@emulsify/cli 1.5.0 → 1.7.1

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 (344) hide show
  1. package/README.md +89 -1
  2. package/dist/handlers/componentInstall.js +9 -5
  3. package/dist/handlers/componentList.js +1 -1
  4. package/dist/handlers/init.js +1 -1
  5. package/dist/handlers/systemInstall.js +27 -11
  6. package/dist/index.js +13 -21
  7. package/dist/node_modules/.package-lock.json +34 -43
  8. package/dist/node_modules/@types/node/LICENSE +0 -0
  9. package/dist/node_modules/@types/node/README.md +3 -3
  10. package/dist/node_modules/@types/node/assert.d.ts +33 -31
  11. package/dist/node_modules/@types/node/async_hooks.d.ts +29 -21
  12. package/dist/node_modules/@types/node/buffer.d.ts +67 -3
  13. package/dist/node_modules/@types/node/child_process.d.ts +230 -62
  14. package/dist/node_modules/@types/node/cluster.d.ts +62 -27
  15. package/dist/node_modules/@types/node/console.d.ts +6 -6
  16. package/dist/node_modules/@types/node/constants.d.ts +12 -11
  17. package/dist/node_modules/@types/node/crypto.d.ts +338 -240
  18. package/dist/node_modules/@types/node/dgram.d.ts +50 -14
  19. package/dist/node_modules/@types/node/dns.d.ts +183 -54
  20. package/dist/node_modules/@types/node/domain.d.ts +4 -4
  21. package/dist/node_modules/@types/node/events.d.ts +4 -4
  22. package/dist/node_modules/@types/node/fs/promises.d.ts +105 -39
  23. package/dist/node_modules/@types/node/fs.d.ts +440 -126
  24. package/dist/node_modules/@types/node/globals.d.ts +176 -24
  25. package/dist/node_modules/@types/node/globals.global.d.ts +0 -0
  26. package/dist/node_modules/@types/node/http.d.ts +309 -218
  27. package/dist/node_modules/@types/node/http2.d.ts +345 -98
  28. package/dist/node_modules/@types/node/https.d.ts +250 -118
  29. package/dist/node_modules/@types/node/index.d.ts +1 -2
  30. package/dist/node_modules/@types/node/inspector.d.ts +2 -3
  31. package/dist/node_modules/@types/node/module.d.ts +4 -4
  32. package/dist/node_modules/@types/node/net.d.ts +42 -14
  33. package/dist/node_modules/@types/node/os.d.ts +5 -4
  34. package/dist/node_modules/@types/node/package.json +10 -8
  35. package/dist/node_modules/@types/node/path.d.ts +35 -24
  36. package/dist/node_modules/@types/node/perf_hooks.d.ts +5 -5
  37. package/dist/node_modules/@types/node/process.d.ts +62 -23
  38. package/dist/node_modules/@types/node/punycode.d.ts +3 -3
  39. package/dist/node_modules/@types/node/querystring.d.ts +15 -5
  40. package/dist/node_modules/@types/node/readline.d.ts +16 -6
  41. package/dist/node_modules/@types/node/repl.d.ts +13 -7
  42. package/dist/node_modules/@types/node/stream.d.ts +190 -31
  43. package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
  44. package/dist/node_modules/@types/node/timers.d.ts +6 -6
  45. package/dist/node_modules/@types/node/tls.d.ts +113 -30
  46. package/dist/node_modules/@types/node/trace_events.d.ts +3 -3
  47. package/dist/node_modules/@types/node/ts4.8/assert.d.ts +130 -0
  48. package/dist/node_modules/@types/node/ts4.8/async_hooks.d.ts +237 -0
  49. package/dist/node_modules/@types/node/ts4.8/buffer.d.ts +89 -0
  50. package/dist/node_modules/@types/node/ts4.8/child_process.d.ts +682 -0
  51. package/dist/node_modules/@types/node/ts4.8/cluster.d.ts +300 -0
  52. package/dist/node_modules/@types/node/ts4.8/console.d.ts +142 -0
  53. package/dist/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
  54. package/dist/node_modules/@types/node/ts4.8/crypto.d.ts +1287 -0
  55. package/dist/node_modules/@types/node/ts4.8/dgram.d.ts +180 -0
  56. package/dist/node_modules/@types/node/ts4.8/dns.d.ts +516 -0
  57. package/dist/node_modules/@types/node/ts4.8/domain.d.ts +27 -0
  58. package/dist/node_modules/@types/node/ts4.8/events.d.ts +82 -0
  59. package/dist/node_modules/@types/node/ts4.8/fs/promises.d.ts +634 -0
  60. package/dist/node_modules/@types/node/ts4.8/fs.d.ts +2587 -0
  61. package/dist/node_modules/@types/node/ts4.8/globals.d.ts +763 -0
  62. package/dist/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  63. package/dist/node_modules/@types/node/ts4.8/http.d.ts +580 -0
  64. package/dist/node_modules/@types/node/ts4.8/http2.d.ts +1208 -0
  65. package/dist/node_modules/@types/node/ts4.8/https.d.ts +274 -0
  66. package/dist/node_modules/@types/node/ts4.8/index.d.ts +53 -0
  67. package/dist/node_modules/@types/node/ts4.8/inspector.d.ts +3050 -0
  68. package/dist/node_modules/@types/node/ts4.8/module.d.ts +56 -0
  69. package/dist/node_modules/@types/node/ts4.8/net.d.ts +324 -0
  70. package/dist/node_modules/@types/node/ts4.8/os.d.ts +243 -0
  71. package/dist/node_modules/@types/node/ts4.8/path.d.ts +168 -0
  72. package/dist/node_modules/@types/node/ts4.8/perf_hooks.d.ts +274 -0
  73. package/dist/node_modules/@types/node/ts4.8/process.d.ts +452 -0
  74. package/dist/node_modules/@types/node/ts4.8/punycode.d.ts +78 -0
  75. package/dist/node_modules/@types/node/ts4.8/querystring.d.ts +41 -0
  76. package/dist/node_modules/@types/node/ts4.8/readline.d.ts +184 -0
  77. package/dist/node_modules/@types/node/ts4.8/repl.d.ts +404 -0
  78. package/dist/node_modules/@types/node/ts4.8/stream.d.ts +518 -0
  79. package/dist/node_modules/@types/node/ts4.8/string_decoder.d.ts +10 -0
  80. package/dist/node_modules/@types/node/ts4.8/timers.d.ts +19 -0
  81. package/dist/node_modules/@types/node/ts4.8/tls.d.ts +866 -0
  82. package/dist/node_modules/@types/node/ts4.8/trace_events.d.ts +64 -0
  83. package/dist/node_modules/@types/node/ts4.8/tty.d.ts +69 -0
  84. package/dist/node_modules/@types/node/ts4.8/url.d.ts +187 -0
  85. package/dist/node_modules/@types/node/ts4.8/util.d.ts +278 -0
  86. package/dist/node_modules/@types/node/ts4.8/v8.d.ts +189 -0
  87. package/dist/node_modules/@types/node/ts4.8/vm.d.ts +155 -0
  88. package/dist/node_modules/@types/node/ts4.8/wasi.d.ts +88 -0
  89. package/dist/node_modules/@types/node/ts4.8/worker_threads.d.ts +241 -0
  90. package/dist/node_modules/@types/node/ts4.8/zlib.d.ts +364 -0
  91. package/dist/node_modules/@types/node/tty.d.ts +4 -4
  92. package/dist/node_modules/@types/node/url.d.ts +75 -7
  93. package/dist/node_modules/@types/node/util.d.ts +103 -41
  94. package/dist/node_modules/@types/node/v8.d.ts +4 -5
  95. package/dist/node_modules/@types/node/vm.d.ts +7 -7
  96. package/dist/node_modules/@types/node/wasi.d.ts +3 -4
  97. package/dist/node_modules/@types/node/worker_threads.d.ts +8 -8
  98. package/dist/node_modules/@types/node/zlib.d.ts +13 -13
  99. package/dist/node_modules/@types/progress/LICENSE +0 -0
  100. package/dist/node_modules/@types/progress/README.md +2 -3
  101. package/dist/node_modules/@types/progress/index.d.ts +0 -5
  102. package/dist/node_modules/@types/progress/package.json +6 -6
  103. package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +20 -5
  104. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.d.ts +3 -1
  105. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js +7 -1
  106. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js.map +1 -1
  107. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.d.ts +3 -1
  108. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js +7 -1
  109. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js.map +1 -1
  110. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.d.ts +3 -1
  111. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js +7 -1
  112. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js.map +1 -1
  113. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.d.ts +6 -5
  114. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +9 -1
  115. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
  116. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.d.ts +2 -2
  117. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
  118. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.d.ts +5 -5
  119. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js +1 -1
  120. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
  121. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js +1 -1
  122. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js.map +1 -1
  123. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.d.ts +1 -1
  124. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +9 -10
  125. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
  126. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
  127. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
  128. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js +19 -8
  129. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
  130. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/types.d.ts +2 -2
  131. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js +6 -6
  132. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js.map +1 -1
  133. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.d.ts +2 -1
  134. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js +3 -3
  135. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
  136. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +6 -6
  137. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +16 -14
  138. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
  139. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.d.ts +2 -2
  140. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.d.ts +2 -2
  141. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js +1 -1
  142. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js.map +1 -1
  143. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
  144. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.d.ts +1 -1
  145. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js +2 -1
  146. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
  147. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
  148. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +12 -2
  149. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
  150. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
  151. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.d.ts +1 -1
  152. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
  153. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.d.ts +7 -5
  154. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +22 -18
  155. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -1
  156. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.d.ts +4 -2
  157. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js +7 -1
  158. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js.map +1 -1
  159. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.d.ts +1 -1
  160. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js +2 -1
  161. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js.map +1 -1
  162. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/re2.d.ts +1 -1
  163. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
  164. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
  165. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +6 -0
  166. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  167. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js +8 -1
  168. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js.map +1 -1
  169. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +25 -19
  170. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/json-schema.d.ts +15 -14
  171. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/jtd-schema.d.ts +31 -25
  172. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +1 -1
  173. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
  174. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +1 -1
  175. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
  176. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +1 -1
  177. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +1 -1
  178. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
  179. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +2 -2
  180. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
  181. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +1 -1
  182. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
  183. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +1 -1
  184. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
  185. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +1 -1
  186. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +1 -1
  187. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
  188. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +1 -1
  189. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
  190. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
  191. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
  192. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +1 -1
  193. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
  194. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js +1 -1
  195. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
  196. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +1 -1
  197. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +10 -3
  198. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
  199. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +1 -1
  200. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -1
  201. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
  202. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -1
  203. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/errors.d.ts +1 -1
  204. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.d.ts +1 -1
  205. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
  206. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +1 -1
  207. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -1
  208. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +1 -1
  209. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +1 -1
  210. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -1
  211. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +1 -1
  212. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +1 -1
  213. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -1
  214. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -1
  215. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +3 -3
  216. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js +8 -5
  217. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -1
  218. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js +3 -2
  219. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -1
  220. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +3 -3
  221. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -1
  222. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +1 -1
  223. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js +10 -7
  224. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -1
  225. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +1 -1
  226. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -1
  227. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +1 -1
  228. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -1
  229. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.d.ts +1 -1
  230. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
  231. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +1 -1
  232. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +1 -1
  233. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js +4 -3
  234. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
  235. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.d.ts +2 -2
  236. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -1
  237. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +3 -3
  238. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
  239. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
  240. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +1 -1
  241. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +1 -1
  242. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.d.ts +1 -1
  243. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
  244. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +1 -1
  245. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2019.ts +4 -1
  246. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2020.ts +4 -1
  247. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/ajv.ts +4 -1
  248. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +8 -0
  249. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/index.ts +25 -5
  250. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +8 -8
  251. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/parse.ts +1 -1
  252. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/serialize.ts +21 -15
  253. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/types.ts +1 -1
  254. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/ref_error.ts +4 -3
  255. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +18 -15
  256. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/rules.ts +1 -1
  257. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/dataType.ts +1 -0
  258. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/index.ts +11 -2
  259. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/core.ts +13 -2
  260. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/jtd.ts +4 -1
  261. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/parseJson.ts +2 -1
  262. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +6 -0
  263. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/standalone/index.ts +9 -2
  264. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +14 -3
  265. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +2 -4
  266. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/jtd-schema.ts +25 -16
  267. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/core/ref.ts +1 -1
  268. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +11 -3
  269. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/properties.ts +13 -6
  270. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/ref.ts +3 -1
  271. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/values.ts +10 -7
  272. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/enum.ts +5 -3
  273. package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +1 -1
  274. package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +40 -38
  275. package/dist/node_modules/commander/Readme.md +407 -169
  276. package/dist/node_modules/commander/esm.mjs +13 -1
  277. package/dist/node_modules/commander/index.js +13 -2206
  278. package/dist/node_modules/commander/lib/argument.js +145 -0
  279. package/dist/node_modules/commander/lib/command.js +2299 -0
  280. package/dist/node_modules/commander/lib/error.js +43 -0
  281. package/dist/node_modules/commander/lib/help.js +457 -0
  282. package/dist/node_modules/commander/lib/option.js +327 -0
  283. package/dist/node_modules/commander/lib/suggestSimilar.js +100 -0
  284. package/dist/node_modules/commander/package.json +46 -34
  285. package/dist/node_modules/commander/typings/esm.d.mts +3 -0
  286. package/dist/node_modules/commander/typings/index.d.ts +889 -617
  287. package/dist/node_modules/debug/README.md +3 -0
  288. package/dist/node_modules/debug/package.json +1 -1
  289. package/dist/node_modules/debug/src/common.js +1 -1
  290. package/dist/node_modules/fs-extra/README.md +3 -5
  291. package/dist/node_modules/fs-extra/lib/{copy-sync → copy}/copy-sync.js +11 -8
  292. package/dist/node_modules/fs-extra/lib/copy/copy.js +12 -9
  293. package/dist/node_modules/fs-extra/lib/copy/index.js +2 -1
  294. package/dist/node_modules/fs-extra/lib/empty/index.js +10 -19
  295. package/dist/node_modules/fs-extra/lib/ensure/index.js +15 -15
  296. package/dist/node_modules/fs-extra/lib/ensure/link.js +10 -7
  297. package/dist/node_modules/fs-extra/lib/ensure/symlink.js +34 -15
  298. package/dist/node_modules/fs-extra/lib/fs/index.js +8 -10
  299. package/dist/node_modules/fs-extra/lib/index.js +1 -12
  300. package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +1 -1
  301. package/dist/node_modules/fs-extra/lib/json/output-json.js +1 -1
  302. package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +16 -130
  303. package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
  304. package/dist/node_modules/fs-extra/lib/move/index.js +2 -1
  305. package/dist/node_modules/fs-extra/lib/{move-sync → move}/move-sync.js +12 -5
  306. package/dist/node_modules/fs-extra/lib/move/move.js +14 -4
  307. package/dist/node_modules/fs-extra/lib/remove/index.js +15 -2
  308. package/dist/node_modules/fs-extra/lib/util/stat.js +60 -45
  309. package/dist/node_modules/fs-extra/package.json +7 -10
  310. package/dist/node_modules/graceful-fs/LICENSE +1 -1
  311. package/dist/node_modules/graceful-fs/graceful-fs.js +23 -4
  312. package/dist/node_modules/graceful-fs/package.json +6 -3
  313. package/dist/node_modules/graceful-fs/polyfills.js +39 -30
  314. package/dist/node_modules/punycode/README.md +29 -3
  315. package/dist/node_modules/punycode/package.json +7 -7
  316. package/dist/node_modules/punycode/punycode.es6.js +25 -22
  317. package/dist/node_modules/punycode/punycode.js +25 -22
  318. package/dist/node_modules/ramda/dist/ramda.js +4 -4
  319. package/dist/node_modules/ramda/dist/ramda.min.js +1 -1
  320. package/dist/node_modules/ramda/es/trim.js +1 -1
  321. package/dist/node_modules/ramda/package.json +1 -1
  322. package/dist/node_modules/ramda/src/trim.js +1 -1
  323. package/dist/node_modules/universalify/README.md +1 -1
  324. package/dist/node_modules/universalify/index.js +6 -6
  325. package/dist/node_modules/universalify/package.json +2 -2
  326. package/dist/package.json +5 -6
  327. package/dist/schemas/variant.json +28 -5
  328. package/dist/util/cache/cloneIntoCache.js +1 -1
  329. package/dist/util/cache/getCachedItemPath.js +4 -2
  330. package/dist/util/cache/getJsonFromCachedFile.js +2 -2
  331. package/dist/util/getGitRepoNameFromUrl.js +1 -1
  332. package/dist/util/getRepositoryLatestTag.js +16 -0
  333. package/dist/util/platform/getInitSuccessMessageForPlatform.js +4 -3
  334. package/dist/util/project/buildComponentDependencyList.js +20 -0
  335. package/package.json +6 -7
  336. package/dist/node_modules/at-least-node/LICENSE +0 -6
  337. package/dist/node_modules/at-least-node/README.md +0 -25
  338. package/dist/node_modules/at-least-node/index.js +0 -5
  339. package/dist/node_modules/at-least-node/package.json +0 -32
  340. package/dist/node_modules/commander/CHANGELOG.md +0 -440
  341. package/dist/node_modules/fs-extra/CHANGELOG.md +0 -902
  342. package/dist/node_modules/fs-extra/lib/copy-sync/index.js +0 -5
  343. package/dist/node_modules/fs-extra/lib/move-sync/index.js +0 -5
  344. /package/dist/node_modules/fs-extra/lib/{output → output-file}/index.js +0 -0
