UrgentcareCLI 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +60 -25
  4. data/Notes +1 -1
  5. data/README.md +5 -5
  6. data/Rakefile +2 -0
  7. data/UrgentCare.gemspec +3 -3
  8. data/background.jpg +0 -0
  9. data/lib/UrgentCare.rb +3 -0
  10. data/lib/UrgentCare/CLI.rb +6 -2
  11. data/lib/UrgentCare/version.rb +1 -1
  12. data/lib/Urgentcare/Scraper.rb +65 -23
  13. data/node_modules/.bin/rimraf +1 -0
  14. data/node_modules/.package-lock.json +250 -0
  15. data/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  16. data/node_modules/balanced-match/LICENSE.md +21 -0
  17. data/node_modules/balanced-match/README.md +97 -0
  18. data/node_modules/balanced-match/index.js +62 -0
  19. data/node_modules/balanced-match/package.json +48 -0
  20. data/node_modules/brace-expansion/LICENSE +21 -0
  21. data/node_modules/brace-expansion/README.md +129 -0
  22. data/node_modules/brace-expansion/index.js +201 -0
  23. data/node_modules/brace-expansion/package.json +47 -0
  24. data/node_modules/concat-map/.travis.yml +4 -0
  25. data/node_modules/concat-map/LICENSE +18 -0
  26. data/node_modules/concat-map/README.markdown +62 -0
  27. data/node_modules/concat-map/example/map.js +6 -0
  28. data/node_modules/concat-map/index.js +13 -0
  29. data/node_modules/concat-map/package.json +43 -0
  30. data/node_modules/concat-map/test/map.js +39 -0
  31. data/node_modules/core-util-is/LICENSE +19 -0
  32. data/node_modules/core-util-is/README.md +3 -0
  33. data/node_modules/core-util-is/float.patch +604 -0
  34. data/node_modules/core-util-is/lib/util.js +107 -0
  35. data/node_modules/core-util-is/package.json +32 -0
  36. data/node_modules/core-util-is/test.js +68 -0
  37. data/node_modules/fs.realpath/LICENSE +43 -0
  38. data/node_modules/fs.realpath/README.md +33 -0
  39. data/node_modules/fs.realpath/index.js +66 -0
  40. data/node_modules/fs.realpath/old.js +303 -0
  41. data/node_modules/fs.realpath/package.json +26 -0
  42. data/node_modules/glob/LICENSE +21 -0
  43. data/node_modules/glob/README.md +375 -0
  44. data/node_modules/glob/changelog.md +67 -0
  45. data/node_modules/glob/common.js +234 -0
  46. data/node_modules/glob/glob.js +788 -0
  47. data/node_modules/glob/package.json +51 -0
  48. data/node_modules/glob/sync.js +484 -0
  49. data/node_modules/immediate/LICENSE.txt +20 -0
  50. data/node_modules/immediate/README.md +93 -0
  51. data/node_modules/immediate/dist/immediate.js +75 -0
  52. data/node_modules/immediate/dist/immediate.min.js +1 -0
  53. data/node_modules/immediate/lib/browser.js +69 -0
  54. data/node_modules/immediate/lib/index.js +73 -0
  55. data/node_modules/immediate/package.json +42 -0
  56. data/node_modules/inflight/LICENSE +15 -0
  57. data/node_modules/inflight/README.md +37 -0
  58. data/node_modules/inflight/inflight.js +54 -0
  59. data/node_modules/inflight/package.json +29 -0
  60. data/node_modules/inherits/LICENSE +16 -0
  61. data/node_modules/inherits/README.md +42 -0
  62. data/node_modules/inherits/inherits.js +9 -0
  63. data/node_modules/inherits/inherits_browser.js +27 -0
  64. data/node_modules/inherits/package.json +29 -0
  65. data/node_modules/isarray/.npmignore +1 -0
  66. data/node_modules/isarray/.travis.yml +4 -0
  67. data/node_modules/isarray/Makefile +6 -0
  68. data/node_modules/isarray/README.md +60 -0
  69. data/node_modules/isarray/component.json +19 -0
  70. data/node_modules/isarray/index.js +5 -0
  71. data/node_modules/isarray/package.json +45 -0
  72. data/node_modules/isarray/test.js +20 -0
  73. data/node_modules/jszip/.codeclimate.yml +16 -0
  74. data/node_modules/jszip/.editorconfig +8 -0
  75. data/node_modules/jszip/.jshintignore +1 -0
  76. data/node_modules/jszip/.jshintrc +21 -0
  77. data/node_modules/jszip/.travis.yml +17 -0
  78. data/node_modules/jszip/CHANGES.md +163 -0
  79. data/node_modules/jszip/LICENSE.markdown +651 -0
  80. data/node_modules/jszip/README.markdown +35 -0
  81. data/node_modules/jszip/dist/jszip.js +30 -0
  82. data/node_modules/jszip/dist/jszip.min.js +13 -0
  83. data/node_modules/jszip/index.d.ts +270 -0
  84. data/node_modules/jszip/lib/base64.js +106 -0
  85. data/node_modules/jszip/lib/compressedObject.js +74 -0
  86. data/node_modules/jszip/lib/compressions.js +14 -0
  87. data/node_modules/jszip/lib/crc32.js +77 -0
  88. data/node_modules/jszip/lib/defaults.js +11 -0
  89. data/node_modules/jszip/lib/external.js +19 -0
  90. data/node_modules/jszip/lib/flate.js +85 -0
  91. data/node_modules/jszip/lib/generate/ZipFileWorker.js +540 -0
  92. data/node_modules/jszip/lib/generate/index.js +57 -0
  93. data/node_modules/jszip/lib/index.js +52 -0
  94. data/node_modules/jszip/lib/license_header.js +11 -0
  95. data/node_modules/jszip/lib/load.js +81 -0
  96. data/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  97. data/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  98. data/node_modules/jszip/lib/nodejsUtils.js +57 -0
  99. data/node_modules/jszip/lib/object.js +389 -0
  100. data/node_modules/jszip/lib/readable-stream-browser.js +9 -0
  101. data/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  102. data/node_modules/jszip/lib/reader/DataReader.js +116 -0
  103. data/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  104. data/node_modules/jszip/lib/reader/StringReader.js +38 -0
  105. data/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  106. data/node_modules/jszip/lib/reader/readerFor.js +28 -0
  107. data/node_modules/jszip/lib/signature.js +7 -0
  108. data/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  109. data/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  110. data/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  111. data/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  112. data/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  113. data/node_modules/jszip/lib/stream/StreamHelper.js +212 -0
  114. data/node_modules/jszip/lib/support.js +38 -0
  115. data/node_modules/jszip/lib/utf8.js +275 -0
  116. data/node_modules/jszip/lib/utils.js +476 -0
  117. data/node_modules/jszip/lib/zipEntries.js +262 -0
  118. data/node_modules/jszip/lib/zipEntry.js +294 -0
  119. data/node_modules/jszip/lib/zipObject.js +133 -0
  120. data/node_modules/jszip/package.json +63 -0
  121. data/node_modules/jszip/vendor/FileSaver.js +247 -0
  122. data/node_modules/lie/README.md +62 -0
  123. data/node_modules/lie/dist/lie.js +350 -0
  124. data/node_modules/lie/dist/lie.min.js +1 -0
  125. data/node_modules/lie/dist/lie.polyfill.js +358 -0
  126. data/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  127. data/node_modules/lie/lib/browser.js +273 -0
  128. data/node_modules/lie/lib/index.js +298 -0
  129. data/node_modules/lie/license.md +7 -0
  130. data/node_modules/lie/lie.d.ts +244 -0
  131. data/node_modules/lie/package.json +69 -0
  132. data/node_modules/lie/polyfill.js +4 -0
  133. data/node_modules/minimatch/LICENSE +15 -0
  134. data/node_modules/minimatch/README.md +209 -0
  135. data/node_modules/minimatch/minimatch.js +923 -0
  136. data/node_modules/minimatch/package.json +30 -0
  137. data/node_modules/once/LICENSE +15 -0
  138. data/node_modules/once/README.md +79 -0
  139. data/node_modules/once/once.js +42 -0
  140. data/node_modules/once/package.json +33 -0
  141. data/node_modules/pako/CHANGELOG.md +164 -0
  142. data/node_modules/pako/LICENSE +21 -0
  143. data/node_modules/pako/README.md +191 -0
  144. data/node_modules/pako/dist/pako.js +6818 -0
  145. data/node_modules/pako/dist/pako.min.js +1 -0
  146. data/node_modules/pako/dist/pako_deflate.js +3997 -0
  147. data/node_modules/pako/dist/pako_deflate.min.js +1 -0
  148. data/node_modules/pako/dist/pako_inflate.js +3300 -0
  149. data/node_modules/pako/dist/pako_inflate.min.js +1 -0
  150. data/node_modules/pako/index.js +14 -0
  151. data/node_modules/pako/lib/deflate.js +400 -0
  152. data/node_modules/pako/lib/inflate.js +423 -0
  153. data/node_modules/pako/lib/utils/common.js +105 -0
  154. data/node_modules/pako/lib/utils/strings.js +187 -0
  155. data/node_modules/pako/lib/zlib/README +59 -0
  156. data/node_modules/pako/lib/zlib/adler32.js +51 -0
  157. data/node_modules/pako/lib/zlib/constants.js +68 -0
  158. data/node_modules/pako/lib/zlib/crc32.js +59 -0
  159. data/node_modules/pako/lib/zlib/deflate.js +1874 -0
  160. data/node_modules/pako/lib/zlib/gzheader.js +58 -0
  161. data/node_modules/pako/lib/zlib/inffast.js +345 -0
  162. data/node_modules/pako/lib/zlib/inflate.js +1556 -0
  163. data/node_modules/pako/lib/zlib/inftrees.js +343 -0
  164. data/node_modules/pako/lib/zlib/messages.js +32 -0
  165. data/node_modules/pako/lib/zlib/trees.js +1222 -0
  166. data/node_modules/pako/lib/zlib/zstream.js +47 -0
  167. data/node_modules/pako/package.json +44 -0
  168. data/node_modules/path-is-absolute/index.js +20 -0
  169. data/node_modules/path-is-absolute/license +21 -0
  170. data/node_modules/path-is-absolute/package.json +43 -0
  171. data/node_modules/path-is-absolute/readme.md +59 -0
  172. data/node_modules/process-nextick-args/index.js +45 -0
  173. data/node_modules/process-nextick-args/license.md +19 -0
  174. data/node_modules/process-nextick-args/package.json +25 -0
  175. data/node_modules/process-nextick-args/readme.md +18 -0
  176. data/node_modules/readable-stream/.travis.yml +34 -0
  177. data/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  178. data/node_modules/readable-stream/GOVERNANCE.md +136 -0
  179. data/node_modules/readable-stream/LICENSE +47 -0
  180. data/node_modules/readable-stream/README.md +58 -0
  181. data/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  182. data/node_modules/readable-stream/duplex-browser.js +1 -0
  183. data/node_modules/readable-stream/duplex.js +1 -0
  184. data/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  185. data/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  186. data/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  187. data/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  188. data/node_modules/readable-stream/lib/_stream_writable.js +687 -0
  189. data/node_modules/readable-stream/lib/internal/streams/BufferList.js +79 -0
  190. data/node_modules/readable-stream/lib/internal/streams/destroy.js +74 -0
  191. data/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  192. data/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  193. data/node_modules/readable-stream/package.json +52 -0
  194. data/node_modules/readable-stream/passthrough.js +1 -0
  195. data/node_modules/readable-stream/readable-browser.js +7 -0
  196. data/node_modules/readable-stream/readable.js +19 -0
  197. data/node_modules/readable-stream/transform.js +1 -0
  198. data/node_modules/readable-stream/writable-browser.js +1 -0
  199. data/node_modules/readable-stream/writable.js +8 -0
  200. data/node_modules/rimraf/LICENSE +15 -0
  201. data/node_modules/rimraf/README.md +101 -0
  202. data/node_modules/rimraf/bin.js +50 -0
  203. data/node_modules/rimraf/package.json +29 -0
  204. data/node_modules/rimraf/rimraf.js +372 -0
  205. data/node_modules/safe-buffer/LICENSE +21 -0
  206. data/node_modules/safe-buffer/README.md +584 -0
  207. data/node_modules/safe-buffer/index.d.ts +187 -0
  208. data/node_modules/safe-buffer/index.js +62 -0
  209. data/node_modules/safe-buffer/package.json +37 -0
  210. data/node_modules/selenium-webdriver/CHANGES.md +1114 -0
  211. data/node_modules/selenium-webdriver/LICENSE +202 -0
  212. data/node_modules/selenium-webdriver/NOTICE +2 -0
  213. data/node_modules/selenium-webdriver/README.md +229 -0
  214. data/node_modules/selenium-webdriver/chrome.js +295 -0
  215. data/node_modules/selenium-webdriver/chromium.js +829 -0
  216. data/node_modules/selenium-webdriver/devtools/CDPConnection.js +35 -0
  217. data/node_modules/selenium-webdriver/edge.js +224 -0
  218. data/node_modules/selenium-webdriver/example/chrome_android.js +45 -0
  219. data/node_modules/selenium-webdriver/example/chrome_mobile_emulation.js +46 -0
  220. data/node_modules/selenium-webdriver/example/firefox_channels.js +84 -0
  221. data/node_modules/selenium-webdriver/example/google_search.js +50 -0
  222. data/node_modules/selenium-webdriver/example/google_search_test.js +70 -0
  223. data/node_modules/selenium-webdriver/example/headless.js +63 -0
  224. data/node_modules/selenium-webdriver/example/logging.js +64 -0
  225. data/node_modules/selenium-webdriver/firefox.js +789 -0
  226. data/node_modules/selenium-webdriver/http/index.js +324 -0
  227. data/node_modules/selenium-webdriver/http/util.js +172 -0
  228. data/node_modules/selenium-webdriver/ie.js +503 -0
  229. data/node_modules/selenium-webdriver/index.js +825 -0
  230. data/node_modules/selenium-webdriver/io/exec.js +162 -0
  231. data/node_modules/selenium-webdriver/io/index.js +348 -0
  232. data/node_modules/selenium-webdriver/io/zip.js +223 -0
  233. data/node_modules/selenium-webdriver/lib/atoms/find-elements.js +123 -0
  234. data/node_modules/selenium-webdriver/lib/atoms/get-attribute.js +101 -0
  235. data/node_modules/selenium-webdriver/lib/atoms/is-displayed.js +101 -0
  236. data/node_modules/selenium-webdriver/lib/atoms/mutation-listener.js +55 -0
  237. data/node_modules/selenium-webdriver/lib/by.js +415 -0
  238. data/node_modules/selenium-webdriver/lib/capabilities.js +553 -0
  239. data/node_modules/selenium-webdriver/lib/command.js +206 -0
  240. data/node_modules/selenium-webdriver/lib/error.js +605 -0
  241. data/node_modules/selenium-webdriver/lib/http.js +704 -0
  242. data/node_modules/selenium-webdriver/lib/input.js +946 -0
  243. data/node_modules/selenium-webdriver/lib/logging.js +661 -0
  244. data/node_modules/selenium-webdriver/lib/promise.js +285 -0
  245. data/node_modules/selenium-webdriver/lib/proxy.js +212 -0
  246. data/node_modules/selenium-webdriver/lib/session.js +77 -0
  247. data/node_modules/selenium-webdriver/lib/symbols.js +37 -0
  248. data/node_modules/selenium-webdriver/lib/until.js +429 -0
  249. data/node_modules/selenium-webdriver/lib/webdriver.js +2919 -0
  250. data/node_modules/selenium-webdriver/net/index.js +107 -0
  251. data/node_modules/selenium-webdriver/net/portprober.js +75 -0
  252. data/node_modules/selenium-webdriver/opera.js +406 -0
  253. data/node_modules/selenium-webdriver/package.json +54 -0
  254. data/node_modules/selenium-webdriver/proxy.js +32 -0
  255. data/node_modules/selenium-webdriver/remote/index.js +624 -0
  256. data/node_modules/selenium-webdriver/safari.js +168 -0
  257. data/node_modules/selenium-webdriver/testing/index.js +504 -0
  258. data/node_modules/set-immediate-shim/index.js +7 -0
  259. data/node_modules/set-immediate-shim/package.json +34 -0
  260. data/node_modules/set-immediate-shim/readme.md +31 -0
  261. data/node_modules/string_decoder/.travis.yml +50 -0
  262. data/node_modules/string_decoder/LICENSE +48 -0
  263. data/node_modules/string_decoder/README.md +47 -0
  264. data/node_modules/string_decoder/lib/string_decoder.js +296 -0
  265. data/node_modules/string_decoder/package.json +31 -0
  266. data/node_modules/tmp/CHANGELOG.md +288 -0
  267. data/node_modules/tmp/LICENSE +21 -0
  268. data/node_modules/tmp/README.md +365 -0
  269. data/node_modules/tmp/lib/tmp.js +780 -0
  270. data/node_modules/tmp/node_modules/.bin/rimraf +1 -0
  271. data/node_modules/tmp/node_modules/rimraf/CHANGELOG.md +65 -0
  272. data/node_modules/tmp/node_modules/rimraf/LICENSE +15 -0
  273. data/node_modules/tmp/node_modules/rimraf/README.md +101 -0
  274. data/node_modules/tmp/node_modules/rimraf/bin.js +68 -0
  275. data/node_modules/tmp/node_modules/rimraf/package.json +32 -0
  276. data/node_modules/tmp/node_modules/rimraf/rimraf.js +360 -0
  277. data/node_modules/tmp/package.json +58 -0
  278. data/node_modules/util-deprecate/History.md +16 -0
  279. data/node_modules/util-deprecate/LICENSE +24 -0
  280. data/node_modules/util-deprecate/README.md +53 -0
  281. data/node_modules/util-deprecate/browser.js +67 -0
  282. data/node_modules/util-deprecate/node.js +6 -0
  283. data/node_modules/util-deprecate/package.json +27 -0
  284. data/node_modules/wrappy/LICENSE +15 -0
  285. data/node_modules/wrappy/README.md +36 -0
  286. data/node_modules/wrappy/package.json +29 -0
  287. data/node_modules/wrappy/wrappy.js +33 -0
  288. data/node_modules/ws/LICENSE +21 -0
  289. data/node_modules/ws/README.md +496 -0
  290. data/node_modules/ws/browser.js +8 -0
  291. data/node_modules/ws/index.js +10 -0
  292. data/node_modules/ws/lib/buffer-util.js +129 -0
  293. data/node_modules/ws/lib/constants.js +10 -0
  294. data/node_modules/ws/lib/event-target.js +184 -0
  295. data/node_modules/ws/lib/extension.js +223 -0
  296. data/node_modules/ws/lib/limiter.js +55 -0
  297. data/node_modules/ws/lib/permessage-deflate.js +517 -0
  298. data/node_modules/ws/lib/receiver.js +507 -0
  299. data/node_modules/ws/lib/sender.js +405 -0
  300. data/node_modules/ws/lib/stream.js +165 -0
  301. data/node_modules/ws/lib/validation.js +104 -0
  302. data/node_modules/ws/lib/websocket-server.js +418 -0
  303. data/node_modules/ws/lib/websocket.js +942 -0
  304. data/node_modules/ws/package.json +56 -0
  305. data/package-lock.json +458 -0
  306. data/package.json +5 -0
  307. data/selenium.log +1 -0
  308. metadata +314 -19
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "string_decoder",
3
+ "version": "1.1.1",
4
+ "description": "The string_decoder module from Node core",
5
+ "main": "lib/string_decoder.js",
6
+ "dependencies": {
7
+ "safe-buffer": "~5.1.0"
8
+ },
9
+ "devDependencies": {
10
+ "babel-polyfill": "^6.23.0",
11
+ "core-util-is": "^1.0.2",
12
+ "inherits": "^2.0.3",
13
+ "tap": "~0.4.8"
14
+ },
15
+ "scripts": {
16
+ "test": "tap test/parallel/*.js && node test/verify-dependencies",
17
+ "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git://github.com/nodejs/string_decoder.git"
22
+ },
23
+ "homepage": "https://github.com/nodejs/string_decoder",
24
+ "keywords": [
25
+ "string",
26
+ "decoder",
27
+ "browser",
28
+ "browserify"
29
+ ],
30
+ "license": "MIT"
31
+ }
@@ -0,0 +1,288 @@
1
+
2
+
3
+ ## v0.2.1 (2020-04-28)
4
+
5
+ #### :rocket: Enhancement
6
+ * [#252](https://github.com/raszi/node-tmp/pull/252) Closes [#250](https://github.com/raszi/node-tmp/issues/250): introduce tmpdir option for overriding the system tmp dir ([@silkentrance](https://github.com/silkentrance))
7
+
8
+ #### :house: Internal
9
+ * [#253](https://github.com/raszi/node-tmp/pull/253) Closes [#191](https://github.com/raszi/node-tmp/issues/191): generate changelog from pull requests using lerna-changelog ([@silkentrance](https://github.com/silkentrance))
10
+
11
+ #### Committers: 1
12
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
13
+
14
+
15
+ ## v0.2.0 (2020-04-25)
16
+
17
+ #### :rocket: Enhancement
18
+ * [#234](https://github.com/raszi/node-tmp/pull/234) feat: stabilize tmp for v0.2.0 release ([@silkentrance](https://github.com/silkentrance))
19
+
20
+ #### :bug: Bug Fix
21
+ * [#231](https://github.com/raszi/node-tmp/pull/231) Closes [#230](https://github.com/raszi/node-tmp/issues/230): regression after fix for #197 ([@silkentrance](https://github.com/silkentrance))
22
+ * [#220](https://github.com/raszi/node-tmp/pull/220) Closes [#197](https://github.com/raszi/node-tmp/issues/197): return sync callback when using the sync interface, otherwise return the async callback ([@silkentrance](https://github.com/silkentrance))
23
+ * [#193](https://github.com/raszi/node-tmp/pull/193) Closes [#192](https://github.com/raszi/node-tmp/issues/192): tmp must not exit the process on its own ([@silkentrance](https://github.com/silkentrance))
24
+
25
+ #### :memo: Documentation
26
+ * [#221](https://github.com/raszi/node-tmp/pull/221) Gh 206 document name option ([@silkentrance](https://github.com/silkentrance))
27
+
28
+ #### :house: Internal
29
+ * [#226](https://github.com/raszi/node-tmp/pull/226) Closes [#212](https://github.com/raszi/node-tmp/issues/212): enable direct name option test ([@silkentrance](https://github.com/silkentrance))
30
+ * [#225](https://github.com/raszi/node-tmp/pull/225) Closes [#211](https://github.com/raszi/node-tmp/issues/211): existing tests must clean up after themselves ([@silkentrance](https://github.com/silkentrance))
31
+ * [#224](https://github.com/raszi/node-tmp/pull/224) Closes [#217](https://github.com/raszi/node-tmp/issues/217): name tests must use tmpName ([@silkentrance](https://github.com/silkentrance))
32
+ * [#223](https://github.com/raszi/node-tmp/pull/223) Closes [#214](https://github.com/raszi/node-tmp/issues/214): refactor tests and lib ([@silkentrance](https://github.com/silkentrance))
33
+ * [#198](https://github.com/raszi/node-tmp/pull/198) Update dependencies to latest versions ([@matsev](https://github.com/matsev))
34
+
35
+ #### Committers: 2
36
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
37
+ - Mattias Severson ([@matsev](https://github.com/matsev))
38
+
39
+
40
+ ## v0.1.0 (2019-03-20)
41
+
42
+ #### :rocket: Enhancement
43
+ * [#177](https://github.com/raszi/node-tmp/pull/177) fix: fail early if there is no tmp dir specified ([@silkentrance](https://github.com/silkentrance))
44
+ * [#159](https://github.com/raszi/node-tmp/pull/159) Closes [#121](https://github.com/raszi/node-tmp/issues/121) ([@silkentrance](https://github.com/silkentrance))
45
+ * [#161](https://github.com/raszi/node-tmp/pull/161) Closes [#155](https://github.com/raszi/node-tmp/issues/155) ([@silkentrance](https://github.com/silkentrance))
46
+ * [#166](https://github.com/raszi/node-tmp/pull/166) fix: avoid relying on Node’s internals ([@addaleax](https://github.com/addaleax))
47
+ * [#144](https://github.com/raszi/node-tmp/pull/144) prepend opts.dir || tmpDir to template if no path is given ([@silkentrance](https://github.com/silkentrance))
48
+
49
+ #### :bug: Bug Fix
50
+ * [#183](https://github.com/raszi/node-tmp/pull/183) Closes [#182](https://github.com/raszi/node-tmp/issues/182) fileSync takes empty string postfix option ([@gutte](https://github.com/gutte))
51
+ * [#130](https://github.com/raszi/node-tmp/pull/130) Closes [#129](https://github.com/raszi/node-tmp/issues/129) install process listeners safely ([@silkentrance](https://github.com/silkentrance))
52
+
53
+ #### :memo: Documentation
54
+ * [#188](https://github.com/raszi/node-tmp/pull/188) HOTCloses [#187](https://github.com/raszi/node-tmp/issues/187): restore behaviour for #182 ([@silkentrance](https://github.com/silkentrance))
55
+ * [#180](https://github.com/raszi/node-tmp/pull/180) fix gh-179: template no longer accepts arbitrary paths ([@silkentrance](https://github.com/silkentrance))
56
+ * [#175](https://github.com/raszi/node-tmp/pull/175) docs: add `unsafeCleanup` option to jsdoc ([@kerimdzhanov](https://github.com/kerimdzhanov))
57
+ * [#151](https://github.com/raszi/node-tmp/pull/151) docs: fix link to tmp-promise ([@silkentrance](https://github.com/silkentrance))
58
+
59
+ #### :house: Internal
60
+ * [#184](https://github.com/raszi/node-tmp/pull/184) test: add missing tests for #182 ([@silkentrance](https://github.com/silkentrance))
61
+ * [#171](https://github.com/raszi/node-tmp/pull/171) chore: drop old NodeJS support ([@poppinlp](https://github.com/poppinlp))
62
+ * [#170](https://github.com/raszi/node-tmp/pull/170) chore: update dependencies ([@raszi](https://github.com/raszi))
63
+ * [#165](https://github.com/raszi/node-tmp/pull/165) test: add missing tests ([@raszi](https://github.com/raszi))
64
+ * [#163](https://github.com/raszi/node-tmp/pull/163) chore: add lint npm task ([@raszi](https://github.com/raszi))
65
+ * [#107](https://github.com/raszi/node-tmp/pull/107) chore: add coverage report ([@raszi](https://github.com/raszi))
66
+ * [#141](https://github.com/raszi/node-tmp/pull/141) test: refactor tests for mocha ([@silkentrance](https://github.com/silkentrance))
67
+ * [#154](https://github.com/raszi/node-tmp/pull/154) chore: change Travis configuration ([@raszi](https://github.com/raszi))
68
+ * [#152](https://github.com/raszi/node-tmp/pull/152) fix: drop Node v0.6.0 ([@raszi](https://github.com/raszi))
69
+
70
+ #### Committers: 6
71
+ - Anna Henningsen ([@addaleax](https://github.com/addaleax))
72
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
73
+ - Dan Kerimdzhanov ([@kerimdzhanov](https://github.com/kerimdzhanov))
74
+ - Gustav Klingstedt ([@gutte](https://github.com/gutte))
75
+ - KARASZI István ([@raszi](https://github.com/raszi))
76
+ - PoppinL ([@poppinlp](https://github.com/poppinlp))
77
+
78
+
79
+ ## v0.0.33 (2017-08-12)
80
+
81
+ #### :rocket: Enhancement
82
+ * [#147](https://github.com/raszi/node-tmp/pull/147) fix: with name option try at most once to get a unique tmp name ([@silkentrance](https://github.com/silkentrance))
83
+
84
+ #### :bug: Bug Fix
85
+ * [#149](https://github.com/raszi/node-tmp/pull/149) fix(fileSync): must honor detachDescriptor and discardDescriptor options ([@silkentrance](https://github.com/silkentrance))
86
+ * [#119](https://github.com/raszi/node-tmp/pull/119) Closes [#115](https://github.com/raszi/node-tmp/issues/115) ([@silkentrance](https://github.com/silkentrance))
87
+
88
+ #### :memo: Documentation
89
+ * [#128](https://github.com/raszi/node-tmp/pull/128) Closes [#127](https://github.com/raszi/node-tmp/issues/127) add reference to tmp-promise ([@silkentrance](https://github.com/silkentrance))
90
+
91
+ #### :house: Internal
92
+ * [#135](https://github.com/raszi/node-tmp/pull/135) Closes [#133](https://github.com/raszi/node-tmp/issues/133), #134 ([@silkentrance](https://github.com/silkentrance))
93
+ * [#123](https://github.com/raszi/node-tmp/pull/123) docs: update tmp.js MIT license header to 2017 ([@madnight](https://github.com/madnight))
94
+ * [#122](https://github.com/raszi/node-tmp/pull/122) chore: add issue template ([@silkentrance](https://github.com/silkentrance))
95
+
96
+ #### Committers: 2
97
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
98
+ - Fabian Beuke ([@madnight](https://github.com/madnight))
99
+
100
+
101
+ ## v0.0.32 (2017-03-24)
102
+
103
+ #### :memo: Documentation
104
+ * [#106](https://github.com/raszi/node-tmp/pull/106) doc: add proper JSDoc documentation ([@raszi](https://github.com/raszi))
105
+
106
+ #### :house: Internal
107
+ * [#111](https://github.com/raszi/node-tmp/pull/111) test: add Windows tests ([@binki](https://github.com/binki))
108
+ * [#110](https://github.com/raszi/node-tmp/pull/110) chore: add AppVeyor ([@binki](https://github.com/binki))
109
+ * [#105](https://github.com/raszi/node-tmp/pull/105) chore: use const where possible ([@raszi](https://github.com/raszi))
110
+ * [#104](https://github.com/raszi/node-tmp/pull/104) style: fix various style issues ([@raszi](https://github.com/raszi))
111
+
112
+ #### Committers: 2
113
+ - KARASZI István ([@raszi](https://github.com/raszi))
114
+ - Nathan Phillip Brink ([@binki](https://github.com/binki))
115
+
116
+
117
+ ## v0.0.31 (2016-11-21)
118
+
119
+ #### :rocket: Enhancement
120
+ * [#99](https://github.com/raszi/node-tmp/pull/99) feat: add next callback functionality ([@silkentrance](https://github.com/silkentrance))
121
+ * [#94](https://github.com/raszi/node-tmp/pull/94) feat: add options to control descriptor management ([@pabigot](https://github.com/pabigot))
122
+
123
+ #### :house: Internal
124
+ * [#101](https://github.com/raszi/node-tmp/pull/101) fix: Include files in the package.json ([@raszi](https://github.com/raszi))
125
+
126
+ #### Committers: 3
127
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
128
+ - KARASZI István ([@raszi](https://github.com/raszi))
129
+ - Peter A. Bigot ([@pabigot](https://github.com/pabigot))
130
+
131
+
132
+ ## v0.0.30 (2016-11-01)
133
+
134
+ #### :bug: Bug Fix
135
+ * [#96](https://github.com/raszi/node-tmp/pull/96) fix: constants for Node 6 ([@jnj16180340](https://github.com/jnj16180340))
136
+ * [#98](https://github.com/raszi/node-tmp/pull/98) fix: garbage collector ([@Ari-H](https://github.com/Ari-H))
137
+
138
+ #### Committers: 2
139
+ - Nate Johnson ([@jnj16180340](https://github.com/jnj16180340))
140
+ - [@Ari-H](https://github.com/Ari-H)
141
+
142
+
143
+ ## v0.0.29 (2016-09-18)
144
+
145
+ #### :rocket: Enhancement
146
+ * [#87](https://github.com/raszi/node-tmp/pull/87) fix: replace calls to deprecated fs API functions ([@OlliV](https://github.com/OlliV))
147
+
148
+ #### :bug: Bug Fix
149
+ * [#70](https://github.com/raszi/node-tmp/pull/70) fix: prune `_removeObjects` correctly ([@joliss](https://github.com/joliss))
150
+ * [#71](https://github.com/raszi/node-tmp/pull/71) Fix typo ([@gcampax](https://github.com/gcampax))
151
+
152
+ #### :memo: Documentation
153
+ * [#77](https://github.com/raszi/node-tmp/pull/77) docs: change mkstemps to mkstemp ([@thefourtheye](https://github.com/thefourtheye))
154
+
155
+ #### :house: Internal
156
+ * [#92](https://github.com/raszi/node-tmp/pull/92) chore: add Travis CI support for Node 6 ([@amilajack](https://github.com/amilajack))
157
+ * [#79](https://github.com/raszi/node-tmp/pull/79) fix: remove unneeded require statement ([@whmountains](https://github.com/whmountains))
158
+
159
+ #### Committers: 6
160
+ - Amila Welihinda ([@amilajack](https://github.com/amilajack))
161
+ - Caleb Whiting ([@whmountains](https://github.com/whmountains))
162
+ - Giovanni Campagna ([@gcampax](https://github.com/gcampax))
163
+ - Jo Liss ([@joliss](https://github.com/joliss))
164
+ - Olli Vanhoja ([@OlliV](https://github.com/OlliV))
165
+ - Sakthipriyan Vairamani ([@thefourtheye](https://github.com/thefourtheye))
166
+
167
+
168
+ ## v0.0.28 (2015-09-27)
169
+
170
+ #### :bug: Bug Fix
171
+ * [#63](https://github.com/raszi/node-tmp/pull/63) fix: delete for _rmdirRecursiveSync ([@voltrevo](https://github.com/voltrevo))
172
+
173
+ #### :memo: Documentation
174
+ * [#64](https://github.com/raszi/node-tmp/pull/64) docs: fix typo in the README ([@JTKnox91](https://github.com/JTKnox91))
175
+
176
+ #### :house: Internal
177
+ * [#67](https://github.com/raszi/node-tmp/pull/67) test: add node v4.0 v4.1 to travis config ([@raszi](https://github.com/raszi))
178
+ * [#66](https://github.com/raszi/node-tmp/pull/66) chore(deps): update deps ([@raszi](https://github.com/raszi))
179
+
180
+ #### Committers: 3
181
+ - Andrew Morris ([@voltrevo](https://github.com/voltrevo))
182
+ - John T. Knox ([@JTKnox91](https://github.com/JTKnox91))
183
+ - KARASZI István ([@raszi](https://github.com/raszi))
184
+
185
+
186
+ ## v0.0.27 (2015-08-15)
187
+
188
+ #### :bug: Bug Fix
189
+ * [#60](https://github.com/raszi/node-tmp/pull/60) fix: unlinking when the file has been already removed ([@silkentrance](https://github.com/silkentrance))
190
+
191
+ #### :memo: Documentation
192
+ * [#55](https://github.com/raszi/node-tmp/pull/55) docs(README): update README ([@raszi](https://github.com/raszi))
193
+
194
+ #### :house: Internal
195
+ * [#56](https://github.com/raszi/node-tmp/pull/56) style(jshint): fix JSHint error ([@raszi](https://github.com/raszi))
196
+ * [#53](https://github.com/raszi/node-tmp/pull/53) chore: update license attribute ([@pdehaan](https://github.com/pdehaan))
197
+
198
+ #### Committers: 3
199
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
200
+ - KARASZI István ([@raszi](https://github.com/raszi))
201
+ - Peter deHaan ([@pdehaan](https://github.com/pdehaan))
202
+
203
+
204
+ ## v0.0.26 (2015-05-12)
205
+
206
+ #### :rocket: Enhancement
207
+ * [#40](https://github.com/raszi/node-tmp/pull/40) Fix for #39 ([@silkentrance](https://github.com/silkentrance))
208
+ * [#42](https://github.com/raszi/node-tmp/pull/42) Fix for #17 ([@silkentrance](https://github.com/silkentrance))
209
+ * [#41](https://github.com/raszi/node-tmp/pull/41) Fix for #37 ([@silkentrance](https://github.com/silkentrance))
210
+ * [#32](https://github.com/raszi/node-tmp/pull/32) add ability to customize file/dir names ([@shime](https://github.com/shime))
211
+ * [#29](https://github.com/raszi/node-tmp/pull/29) tmp.file have responsibility to close file, not only unlink file ([@vhain](https://github.com/vhain))
212
+
213
+ #### :bug: Bug Fix
214
+ * [#51](https://github.com/raszi/node-tmp/pull/51) fix(windows): fix tempDir on windows ([@raszi](https://github.com/raszi))
215
+ * [#49](https://github.com/raszi/node-tmp/pull/49) remove object from _removeObjects if cleanup fn is called Closes [#48](https://github.com/raszi/node-tmp/issues/48) ([@bmeck](https://github.com/bmeck))
216
+
217
+ #### :memo: Documentation
218
+ * [#45](https://github.com/raszi/node-tmp/pull/45) Fix for #44 ([@silkentrance](https://github.com/silkentrance))
219
+
220
+ #### :house: Internal
221
+ * [#34](https://github.com/raszi/node-tmp/pull/34) Create LICENSE ([@ScottWeinstein](https://github.com/ScottWeinstein))
222
+
223
+ #### Committers: 6
224
+ - Bradley Farias ([@bmeck](https://github.com/bmeck))
225
+ - Carsten Klein ([@silkentrance](https://github.com/silkentrance))
226
+ - Hrvoje Šimić ([@shime](https://github.com/shime))
227
+ - Juwan Yoo ([@vhain](https://github.com/vhain))
228
+ - KARASZI István ([@raszi](https://github.com/raszi))
229
+ - Scott Weinstein ([@ScottWeinstein](https://github.com/ScottWeinstein))
230
+
231
+
232
+ ## v0.0.24 (2014-07-11)
233
+
234
+ #### :rocket: Enhancement
235
+ * [#25](https://github.com/raszi/node-tmp/pull/25) Added removeCallback passing ([@foxel](https://github.com/foxel))
236
+
237
+ #### Committers: 1
238
+ - Andrey Kupreychik ([@foxel](https://github.com/foxel))
239
+
240
+
241
+ ## v0.0.23 (2013-12-03)
242
+
243
+ #### :rocket: Enhancement
244
+ * [#21](https://github.com/raszi/node-tmp/pull/21) If we are not on node 0.8, don't register an uncaughtException handler ([@wibblymat](https://github.com/wibblymat))
245
+
246
+ #### Committers: 1
247
+ - Mat Scales ([@wibblymat](https://github.com/wibblymat))
248
+
249
+
250
+ ## v0.0.22 (2013-11-29)
251
+
252
+ #### :rocket: Enhancement
253
+ * [#19](https://github.com/raszi/node-tmp/pull/19) Rethrow only on node v0.8. ([@mcollina](https://github.com/mcollina))
254
+
255
+ #### Committers: 1
256
+ - Matteo Collina ([@mcollina](https://github.com/mcollina))
257
+
258
+
259
+ ## v0.0.21 (2013-08-07)
260
+
261
+ #### :bug: Bug Fix
262
+ * [#16](https://github.com/raszi/node-tmp/pull/16) Fix bug where we delete contents of symlinks ([@lightsofapollo](https://github.com/lightsofapollo))
263
+
264
+ #### Committers: 1
265
+ - James Lal ([@lightsofapollo](https://github.com/lightsofapollo))
266
+
267
+
268
+ ## v0.0.17 (2013-04-09)
269
+
270
+ #### :rocket: Enhancement
271
+ * [#9](https://github.com/raszi/node-tmp/pull/9) add recursive remove option ([@oscar-broman](https://github.com/oscar-broman))
272
+
273
+ #### Committers: 1
274
+ - [@oscar-broman](https://github.com/oscar-broman)
275
+
276
+
277
+ ## v0.0.14 (2012-08-26)
278
+
279
+ #### :rocket: Enhancement
280
+ * [#5](https://github.com/raszi/node-tmp/pull/5) Export _getTmpName for temporary file name creation ([@joscha](https://github.com/joscha))
281
+
282
+ #### Committers: 1
283
+ - Joscha Feth ([@joscha](https://github.com/joscha))
284
+
285
+
286
+ ## Previous Releases < v0.0.14
287
+
288
+ - no information available
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 KARASZI István
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,365 @@
1
+ # Tmp
2
+
3
+ A simple temporary file and directory creator for [node.js.][1]
4
+
5
+ [![Build Status](https://travis-ci.org/raszi/node-tmp.svg?branch=master)](https://travis-ci.org/raszi/node-tmp)
6
+ [![Dependencies](https://david-dm.org/raszi/node-tmp.svg)](https://david-dm.org/raszi/node-tmp)
7
+ [![npm version](https://badge.fury.io/js/tmp.svg)](https://badge.fury.io/js/tmp)
8
+ [![API documented](https://img.shields.io/badge/API-documented-brightgreen.svg)](https://raszi.github.io/node-tmp/)
9
+ [![Known Vulnerabilities](https://snyk.io/test/npm/tmp/badge.svg)](https://snyk.io/test/npm/tmp)
10
+
11
+ ## About
12
+
13
+ This is a [widely used library][2] to create temporary files and directories
14
+ in a [node.js][1] environment.
15
+
16
+ Tmp offers both an asynchronous and a synchronous API. For all API calls, all
17
+ the parameters are optional. There also exists a promisified version of the
18
+ API, see [tmp-promise][5].
19
+
20
+ Tmp uses crypto for determining random file names, or, when using templates,
21
+ a six letter random identifier. And just in case that you do not have that much
22
+ entropy left on your system, Tmp will fall back to pseudo random numbers.
23
+
24
+ You can set whether you want to remove the temporary file on process exit or
25
+ not.
26
+
27
+ If you do not want to store your temporary directories and files in the
28
+ standard OS temporary directory, then you are free to override that as well.
29
+
30
+ ## An Important Note on Compatibility
31
+
32
+ See the [CHANGELOG](./CHANGELOG.md) for more information.
33
+
34
+ ### Version 0.1.0
35
+
36
+ Since version 0.1.0, all support for node versions < 0.10.0 has been dropped.
37
+
38
+ Most importantly, any support for earlier versions of node-tmp was also dropped.
39
+
40
+ If you still require node versions < 0.10.0, then you must limit your node-tmp
41
+ dependency to versions below 0.1.0.
42
+
43
+ ### Version 0.0.33
44
+
45
+ Since version 0.0.33, all support for node versions < 0.8 has been dropped.
46
+
47
+ If you still require node version 0.8, then you must limit your node-tmp
48
+ dependency to version 0.0.33.
49
+
50
+ For node versions < 0.8 you must limit your node-tmp dependency to
51
+ versions < 0.0.33.
52
+
53
+ ## How to install
54
+
55
+ ```bash
56
+ npm install tmp
57
+ ```
58
+
59
+ ## Usage
60
+
61
+ Please also check [API docs][4].
62
+
63
+ ### Asynchronous file creation
64
+
65
+ Simple temporary file creation, the file will be closed and unlinked on process exit.
66
+
67
+ ```javascript
68
+ const tmp = require('tmp');
69
+
70
+ tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) {
71
+ if (err) throw err;
72
+
73
+ console.log('File: ', path);
74
+ console.log('Filedescriptor: ', fd);
75
+
76
+ // If we don't need the file anymore we could manually call the cleanupCallback
77
+ // But that is not necessary if we didn't pass the keep option because the library
78
+ // will clean after itself.
79
+ cleanupCallback();
80
+ });
81
+ ```
82
+
83
+ ### Synchronous file creation
84
+
85
+ A synchronous version of the above.
86
+
87
+ ```javascript
88
+ const tmp = require('tmp');
89
+
90
+ const tmpobj = tmp.fileSync();
91
+ console.log('File: ', tmpobj.name);
92
+ console.log('Filedescriptor: ', tmpobj.fd);
93
+
94
+ // If we don't need the file anymore we could manually call the removeCallback
95
+ // But that is not necessary if we didn't pass the keep option because the library
96
+ // will clean after itself.
97
+ tmpobj.removeCallback();
98
+ ```
99
+
100
+ Note that this might throw an exception if either the maximum limit of retries
101
+ for creating a temporary name fails, or, in case that you do not have the permission
102
+ to write to the directory where the temporary file should be created in.
103
+
104
+ ### Asynchronous directory creation
105
+
106
+ Simple temporary directory creation, it will be removed on process exit.
107
+
108
+ If the directory still contains items on process exit, then it won't be removed.
109
+
110
+ ```javascript
111
+ const tmp = require('tmp');
112
+
113
+ tmp.dir(function _tempDirCreated(err, path, cleanupCallback) {
114
+ if (err) throw err;
115
+
116
+ console.log('Dir: ', path);
117
+
118
+ // Manual cleanup
119
+ cleanupCallback();
120
+ });
121
+ ```
122
+
123
+ If you want to cleanup the directory even when there are entries in it, then
124
+ you can pass the `unsafeCleanup` option when creating it.
125
+
126
+ ### Synchronous directory creation
127
+
128
+ A synchronous version of the above.
129
+
130
+ ```javascript
131
+ const tmp = require('tmp');
132
+
133
+ const tmpobj = tmp.dirSync();
134
+ console.log('Dir: ', tmpobj.name);
135
+ // Manual cleanup
136
+ tmpobj.removeCallback();
137
+ ```
138
+
139
+ Note that this might throw an exception if either the maximum limit of retries
140
+ for creating a temporary name fails, or, in case that you do not have the permission
141
+ to write to the directory where the temporary directory should be created in.
142
+
143
+ ### Asynchronous filename generation
144
+
145
+ It is possible with this library to generate a unique filename in the specified
146
+ directory.
147
+
148
+ ```javascript
149
+ const tmp = require('tmp');
150
+
151
+ tmp.tmpName(function _tempNameGenerated(err, path) {
152
+ if (err) throw err;
153
+
154
+ console.log('Created temporary filename: ', path);
155
+ });
156
+ ```
157
+
158
+ ### Synchronous filename generation
159
+
160
+ A synchronous version of the above.
161
+
162
+ ```javascript
163
+ const tmp = require('tmp');
164
+
165
+ const name = tmp.tmpNameSync();
166
+ console.log('Created temporary filename: ', name);
167
+ ```
168
+
169
+ ## Advanced usage
170
+
171
+ ### Asynchronous file creation
172
+
173
+ Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`.
174
+
175
+ ```javascript
176
+ const tmp = require('tmp');
177
+
178
+ tmp.file({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) {
179
+ if (err) throw err;
180
+
181
+ console.log('File: ', path);
182
+ console.log('Filedescriptor: ', fd);
183
+ });
184
+ ```
185
+
186
+ ### Synchronous file creation
187
+
188
+ A synchronous version of the above.
189
+
190
+ ```javascript
191
+ const tmp = require('tmp');
192
+
193
+ const tmpobj = tmp.fileSync({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' });
194
+ console.log('File: ', tmpobj.name);
195
+ console.log('Filedescriptor: ', tmpobj.fd);
196
+ ```
197
+
198
+ ### Controlling the Descriptor
199
+
200
+ As a side effect of creating a unique file `tmp` gets a file descriptor that is
201
+ returned to the user as the `fd` parameter. The descriptor may be used by the
202
+ application and is closed when the `removeCallback` is invoked.
203
+
204
+ In some use cases the application does not need the descriptor, needs to close it
205
+ without removing the file, or needs to remove the file without closing the
206
+ descriptor. Two options control how the descriptor is managed:
207
+
208
+ * `discardDescriptor` - if `true` causes `tmp` to close the descriptor after the file
209
+ is created. In this case the `fd` parameter is undefined.
210
+ * `detachDescriptor` - if `true` causes `tmp` to return the descriptor in the `fd`
211
+ parameter, but it is the application's responsibility to close it when it is no
212
+ longer needed.
213
+
214
+ ```javascript
215
+ const tmp = require('tmp');
216
+
217
+ tmp.file({ discardDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
218
+ if (err) throw err;
219
+ // fd will be undefined, allowing application to use fs.createReadStream(path)
220
+ // without holding an unused descriptor open.
221
+ });
222
+ ```
223
+
224
+ ```javascript
225
+ const tmp = require('tmp');
226
+
227
+ tmp.file({ detachDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
228
+ if (err) throw err;
229
+
230
+ cleanupCallback();
231
+ // Application can store data through fd here; the space used will automatically
232
+ // be reclaimed by the operating system when the descriptor is closed or program
233
+ // terminates.
234
+ });
235
+ ```
236
+
237
+ ### Asynchronous directory creation
238
+
239
+ Creates a directory with mode `0755`, prefix will be `myTmpDir_`.
240
+
241
+ ```javascript
242
+ const tmp = require('tmp');
243
+
244
+ tmp.dir({ mode: 0o750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) {
245
+ if (err) throw err;
246
+
247
+ console.log('Dir: ', path);
248
+ });
249
+ ```
250
+
251
+ ### Synchronous directory creation
252
+
253
+ Again, a synchronous version of the above.
254
+
255
+ ```javascript
256
+ const tmp = require('tmp');
257
+
258
+ const tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' });
259
+ console.log('Dir: ', tmpobj.name);
260
+ ```
261
+
262
+ ### mkstemp like, asynchronously
263
+
264
+ Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`.
265
+
266
+ IMPORTANT NOTE: template no longer accepts a path. Use the dir option instead if you
267
+ require tmp to create your temporary filesystem object in a different place than the
268
+ default `tmp.tmpdir`.
269
+
270
+ ```javascript
271
+ const tmp = require('tmp');
272
+
273
+ tmp.dir({ template: 'tmp-XXXXXX' }, function _tempDirCreated(err, path) {
274
+ if (err) throw err;
275
+
276
+ console.log('Dir: ', path);
277
+ });
278
+ ```
279
+
280
+ ### mkstemp like, synchronously
281
+
282
+ This will behave similarly to the asynchronous version.
283
+
284
+ ```javascript
285
+ const tmp = require('tmp');
286
+
287
+ const tmpobj = tmp.dirSync({ template: 'tmp-XXXXXX' });
288
+ console.log('Dir: ', tmpobj.name);
289
+ ```
290
+
291
+ ### Asynchronous filename generation
292
+
293
+ Using `tmpName()` you can create temporary file names asynchronously.
294
+ The function accepts all standard options, e.g. `prefix`, `postfix`, `dir`, and so on.
295
+
296
+ You can also leave out the options altogether and just call the function with a callback as first parameter.
297
+
298
+ ```javascript
299
+ const tmp = require('tmp');
300
+
301
+ const options = {};
302
+
303
+ tmp.tmpName(options, function _tempNameGenerated(err, path) {
304
+ if (err) throw err;
305
+
306
+ console.log('Created temporary filename: ', path);
307
+ });
308
+ ```
309
+
310
+ ### Synchronous filename generation
311
+
312
+ The `tmpNameSync()` function works similarly to `tmpName()`.
313
+ Again, you can leave out the options altogether and just invoke the function without any parameters.
314
+
315
+ ```javascript
316
+ const tmp = require('tmp');
317
+ const options = {};
318
+ const tmpname = tmp.tmpNameSync(options);
319
+ console.log('Created temporary filename: ', tmpname);
320
+ ```
321
+
322
+ ## Graceful cleanup
323
+
324
+ If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the
325
+ temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary
326
+ object removal.
327
+
328
+ To enforce this, you can call the `setGracefulCleanup()` method:
329
+
330
+ ```javascript
331
+ const tmp = require('tmp');
332
+
333
+ tmp.setGracefulCleanup();
334
+ ```
335
+
336
+ ## Options
337
+
338
+ All options are optional :)
339
+
340
+ * `name`: a fixed name that overrides random name generation, the name must be relative and must not contain path segments
341
+ * `mode`: the file mode to create with, falls back to `0o600` on file creation and `0o700` on directory creation
342
+ * `prefix`: the optional prefix, defaults to `tmp`
343
+ * `postfix`: the optional postfix
344
+ * `template`: [`mkstemp`][3] like filename template, no default, can be either an absolute or a relative path that resolves
345
+ to a relative path of the system's default temporary directory, must include `XXXXXX` once for random name generation, e.g.
346
+ 'foo/bar/XXXXXX'. Absolute paths are also fine as long as they are relative to os.tmpdir().
347
+ Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access,
348
+ as tmp will not check the availability of the path, nor will it establish the requested path for you.
349
+ * `dir`: the optional temporary directory that must be relative to the system's default temporary directory.
350
+ absolute paths are fine as long as they point to a location under the system's default temporary directory.
351
+ Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access,
352
+ as tmp will not check the availability of the path, nor will it establish the requested path for you.
353
+ * `tmpdir`: allows you to override the system's root tmp directory
354
+ * `tries`: how many times should the function try to get a unique filename before giving up, default `3`
355
+ * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`
356
+ * In order to clean up, you will have to call the provided `cleanupCallback` function manually.
357
+ * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false`
358
+ * `detachDescriptor`: detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection
359
+ * `discardDescriptor`: discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection
360
+
361
+ [1]: http://nodejs.org/
362
+ [2]: https://www.npmjs.com/browse/depended/tmp
363
+ [3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html
364
+ [4]: https://raszi.github.io/node-tmp/
365
+ [5]: https://github.com/benjamingr/tmp-promise