@oneblink/release-cli 1.2.0-beta.3 → 1.2.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -2
- package/node_modules/@yarnpkg/lockfile/README.md +0 -22
- package/node_modules/@yarnpkg/lockfile/index.js +0 -10273
- package/node_modules/@yarnpkg/lockfile/package.json +0 -19
- package/node_modules/ansi-styles/index.js +0 -165
- package/node_modules/ansi-styles/license +0 -9
- package/node_modules/ansi-styles/package.json +0 -60
- package/node_modules/ansi-styles/readme.md +0 -147
- package/node_modules/balanced-match/.github/FUNDING.yml +0 -2
- package/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/balanced-match/README.md +0 -97
- package/node_modules/balanced-match/index.js +0 -62
- package/node_modules/balanced-match/package.json +0 -52
- package/node_modules/brace-expansion/LICENSE +0 -21
- package/node_modules/brace-expansion/README.md +0 -129
- package/node_modules/brace-expansion/index.js +0 -201
- package/node_modules/brace-expansion/package.json +0 -51
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/braces/LICENSE +0 -21
- package/node_modules/braces/README.md +0 -593
- package/node_modules/braces/index.js +0 -170
- package/node_modules/braces/lib/compile.js +0 -57
- package/node_modules/braces/lib/constants.js +0 -57
- package/node_modules/braces/lib/expand.js +0 -113
- package/node_modules/braces/lib/parse.js +0 -333
- package/node_modules/braces/lib/stringify.js +0 -32
- package/node_modules/braces/lib/utils.js +0 -112
- package/node_modules/braces/package.json +0 -81
- package/node_modules/chalk/index.js +0 -228
- package/node_modules/chalk/index.js.flow +0 -93
- package/node_modules/chalk/license +0 -9
- package/node_modules/chalk/package.json +0 -75
- package/node_modules/chalk/readme.md +0 -314
- package/node_modules/chalk/templates.js +0 -128
- package/node_modules/chalk/types/index.d.ts +0 -97
- package/node_modules/ci-info/CHANGELOG.md +0 -78
- package/node_modules/ci-info/LICENSE +0 -21
- package/node_modules/ci-info/README.md +0 -108
- package/node_modules/ci-info/index.js +0 -66
- package/node_modules/ci-info/package.json +0 -40
- package/node_modules/ci-info/vendors.json +0 -153
- package/node_modules/color-convert/CHANGELOG.md +0 -54
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -868
- package/node_modules/color-convert/index.js +0 -78
- package/node_modules/color-convert/package.json +0 -50
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/.eslintrc.json +0 -43
- package/node_modules/color-name/.npmignore +0 -107
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -29
- package/node_modules/color-name/test.js +0 -7
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/LICENSE +0 -18
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -47
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/escape-string-regexp/index.js +0 -11
- package/node_modules/escape-string-regexp/license +0 -21
- package/node_modules/escape-string-regexp/package.json +0 -45
- package/node_modules/escape-string-regexp/readme.md +0 -27
- package/node_modules/fill-range/LICENSE +0 -21
- package/node_modules/fill-range/README.md +0 -237
- package/node_modules/fill-range/index.js +0 -249
- package/node_modules/fill-range/package.json +0 -73
- package/node_modules/find-yarn-workspace-root/CHANGELOG.md +0 -53
- package/node_modules/find-yarn-workspace-root/LICENSE +0 -201
- package/node_modules/find-yarn-workspace-root/README.md +0 -56
- package/node_modules/find-yarn-workspace-root/index.d.ts +0 -3
- package/node_modules/find-yarn-workspace-root/index.js +0 -53
- package/node_modules/find-yarn-workspace-root/package.json +0 -38
- package/node_modules/fs-extra/CHANGELOG.md +0 -842
- package/node_modules/fs-extra/LICENSE +0 -15
- package/node_modules/fs-extra/README.md +0 -261
- package/node_modules/fs-extra/lib/copy/copy.js +0 -246
- package/node_modules/fs-extra/lib/copy/index.js +0 -6
- package/node_modules/fs-extra/lib/copy-sync/copy-sync.js +0 -193
- package/node_modules/fs-extra/lib/copy-sync/index.js +0 -5
- package/node_modules/fs-extra/lib/empty/index.js +0 -48
- package/node_modules/fs-extra/lib/ensure/file.js +0 -49
- package/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/node_modules/fs-extra/lib/ensure/link.js +0 -61
- package/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -99
- package/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -31
- package/node_modules/fs-extra/lib/ensure/symlink.js +0 -63
- package/node_modules/fs-extra/lib/fs/index.js +0 -104
- package/node_modules/fs-extra/lib/index.js +0 -28
- package/node_modules/fs-extra/lib/json/index.js +0 -16
- package/node_modules/fs-extra/lib/json/jsonfile.js +0 -12
- package/node_modules/fs-extra/lib/json/output-json-sync.js +0 -18
- package/node_modules/fs-extra/lib/json/output-json.js +0 -27
- package/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +0 -54
- package/node_modules/fs-extra/lib/mkdirs/mkdirs.js +0 -63
- package/node_modules/fs-extra/lib/mkdirs/win32.js +0 -25
- package/node_modules/fs-extra/lib/move/index.js +0 -82
- package/node_modules/fs-extra/lib/move-sync/index.js +0 -117
- package/node_modules/fs-extra/lib/output/index.js +0 -40
- package/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/node_modules/fs-extra/lib/remove/index.js +0 -9
- package/node_modules/fs-extra/lib/remove/rimraf.js +0 -314
- package/node_modules/fs-extra/lib/util/buffer.js +0 -12
- package/node_modules/fs-extra/lib/util/utimes.js +0 -79
- package/node_modules/fs-extra/package.json +0 -72
- package/node_modules/fs.realpath/LICENSE +0 -43
- package/node_modules/fs.realpath/README.md +0 -33
- package/node_modules/fs.realpath/index.js +0 -66
- package/node_modules/fs.realpath/old.js +0 -303
- package/node_modules/fs.realpath/package.json +0 -30
- package/node_modules/glob/LICENSE +0 -21
- package/node_modules/glob/README.md +0 -375
- package/node_modules/glob/changelog.md +0 -67
- package/node_modules/glob/common.js +0 -240
- package/node_modules/glob/glob.js +0 -790
- package/node_modules/glob/package.json +0 -50
- package/node_modules/glob/sync.js +0 -486
- package/node_modules/graceful-fs/LICENSE +0 -15
- package/node_modules/graceful-fs/README.md +0 -133
- package/node_modules/graceful-fs/clone.js +0 -23
- package/node_modules/graceful-fs/graceful-fs.js +0 -373
- package/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/node_modules/graceful-fs/package.json +0 -54
- package/node_modules/graceful-fs/polyfills.js +0 -346
- package/node_modules/has-flag/index.js +0 -8
- package/node_modules/has-flag/license +0 -9
- package/node_modules/has-flag/package.json +0 -48
- package/node_modules/has-flag/readme.md +0 -70
- package/node_modules/inflight/LICENSE +0 -15
- package/node_modules/inflight/README.md +0 -37
- package/node_modules/inflight/inflight.js +0 -54
- package/node_modules/inflight/package.json +0 -33
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -33
- package/node_modules/is-ci/CHANGELOG.md +0 -14
- package/node_modules/is-ci/LICENSE +0 -21
- package/node_modules/is-ci/README.md +0 -50
- package/node_modules/is-ci/bin.js +0 -4
- package/node_modules/is-ci/index.js +0 -3
- package/node_modules/is-ci/package.json +0 -42
- package/node_modules/is-docker/cli.js +0 -5
- package/node_modules/is-docker/index.d.ts +0 -15
- package/node_modules/is-docker/index.js +0 -29
- package/node_modules/is-docker/license +0 -9
- package/node_modules/is-docker/package.json +0 -46
- package/node_modules/is-docker/readme.md +0 -27
- package/node_modules/is-number/LICENSE +0 -21
- package/node_modules/is-number/README.md +0 -187
- package/node_modules/is-number/index.js +0 -18
- package/node_modules/is-number/package.json +0 -86
- package/node_modules/is-wsl/index.d.ts +0 -15
- package/node_modules/is-wsl/index.js +0 -31
- package/node_modules/is-wsl/license +0 -9
- package/node_modules/is-wsl/package.json +0 -49
- package/node_modules/is-wsl/readme.md +0 -36
- package/node_modules/isexe/.npmignore +0 -2
- package/node_modules/isexe/LICENSE +0 -15
- package/node_modules/isexe/README.md +0 -51
- package/node_modules/isexe/index.js +0 -57
- package/node_modules/isexe/mode.js +0 -41
- package/node_modules/isexe/package.json +0 -35
- package/node_modules/isexe/test/basic.js +0 -221
- package/node_modules/isexe/windows.js +0 -42
- package/node_modules/jsonfile/CHANGELOG.md +0 -145
- package/node_modules/jsonfile/LICENSE +0 -15
- package/node_modules/jsonfile/README.md +0 -168
- package/node_modules/jsonfile/index.js +0 -134
- package/node_modules/jsonfile/package.json +0 -41
- package/node_modules/klaw-sync/CHANGELOG.md +0 -73
- package/node_modules/klaw-sync/LICENSE +0 -20
- package/node_modules/klaw-sync/README.md +0 -164
- package/node_modules/klaw-sync/klaw-sync.js +0 -29
- package/node_modules/klaw-sync/package.json +0 -51
- package/node_modules/lru-cache/LICENSE +0 -15
- package/node_modules/lru-cache/README.md +0 -166
- package/node_modules/lru-cache/index.js +0 -334
- package/node_modules/lru-cache/package.json +0 -38
- package/node_modules/micromatch/CHANGELOG.md +0 -109
- package/node_modules/micromatch/LICENSE +0 -21
- package/node_modules/micromatch/README.md +0 -1008
- package/node_modules/micromatch/index.js +0 -467
- package/node_modules/micromatch/package.json +0 -123
- package/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/minimatch/README.md +0 -209
- package/node_modules/minimatch/minimatch.js +0 -923
- package/node_modules/minimatch/package.json +0 -34
- package/node_modules/minimist/.travis.yml +0 -8
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/example/parse.js +0 -2
- package/node_modules/minimist/index.js +0 -245
- package/node_modules/minimist/package.json +0 -49
- package/node_modules/minimist/readme.markdown +0 -95
- package/node_modules/minimist/test/all_bool.js +0 -32
- package/node_modules/minimist/test/bool.js +0 -178
- package/node_modules/minimist/test/dash.js +0 -31
- package/node_modules/minimist/test/default_bool.js +0 -35
- package/node_modules/minimist/test/dotted.js +0 -22
- package/node_modules/minimist/test/kv_short.js +0 -16
- package/node_modules/minimist/test/long.js +0 -31
- package/node_modules/minimist/test/num.js +0 -36
- package/node_modules/minimist/test/parse.js +0 -197
- package/node_modules/minimist/test/parse_modified.js +0 -9
- package/node_modules/minimist/test/proto.js +0 -44
- package/node_modules/minimist/test/short.js +0 -67
- package/node_modules/minimist/test/stop_early.js +0 -15
- package/node_modules/minimist/test/unknown.js +0 -102
- package/node_modules/minimist/test/whitespace.js +0 -8
- package/node_modules/nice-try/CHANGELOG.md +0 -21
- package/node_modules/nice-try/LICENSE +0 -21
- package/node_modules/nice-try/README.md +0 -32
- package/node_modules/nice-try/package.json +0 -37
- package/node_modules/nice-try/src/index.js +0 -12
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -37
- package/node_modules/open/index.d.ts +0 -88
- package/node_modules/open/index.js +0 -195
- package/node_modules/open/license +0 -9
- package/node_modules/open/package.json +0 -64
- package/node_modules/open/readme.md +0 -154
- package/node_modules/open/xdg-open +0 -1066
- package/node_modules/os-tmpdir/index.js +0 -25
- package/node_modules/os-tmpdir/license +0 -21
- package/node_modules/os-tmpdir/package.json +0 -45
- package/node_modules/os-tmpdir/readme.md +0 -32
- package/node_modules/patch-package/CHANGELOG.md +0 -389
- package/node_modules/patch-package/LICENSE +0 -19
- package/node_modules/patch-package/README.md +0 -269
- package/node_modules/patch-package/dist/PackageDetails.js +0 -102
- package/node_modules/patch-package/dist/PackageDetails.test.js +0 -228
- package/node_modules/patch-package/dist/applyPatches.js +0 -261
- package/node_modules/patch-package/dist/assertNever.js +0 -8
- package/node_modules/patch-package/dist/createIssue.js +0 -83
- package/node_modules/patch-package/dist/detectPackageManager.js +0 -64
- package/node_modules/patch-package/dist/filterFiles.js +0 -17
- package/node_modules/patch-package/dist/getAppRootPath.js +0 -22
- package/node_modules/patch-package/dist/getPackageResolution.js +0 -85
- package/node_modules/patch-package/dist/getPackageVersion.js +0 -9
- package/node_modules/patch-package/dist/index.js +0 -161
- package/node_modules/patch-package/dist/makePatch.js +0 -231
- package/node_modules/patch-package/dist/makeRegExp.js +0 -28
- package/node_modules/patch-package/dist/packageIsDevDependency.js +0 -15
- package/node_modules/patch-package/dist/packageIsDevDependency.test.js +0 -32
- package/node_modules/patch-package/dist/patch/apply.js +0 -197
- package/node_modules/patch-package/dist/patch/parse.js +0 -330
- package/node_modules/patch-package/dist/patch/read.js +0 -49
- package/node_modules/patch-package/dist/patch/reverse.js +0 -96
- package/node_modules/patch-package/dist/patchFs.js +0 -20
- package/node_modules/patch-package/dist/path.js +0 -17
- package/node_modules/patch-package/dist/resolveRelativeFileDependencies.js +0 -21
- package/node_modules/patch-package/dist/resolveRelativeFileDependencies.test.js +0 -22
- package/node_modules/patch-package/dist/spawnSafe.js +0 -28
- package/node_modules/patch-package/index.js +0 -3
- package/node_modules/patch-package/node_modules/cross-spawn/CHANGELOG.md +0 -100
- package/node_modules/patch-package/node_modules/cross-spawn/LICENSE +0 -21
- package/node_modules/patch-package/node_modules/cross-spawn/README.md +0 -94
- package/node_modules/patch-package/node_modules/cross-spawn/index.js +0 -39
- package/node_modules/patch-package/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/node_modules/patch-package/node_modules/cross-spawn/lib/parse.js +0 -125
- package/node_modules/patch-package/node_modules/cross-spawn/lib/util/escape.js +0 -45
- package/node_modules/patch-package/node_modules/cross-spawn/lib/util/readShebang.js +0 -32
- package/node_modules/patch-package/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -47
- package/node_modules/patch-package/node_modules/cross-spawn/package.json +0 -80
- package/node_modules/patch-package/node_modules/path-key/index.js +0 -13
- package/node_modules/patch-package/node_modules/path-key/license +0 -21
- package/node_modules/patch-package/node_modules/path-key/package.json +0 -43
- package/node_modules/patch-package/node_modules/path-key/readme.md +0 -51
- package/node_modules/patch-package/node_modules/rimraf/LICENSE +0 -15
- package/node_modules/patch-package/node_modules/rimraf/README.md +0 -101
- package/node_modules/patch-package/node_modules/rimraf/bin.js +0 -50
- package/node_modules/patch-package/node_modules/rimraf/package.json +0 -33
- package/node_modules/patch-package/node_modules/rimraf/rimraf.js +0 -372
- package/node_modules/patch-package/node_modules/semver/CHANGELOG.md +0 -39
- package/node_modules/patch-package/node_modules/semver/LICENSE +0 -15
- package/node_modules/patch-package/node_modules/semver/README.md +0 -412
- package/node_modules/patch-package/node_modules/semver/bin/semver +0 -160
- package/node_modules/patch-package/node_modules/semver/package.json +0 -32
- package/node_modules/patch-package/node_modules/semver/range.bnf +0 -16
- package/node_modules/patch-package/node_modules/semver/semver.js +0 -1483
- package/node_modules/patch-package/node_modules/shebang-command/index.js +0 -19
- package/node_modules/patch-package/node_modules/shebang-command/license +0 -21
- package/node_modules/patch-package/node_modules/shebang-command/package.json +0 -43
- package/node_modules/patch-package/node_modules/shebang-command/readme.md +0 -39
- package/node_modules/patch-package/node_modules/shebang-regex/index.js +0 -2
- package/node_modules/patch-package/node_modules/shebang-regex/license +0 -21
- package/node_modules/patch-package/node_modules/shebang-regex/package.json +0 -36
- package/node_modules/patch-package/node_modules/shebang-regex/readme.md +0 -29
- package/node_modules/patch-package/node_modules/slash/index.js +0 -11
- package/node_modules/patch-package/node_modules/slash/license +0 -9
- package/node_modules/patch-package/node_modules/slash/package.json +0 -38
- package/node_modules/patch-package/node_modules/slash/readme.md +0 -44
- package/node_modules/patch-package/node_modules/which/CHANGELOG.md +0 -152
- package/node_modules/patch-package/node_modules/which/LICENSE +0 -15
- package/node_modules/patch-package/node_modules/which/README.md +0 -51
- package/node_modules/patch-package/node_modules/which/bin/which +0 -52
- package/node_modules/patch-package/node_modules/which/package.json +0 -34
- package/node_modules/patch-package/node_modules/which/which.js +0 -135
- package/node_modules/patch-package/package.json +0 -100
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/license +0 -21
- package/node_modules/path-is-absolute/package.json +0 -47
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/picomatch/CHANGELOG.md +0 -120
- package/node_modules/picomatch/LICENSE +0 -21
- package/node_modules/picomatch/README.md +0 -691
- package/node_modules/picomatch/index.js +0 -3
- package/node_modules/picomatch/lib/constants.js +0 -179
- package/node_modules/picomatch/lib/parse.js +0 -1078
- package/node_modules/picomatch/lib/picomatch.js +0 -339
- package/node_modules/picomatch/lib/scan.js +0 -385
- package/node_modules/picomatch/lib/utils.js +0 -64
- package/node_modules/picomatch/package.json +0 -85
- package/node_modules/semver/CHANGELOG.md +0 -111
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -566
- package/node_modules/semver/bin/semver.js +0 -173
- package/node_modules/semver/classes/comparator.js +0 -135
- package/node_modules/semver/classes/index.js +0 -5
- package/node_modules/semver/classes/range.js +0 -510
- package/node_modules/semver/classes/semver.js +0 -287
- package/node_modules/semver/functions/clean.js +0 -6
- package/node_modules/semver/functions/cmp.js +0 -48
- package/node_modules/semver/functions/coerce.js +0 -51
- package/node_modules/semver/functions/compare-build.js +0 -7
- package/node_modules/semver/functions/compare-loose.js +0 -3
- package/node_modules/semver/functions/compare.js +0 -5
- package/node_modules/semver/functions/diff.js +0 -23
- package/node_modules/semver/functions/eq.js +0 -3
- package/node_modules/semver/functions/gt.js +0 -3
- package/node_modules/semver/functions/gte.js +0 -3
- package/node_modules/semver/functions/inc.js +0 -15
- package/node_modules/semver/functions/lt.js +0 -3
- package/node_modules/semver/functions/lte.js +0 -3
- package/node_modules/semver/functions/major.js +0 -3
- package/node_modules/semver/functions/minor.js +0 -3
- package/node_modules/semver/functions/neq.js +0 -3
- package/node_modules/semver/functions/parse.js +0 -33
- package/node_modules/semver/functions/patch.js +0 -3
- package/node_modules/semver/functions/prerelease.js +0 -6
- package/node_modules/semver/functions/rcompare.js +0 -3
- package/node_modules/semver/functions/rsort.js +0 -3
- package/node_modules/semver/functions/satisfies.js +0 -10
- package/node_modules/semver/functions/sort.js +0 -3
- package/node_modules/semver/functions/valid.js +0 -6
- package/node_modules/semver/index.js +0 -48
- package/node_modules/semver/internal/constants.js +0 -17
- package/node_modules/semver/internal/debug.js +0 -9
- package/node_modules/semver/internal/identifiers.js +0 -23
- package/node_modules/semver/internal/parse-options.js +0 -11
- package/node_modules/semver/internal/re.js +0 -182
- package/node_modules/semver/package.json +0 -45
- package/node_modules/semver/preload.js +0 -2
- package/node_modules/semver/range.bnf +0 -16
- package/node_modules/semver/ranges/gtr.js +0 -4
- package/node_modules/semver/ranges/intersects.js +0 -7
- package/node_modules/semver/ranges/ltr.js +0 -4
- package/node_modules/semver/ranges/max-satisfying.js +0 -25
- package/node_modules/semver/ranges/min-satisfying.js +0 -24
- package/node_modules/semver/ranges/min-version.js +0 -60
- package/node_modules/semver/ranges/outside.js +0 -80
- package/node_modules/semver/ranges/simplify.js +0 -44
- package/node_modules/semver/ranges/subset.js +0 -222
- package/node_modules/semver/ranges/to-comparators.js +0 -8
- package/node_modules/semver/ranges/valid.js +0 -11
- package/node_modules/supports-color/browser.js +0 -5
- package/node_modules/supports-color/index.js +0 -131
- package/node_modules/supports-color/license +0 -9
- package/node_modules/supports-color/package.json +0 -57
- package/node_modules/supports-color/readme.md +0 -66
- package/node_modules/tmp/LICENSE +0 -21
- package/node_modules/tmp/README.md +0 -314
- package/node_modules/tmp/lib/tmp.js +0 -611
- package/node_modules/tmp/package.json +0 -42
- package/node_modules/to-regex-range/LICENSE +0 -21
- package/node_modules/to-regex-range/README.md +0 -305
- package/node_modules/to-regex-range/index.js +0 -288
- package/node_modules/to-regex-range/package.json +0 -92
- package/node_modules/universalify/LICENSE +0 -20
- package/node_modules/universalify/README.md +0 -76
- package/node_modules/universalify/index.js +0 -25
- package/node_modules/universalify/package.json +0 -38
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -33
- package/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/yallist/LICENSE +0 -15
- package/node_modules/yallist/README.md +0 -204
- package/node_modules/yallist/iterator.js +0 -8
- package/node_modules/yallist/package.json +0 -33
- package/node_modules/yallist/yallist.js +0 -426
|
@@ -1,611 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Tmp
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
5
|
-
*
|
|
6
|
-
* MIT Licensed
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* Module dependencies.
|
|
11
|
-
*/
|
|
12
|
-
const fs = require('fs');
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const crypto = require('crypto');
|
|
15
|
-
const osTmpDir = require('os-tmpdir');
|
|
16
|
-
const _c = process.binding('constants');
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
* The working inner variables.
|
|
20
|
-
*/
|
|
21
|
-
const
|
|
22
|
-
/**
|
|
23
|
-
* The temporary directory.
|
|
24
|
-
* @type {string}
|
|
25
|
-
*/
|
|
26
|
-
tmpDir = osTmpDir(),
|
|
27
|
-
|
|
28
|
-
// the random characters to choose from
|
|
29
|
-
RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
|
|
30
|
-
|
|
31
|
-
TEMPLATE_PATTERN = /XXXXXX/,
|
|
32
|
-
|
|
33
|
-
DEFAULT_TRIES = 3,
|
|
34
|
-
|
|
35
|
-
CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR),
|
|
36
|
-
|
|
37
|
-
EBADF = _c.EBADF || _c.os.errno.EBADF,
|
|
38
|
-
ENOENT = _c.ENOENT || _c.os.errno.ENOENT,
|
|
39
|
-
|
|
40
|
-
DIR_MODE = 448 /* 0o700 */,
|
|
41
|
-
FILE_MODE = 384 /* 0o600 */,
|
|
42
|
-
|
|
43
|
-
// this will hold the objects need to be removed on exit
|
|
44
|
-
_removeObjects = [];
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
_gracefulCleanup = false,
|
|
48
|
-
_uncaughtException = false;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Random name generator based on crypto.
|
|
52
|
-
* Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
|
|
53
|
-
*
|
|
54
|
-
* @param {number} howMany
|
|
55
|
-
* @returns {string} the generated random name
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
function _randomChars(howMany) {
|
|
59
|
-
var
|
|
60
|
-
value = [],
|
|
61
|
-
rnd = null;
|
|
62
|
-
|
|
63
|
-
// make sure that we do not fail because we ran out of entropy
|
|
64
|
-
try {
|
|
65
|
-
rnd = crypto.randomBytes(howMany);
|
|
66
|
-
} catch (e) {
|
|
67
|
-
rnd = crypto.pseudoRandomBytes(howMany);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
for (var i = 0; i < howMany; i++) {
|
|
71
|
-
value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return value.join('');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Checks whether the `obj` parameter is defined or not.
|
|
79
|
-
*
|
|
80
|
-
* @param {Object} obj
|
|
81
|
-
* @returns {boolean} true if the object is undefined
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
function _isUndefined(obj) {
|
|
85
|
-
return typeof obj === 'undefined';
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Parses the function arguments.
|
|
90
|
-
*
|
|
91
|
-
* This function helps to have optional arguments.
|
|
92
|
-
*
|
|
93
|
-
* @param {(Options|Function)} options
|
|
94
|
-
* @param {Function} callback
|
|
95
|
-
* @returns {Array} parsed arguments
|
|
96
|
-
* @private
|
|
97
|
-
*/
|
|
98
|
-
function _parseArguments(options, callback) {
|
|
99
|
-
if (typeof options == 'function') {
|
|
100
|
-
return [callback || {}, options];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (_isUndefined(options)) {
|
|
104
|
-
return [{}, callback];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return [options, callback];
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Generates a new temporary name.
|
|
112
|
-
*
|
|
113
|
-
* @param {Object} opts
|
|
114
|
-
* @returns {string} the new random name according to opts
|
|
115
|
-
* @private
|
|
116
|
-
*/
|
|
117
|
-
function _generateTmpName(opts) {
|
|
118
|
-
if (opts.name) {
|
|
119
|
-
return path.join(opts.dir || tmpDir, opts.name);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// mkstemps like template
|
|
123
|
-
if (opts.template) {
|
|
124
|
-
return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// prefix and postfix
|
|
128
|
-
const name = [
|
|
129
|
-
opts.prefix || 'tmp-',
|
|
130
|
-
process.pid,
|
|
131
|
-
_randomChars(12),
|
|
132
|
-
opts.postfix || ''
|
|
133
|
-
].join('');
|
|
134
|
-
|
|
135
|
-
return path.join(opts.dir || tmpDir, name);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Gets a temporary file name.
|
|
140
|
-
*
|
|
141
|
-
* @param {(Options|tmpNameCallback)} options options or callback
|
|
142
|
-
* @param {?tmpNameCallback} callback the callback function
|
|
143
|
-
*/
|
|
144
|
-
function tmpName(options, callback) {
|
|
145
|
-
var
|
|
146
|
-
args = _parseArguments(options, callback),
|
|
147
|
-
opts = args[0],
|
|
148
|
-
cb = args[1],
|
|
149
|
-
tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
|
|
150
|
-
|
|
151
|
-
if (isNaN(tries) || tries < 0)
|
|
152
|
-
return cb(new Error('Invalid tries'));
|
|
153
|
-
|
|
154
|
-
if (opts.template && !opts.template.match(TEMPLATE_PATTERN))
|
|
155
|
-
return cb(new Error('Invalid template provided'));
|
|
156
|
-
|
|
157
|
-
(function _getUniqueName() {
|
|
158
|
-
const name = _generateTmpName(opts);
|
|
159
|
-
|
|
160
|
-
// check whether the path exists then retry if needed
|
|
161
|
-
fs.stat(name, function (err) {
|
|
162
|
-
if (!err) {
|
|
163
|
-
if (tries-- > 0) return _getUniqueName();
|
|
164
|
-
|
|
165
|
-
return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
cb(null, name);
|
|
169
|
-
});
|
|
170
|
-
}());
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Synchronous version of tmpName.
|
|
175
|
-
*
|
|
176
|
-
* @param {Object} options
|
|
177
|
-
* @returns {string} the generated random name
|
|
178
|
-
* @throws {Error} if the options are invalid or could not generate a filename
|
|
179
|
-
*/
|
|
180
|
-
function tmpNameSync(options) {
|
|
181
|
-
var
|
|
182
|
-
args = _parseArguments(options),
|
|
183
|
-
opts = args[0],
|
|
184
|
-
tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
|
|
185
|
-
|
|
186
|
-
if (isNaN(tries) || tries < 0)
|
|
187
|
-
throw new Error('Invalid tries');
|
|
188
|
-
|
|
189
|
-
if (opts.template && !opts.template.match(TEMPLATE_PATTERN))
|
|
190
|
-
throw new Error('Invalid template provided');
|
|
191
|
-
|
|
192
|
-
do {
|
|
193
|
-
const name = _generateTmpName(opts);
|
|
194
|
-
try {
|
|
195
|
-
fs.statSync(name);
|
|
196
|
-
} catch (e) {
|
|
197
|
-
return name;
|
|
198
|
-
}
|
|
199
|
-
} while (tries-- > 0);
|
|
200
|
-
|
|
201
|
-
throw new Error('Could not get a unique tmp filename, max tries reached');
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Creates and opens a temporary file.
|
|
206
|
-
*
|
|
207
|
-
* @param {(Options|fileCallback)} options the config options or the callback function
|
|
208
|
-
* @param {?fileCallback} callback
|
|
209
|
-
*/
|
|
210
|
-
function file(options, callback) {
|
|
211
|
-
var
|
|
212
|
-
args = _parseArguments(options, callback),
|
|
213
|
-
opts = args[0],
|
|
214
|
-
cb = args[1];
|
|
215
|
-
|
|
216
|
-
opts.postfix = (_isUndefined(opts.postfix)) ? '.tmp' : opts.postfix;
|
|
217
|
-
|
|
218
|
-
// gets a temporary filename
|
|
219
|
-
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
220
|
-
if (err) return cb(err);
|
|
221
|
-
|
|
222
|
-
// create and open the file
|
|
223
|
-
fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
|
|
224
|
-
if (err) return cb(err);
|
|
225
|
-
|
|
226
|
-
if (opts.discardDescriptor) {
|
|
227
|
-
return fs.close(fd, function _discardCallback(err) {
|
|
228
|
-
if (err) {
|
|
229
|
-
// Low probability, and the file exists, so this could be
|
|
230
|
-
// ignored. If it isn't we certainly need to unlink the
|
|
231
|
-
// file, and if that fails too its error is more
|
|
232
|
-
// important.
|
|
233
|
-
try {
|
|
234
|
-
fs.unlinkSync(name);
|
|
235
|
-
} catch (e) {
|
|
236
|
-
if (!isENOENT(e)) {
|
|
237
|
-
err = e;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return cb(err);
|
|
241
|
-
}
|
|
242
|
-
cb(null, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts));
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
if (opts.detachDescriptor) {
|
|
246
|
-
return cb(null, name, fd, _prepareTmpFileRemoveCallback(name, -1, opts));
|
|
247
|
-
}
|
|
248
|
-
cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts));
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Synchronous version of file.
|
|
255
|
-
*
|
|
256
|
-
* @param {Options} options
|
|
257
|
-
* @returns {FileSyncObject} object consists of name, fd and removeCallback
|
|
258
|
-
* @throws {Error} if cannot create a file
|
|
259
|
-
*/
|
|
260
|
-
function fileSync(options) {
|
|
261
|
-
var
|
|
262
|
-
args = _parseArguments(options),
|
|
263
|
-
opts = args[0];
|
|
264
|
-
|
|
265
|
-
opts.postfix = opts.postfix || '.tmp';
|
|
266
|
-
|
|
267
|
-
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
268
|
-
const name = tmpNameSync(opts);
|
|
269
|
-
var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
270
|
-
if (opts.discardDescriptor) {
|
|
271
|
-
fs.closeSync(fd);
|
|
272
|
-
fd = undefined;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return {
|
|
276
|
-
name: name,
|
|
277
|
-
fd: fd,
|
|
278
|
-
removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts)
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Removes files and folders in a directory recursively.
|
|
284
|
-
*
|
|
285
|
-
* @param {string} root
|
|
286
|
-
* @private
|
|
287
|
-
*/
|
|
288
|
-
function _rmdirRecursiveSync(root) {
|
|
289
|
-
const dirs = [root];
|
|
290
|
-
|
|
291
|
-
do {
|
|
292
|
-
var
|
|
293
|
-
dir = dirs.pop(),
|
|
294
|
-
deferred = false,
|
|
295
|
-
files = fs.readdirSync(dir);
|
|
296
|
-
|
|
297
|
-
for (var i = 0, length = files.length; i < length; i++) {
|
|
298
|
-
var
|
|
299
|
-
file = path.join(dir, files[i]),
|
|
300
|
-
stat = fs.lstatSync(file); // lstat so we don't recurse into symlinked directories
|
|
301
|
-
|
|
302
|
-
if (stat.isDirectory()) {
|
|
303
|
-
if (!deferred) {
|
|
304
|
-
deferred = true;
|
|
305
|
-
dirs.push(dir);
|
|
306
|
-
}
|
|
307
|
-
dirs.push(file);
|
|
308
|
-
} else {
|
|
309
|
-
fs.unlinkSync(file);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
if (!deferred) {
|
|
314
|
-
fs.rmdirSync(dir);
|
|
315
|
-
}
|
|
316
|
-
} while (dirs.length !== 0);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Creates a temporary directory.
|
|
321
|
-
*
|
|
322
|
-
* @param {(Options|dirCallback)} options the options or the callback function
|
|
323
|
-
* @param {?dirCallback} callback
|
|
324
|
-
*/
|
|
325
|
-
function dir(options, callback) {
|
|
326
|
-
var
|
|
327
|
-
args = _parseArguments(options, callback),
|
|
328
|
-
opts = args[0],
|
|
329
|
-
cb = args[1];
|
|
330
|
-
|
|
331
|
-
// gets a temporary filename
|
|
332
|
-
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
333
|
-
if (err) return cb(err);
|
|
334
|
-
|
|
335
|
-
// create the directory
|
|
336
|
-
fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
|
|
337
|
-
if (err) return cb(err);
|
|
338
|
-
|
|
339
|
-
cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Synchronous version of dir.
|
|
346
|
-
*
|
|
347
|
-
* @param {Options} options
|
|
348
|
-
* @returns {DirSyncObject} object consists of name and removeCallback
|
|
349
|
-
* @throws {Error} if it cannot create a directory
|
|
350
|
-
*/
|
|
351
|
-
function dirSync(options) {
|
|
352
|
-
var
|
|
353
|
-
args = _parseArguments(options),
|
|
354
|
-
opts = args[0];
|
|
355
|
-
|
|
356
|
-
const name = tmpNameSync(opts);
|
|
357
|
-
fs.mkdirSync(name, opts.mode || DIR_MODE);
|
|
358
|
-
|
|
359
|
-
return {
|
|
360
|
-
name: name,
|
|
361
|
-
removeCallback: _prepareTmpDirRemoveCallback(name, opts)
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Prepares the callback for removal of the temporary file.
|
|
367
|
-
*
|
|
368
|
-
* @param {string} name the path of the file
|
|
369
|
-
* @param {number} fd file descriptor
|
|
370
|
-
* @param {Object} opts
|
|
371
|
-
* @returns {fileCallback}
|
|
372
|
-
* @private
|
|
373
|
-
*/
|
|
374
|
-
function _prepareTmpFileRemoveCallback(name, fd, opts) {
|
|
375
|
-
const removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
|
|
376
|
-
try {
|
|
377
|
-
if (0 <= fdPath[0]) {
|
|
378
|
-
fs.closeSync(fdPath[0]);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
catch (e) {
|
|
382
|
-
// under some node/windows related circumstances, a temporary file
|
|
383
|
-
// may have not be created as expected or the file was already closed
|
|
384
|
-
// by the user, in which case we will simply ignore the error
|
|
385
|
-
if (!isEBADF(e) && !isENOENT(e)) {
|
|
386
|
-
// reraise any unanticipated error
|
|
387
|
-
throw e;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
try {
|
|
391
|
-
fs.unlinkSync(fdPath[1]);
|
|
392
|
-
}
|
|
393
|
-
catch (e) {
|
|
394
|
-
if (!isENOENT(e)) {
|
|
395
|
-
// reraise any unanticipated error
|
|
396
|
-
throw e;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}, [fd, name]);
|
|
400
|
-
|
|
401
|
-
if (!opts.keep) {
|
|
402
|
-
_removeObjects.unshift(removeCallback);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
return removeCallback;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Prepares the callback for removal of the temporary directory.
|
|
410
|
-
*
|
|
411
|
-
* @param {string} name
|
|
412
|
-
* @param {Object} opts
|
|
413
|
-
* @returns {Function} the callback
|
|
414
|
-
* @private
|
|
415
|
-
*/
|
|
416
|
-
function _prepareTmpDirRemoveCallback(name, opts) {
|
|
417
|
-
const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs.rmdirSync.bind(fs);
|
|
418
|
-
const removeCallback = _prepareRemoveCallback(removeFunction, name);
|
|
419
|
-
|
|
420
|
-
if (!opts.keep) {
|
|
421
|
-
_removeObjects.unshift(removeCallback);
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
return removeCallback;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Creates a guarded function wrapping the removeFunction call.
|
|
429
|
-
*
|
|
430
|
-
* @param {Function} removeFunction
|
|
431
|
-
* @param {Object} arg
|
|
432
|
-
* @returns {Function}
|
|
433
|
-
* @private
|
|
434
|
-
*/
|
|
435
|
-
function _prepareRemoveCallback(removeFunction, arg) {
|
|
436
|
-
var called = false;
|
|
437
|
-
|
|
438
|
-
return function _cleanupCallback(next) {
|
|
439
|
-
if (!called) {
|
|
440
|
-
const index = _removeObjects.indexOf(_cleanupCallback);
|
|
441
|
-
if (index >= 0) {
|
|
442
|
-
_removeObjects.splice(index, 1);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
called = true;
|
|
446
|
-
removeFunction(arg);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
if (next) next(null);
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* The garbage collector.
|
|
455
|
-
*
|
|
456
|
-
* @private
|
|
457
|
-
*/
|
|
458
|
-
function _garbageCollector() {
|
|
459
|
-
if (_uncaughtException && !_gracefulCleanup) {
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// the function being called removes itself from _removeObjects,
|
|
464
|
-
// loop until _removeObjects is empty
|
|
465
|
-
while (_removeObjects.length) {
|
|
466
|
-
try {
|
|
467
|
-
_removeObjects[0].call(null);
|
|
468
|
-
} catch (e) {
|
|
469
|
-
// already removed?
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Helper for testing against EBADF to compensate changes made to Node 7.x under Windows.
|
|
476
|
-
*/
|
|
477
|
-
function isEBADF(error) {
|
|
478
|
-
return isExpectedError(error, -EBADF, 'EBADF');
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows.
|
|
483
|
-
*/
|
|
484
|
-
function isENOENT(error) {
|
|
485
|
-
return isExpectedError(error, -ENOENT, 'ENOENT');
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Helper to determine whether the expected error code matches the actual code and errno,
|
|
490
|
-
* which will differ between the supported node versions.
|
|
491
|
-
*
|
|
492
|
-
* - Node >= 7.0:
|
|
493
|
-
* error.code {String}
|
|
494
|
-
* error.errno {String|Number} any numerical value will be negated
|
|
495
|
-
*
|
|
496
|
-
* - Node >= 6.0 < 7.0:
|
|
497
|
-
* error.code {String}
|
|
498
|
-
* error.errno {Number} negated
|
|
499
|
-
*
|
|
500
|
-
* - Node >= 4.0 < 6.0: introduces SystemError
|
|
501
|
-
* error.code {String}
|
|
502
|
-
* error.errno {Number} negated
|
|
503
|
-
*
|
|
504
|
-
* - Node >= 0.10 < 4.0:
|
|
505
|
-
* error.code {Number} negated
|
|
506
|
-
* error.errno n/a
|
|
507
|
-
*/
|
|
508
|
-
function isExpectedError(error, code, errno) {
|
|
509
|
-
return error.code == code || error.code == errno;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Sets the graceful cleanup.
|
|
514
|
-
*
|
|
515
|
-
* Also removes the created files and directories when an uncaught exception occurs.
|
|
516
|
-
*/
|
|
517
|
-
function setGracefulCleanup() {
|
|
518
|
-
_gracefulCleanup = true;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
const version = process.versions.node.split('.').map(function (value) {
|
|
522
|
-
return parseInt(value, 10);
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
if (version[0] === 0 && (version[1] < 9 || version[1] === 9 && version[2] < 5)) {
|
|
526
|
-
process.addListener('uncaughtException', function _uncaughtExceptionThrown(err) {
|
|
527
|
-
_uncaughtException = true;
|
|
528
|
-
_garbageCollector();
|
|
529
|
-
|
|
530
|
-
throw err;
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
process.addListener('exit', function _exit(code) {
|
|
535
|
-
if (code) _uncaughtException = true;
|
|
536
|
-
_garbageCollector();
|
|
537
|
-
});
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Configuration options.
|
|
541
|
-
*
|
|
542
|
-
* @typedef {Object} Options
|
|
543
|
-
* @property {?number} tries the number of tries before give up the name generation
|
|
544
|
-
* @property {?string} template the "mkstemp" like filename template
|
|
545
|
-
* @property {?string} name fix name
|
|
546
|
-
* @property {?string} dir the tmp directory to use
|
|
547
|
-
* @property {?string} prefix prefix for the generated name
|
|
548
|
-
* @property {?string} postfix postfix for the generated name
|
|
549
|
-
*/
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* @typedef {Object} FileSyncObject
|
|
553
|
-
* @property {string} name the name of the file
|
|
554
|
-
* @property {string} fd the file descriptor
|
|
555
|
-
* @property {fileCallback} removeCallback the callback function to remove the file
|
|
556
|
-
*/
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* @typedef {Object} DirSyncObject
|
|
560
|
-
* @property {string} name the name of the directory
|
|
561
|
-
* @property {fileCallback} removeCallback the callback function to remove the directory
|
|
562
|
-
*/
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* @callback tmpNameCallback
|
|
566
|
-
* @param {?Error} err the error object if anything goes wrong
|
|
567
|
-
* @param {string} name the temporary file name
|
|
568
|
-
*/
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* @callback fileCallback
|
|
572
|
-
* @param {?Error} err the error object if anything goes wrong
|
|
573
|
-
* @param {string} name the temporary file name
|
|
574
|
-
* @param {number} fd the file descriptor
|
|
575
|
-
* @param {cleanupCallback} fn the cleanup callback function
|
|
576
|
-
*/
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* @callback dirCallback
|
|
580
|
-
* @param {?Error} err the error object if anything goes wrong
|
|
581
|
-
* @param {string} name the temporary file name
|
|
582
|
-
* @param {cleanupCallback} fn the cleanup callback function
|
|
583
|
-
*/
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Removes the temporary created file or directory.
|
|
587
|
-
*
|
|
588
|
-
* @callback cleanupCallback
|
|
589
|
-
* @param {simpleCallback} [next] function to call after entry was removed
|
|
590
|
-
*/
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Callback function for function composition.
|
|
594
|
-
* @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57}
|
|
595
|
-
*
|
|
596
|
-
* @callback simpleCallback
|
|
597
|
-
*/
|
|
598
|
-
|
|
599
|
-
// exporting all the needed methods
|
|
600
|
-
module.exports.tmpdir = tmpDir;
|
|
601
|
-
|
|
602
|
-
module.exports.dir = dir;
|
|
603
|
-
module.exports.dirSync = dirSync;
|
|
604
|
-
|
|
605
|
-
module.exports.file = file;
|
|
606
|
-
module.exports.fileSync = fileSync;
|
|
607
|
-
|
|
608
|
-
module.exports.tmpName = tmpName;
|
|
609
|
-
module.exports.tmpNameSync = tmpNameSync;
|
|
610
|
-
|
|
611
|
-
module.exports.setGracefulCleanup = setGracefulCleanup;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tmp",
|
|
3
|
-
"version": "0.0.33",
|
|
4
|
-
"description": "Temporary file and directory creator",
|
|
5
|
-
"author": "KARASZI István <github@spam.raszi.hu> (http://raszi.hu/)",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"temporary",
|
|
8
|
-
"tmp",
|
|
9
|
-
"temp",
|
|
10
|
-
"tempdir",
|
|
11
|
-
"tempfile",
|
|
12
|
-
"tmpdir",
|
|
13
|
-
"tmpfile"
|
|
14
|
-
],
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": "raszi/node-tmp",
|
|
17
|
-
"homepage": "http://github.com/raszi/node-tmp",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "http://github.com/raszi/node-tmp/issues"
|
|
20
|
-
},
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=0.6.0"
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"os-tmpdir": "~1.0.2"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"vows": "~0.7.0"
|
|
29
|
-
},
|
|
30
|
-
"main": "lib/tmp.js",
|
|
31
|
-
"files": [
|
|
32
|
-
"lib/"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"test": "vows test/*-test.js",
|
|
36
|
-
"doc": "jsdoc -c .jsdoc.json"
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
,"_resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
|
|
40
|
-
,"_integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw=="
|
|
41
|
-
,"_from": "tmp@0.0.33"
|
|
42
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015-present, Jon Schlinkert.
|
|
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
|
|
13
|
-
all 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
|
|
21
|
-
THE SOFTWARE.
|