@@ -241,6 +241,9 @@ setInterval(function(){
241
241
  }, 1200);
242
242
  ```
243
243
 
244
+ In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
245
+
246
+ <img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
244
247
 
245
248
  ## Output streams
246
249
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debug",
3
- "version": "4.3.3",
3
+ "version": "4.3.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git://github.com/debug-js/debug.git"
@@ -179,7 +179,7 @@ function setup(env) {
179
179
  namespaces = split[i].replace(/\*/g, '.*?');
180
180
 
181
181
  if (namespaces[0] === '-') {
182
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
182
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
183
183
  } else {
184
184
  createDebug.names.push(new RegExp('^' + namespaces + '$'));
185
185
  }
@@ -4,11 +4,9 @@ Node.js: fs-extra
4
4
  `fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
5
5
 
6
6
  [![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
7
- [![License](https://img.shields.io/npm/l/express.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
8
- [![build status](https://img.shields.io/travis/jprichardson/node-fs-extra/master.svg)](http://travis-ci.org/jprichardson/node-fs-extra)
9
- [![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)
7
+ [![License](https://img.shields.io/npm/l/fs-extra.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
8
+ [![build status](https://img.shields.io/github/workflow/status/jprichardson/node-fs-extra/Node.js%20CI/master)](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
10
9
  [![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
11
- [![Coverage Status](https://img.shields.io/coveralls/github/jprichardson/node-fs-extra/master.svg)](https://coveralls.io/github/jprichardson/node-fs-extra)
12
10
  [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
13
11
 
14
12
  Why?
@@ -189,7 +187,7 @@ you're gonna have to get over it :) If `standard` is good enough for `npm`, it's
189
187
  What's needed?
190
188
  - First, take a look at existing issues. Those are probably going to be where the priority lies.
191
189
  - More tests for edge cases. Specifically on different platforms. There can never be enough tests.
192
- - Improve test coverage. See coveralls output for more info.
190
+ - Improve test coverage.
193
191
 
194
192
  Note: If you make any big changes, **you should definitely file an issue for discussion first.**
195
193
 
@@ -17,11 +17,14 @@ function copySync (src, dest, opts) {
17
17
 
18
18
  // Warn about using preserveTimestamps on 32-bit node
19
19
  if (opts.preserveTimestamps && process.arch === 'ia32') {
20
- console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
21
- see https://github.com/jprichardson/node-fs-extra/issues/269`)
20
+ process.emitWarning(
21
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
22
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
23
+ 'Warning', 'fs-extra-WARN0002'
24
+ )
22
25
  }
23
26
 
24
- const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy')
27
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
25
28
  stat.checkParentPathsSync(src, srcStat, dest, 'copy')
26
29
  return handleFilterAndCopy(destStat, src, dest, opts)
27
30
  }
@@ -30,7 +33,7 @@ function handleFilterAndCopy (destStat, src, dest, opts) {
30
33
  if (opts.filter && !opts.filter(src, dest)) return
31
34
  const destParent = path.dirname(dest)
32
35
  if (!fs.existsSync(destParent)) mkdirsSync(destParent)
33
- return startCopy(destStat, src, dest, opts)
36
+ return getStats(destStat, src, dest, opts)
34
37
  }
35
38
 
36
39
  function startCopy (destStat, src, dest, opts) {
@@ -47,6 +50,9 @@ function getStats (destStat, src, dest, opts) {
47
50
  srcStat.isCharacterDevice() ||
48
51
  srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
49
52
  else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
53
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
54
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
55
+ throw new Error(`Unknown file: ${src}`)
50
56
  }
51
57
 
52
58
  function onFile (srcStat, destStat, src, dest, opts) {
@@ -99,9 +105,6 @@ function setDestTimestamps (src, dest) {
99
105
 
100
106
  function onDir (srcStat, destStat, src, dest, opts) {
101
107
  if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
102
- if (destStat && !destStat.isDirectory()) {
103
- throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
104
- }
105
108
  return copyDir(src, dest, opts)
106
109
  }
107
110
 
@@ -118,7 +121,7 @@ function copyDir (src, dest, opts) {
118
121
  function copyDirItem (item, src, dest, opts) {
119
122
  const srcItem = path.join(src, item)
120
123
  const destItem = path.join(dest, item)
121
- const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy')
124
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
122
125
  return startCopy(destStat, srcItem, destItem, opts)
123
126
  }
124
127
 
@@ -23,11 +23,14 @@ function copy (src, dest, opts, cb) {
23
23
 
24
24
  // Warn about using preserveTimestamps on 32-bit node
25
25
  if (opts.preserveTimestamps && process.arch === 'ia32') {
26
- console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
27
- see https://github.com/jprichardson/node-fs-extra/issues/269`)
26
+ process.emitWarning(
27
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
28
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
29
+ 'Warning', 'fs-extra-WARN0001'
30
+ )
28
31
  }
29
32
 
30
- stat.checkPaths(src, dest, 'copy', (err, stats) => {
33
+ stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
31
34
  if (err) return cb(err)
32
35
  const { srcStat, destStat } = stats
33
36
  stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
@@ -42,10 +45,10 @@ function checkParentDir (destStat, src, dest, opts, cb) {
42
45
  const destParent = path.dirname(dest)
43
46
  pathExists(destParent, (err, dirExists) => {
44
47
  if (err) return cb(err)
45
- if (dirExists) return startCopy(destStat, src, dest, opts, cb)
48
+ if (dirExists) return getStats(destStat, src, dest, opts, cb)
46
49
  mkdirs(destParent, err => {
47
50
  if (err) return cb(err)
48
- return startCopy(destStat, src, dest, opts, cb)
51
+ return getStats(destStat, src, dest, opts, cb)
49
52
  })
50
53
  })
51
54
  }
@@ -72,6 +75,9 @@ function getStats (destStat, src, dest, opts, cb) {
72
75
  srcStat.isCharacterDevice() ||
73
76
  srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
74
77
  else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
78
+ else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
79
+ else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
80
+ return cb(new Error(`Unknown file: ${src}`))
75
81
  })
76
82
  }
77
83
 
@@ -143,9 +149,6 @@ function setDestTimestamps (src, dest, cb) {
143
149
 
144
150
  function onDir (srcStat, destStat, src, dest, opts, cb) {
145
151
  if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
146
- if (destStat && !destStat.isDirectory()) {
147
- return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
148
- }
149
152
  return copyDir(src, dest, opts, cb)
150
153
  }
151
154
 
@@ -175,7 +178,7 @@ function copyDirItems (items, src, dest, opts, cb) {
175
178
  function copyDirItem (items, item, src, dest, opts, cb) {
176
179
  const srcItem = path.join(src, item)
177
180
  const destItem = path.join(dest, item)
178
- stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => {
181
+ stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
179
182
  if (err) return cb(err)
180
183
  const { destStat } = stats
181
184
  startCopy(destStat, srcItem, destItem, opts, err => {
@@ -2,5 +2,6 @@
2
2
 
3
3
  const u = require('universalify').fromCallback
4
4
  module.exports = {
5
- copy: u(require('./copy'))
5
+ copy: u(require('./copy')),
6
+ copySync: require('./copy-sync')
6
7
  }
@@ -1,29 +1,20 @@
1
1
  'use strict'
2
2
 
3
- const u = require('universalify').fromCallback
4
- const fs = require('graceful-fs')
3
+ const u = require('universalify').fromPromise
4
+ const fs = require('../fs')
5
5
  const path = require('path')
6
6
  const mkdir = require('../mkdirs')
7
7
  const remove = require('../remove')
8
8
 
9
- const emptyDir = u(function emptyDir (dir, callback) {
10
- callback = callback || function () {}
11
- fs.readdir(dir, (err, items) => {
12
- if (err) return mkdir.mkdirs(dir, callback)
13
-
14
- items = items.map(item => path.join(dir, item))
15
-
16
- deleteItem()
9
+ const emptyDir = u(async function emptyDir (dir) {
10
+ let items
11
+ try {
12
+ items = await fs.readdir(dir)
13
+ } catch {
14
+ return mkdir.mkdirs(dir)
15
+ }
17
16
 
18
- function deleteItem () {
19
- const item = items.pop()
20
- if (!item) return callback()
21
- remove.remove(item, err => {
22
- if (err) return callback(err)
23
- deleteItem()
24
- })
25
- }
26
- })
17
+ return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
27
18
  })
28
19
 
29
20
  function emptyDirSync (dir) {
@@ -1,23 +1,23 @@
1
1
  'use strict'
2
2
 
3
- const file = require('./file')
4
- const link = require('./link')
5
- const symlink = require('./symlink')
3
+ const { createFile, createFileSync } = require('./file')
4
+ const { createLink, createLinkSync } = require('./link')
5
+ const { createSymlink, createSymlinkSync } = require('./symlink')
6
6
 
7
7
  module.exports = {
8
8
  // file
9
- createFile: file.createFile,
10
- createFileSync: file.createFileSync,
11
- ensureFile: file.createFile,
12
- ensureFileSync: file.createFileSync,
9
+ createFile,
10
+ createFileSync,
11
+ ensureFile: createFile,
12
+ ensureFileSync: createFileSync,
13
13
  // link
14
- createLink: link.createLink,
15
- createLinkSync: link.createLinkSync,
16
- ensureLink: link.createLink,
17
- ensureLinkSync: link.createLinkSync,
14
+ createLink,
15
+ createLinkSync,
16
+ ensureLink: createLink,
17
+ ensureLinkSync: createLinkSync,
18
18
  // symlink
19
- createSymlink: symlink.createSymlink,
20
- createSymlinkSync: symlink.createSymlinkSync,
21
- ensureSymlink: symlink.createSymlink,
22
- ensureSymlinkSync: symlink.createSymlinkSync
19
+ createSymlink,
20
+ createSymlinkSync,
21
+ ensureSymlink: createSymlink,
22
+ ensureSymlinkSync: createSymlinkSync
23
23
  }
@@ -5,6 +5,7 @@ const path = require('path')
5
5
  const fs = require('graceful-fs')
6
6
  const mkdir = require('../mkdirs')
7
7
  const pathExists = require('../path-exists').pathExists
8
+ const { areIdentical } = require('../util/stat')
8
9
 
9
10
  function createLink (srcpath, dstpath, callback) {
10
11
  function makeLink (srcpath, dstpath) {
@@ -14,14 +15,13 @@ function createLink (srcpath, dstpath, callback) {
14
15
  })
15
16
  }
16
17
 
17
- pathExists(dstpath, (err, destinationExists) => {
18
- if (err) return callback(err)
19
- if (destinationExists) return callback(null)
20
- fs.lstat(srcpath, (err) => {
18
+ fs.lstat(dstpath, (_, dstStat) => {
19
+ fs.lstat(srcpath, (err, srcStat) => {
21
20
  if (err) {
22
21
  err.message = err.message.replace('lstat', 'ensureLink')
23
22
  return callback(err)
24
23
  }
24
+ if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
25
25
 
26
26
  const dir = path.dirname(dstpath)
27
27
  pathExists(dir, (err, dirExists) => {
@@ -37,11 +37,14 @@ function createLink (srcpath, dstpath, callback) {
37
37
  }
38
38
 
39
39
  function createLinkSync (srcpath, dstpath) {
40
- const destinationExists = fs.existsSync(dstpath)
41
- if (destinationExists) return undefined
40
+ let dstStat
41
+ try {
42
+ dstStat = fs.lstatSync(dstpath)
43
+ } catch {}
42
44
 
43
45
  try {
44
- fs.lstatSync(srcpath)
46
+ const srcStat = fs.lstatSync(srcpath)
47
+ if (dstStat && areIdentical(srcStat, dstStat)) return
45
48
  } catch (err) {
46
49
  err.message = err.message.replace('lstat', 'ensureLink')
47
50
  throw err
@@ -2,7 +2,7 @@
2
2
 
3
3
  const u = require('universalify').fromCallback
4
4
  const path = require('path')
5
- const fs = require('graceful-fs')
5
+ const fs = require('../fs')
6
6
  const _mkdirs = require('../mkdirs')
7
7
  const mkdirs = _mkdirs.mkdirs
8
8
  const mkdirsSync = _mkdirs.mkdirsSync
@@ -17,26 +17,38 @@ const symlinkTypeSync = _symlinkType.symlinkTypeSync
17
17
 
18
18
  const pathExists = require('../path-exists').pathExists
19
19
 
20
+ const { areIdentical } = require('../util/stat')
21
+
20
22
  function createSymlink (srcpath, dstpath, type, callback) {
21
23
  callback = (typeof type === 'function') ? type : callback
22
24
  type = (typeof type === 'function') ? false : type
23
25
 
24
- pathExists(dstpath, (err, destinationExists) => {
26
+ fs.lstat(dstpath, (err, stats) => {
27
+ if (!err && stats.isSymbolicLink()) {
28
+ Promise.all([
29
+ fs.stat(srcpath),
30
+ fs.stat(dstpath)
31
+ ]).then(([srcStat, dstStat]) => {
32
+ if (areIdentical(srcStat, dstStat)) return callback(null)
33
+ _createSymlink(srcpath, dstpath, type, callback)
34
+ })
35
+ } else _createSymlink(srcpath, dstpath, type, callback)
36
+ })
37
+ }
38
+
39
+ function _createSymlink (srcpath, dstpath, type, callback) {
40
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
25
41
  if (err) return callback(err)
26
- if (destinationExists) return callback(null)
27
- symlinkPaths(srcpath, dstpath, (err, relative) => {
42
+ srcpath = relative.toDst
43
+ symlinkType(relative.toCwd, type, (err, type) => {
28
44
  if (err) return callback(err)
29
- srcpath = relative.toDst
30
- symlinkType(relative.toCwd, type, (err, type) => {
45
+ const dir = path.dirname(dstpath)
46
+ pathExists(dir, (err, dirExists) => {
31
47
  if (err) return callback(err)
32
- const dir = path.dirname(dstpath)
33
- pathExists(dir, (err, dirExists) => {
48
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
49
+ mkdirs(dir, err => {
34
50
  if (err) return callback(err)
35
- if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
36
- mkdirs(dir, err => {
37
- if (err) return callback(err)
38
- fs.symlink(srcpath, dstpath, type, callback)
39
- })
51
+ fs.symlink(srcpath, dstpath, type, callback)
40
52
  })
41
53
  })
42
54
  })
@@ -44,8 +56,15 @@ function createSymlink (srcpath, dstpath, type, callback) {
44
56
  }
45
57
 
46
58
  function createSymlinkSync (srcpath, dstpath, type) {
47
- const destinationExists = fs.existsSync(dstpath)
48
- if (destinationExists) return undefined
59
+ let stats
60
+ try {
61
+ stats = fs.lstatSync(dstpath)
62
+ } catch {}
63
+ if (stats && stats.isSymbolicLink()) {
64
+ const srcStat = fs.statSync(srcpath)
65
+ const dstStat = fs.statSync(dstpath)
66
+ if (areIdentical(srcStat, dstStat)) return
67
+ }
49
68
 
50
69
  const relative = symlinkPathsSync(srcpath, dstpath)
51
70
  srcpath = relative.toDst
@@ -47,15 +47,8 @@ const api = [
47
47
  return typeof fs[key] === 'function'
48
48
  })
49
49
 
50
- // Export all keys:
51
- Object.keys(fs).forEach(key => {
52
- if (key === 'promises') {
53
- // fs.promises is a getter property that triggers ExperimentalWarning
54
- // Don't re-export it here, the getter is defined in "lib/index.js"
55
- return
56
- }
57
- exports[key] = fs[key]
58
- })
50
+ // Export cloned fs:
51
+ Object.assign(exports, fs)
59
52
 
60
53
  // Universalify async methods:
61
54
  api.forEach(method => {
@@ -124,7 +117,12 @@ if (typeof fs.writev === 'function') {
124
117
  }
125
118
  }
126
119
 
127
- // fs.realpath.native only available in Node v9.2+
120
+ // fs.realpath.native sometimes not available if fs is monkey-patched
128
121
  if (typeof fs.realpath.native === 'function') {
129
122
  exports.realpath.native = u(fs.realpath.native)
123
+ } else {
124
+ process.emitWarning(
125
+ 'fs.realpath.native is not a function. Is fs being monkey-patched?',
126
+ 'Warning', 'fs-extra-WARN0003'
127
+ )
130
128
  }
@@ -4,24 +4,13 @@ module.exports = {
4
4
  // Export promiseified graceful-fs:
5
5
  ...require('./fs'),
6
6
  // Export extra methods:
7
- ...require('./copy-sync'),
8
7
  ...require('./copy'),
9
8
  ...require('./empty'),
10
9
  ...require('./ensure'),
11
10
  ...require('./json'),
12
11
  ...require('./mkdirs'),
13
- ...require('./move-sync'),
14
12
  ...require('./move'),
15
- ...require('./output'),
13
+ ...require('./output-file'),
16
14
  ...require('./path-exists'),
17
15
  ...require('./remove')
18
16
  }
19
-
20
- // Export fs.promises as a getter property so that we don't trigger
21
- // ExperimentalWarning before fs.promises is actually accessed.
22
- const fs = require('fs')
23
- if (Object.getOwnPropertyDescriptor(fs, 'promises')) {
24
- Object.defineProperty(module.exports, 'promises', {
25
- get () { return fs.promises }
26
- })
27
- }
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const { stringify } = require('jsonfile/utils')
4
- const { outputFileSync } = require('../output')
4
+ const { outputFileSync } = require('../output-file')
5
5
 
6
6
  function outputJsonSync (file, data, options) {
7
7
  const str = stringify(data, options)
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const { stringify } = require('jsonfile/utils')
4
- const { outputFile } = require('../output')
4
+ const { outputFile } = require('../output-file')
5
5
 
6
6
  async function outputJson (file, data, options = {}) {
7
7
  const str = stringify(data, options)
@@ -1,141 +1,27 @@
1
- // Adapted from https://github.com/sindresorhus/make-dir
2
- // Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
3
- // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
- // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6
1
  'use strict'
7
2
  const fs = require('../fs')
8
- const path = require('path')
9
- const atLeastNode = require('at-least-node')
3
+ const { checkPath } = require('./utils')
10
4
 
11
- const useNativeRecursiveOption = atLeastNode('10.12.0')
12
-
13
- // https://github.com/nodejs/node/issues/8987
14
- // https://github.com/libuv/libuv/pull/1088
15
- const checkPath = pth => {
16
- if (process.platform === 'win32') {
17
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
18
-
19
- if (pathHasInvalidWinCharacters) {
20
- const error = new Error(`Path contains invalid characters: ${pth}`)
21
- error.code = 'EINVAL'
22
- throw error
23
- }
24
- }
25
- }
26
-
27
- const processOptions = options => {
5
+ const getMode = options => {
28
6
  const defaults = { mode: 0o777 }
29
- if (typeof options === 'number') options = { mode: options }
30
- return { ...defaults, ...options }
31
- }
32
-
33
- const permissionError = pth => {
34
- // This replicates the exception of `fs.mkdir` with native the
35
- // `recusive` option when run on an invalid drive under Windows.
36
- const error = new Error(`operation not permitted, mkdir '${pth}'`)
37
- error.code = 'EPERM'
38
- error.errno = -4048
39
- error.path = pth
40
- error.syscall = 'mkdir'
41
- return error
7
+ if (typeof options === 'number') return options
8
+ return ({ ...defaults, ...options }).mode
42
9
  }
43
10
 
44
- module.exports.makeDir = async (input, options) => {
45
- checkPath(input)
46
- options = processOptions(options)
47
-
48
- if (useNativeRecursiveOption) {
49
- const pth = path.resolve(input)
50
-
51
- return fs.mkdir(pth, {
52
- mode: options.mode,
53
- recursive: true
54
- })
55
- }
56
-
57
- const make = async pth => {
58
- try {
59
- await fs.mkdir(pth, options.mode)
60
- } catch (error) {
61
- if (error.code === 'EPERM') {
62
- throw error
63
- }
64
-
65
- if (error.code === 'ENOENT') {
66
- if (path.dirname(pth) === pth) {
67
- throw permissionError(pth)
68
- }
11
+ module.exports.makeDir = async (dir, options) => {
12
+ checkPath(dir)
69
13
 
70
- if (error.message.includes('null bytes')) {
71
- throw error
72
- }
73
-
74
- await make(path.dirname(pth))
75
- return make(pth)
76
- }
77
-
78
- try {
79
- const stats = await fs.stat(pth)
80
- if (!stats.isDirectory()) {
81
- // This error is never exposed to the user
82
- // it is caught below, and the original error is thrown
83
- throw new Error('The path is not a directory')
84
- }
85
- } catch {
86
- throw error
87
- }
88
- }
89
- }
90
-
91
- return make(path.resolve(input))
14
+ return fs.mkdir(dir, {
15
+ mode: getMode(options),
16
+ recursive: true
17
+ })
92
18
  }
93
19
 
94
- module.exports.makeDirSync = (input, options) => {
95
- checkPath(input)
96
- options = processOptions(options)
97
-
98
- if (useNativeRecursiveOption) {
99
- const pth = path.resolve(input)
100
-
101
- return fs.mkdirSync(pth, {
102
- mode: options.mode,
103
- recursive: true
104
- })
105
- }
106
-
107
- const make = pth => {
108
- try {
109
- fs.mkdirSync(pth, options.mode)
110
- } catch (error) {
111
- if (error.code === 'EPERM') {
112
- throw error
113
- }
114
-
115
- if (error.code === 'ENOENT') {
116
- if (path.dirname(pth) === pth) {
117
- throw permissionError(pth)
118
- }
119
-
120
- if (error.message.includes('null bytes')) {
121
- throw error
122
- }
123
-
124
- make(path.dirname(pth))
125
- return make(pth)
126
- }
127
-
128
- try {
129
- if (!fs.statSync(pth).isDirectory()) {
130
- // This error is never exposed to the user
131
- // it is caught below, and the original error is thrown
132
- throw new Error('The path is not a directory')
133
- }
134
- } catch {
135
- throw error
136
- }
137
- }
138
- }
20
+ module.exports.makeDirSync = (dir, options) => {
21
+ checkPath(dir)
139
22
 
140
- return make(path.resolve(input))
23
+ return fs.mkdirSync(dir, {
24
+ mode: getMode(options),
25
+ recursive: true
26
+ })
141
27
  }
@@ -0,0 +1,21 @@
1
+ // Adapted from https://github.com/sindresorhus/make-dir
2
+ // Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+ // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6
+ 'use strict'
7
+ const path = require('path')
8
+
9
+ // https://github.com/nodejs/node/issues/8987
10
+ // https://github.com/libuv/libuv/pull/1088
11
+ module.exports.checkPath = function checkPath (pth) {
12
+ if (process.platform === 'win32') {
13
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
14
+
15
+ if (pathHasInvalidWinCharacters) {
16
+ const error = new Error(`Path contains invalid characters: ${pth}`)
17
+ error.code = 'EINVAL'
18
+ throw error
19
+ }
20
+ }
21
+ }
@@ -2,5 +2,6 @@
2
2
 
3
3
  const u = require('universalify').fromCallback
4
4
  module.exports = {
5
- move: u(require('./move'))
5
+ move: u(require('./move')),
6
+ moveSync: require('./move-sync')
6
7
  }