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.
Files changed (558) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/README.md +9 -0
  3. package/muhammara.js +1 -1
  4. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/CHANGELOG.md +40 -0
  5. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/LICENSE +0 -0
  6. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/README.md +128 -76
  7. package/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp +4 -0
  8. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/bin/node-pre-gyp.cmd +0 -0
  9. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/contributing.md +0 -0
  10. package/node_modules/@mapbox/node-pre-gyp/lib/build.js +51 -0
  11. package/node_modules/@mapbox/node-pre-gyp/lib/clean.js +31 -0
  12. package/node_modules/@mapbox/node-pre-gyp/lib/configure.js +52 -0
  13. package/node_modules/@mapbox/node-pre-gyp/lib/info.js +38 -0
  14. package/node_modules/@mapbox/node-pre-gyp/lib/install.js +235 -0
  15. package/node_modules/{node-pre-gyp/bin/node-pre-gyp → @mapbox/node-pre-gyp/lib/main.js} +29 -38
  16. package/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js +309 -0
  17. package/node_modules/@mapbox/node-pre-gyp/lib/package.js +73 -0
  18. package/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js +34 -0
  19. package/node_modules/@mapbox/node-pre-gyp/lib/publish.js +81 -0
  20. package/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js +20 -0
  21. package/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js +19 -0
  22. package/node_modules/@mapbox/node-pre-gyp/lib/reveal.js +32 -0
  23. package/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js +79 -0
  24. package/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js +53 -0
  25. package/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js +41 -0
  26. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/abi_crosswalk.json +264 -0
  27. package/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js +93 -0
  28. package/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js +102 -0
  29. package/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js +205 -0
  30. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/nw-pre-gyp/index.html +0 -0
  31. package/node_modules/{node-pre-gyp → @mapbox/node-pre-gyp}/lib/util/nw-pre-gyp/package.json +0 -0
  32. package/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js +163 -0
  33. package/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +335 -0
  34. package/node_modules/@mapbox/node-pre-gyp/package.json +98 -0
  35. package/node_modules/agent-base/README.md +145 -0
  36. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  37. package/node_modules/agent-base/dist/src/index.js +203 -0
  38. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  39. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  40. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  41. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  42. package/node_modules/agent-base/package.json +94 -0
  43. package/node_modules/agent-base/src/index.ts +345 -0
  44. package/node_modules/agent-base/src/promisify.ts +33 -0
  45. package/node_modules/ansi-regex/index.d.ts +37 -0
  46. package/node_modules/ansi-regex/index.js +8 -2
  47. package/node_modules/ansi-regex/license +4 -16
  48. package/node_modules/ansi-regex/package.json +19 -39
  49. package/node_modules/ansi-regex/readme.md +48 -9
  50. package/node_modules/aproba/CHANGELOG.md +4 -0
  51. package/node_modules/aproba/index.js +33 -33
  52. package/node_modules/aproba/package.json +14 -13
  53. package/node_modules/are-we-there-yet/LICENSE.md +18 -0
  54. package/node_modules/are-we-there-yet/README.md +16 -3
  55. package/node_modules/are-we-there-yet/{index.js → lib/index.js} +0 -0
  56. package/node_modules/are-we-there-yet/{tracker-base.js → lib/tracker-base.js} +0 -0
  57. package/node_modules/are-we-there-yet/{tracker-group.js → lib/tracker-group.js} +14 -5
  58. package/node_modules/are-we-there-yet/{tracker-stream.js → lib/tracker-stream.js} +0 -0
  59. package/node_modules/are-we-there-yet/{tracker.js → lib/tracker.js} +3 -1
  60. package/node_modules/are-we-there-yet/package.json +43 -26
  61. package/node_modules/chownr/package.json +13 -10
  62. package/node_modules/{ignore-walk → color-support}/LICENSE +0 -0
  63. package/node_modules/color-support/README.md +129 -0
  64. package/node_modules/color-support/bin.js +3 -0
  65. package/node_modules/color-support/browser.js +14 -0
  66. package/node_modules/color-support/index.js +134 -0
  67. package/node_modules/color-support/package.json +71 -0
  68. package/node_modules/console-control-strings/package.json +5 -5
  69. package/node_modules/debug/LICENSE +10 -9
  70. package/node_modules/debug/README.md +42 -1
  71. package/node_modules/debug/package.json +44 -32
  72. package/node_modules/debug/src/browser.js +195 -106
  73. package/node_modules/debug/src/common.js +265 -240
  74. package/node_modules/debug/src/index.js +3 -5
  75. package/node_modules/debug/src/node.js +171 -85
  76. package/node_modules/detect-libc/package.json +2 -2
  77. package/node_modules/{iconv-lite/LICENSE → emoji-regex/LICENSE-MIT.txt} +1 -2
  78. package/node_modules/emoji-regex/README.md +73 -0
  79. package/node_modules/emoji-regex/es2015/index.js +6 -0
  80. package/node_modules/emoji-regex/es2015/text.js +6 -0
  81. package/node_modules/emoji-regex/index.d.ts +23 -0
  82. package/node_modules/emoji-regex/index.js +6 -0
  83. package/node_modules/emoji-regex/package.json +77 -0
  84. package/node_modules/emoji-regex/text.js +6 -0
  85. package/node_modules/fs-minipass/index.js +69 -34
  86. package/node_modules/fs-minipass/package.json +14 -11
  87. package/node_modules/gauge/LICENSE.md +20 -0
  88. package/node_modules/gauge/README.md +19 -16
  89. package/node_modules/gauge/{base-theme.js → lib/base-theme.js} +7 -3
  90. package/node_modules/gauge/lib/demo.js +45 -0
  91. package/node_modules/gauge/{error.js → lib/error.js} +0 -0
  92. package/node_modules/gauge/lib/has-color.js +4 -0
  93. package/node_modules/gauge/{index.js → lib/index.js} +90 -33
  94. package/node_modules/gauge/{plumbing.js → lib/plumbing.js} +3 -1
  95. package/node_modules/gauge/{process.js → lib/process.js} +0 -0
  96. package/node_modules/gauge/{progress-bar.js → lib/progress-bar.js} +12 -6
  97. package/node_modules/gauge/{render-template.js → lib/render-template.js} +69 -28
  98. package/node_modules/gauge/{set-immediate.js → lib/set-immediate.js} +0 -0
  99. package/node_modules/gauge/{set-interval.js → lib/set-interval.js} +0 -0
  100. package/node_modules/gauge/{spin.js → lib/spin.js} +0 -0
  101. package/node_modules/gauge/{template-item.js → lib/template-item.js} +21 -7
  102. package/node_modules/gauge/{theme-set.js → lib/theme-set.js} +31 -24
  103. package/node_modules/gauge/lib/themes.js +56 -0
  104. package/node_modules/gauge/{wide-truncate.js → lib/wide-truncate.js} +9 -3
  105. package/node_modules/gauge/package.json +47 -49
  106. package/node_modules/glob/README.md +3 -0
  107. package/node_modules/glob/common.js +2 -0
  108. package/node_modules/glob/glob.js +4 -5
  109. package/node_modules/glob/package.json +6 -5
  110. package/node_modules/glob/sync.js +4 -5
  111. package/node_modules/has-unicode/package.json +5 -5
  112. package/node_modules/https-proxy-agent/README.md +137 -0
  113. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  114. package/node_modules/https-proxy-agent/dist/agent.js +180 -0
  115. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  116. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  117. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  118. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  119. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  120. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  121. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  122. package/node_modules/https-proxy-agent/package.json +86 -0
  123. package/node_modules/inherits/package.json +5 -5
  124. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  125. package/node_modules/is-fullwidth-code-point/index.js +40 -36
  126. package/node_modules/is-fullwidth-code-point/license +4 -16
  127. package/node_modules/is-fullwidth-code-point/package.json +17 -20
  128. package/node_modules/is-fullwidth-code-point/readme.md +8 -8
  129. package/node_modules/{ini → lru-cache}/LICENSE +0 -0
  130. package/node_modules/lru-cache/README.md +166 -0
  131. package/node_modules/lru-cache/index.js +334 -0
  132. package/node_modules/lru-cache/package.json +69 -0
  133. package/node_modules/make-dir/index.d.ts +66 -0
  134. package/node_modules/make-dir/index.js +156 -0
  135. package/node_modules/make-dir/license +9 -0
  136. package/node_modules/make-dir/node_modules/semver/CHANGELOG.md +70 -0
  137. package/node_modules/{npm-packlist → make-dir/node_modules/semver}/LICENSE +0 -0
  138. package/node_modules/make-dir/node_modules/semver/README.md +443 -0
  139. package/node_modules/{semver/bin/semver → make-dir/node_modules/semver/bin/semver.js} +16 -2
  140. package/node_modules/make-dir/node_modules/semver/package.json +60 -0
  141. package/node_modules/make-dir/node_modules/semver/range.bnf +16 -0
  142. package/node_modules/{semver → make-dir/node_modules/semver}/semver.js +249 -136
  143. package/node_modules/make-dir/package.json +91 -0
  144. package/node_modules/make-dir/readme.md +125 -0
  145. package/node_modules/minimatch/package.json +1 -2
  146. package/node_modules/minipass/README.md +52 -45
  147. package/node_modules/minipass/index.js +56 -38
  148. package/node_modules/minipass/package.json +16 -14
  149. package/node_modules/minizlib/README.md +7 -0
  150. package/node_modules/minizlib/index.js +31 -3
  151. package/node_modules/minizlib/package.json +16 -12
  152. package/node_modules/mkdirp/CHANGELOG.md +15 -0
  153. package/node_modules/mkdirp/LICENSE +2 -2
  154. package/node_modules/mkdirp/bin/cmd.js +64 -29
  155. package/node_modules/mkdirp/index.js +24 -92
  156. package/node_modules/mkdirp/lib/find-made.js +29 -0
  157. package/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
  158. package/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
  159. package/node_modules/mkdirp/lib/opts-arg.js +23 -0
  160. package/node_modules/mkdirp/lib/path-arg.js +29 -0
  161. package/node_modules/mkdirp/lib/use-native.js +10 -0
  162. package/node_modules/mkdirp/package.json +35 -30
  163. package/node_modules/mkdirp/readme.markdown +201 -35
  164. package/node_modules/ms/index.js +1 -1
  165. package/node_modules/ms/license.md +1 -1
  166. package/node_modules/ms/package.json +16 -17
  167. package/node_modules/ms/readme.md +2 -1
  168. package/node_modules/{safer-buffer/LICENSE → node-fetch/LICENSE.md} +3 -2
  169. package/node_modules/node-fetch/README.md +590 -0
  170. package/node_modules/node-fetch/browser.js +25 -0
  171. package/node_modules/node-fetch/lib/index.es.js +1662 -0
  172. package/node_modules/node-fetch/lib/index.js +1671 -0
  173. package/node_modules/node-fetch/lib/index.mjs +1660 -0
  174. package/node_modules/node-fetch/package.json +95 -0
  175. package/node_modules/nopt/lib/nopt.js +2 -2
  176. package/node_modules/nopt/package.json +16 -14
  177. package/node_modules/npmlog/LICENSE.md +20 -0
  178. package/node_modules/npmlog/{log.js → lib/log.js} +148 -54
  179. package/node_modules/npmlog/package.json +40 -24
  180. package/node_modules/readable-stream/README.md +61 -13
  181. package/node_modules/readable-stream/errors-browser.js +127 -0
  182. package/node_modules/readable-stream/errors.js +116 -0
  183. package/node_modules/readable-stream/experimentalWarning.js +17 -0
  184. package/node_modules/readable-stream/lib/_stream_duplex.js +52 -44
  185. package/node_modules/readable-stream/lib/_stream_passthrough.js +1 -9
  186. package/node_modules/readable-stream/lib/_stream_readable.js +446 -341
  187. package/node_modules/readable-stream/lib/_stream_transform.js +29 -42
  188. package/node_modules/readable-stream/lib/_stream_writable.js +200 -190
  189. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
  190. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
  191. package/node_modules/readable-stream/lib/internal/streams/destroy.js +48 -17
  192. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
  193. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  194. package/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
  195. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
  196. package/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
  197. package/node_modules/readable-stream/package.json +43 -27
  198. package/node_modules/readable-stream/readable-browser.js +2 -0
  199. package/node_modules/readable-stream/readable.js +5 -8
  200. package/node_modules/rimraf/CHANGELOG.md +65 -0
  201. package/node_modules/rimraf/bin.js +41 -23
  202. package/node_modules/rimraf/package.json +16 -13
  203. package/node_modules/rimraf/rimraf.js +67 -79
  204. package/node_modules/safe-buffer/index.js +3 -0
  205. package/node_modules/safe-buffer/package.json +28 -17
  206. package/node_modules/semver/CHANGELOG.md +72 -0
  207. package/node_modules/semver/README.md +180 -26
  208. package/node_modules/semver/bin/semver.js +173 -0
  209. package/node_modules/semver/classes/comparator.js +135 -0
  210. package/node_modules/semver/classes/index.js +5 -0
  211. package/node_modules/semver/classes/range.js +510 -0
  212. package/node_modules/semver/classes/semver.js +287 -0
  213. package/node_modules/semver/functions/clean.js +6 -0
  214. package/node_modules/semver/functions/cmp.js +48 -0
  215. package/node_modules/semver/functions/coerce.js +51 -0
  216. package/node_modules/semver/functions/compare-build.js +7 -0
  217. package/node_modules/semver/functions/compare-loose.js +3 -0
  218. package/node_modules/semver/functions/compare.js +5 -0
  219. package/node_modules/semver/functions/diff.js +23 -0
  220. package/node_modules/semver/functions/eq.js +3 -0
  221. package/node_modules/semver/functions/gt.js +3 -0
  222. package/node_modules/semver/functions/gte.js +3 -0
  223. package/node_modules/semver/functions/inc.js +15 -0
  224. package/node_modules/semver/functions/lt.js +3 -0
  225. package/node_modules/semver/functions/lte.js +3 -0
  226. package/node_modules/semver/functions/major.js +3 -0
  227. package/node_modules/semver/functions/minor.js +3 -0
  228. package/node_modules/semver/functions/neq.js +3 -0
  229. package/node_modules/semver/functions/parse.js +33 -0
  230. package/node_modules/semver/functions/patch.js +3 -0
  231. package/node_modules/semver/functions/prerelease.js +6 -0
  232. package/node_modules/semver/functions/rcompare.js +3 -0
  233. package/node_modules/semver/functions/rsort.js +3 -0
  234. package/node_modules/semver/functions/satisfies.js +10 -0
  235. package/node_modules/semver/functions/sort.js +3 -0
  236. package/node_modules/semver/functions/valid.js +6 -0
  237. package/node_modules/semver/index.js +48 -0
  238. package/node_modules/semver/internal/constants.js +17 -0
  239. package/node_modules/semver/internal/debug.js +9 -0
  240. package/node_modules/semver/internal/identifiers.js +23 -0
  241. package/node_modules/semver/internal/parse-options.js +11 -0
  242. package/node_modules/semver/internal/re.js +182 -0
  243. package/node_modules/semver/package.json +32 -20
  244. package/node_modules/semver/preload.js +2 -0
  245. package/node_modules/semver/ranges/gtr.js +4 -0
  246. package/node_modules/semver/ranges/intersects.js +7 -0
  247. package/node_modules/semver/ranges/ltr.js +4 -0
  248. package/node_modules/semver/ranges/max-satisfying.js +25 -0
  249. package/node_modules/semver/ranges/min-satisfying.js +24 -0
  250. package/node_modules/semver/ranges/min-version.js +60 -0
  251. package/node_modules/semver/ranges/outside.js +80 -0
  252. package/node_modules/semver/ranges/simplify.js +44 -0
  253. package/node_modules/semver/ranges/subset.js +222 -0
  254. package/node_modules/semver/ranges/to-comparators.js +8 -0
  255. package/node_modules/semver/ranges/valid.js +11 -0
  256. package/node_modules/set-blocking/package.json +5 -5
  257. package/node_modules/signal-exit/README.md +1 -1
  258. package/node_modules/signal-exit/index.js +167 -130
  259. package/node_modules/signal-exit/package.json +14 -14
  260. package/node_modules/string-width/index.d.ts +29 -0
  261. package/node_modules/string-width/index.js +29 -19
  262. package/node_modules/string-width/license +4 -16
  263. package/node_modules/string-width/package.json +20 -20
  264. package/node_modules/string-width/readme.md +17 -9
  265. package/node_modules/string_decoder/package.json +14 -11
  266. package/node_modules/strip-ansi/index.d.ts +17 -0
  267. package/node_modules/strip-ansi/index.js +2 -4
  268. package/node_modules/strip-ansi/license +4 -16
  269. package/node_modules/strip-ansi/package.json +19 -34
  270. package/node_modules/strip-ansi/readme.md +20 -7
  271. package/node_modules/tar/README.md +145 -57
  272. package/node_modules/tar/lib/create.js +9 -10
  273. package/node_modules/tar/lib/extract.js +11 -16
  274. package/node_modules/tar/lib/get-write-flag.js +20 -0
  275. package/node_modules/tar/lib/header.js +13 -14
  276. package/node_modules/tar/lib/high-level-opt.js +3 -3
  277. package/node_modules/tar/lib/large-numbers.js +19 -17
  278. package/node_modules/tar/lib/list.js +16 -14
  279. package/node_modules/tar/lib/mkdir.js +60 -53
  280. package/node_modules/tar/lib/mode-fix.js +10 -1
  281. package/node_modules/tar/lib/normalize-unicode.js +11 -0
  282. package/node_modules/tar/lib/normalize-windows-path.js +8 -0
  283. package/node_modules/tar/lib/pack.js +26 -33
  284. package/node_modules/tar/lib/parse.js +115 -62
  285. package/node_modules/tar/lib/path-reservations.js +148 -0
  286. package/node_modules/tar/lib/pax.js +5 -8
  287. package/node_modules/tar/lib/read-entry.js +9 -7
  288. package/node_modules/tar/lib/replace.js +20 -17
  289. package/node_modules/tar/lib/strip-absolute-path.js +24 -0
  290. package/node_modules/tar/lib/strip-trailing-slashes.js +13 -0
  291. package/node_modules/tar/lib/types.js +1 -1
  292. package/node_modules/tar/lib/unpack.js +375 -119
  293. package/node_modules/tar/lib/update.js +1 -1
  294. package/node_modules/tar/lib/warn-mixin.js +17 -10
  295. package/node_modules/tar/lib/winchars.js +2 -2
  296. package/node_modules/tar/lib/write-entry.js +199 -96
  297. package/node_modules/tar/package.json +36 -26
  298. package/node_modules/tr46/.npmignore +4 -0
  299. package/node_modules/tr46/index.js +193 -0
  300. package/node_modules/tr46/lib/.gitkeep +0 -0
  301. package/node_modules/tr46/lib/mappingTable.json +1 -0
  302. package/node_modules/tr46/package.json +59 -0
  303. package/node_modules/util-deprecate/package.json +5 -5
  304. package/node_modules/webidl-conversions/LICENSE.md +12 -0
  305. package/node_modules/webidl-conversions/README.md +53 -0
  306. package/node_modules/webidl-conversions/lib/index.js +189 -0
  307. package/node_modules/webidl-conversions/package.json +59 -0
  308. package/node_modules/{code-point-at/license → whatwg-url/LICENSE.txt} +1 -1
  309. package/node_modules/whatwg-url/README.md +67 -0
  310. package/node_modules/whatwg-url/lib/URL-impl.js +200 -0
  311. package/node_modules/whatwg-url/lib/URL.js +196 -0
  312. package/node_modules/whatwg-url/lib/public-api.js +11 -0
  313. package/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
  314. package/node_modules/whatwg-url/lib/utils.js +20 -0
  315. package/node_modules/whatwg-url/package.json +67 -0
  316. package/node_modules/wide-align/LICENSE +0 -0
  317. package/node_modules/wide-align/README.md +0 -0
  318. package/node_modules/wide-align/align.js +0 -0
  319. package/node_modules/wide-align/package.json +15 -16
  320. package/node_modules/yallist/package.json +13 -11
  321. package/node_modules/yallist/yallist.js +3 -3
  322. package/package.json +7 -4
  323. package/src/deps/LibPng/pnglibconf.h +6 -2
  324. package/src/deps/LibTiff/tif_unix.c +4 -0
  325. package/src/deps/ZLib/gzguts.h +4 -0
  326. package/node_modules/are-we-there-yet/CHANGES.md +0 -37
  327. package/node_modules/are-we-there-yet/LICENSE +0 -5
  328. package/node_modules/code-point-at/index.js +0 -32
  329. package/node_modules/code-point-at/package.json +0 -70
  330. package/node_modules/code-point-at/readme.md +0 -32
  331. package/node_modules/core-util-is/LICENSE +0 -19
  332. package/node_modules/core-util-is/README.md +0 -3
  333. package/node_modules/core-util-is/float.patch +0 -604
  334. package/node_modules/core-util-is/lib/util.js +0 -107
  335. package/node_modules/core-util-is/package.json +0 -62
  336. package/node_modules/core-util-is/test.js +0 -68
  337. package/node_modules/debug/CHANGELOG.md +0 -395
  338. package/node_modules/debug/node.js +0 -1
  339. package/node_modules/deep-extend/CHANGELOG.md +0 -46
  340. package/node_modules/deep-extend/LICENSE +0 -20
  341. package/node_modules/deep-extend/README.md +0 -91
  342. package/node_modules/deep-extend/index.js +0 -1
  343. package/node_modules/deep-extend/lib/deep-extend.js +0 -150
  344. package/node_modules/deep-extend/package.json +0 -92
  345. package/node_modules/gauge/CHANGELOG.md +0 -160
  346. package/node_modules/gauge/LICENSE +0 -13
  347. package/node_modules/gauge/has-color.js +0 -12
  348. package/node_modules/gauge/themes.js +0 -54
  349. package/node_modules/glob/changelog.md +0 -67
  350. package/node_modules/iconv-lite/Changelog.md +0 -162
  351. package/node_modules/iconv-lite/README.md +0 -156
  352. package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
  353. package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
  354. package/node_modules/iconv-lite/encodings/index.js +0 -22
  355. package/node_modules/iconv-lite/encodings/internal.js +0 -188
  356. package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  357. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  358. package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
  359. package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  360. package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  361. package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  362. package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  363. package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  364. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  365. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
  366. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  367. package/node_modules/iconv-lite/encodings/utf16.js +0 -177
  368. package/node_modules/iconv-lite/encodings/utf7.js +0 -290
  369. package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  370. package/node_modules/iconv-lite/lib/extend-node.js +0 -217
  371. package/node_modules/iconv-lite/lib/index.d.ts +0 -24
  372. package/node_modules/iconv-lite/lib/index.js +0 -153
  373. package/node_modules/iconv-lite/lib/streams.js +0 -121
  374. package/node_modules/iconv-lite/package.json +0 -76
  375. package/node_modules/ignore-walk/README.md +0 -60
  376. package/node_modules/ignore-walk/index.js +0 -269
  377. package/node_modules/ignore-walk/package.json +0 -77
  378. package/node_modules/ini/README.md +0 -102
  379. package/node_modules/ini/ini.js +0 -206
  380. package/node_modules/ini/package.json +0 -66
  381. package/node_modules/isarray/.npmignore +0 -1
  382. package/node_modules/isarray/.travis.yml +0 -4
  383. package/node_modules/isarray/Makefile +0 -6
  384. package/node_modules/isarray/README.md +0 -60
  385. package/node_modules/isarray/component.json +0 -19
  386. package/node_modules/isarray/index.js +0 -5
  387. package/node_modules/isarray/package.json +0 -73
  388. package/node_modules/isarray/test.js +0 -20
  389. package/node_modules/minimist/.travis.yml +0 -8
  390. package/node_modules/minimist/LICENSE +0 -18
  391. package/node_modules/minimist/example/parse.js +0 -2
  392. package/node_modules/minimist/index.js +0 -245
  393. package/node_modules/minimist/package.json +0 -75
  394. package/node_modules/minimist/readme.markdown +0 -95
  395. package/node_modules/minimist/test/all_bool.js +0 -32
  396. package/node_modules/minimist/test/bool.js +0 -178
  397. package/node_modules/minimist/test/dash.js +0 -31
  398. package/node_modules/minimist/test/default_bool.js +0 -35
  399. package/node_modules/minimist/test/dotted.js +0 -22
  400. package/node_modules/minimist/test/kv_short.js +0 -16
  401. package/node_modules/minimist/test/long.js +0 -31
  402. package/node_modules/minimist/test/num.js +0 -36
  403. package/node_modules/minimist/test/parse.js +0 -197
  404. package/node_modules/minimist/test/parse_modified.js +0 -9
  405. package/node_modules/minimist/test/proto.js +0 -44
  406. package/node_modules/minimist/test/short.js +0 -67
  407. package/node_modules/minimist/test/stop_early.js +0 -15
  408. package/node_modules/minimist/test/unknown.js +0 -102
  409. package/node_modules/minimist/test/whitespace.js +0 -8
  410. package/node_modules/mkdirp/bin/usage.txt +0 -12
  411. package/node_modules/needle/.github/workflows/nodejs.yml +0 -27
  412. package/node_modules/needle/README.md +0 -612
  413. package/node_modules/needle/bin/needle +0 -40
  414. package/node_modules/needle/examples/deflated-stream.js +0 -22
  415. package/node_modules/needle/examples/digest-auth.js +0 -16
  416. package/node_modules/needle/examples/download-to-file.js +0 -18
  417. package/node_modules/needle/examples/multipart-stream.js +0 -25
  418. package/node_modules/needle/examples/parsed-stream.js +0 -23
  419. package/node_modules/needle/examples/parsed-stream2.js +0 -21
  420. package/node_modules/needle/examples/stream-events.js +0 -23
  421. package/node_modules/needle/examples/stream-to-file.js +0 -14
  422. package/node_modules/needle/examples/upload-image.js +0 -51
  423. package/node_modules/needle/lib/auth.js +0 -112
  424. package/node_modules/needle/lib/cookies.js +0 -79
  425. package/node_modules/needle/lib/decoder.js +0 -53
  426. package/node_modules/needle/lib/multipart.js +0 -98
  427. package/node_modules/needle/lib/needle.js +0 -829
  428. package/node_modules/needle/lib/parsers.js +0 -120
  429. package/node_modules/needle/lib/querystring.js +0 -49
  430. package/node_modules/needle/license.txt +0 -19
  431. package/node_modules/needle/package.json +0 -102
  432. package/node_modules/needle/test/auth_digest_spec.js +0 -192
  433. package/node_modules/needle/test/basic_auth_spec.js +0 -196
  434. package/node_modules/needle/test/compression_spec.js +0 -112
  435. package/node_modules/needle/test/cookies_spec.js +0 -396
  436. package/node_modules/needle/test/decoder_spec.js +0 -121
  437. package/node_modules/needle/test/errors_spec.js +0 -286
  438. package/node_modules/needle/test/headers_spec.js +0 -203
  439. package/node_modules/needle/test/helpers.js +0 -72
  440. package/node_modules/needle/test/long_string_spec.js +0 -34
  441. package/node_modules/needle/test/output_spec.js +0 -254
  442. package/node_modules/needle/test/parsing_spec.js +0 -494
  443. package/node_modules/needle/test/post_data_spec.js +0 -1021
  444. package/node_modules/needle/test/proxy_spec.js +0 -202
  445. package/node_modules/needle/test/querystring_spec.js +0 -128
  446. package/node_modules/needle/test/redirect_spec.js +0 -394
  447. package/node_modules/needle/test/redirect_with_timeout.js +0 -45
  448. package/node_modules/needle/test/request_stream_spec.js +0 -236
  449. package/node_modules/needle/test/response_stream_spec.js +0 -138
  450. package/node_modules/needle/test/socket_pool_spec.js +0 -67
  451. package/node_modules/needle/test/uri_modifier_spec.js +0 -46
  452. package/node_modules/needle/test/url_spec.js +0 -155
  453. package/node_modules/needle/test/utils/formidable.js +0 -17
  454. package/node_modules/needle/test/utils/proxy.js +0 -62
  455. package/node_modules/needle/test/utils/test.js +0 -104
  456. package/node_modules/node-pre-gyp/lib/build.js +0 -51
  457. package/node_modules/node-pre-gyp/lib/clean.js +0 -32
  458. package/node_modules/node-pre-gyp/lib/configure.js +0 -52
  459. package/node_modules/node-pre-gyp/lib/info.js +0 -40
  460. package/node_modules/node-pre-gyp/lib/install.js +0 -285
  461. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +0 -203
  462. package/node_modules/node-pre-gyp/lib/package.js +0 -56
  463. package/node_modules/node-pre-gyp/lib/pre-binding.js +0 -30
  464. package/node_modules/node-pre-gyp/lib/publish.js +0 -79
  465. package/node_modules/node-pre-gyp/lib/rebuild.js +0 -21
  466. package/node_modules/node-pre-gyp/lib/reinstall.js +0 -20
  467. package/node_modules/node-pre-gyp/lib/reveal.js +0 -33
  468. package/node_modules/node-pre-gyp/lib/testbinary.js +0 -81
  469. package/node_modules/node-pre-gyp/lib/testpackage.js +0 -55
  470. package/node_modules/node-pre-gyp/lib/unpublish.js +0 -43
  471. package/node_modules/node-pre-gyp/lib/util/compile.js +0 -87
  472. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -103
  473. package/node_modules/node-pre-gyp/lib/util/napi.js +0 -205
  474. package/node_modules/node-pre-gyp/lib/util/s3_setup.js +0 -27
  475. package/node_modules/node-pre-gyp/lib/util/versioning.js +0 -331
  476. package/node_modules/node-pre-gyp/package.json +0 -86
  477. package/node_modules/npm-bundled/LICENSE +0 -15
  478. package/node_modules/npm-bundled/README.md +0 -48
  479. package/node_modules/npm-bundled/index.js +0 -251
  480. package/node_modules/npm-bundled/package.json +0 -63
  481. package/node_modules/npm-normalize-package-bin/.github/settings.yml +0 -2
  482. package/node_modules/npm-normalize-package-bin/.npmignore +0 -24
  483. package/node_modules/npm-normalize-package-bin/LICENSE +0 -15
  484. package/node_modules/npm-normalize-package-bin/README.md +0 -14
  485. package/node_modules/npm-normalize-package-bin/index.js +0 -60
  486. package/node_modules/npm-normalize-package-bin/package-lock.json +0 -3529
  487. package/node_modules/npm-normalize-package-bin/package.json +0 -58
  488. package/node_modules/npm-normalize-package-bin/test/array.js +0 -37
  489. package/node_modules/npm-normalize-package-bin/test/nobin.js +0 -35
  490. package/node_modules/npm-normalize-package-bin/test/object.js +0 -141
  491. package/node_modules/npm-normalize-package-bin/test/string.js +0 -37
  492. package/node_modules/npm-packlist/README.md +0 -68
  493. package/node_modules/npm-packlist/index.js +0 -289
  494. package/node_modules/npm-packlist/package.json +0 -74
  495. package/node_modules/npmlog/CHANGELOG.md +0 -49
  496. package/node_modules/npmlog/LICENSE +0 -15
  497. package/node_modules/number-is-nan/index.js +0 -4
  498. package/node_modules/number-is-nan/license +0 -21
  499. package/node_modules/number-is-nan/package.json +0 -67
  500. package/node_modules/number-is-nan/readme.md +0 -28
  501. package/node_modules/object-assign/index.js +0 -90
  502. package/node_modules/object-assign/license +0 -21
  503. package/node_modules/object-assign/package.json +0 -74
  504. package/node_modules/object-assign/readme.md +0 -61
  505. package/node_modules/os-homedir/index.js +0 -24
  506. package/node_modules/os-homedir/license +0 -21
  507. package/node_modules/os-homedir/package.json +0 -73
  508. package/node_modules/os-homedir/readme.md +0 -31
  509. package/node_modules/os-tmpdir/index.js +0 -25
  510. package/node_modules/os-tmpdir/license +0 -21
  511. package/node_modules/os-tmpdir/package.json +0 -73
  512. package/node_modules/os-tmpdir/readme.md +0 -32
  513. package/node_modules/osenv/LICENSE +0 -15
  514. package/node_modules/osenv/README.md +0 -63
  515. package/node_modules/osenv/osenv.js +0 -72
  516. package/node_modules/osenv/package.json +0 -73
  517. package/node_modules/process-nextick-args/index.js +0 -45
  518. package/node_modules/process-nextick-args/license.md +0 -19
  519. package/node_modules/process-nextick-args/package.json +0 -50
  520. package/node_modules/process-nextick-args/readme.md +0 -18
  521. package/node_modules/rc/LICENSE.APACHE2 +0 -15
  522. package/node_modules/rc/LICENSE.BSD +0 -26
  523. package/node_modules/rc/LICENSE.MIT +0 -24
  524. package/node_modules/rc/README.md +0 -227
  525. package/node_modules/rc/browser.js +0 -7
  526. package/node_modules/rc/cli.js +0 -4
  527. package/node_modules/rc/index.js +0 -53
  528. package/node_modules/rc/lib/utils.js +0 -104
  529. package/node_modules/rc/package.json +0 -64
  530. package/node_modules/rc/test/ini.js +0 -16
  531. package/node_modules/rc/test/nested-env-vars.js +0 -50
  532. package/node_modules/rc/test/test.js +0 -59
  533. package/node_modules/readable-stream/.travis.yml +0 -34
  534. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  535. package/node_modules/readable-stream/duplex-browser.js +0 -1
  536. package/node_modules/readable-stream/duplex.js +0 -1
  537. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  538. package/node_modules/readable-stream/passthrough.js +0 -1
  539. package/node_modules/readable-stream/transform.js +0 -1
  540. package/node_modules/readable-stream/writable-browser.js +0 -1
  541. package/node_modules/readable-stream/writable.js +0 -8
  542. package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  543. package/node_modules/safer-buffer/Readme.md +0 -156
  544. package/node_modules/safer-buffer/dangerous.js +0 -58
  545. package/node_modules/safer-buffer/package.json +0 -60
  546. package/node_modules/safer-buffer/safer.js +0 -77
  547. package/node_modules/safer-buffer/tests.js +0 -406
  548. package/node_modules/sax/LICENSE +0 -41
  549. package/node_modules/sax/README.md +0 -225
  550. package/node_modules/sax/lib/sax.js +0 -1565
  551. package/node_modules/sax/package.json +0 -61
  552. package/node_modules/signal-exit/CHANGELOG.md +0 -35
  553. package/node_modules/string_decoder/.travis.yml +0 -50
  554. package/node_modules/strip-json-comments/index.js +0 -70
  555. package/node_modules/strip-json-comments/license +0 -21
  556. package/node_modules/strip-json-comments/package.json +0 -75
  557. package/node_modules/strip-json-comments/readme.md +0 -64
  558. 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.8.0...HEAD
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
@@ -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
  [![Build Status](https://travis-ci.com/mapbox/node-pre-gyp.svg?branch=master)](https://travis-ci.com/mapbox/node-pre-gyp)
6
6
  [![Build status](https://ci.appveyor.com/api/projects/status/3nxewb425y83c0gv)](https://ci.appveyor.com/project/Mapbox/node-pre-gyp)
7
7
 
8
- `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.
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 v6.x
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 `node-pre-gyp` to `dependencies`
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": "0.6.x"
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 `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 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 `node-pre-gyp`. More history on this at https://github.com/strongloop/fsevents/issues/157#issuecomment-265545908.
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 has two optional properties
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
- ## N-API Considerations
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
- [N-API](https://nodejs.org/api/n-api.html#n_api_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. N-API is Node runtime engine agnostic and guarantees modules created today will continue to run, without changes, into the future.
336
+ ## Node-API Considerations
285
337
 
286
- Using `node-pre-gyp` with N-API projects requires a handful of additional configuration values and imposes some additional requirements.
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
- The most significant difference is that an N-API module can be coded to target multiple N-API versions. Therefore, an N-API module must declare in its `package.json` file which N-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.
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
- An N-API modules must declare in its `package.json` file, the N-API versions the module is intended to support. This is accomplished by including an `napi-versions` array property in the `binary` object. For example:
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 N-API module build.
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 N-API versions in the array. In the example above, two operations are initiated, one for N-API version 1 and second for N-API version 3. How this version number is communicated is described next.
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 N-API module operations `node-pre-gyp` initiates, it ensures that the `napi_build_version` is set appropriately.
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 N-API version it should compile.
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 prefered because it used by the N-API C/C++ headers to configure the specific N-API veriosn being requested.
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 N-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.)
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 N-API and NAN builds
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 N-API, as you add N-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.
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 N-API binaries supported by the current Node instance. If the current Node instance does not support N-API, `node-pre-gyp` will request a traditional, non-N-API build.
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 N-API builds, the string contains the N-API version nad has values like `napi-v3`. For traditional, non-N-API builds, the string contains the ABI version with values like `node-v46`.
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 N-API and NAN builds:
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 N-API and non-N-API builds. The value of `NAPI_VERSION` is set to the integer N-API version for N-API builds and is set to `0` for non-N-API builds.
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
- // N-API code goes here
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 N-API is supported by the currently executing Node instance, this value is the N-API version number supported by Node. If N-API is not supported, this value is an empty string.
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
- "Version": "2012-10-17",
407
- "Statement": [
408
- {
409
- "Sid": "Stmt1394587197000",
410
- "Effect": "Allow",
411
- "Action": [
412
- "s3:DeleteObject",
413
- "s3:GetObject",
414
- "s3:GetObjectAcl",
415
- "s3:ListBucket",
416
- "s3:PutObject",
417
- "s3:PutObjectAcl"
418
- ],
419
- "Resource": [
420
- "arn:aws:s3:::node-pre-gyp-tests/*"
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
- There are several ways to do this.
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
- You can use any of the methods described at http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html.
504
+ - AWS_ACCESS_KEY_ID
505
+ - AWS_SECRET_ACCESS_KEY
442
506
 
443
- Or you can create a `~/.node_pre_gyprc`
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
- node_pre_gyp_accessKeyId:
553
+ AWS_ACCESS_KEY_ID:
508
554
  secure: Dn9HKdLNYvDgPdQOzRq/DqZ/MPhjknRHB1o+/lVU8MA=
509
- node_pre_gyp_secretAccessKey:
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 node_pre_gyp_accessKeyId=${node_pre_gyp_accessKeyId}
556
- travis encrypt node_pre_gyp_secretAccessKey=${node_pre_gyp_secretAccessKey}
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
+ ```
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ require('../lib/main');
@@ -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
+ }