UrgentcareCLI 0.1.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/lib/UrgentCare/CLI.rb +1 -2
  3. data/lib/UrgentCare/Scraper.rb +65 -0
  4. data/lib/UrgentCare/version.rb +2 -2
  5. data/lib/UrgentCare.rb +1 -0
  6. metadata +3 -313
  7. data/.gitignore +0 -11
  8. data/.rspec +0 -3
  9. data/.travis.yml +0 -5
  10. data/CODE_OF_CONDUCT.md +0 -74
  11. data/Gemfile +0 -12
  12. data/Gemfile.lock +0 -84
  13. data/LICENSE.txt +0 -21
  14. data/Notes +0 -41
  15. data/README.md +0 -41
  16. data/Rakefile +0 -8
  17. data/UrgentCare.gemspec +0 -39
  18. data/background.jpg +0 -0
  19. data/data.txt +0 -4
  20. data/lib/Urgentcare/Scraper.rb +0 -78
  21. data/node_modules/.bin/rimraf +0 -1
  22. data/node_modules/.package-lock.json +0 -250
  23. data/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  24. data/node_modules/balanced-match/LICENSE.md +0 -21
  25. data/node_modules/balanced-match/README.md +0 -97
  26. data/node_modules/balanced-match/index.js +0 -62
  27. data/node_modules/balanced-match/package.json +0 -48
  28. data/node_modules/brace-expansion/LICENSE +0 -21
  29. data/node_modules/brace-expansion/README.md +0 -129
  30. data/node_modules/brace-expansion/index.js +0 -201
  31. data/node_modules/brace-expansion/package.json +0 -47
  32. data/node_modules/concat-map/.travis.yml +0 -4
  33. data/node_modules/concat-map/LICENSE +0 -18
  34. data/node_modules/concat-map/README.markdown +0 -62
  35. data/node_modules/concat-map/example/map.js +0 -6
  36. data/node_modules/concat-map/index.js +0 -13
  37. data/node_modules/concat-map/package.json +0 -43
  38. data/node_modules/concat-map/test/map.js +0 -39
  39. data/node_modules/core-util-is/LICENSE +0 -19
  40. data/node_modules/core-util-is/README.md +0 -3
  41. data/node_modules/core-util-is/float.patch +0 -604
  42. data/node_modules/core-util-is/lib/util.js +0 -107
  43. data/node_modules/core-util-is/package.json +0 -32
  44. data/node_modules/core-util-is/test.js +0 -68
  45. data/node_modules/fs.realpath/LICENSE +0 -43
  46. data/node_modules/fs.realpath/README.md +0 -33
  47. data/node_modules/fs.realpath/index.js +0 -66
  48. data/node_modules/fs.realpath/old.js +0 -303
  49. data/node_modules/fs.realpath/package.json +0 -26
  50. data/node_modules/glob/LICENSE +0 -21
  51. data/node_modules/glob/README.md +0 -375
  52. data/node_modules/glob/changelog.md +0 -67
  53. data/node_modules/glob/common.js +0 -234
  54. data/node_modules/glob/glob.js +0 -788
  55. data/node_modules/glob/package.json +0 -51
  56. data/node_modules/glob/sync.js +0 -484
  57. data/node_modules/immediate/LICENSE.txt +0 -20
  58. data/node_modules/immediate/README.md +0 -93
  59. data/node_modules/immediate/dist/immediate.js +0 -75
  60. data/node_modules/immediate/dist/immediate.min.js +0 -1
  61. data/node_modules/immediate/lib/browser.js +0 -69
  62. data/node_modules/immediate/lib/index.js +0 -73
  63. data/node_modules/immediate/package.json +0 -42
  64. data/node_modules/inflight/LICENSE +0 -15
  65. data/node_modules/inflight/README.md +0 -37
  66. data/node_modules/inflight/inflight.js +0 -54
  67. data/node_modules/inflight/package.json +0 -29
  68. data/node_modules/inherits/LICENSE +0 -16
  69. data/node_modules/inherits/README.md +0 -42
  70. data/node_modules/inherits/inherits.js +0 -9
  71. data/node_modules/inherits/inherits_browser.js +0 -27
  72. data/node_modules/inherits/package.json +0 -29
  73. data/node_modules/isarray/.npmignore +0 -1
  74. data/node_modules/isarray/.travis.yml +0 -4
  75. data/node_modules/isarray/Makefile +0 -6
  76. data/node_modules/isarray/README.md +0 -60
  77. data/node_modules/isarray/component.json +0 -19
  78. data/node_modules/isarray/index.js +0 -5
  79. data/node_modules/isarray/package.json +0 -45
  80. data/node_modules/isarray/test.js +0 -20
  81. data/node_modules/jszip/.codeclimate.yml +0 -16
  82. data/node_modules/jszip/.editorconfig +0 -8
  83. data/node_modules/jszip/.jshintignore +0 -1
  84. data/node_modules/jszip/.jshintrc +0 -21
  85. data/node_modules/jszip/.travis.yml +0 -17
  86. data/node_modules/jszip/CHANGES.md +0 -163
  87. data/node_modules/jszip/LICENSE.markdown +0 -651
  88. data/node_modules/jszip/README.markdown +0 -35
  89. data/node_modules/jszip/dist/jszip.js +0 -30
  90. data/node_modules/jszip/dist/jszip.min.js +0 -13
  91. data/node_modules/jszip/index.d.ts +0 -270
  92. data/node_modules/jszip/lib/base64.js +0 -106
  93. data/node_modules/jszip/lib/compressedObject.js +0 -74
  94. data/node_modules/jszip/lib/compressions.js +0 -14
  95. data/node_modules/jszip/lib/crc32.js +0 -77
  96. data/node_modules/jszip/lib/defaults.js +0 -11
  97. data/node_modules/jszip/lib/external.js +0 -19
  98. data/node_modules/jszip/lib/flate.js +0 -85
  99. data/node_modules/jszip/lib/generate/ZipFileWorker.js +0 -540
  100. data/node_modules/jszip/lib/generate/index.js +0 -57
  101. data/node_modules/jszip/lib/index.js +0 -52
  102. data/node_modules/jszip/lib/license_header.js +0 -11
  103. data/node_modules/jszip/lib/load.js +0 -81
  104. data/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +0 -74
  105. data/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +0 -42
  106. data/node_modules/jszip/lib/nodejsUtils.js +0 -57
  107. data/node_modules/jszip/lib/object.js +0 -389
  108. data/node_modules/jszip/lib/readable-stream-browser.js +0 -9
  109. data/node_modules/jszip/lib/reader/ArrayReader.js +0 -57
  110. data/node_modules/jszip/lib/reader/DataReader.js +0 -116
  111. data/node_modules/jszip/lib/reader/NodeBufferReader.js +0 -19
  112. data/node_modules/jszip/lib/reader/StringReader.js +0 -38
  113. data/node_modules/jszip/lib/reader/Uint8ArrayReader.js +0 -22
  114. data/node_modules/jszip/lib/reader/readerFor.js +0 -28
  115. data/node_modules/jszip/lib/signature.js +0 -7
  116. data/node_modules/jszip/lib/stream/ConvertWorker.js +0 -26
  117. data/node_modules/jszip/lib/stream/Crc32Probe.js +0 -24
  118. data/node_modules/jszip/lib/stream/DataLengthProbe.js +0 -29
  119. data/node_modules/jszip/lib/stream/DataWorker.js +0 -116
  120. data/node_modules/jszip/lib/stream/GenericWorker.js +0 -263
  121. data/node_modules/jszip/lib/stream/StreamHelper.js +0 -212
  122. data/node_modules/jszip/lib/support.js +0 -38
  123. data/node_modules/jszip/lib/utf8.js +0 -275
  124. data/node_modules/jszip/lib/utils.js +0 -476
  125. data/node_modules/jszip/lib/zipEntries.js +0 -262
  126. data/node_modules/jszip/lib/zipEntry.js +0 -294
  127. data/node_modules/jszip/lib/zipObject.js +0 -133
  128. data/node_modules/jszip/package.json +0 -63
  129. data/node_modules/jszip/vendor/FileSaver.js +0 -247
  130. data/node_modules/lie/README.md +0 -62
  131. data/node_modules/lie/dist/lie.js +0 -350
  132. data/node_modules/lie/dist/lie.min.js +0 -1
  133. data/node_modules/lie/dist/lie.polyfill.js +0 -358
  134. data/node_modules/lie/dist/lie.polyfill.min.js +0 -1
  135. data/node_modules/lie/lib/browser.js +0 -273
  136. data/node_modules/lie/lib/index.js +0 -298
  137. data/node_modules/lie/license.md +0 -7
  138. data/node_modules/lie/lie.d.ts +0 -244
  139. data/node_modules/lie/package.json +0 -69
  140. data/node_modules/lie/polyfill.js +0 -4
  141. data/node_modules/minimatch/LICENSE +0 -15
  142. data/node_modules/minimatch/README.md +0 -209
  143. data/node_modules/minimatch/minimatch.js +0 -923
  144. data/node_modules/minimatch/package.json +0 -30
  145. data/node_modules/once/LICENSE +0 -15
  146. data/node_modules/once/README.md +0 -79
  147. data/node_modules/once/once.js +0 -42
  148. data/node_modules/once/package.json +0 -33
  149. data/node_modules/pako/CHANGELOG.md +0 -164
  150. data/node_modules/pako/LICENSE +0 -21
  151. data/node_modules/pako/README.md +0 -191
  152. data/node_modules/pako/dist/pako.js +0 -6818
  153. data/node_modules/pako/dist/pako.min.js +0 -1
  154. data/node_modules/pako/dist/pako_deflate.js +0 -3997
  155. data/node_modules/pako/dist/pako_deflate.min.js +0 -1
  156. data/node_modules/pako/dist/pako_inflate.js +0 -3300
  157. data/node_modules/pako/dist/pako_inflate.min.js +0 -1
  158. data/node_modules/pako/index.js +0 -14
  159. data/node_modules/pako/lib/deflate.js +0 -400
  160. data/node_modules/pako/lib/inflate.js +0 -423
  161. data/node_modules/pako/lib/utils/common.js +0 -105
  162. data/node_modules/pako/lib/utils/strings.js +0 -187
  163. data/node_modules/pako/lib/zlib/README +0 -59
  164. data/node_modules/pako/lib/zlib/adler32.js +0 -51
  165. data/node_modules/pako/lib/zlib/constants.js +0 -68
  166. data/node_modules/pako/lib/zlib/crc32.js +0 -59
  167. data/node_modules/pako/lib/zlib/deflate.js +0 -1874
  168. data/node_modules/pako/lib/zlib/gzheader.js +0 -58
  169. data/node_modules/pako/lib/zlib/inffast.js +0 -345
  170. data/node_modules/pako/lib/zlib/inflate.js +0 -1556
  171. data/node_modules/pako/lib/zlib/inftrees.js +0 -343
  172. data/node_modules/pako/lib/zlib/messages.js +0 -32
  173. data/node_modules/pako/lib/zlib/trees.js +0 -1222
  174. data/node_modules/pako/lib/zlib/zstream.js +0 -47
  175. data/node_modules/pako/package.json +0 -44
  176. data/node_modules/path-is-absolute/index.js +0 -20
  177. data/node_modules/path-is-absolute/license +0 -21
  178. data/node_modules/path-is-absolute/package.json +0 -43
  179. data/node_modules/path-is-absolute/readme.md +0 -59
  180. data/node_modules/process-nextick-args/index.js +0 -45
  181. data/node_modules/process-nextick-args/license.md +0 -19
  182. data/node_modules/process-nextick-args/package.json +0 -25
  183. data/node_modules/process-nextick-args/readme.md +0 -18
  184. data/node_modules/readable-stream/.travis.yml +0 -34
  185. data/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  186. data/node_modules/readable-stream/GOVERNANCE.md +0 -136
  187. data/node_modules/readable-stream/LICENSE +0 -47
  188. data/node_modules/readable-stream/README.md +0 -58
  189. data/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  190. data/node_modules/readable-stream/duplex-browser.js +0 -1
  191. data/node_modules/readable-stream/duplex.js +0 -1
  192. data/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
  193. data/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
  194. data/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
  195. data/node_modules/readable-stream/lib/_stream_transform.js +0 -214
  196. data/node_modules/readable-stream/lib/_stream_writable.js +0 -687
  197. data/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  198. data/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
  199. data/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  200. data/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  201. data/node_modules/readable-stream/package.json +0 -52
  202. data/node_modules/readable-stream/passthrough.js +0 -1
  203. data/node_modules/readable-stream/readable-browser.js +0 -7
  204. data/node_modules/readable-stream/readable.js +0 -19
  205. data/node_modules/readable-stream/transform.js +0 -1
  206. data/node_modules/readable-stream/writable-browser.js +0 -1
  207. data/node_modules/readable-stream/writable.js +0 -8
  208. data/node_modules/rimraf/LICENSE +0 -15
  209. data/node_modules/rimraf/README.md +0 -101
  210. data/node_modules/rimraf/bin.js +0 -50
  211. data/node_modules/rimraf/package.json +0 -29
  212. data/node_modules/rimraf/rimraf.js +0 -372
  213. data/node_modules/safe-buffer/LICENSE +0 -21
  214. data/node_modules/safe-buffer/README.md +0 -584
  215. data/node_modules/safe-buffer/index.d.ts +0 -187
  216. data/node_modules/safe-buffer/index.js +0 -62
  217. data/node_modules/safe-buffer/package.json +0 -37
  218. data/node_modules/selenium-webdriver/CHANGES.md +0 -1114
  219. data/node_modules/selenium-webdriver/LICENSE +0 -202
  220. data/node_modules/selenium-webdriver/NOTICE +0 -2
  221. data/node_modules/selenium-webdriver/README.md +0 -229
  222. data/node_modules/selenium-webdriver/chrome.js +0 -295
  223. data/node_modules/selenium-webdriver/chromium.js +0 -829
  224. data/node_modules/selenium-webdriver/devtools/CDPConnection.js +0 -35
  225. data/node_modules/selenium-webdriver/edge.js +0 -224
  226. data/node_modules/selenium-webdriver/example/chrome_android.js +0 -45
  227. data/node_modules/selenium-webdriver/example/chrome_mobile_emulation.js +0 -46
  228. data/node_modules/selenium-webdriver/example/firefox_channels.js +0 -84
  229. data/node_modules/selenium-webdriver/example/google_search.js +0 -50
  230. data/node_modules/selenium-webdriver/example/google_search_test.js +0 -70
  231. data/node_modules/selenium-webdriver/example/headless.js +0 -63
  232. data/node_modules/selenium-webdriver/example/logging.js +0 -64
  233. data/node_modules/selenium-webdriver/firefox.js +0 -789
  234. data/node_modules/selenium-webdriver/http/index.js +0 -324
  235. data/node_modules/selenium-webdriver/http/util.js +0 -172
  236. data/node_modules/selenium-webdriver/ie.js +0 -503
  237. data/node_modules/selenium-webdriver/index.js +0 -825
  238. data/node_modules/selenium-webdriver/io/exec.js +0 -162
  239. data/node_modules/selenium-webdriver/io/index.js +0 -348
  240. data/node_modules/selenium-webdriver/io/zip.js +0 -223
  241. data/node_modules/selenium-webdriver/lib/atoms/find-elements.js +0 -123
  242. data/node_modules/selenium-webdriver/lib/atoms/get-attribute.js +0 -101
  243. data/node_modules/selenium-webdriver/lib/atoms/is-displayed.js +0 -101
  244. data/node_modules/selenium-webdriver/lib/atoms/mutation-listener.js +0 -55
  245. data/node_modules/selenium-webdriver/lib/by.js +0 -415
  246. data/node_modules/selenium-webdriver/lib/capabilities.js +0 -553
  247. data/node_modules/selenium-webdriver/lib/command.js +0 -206
  248. data/node_modules/selenium-webdriver/lib/error.js +0 -605
  249. data/node_modules/selenium-webdriver/lib/http.js +0 -704
  250. data/node_modules/selenium-webdriver/lib/input.js +0 -946
  251. data/node_modules/selenium-webdriver/lib/logging.js +0 -661
  252. data/node_modules/selenium-webdriver/lib/promise.js +0 -285
  253. data/node_modules/selenium-webdriver/lib/proxy.js +0 -212
  254. data/node_modules/selenium-webdriver/lib/session.js +0 -77
  255. data/node_modules/selenium-webdriver/lib/symbols.js +0 -37
  256. data/node_modules/selenium-webdriver/lib/until.js +0 -429
  257. data/node_modules/selenium-webdriver/lib/webdriver.js +0 -2919
  258. data/node_modules/selenium-webdriver/net/index.js +0 -107
  259. data/node_modules/selenium-webdriver/net/portprober.js +0 -75
  260. data/node_modules/selenium-webdriver/opera.js +0 -406
  261. data/node_modules/selenium-webdriver/package.json +0 -54
  262. data/node_modules/selenium-webdriver/proxy.js +0 -32
  263. data/node_modules/selenium-webdriver/remote/index.js +0 -624
  264. data/node_modules/selenium-webdriver/safari.js +0 -168
  265. data/node_modules/selenium-webdriver/testing/index.js +0 -504
  266. data/node_modules/set-immediate-shim/index.js +0 -7
  267. data/node_modules/set-immediate-shim/package.json +0 -34
  268. data/node_modules/set-immediate-shim/readme.md +0 -31
  269. data/node_modules/string_decoder/.travis.yml +0 -50
  270. data/node_modules/string_decoder/LICENSE +0 -48
  271. data/node_modules/string_decoder/README.md +0 -47
  272. data/node_modules/string_decoder/lib/string_decoder.js +0 -296
  273. data/node_modules/string_decoder/package.json +0 -31
  274. data/node_modules/tmp/CHANGELOG.md +0 -288
  275. data/node_modules/tmp/LICENSE +0 -21
  276. data/node_modules/tmp/README.md +0 -365
  277. data/node_modules/tmp/lib/tmp.js +0 -780
  278. data/node_modules/tmp/node_modules/.bin/rimraf +0 -1
  279. data/node_modules/tmp/node_modules/rimraf/CHANGELOG.md +0 -65
  280. data/node_modules/tmp/node_modules/rimraf/LICENSE +0 -15
  281. data/node_modules/tmp/node_modules/rimraf/README.md +0 -101
  282. data/node_modules/tmp/node_modules/rimraf/bin.js +0 -68
  283. data/node_modules/tmp/node_modules/rimraf/package.json +0 -32
  284. data/node_modules/tmp/node_modules/rimraf/rimraf.js +0 -360
  285. data/node_modules/tmp/package.json +0 -58
  286. data/node_modules/util-deprecate/History.md +0 -16
  287. data/node_modules/util-deprecate/LICENSE +0 -24
  288. data/node_modules/util-deprecate/README.md +0 -53
  289. data/node_modules/util-deprecate/browser.js +0 -67
  290. data/node_modules/util-deprecate/node.js +0 -6
  291. data/node_modules/util-deprecate/package.json +0 -27
  292. data/node_modules/wrappy/LICENSE +0 -15
  293. data/node_modules/wrappy/README.md +0 -36
  294. data/node_modules/wrappy/package.json +0 -29
  295. data/node_modules/wrappy/wrappy.js +0 -33
  296. data/node_modules/ws/LICENSE +0 -21
  297. data/node_modules/ws/README.md +0 -496
  298. data/node_modules/ws/browser.js +0 -8
  299. data/node_modules/ws/index.js +0 -10
  300. data/node_modules/ws/lib/buffer-util.js +0 -129
  301. data/node_modules/ws/lib/constants.js +0 -10
  302. data/node_modules/ws/lib/event-target.js +0 -184
  303. data/node_modules/ws/lib/extension.js +0 -223
  304. data/node_modules/ws/lib/limiter.js +0 -55
  305. data/node_modules/ws/lib/permessage-deflate.js +0 -517
  306. data/node_modules/ws/lib/receiver.js +0 -507
  307. data/node_modules/ws/lib/sender.js +0 -405
  308. data/node_modules/ws/lib/stream.js +0 -165
  309. data/node_modules/ws/lib/validation.js +0 -104
  310. data/node_modules/ws/lib/websocket-server.js +0 -418
  311. data/node_modules/ws/lib/websocket.js +0 -942
  312. data/node_modules/ws/package.json +0 -56
  313. data/package-lock.json +0 -458
  314. data/package.json +0 -5
  315. data/selenium.log +0 -1
  316. data/spec.md +0 -6
  317. data/test.data +0 -2110
@@ -1,31 +0,0 @@
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
- }
@@ -1,288 +0,0 @@
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
@@ -1,21 +0,0 @@
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.
@@ -1,365 +0,0 @@
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