@kubb/agent 4.28.1 → 4.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +416 -682
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +4 -6
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +4 -6
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-BD_N68Bo.js → defaultParser-C1atU7yU.js} +2 -3
- package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-C4Au07ON.js → getRelativePath-BcieQL5M.js} +1 -2
- package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +8 -9
- package/.output/server/node_modules/@kubb/fabric-core/dist/{Root-BQX3eHqb.js → onProcessExit-CF200hsz.js} +109 -190
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +3 -4
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +2 -3
- package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +58 -298
- package/.output/server/node_modules/@kubb/fabric-core/package.json +8 -18
- package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-Cnw5r_-A.js} +1 -5
- package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +39 -41
- package/.output/server/node_modules/@kubb/react-fabric/dist/{jsx-runtime-CQFBnRKx.js → jsx-runtime-Dm7PKVbc.js} +6 -24
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +5 -4
- package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +3 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/{react--draJ5Pm.js → react-D652OKii.js} +31 -91
- package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-DqJsInTf.js → reactPlugin-BkDkx1cs.js} +410 -1650
- package/.output/server/node_modules/@kubb/react-fabric/package.json +8 -11
- package/.output/server/node_modules/empathic/access.js +39 -0
- package/.output/server/node_modules/empathic/access.mjs +34 -0
- package/.output/server/node_modules/empathic/find.js +81 -0
- package/.output/server/node_modules/empathic/find.mjs +76 -0
- package/.output/server/node_modules/empathic/package.json +49 -0
- package/.output/server/node_modules/empathic/package.mjs +52 -0
- package/.output/server/node_modules/empathic/resolve.js +31 -0
- package/.output/server/node_modules/empathic/resolve.mjs +27 -0
- package/.output/server/node_modules/empathic/walk.js +22 -0
- package/.output/server/node_modules/empathic/walk.mjs +20 -0
- package/.output/server/node_modules/tinyexec/dist/main.js +633 -0
- package/.output/server/node_modules/tinyexec/package.json +61 -0
- package/.output/server/package.json +6 -44
- package/package.json +19 -21
- package/.output/server/node_modules/.nitro/path-key@3.1.1/index.js +0 -16
- package/.output/server/node_modules/.nitro/path-key@3.1.1/package.json +0 -39
- package/.output/server/node_modules/.nitro/path-key@4.0.0/index.js +0 -12
- package/.output/server/node_modules/.nitro/path-key@4.0.0/package.json +0 -41
- package/.output/server/node_modules/.nitro/path-to-regexp@3.3.0/index.js +0 -421
- package/.output/server/node_modules/.nitro/path-to-regexp@3.3.0/package.json +0 -46
- package/.output/server/node_modules/@kubb/fabric-core/dist/chunk-BVHe6Par.js +0 -22
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js +0 -89
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/fromAnyIterable.js +0 -34
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/index.js +0 -6
- package/.output/server/node_modules/@sec-ant/readable-stream/package.json +0 -98
- package/.output/server/node_modules/@sindresorhus/merge-streams/index.js +0 -265
- package/.output/server/node_modules/@sindresorhus/merge-streams/package.json +0 -49
- package/.output/server/node_modules/balanced-match/index.js +0 -62
- package/.output/server/node_modules/balanced-match/package.json +0 -48
- package/.output/server/node_modules/brace-expansion/index.js +0 -201
- package/.output/server/node_modules/brace-expansion/package.json +0 -50
- package/.output/server/node_modules/bytes/index.js +0 -159
- package/.output/server/node_modules/bytes/package.json +0 -39
- package/.output/server/node_modules/concat-map/index.js +0 -13
- package/.output/server/node_modules/concat-map/package.json +0 -59
- package/.output/server/node_modules/content-disposition/index.js +0 -445
- package/.output/server/node_modules/content-disposition/package.json +0 -39
- package/.output/server/node_modules/cross-spawn/index.js +0 -39
- package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
- package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
- package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/.output/server/node_modules/cross-spawn/package.json +0 -73
- package/.output/server/node_modules/execa/index.js +0 -28
- package/.output/server/node_modules/execa/lib/arguments/command.js +0 -20
- package/.output/server/node_modules/execa/lib/arguments/cwd.js +0 -39
- package/.output/server/node_modules/execa/lib/arguments/encoding-option.js +0 -50
- package/.output/server/node_modules/execa/lib/arguments/escape.js +0 -88
- package/.output/server/node_modules/execa/lib/arguments/fd-options.js +0 -108
- package/.output/server/node_modules/execa/lib/arguments/file-url.js +0 -25
- package/.output/server/node_modules/execa/lib/arguments/options.js +0 -96
- package/.output/server/node_modules/execa/lib/arguments/shell.js +0 -11
- package/.output/server/node_modules/execa/lib/arguments/specific.js +0 -111
- package/.output/server/node_modules/execa/lib/convert/add.js +0 -15
- package/.output/server/node_modules/execa/lib/convert/concurrent.js +0 -33
- package/.output/server/node_modules/execa/lib/convert/duplex.js +0 -69
- package/.output/server/node_modules/execa/lib/convert/iterable.js +0 -34
- package/.output/server/node_modules/execa/lib/convert/readable.js +0 -113
- package/.output/server/node_modules/execa/lib/convert/shared.js +0 -46
- package/.output/server/node_modules/execa/lib/convert/writable.js +0 -90
- package/.output/server/node_modules/execa/lib/io/contents.js +0 -116
- package/.output/server/node_modules/execa/lib/io/input-sync.js +0 -44
- package/.output/server/node_modules/execa/lib/io/iterate.js +0 -110
- package/.output/server/node_modules/execa/lib/io/max-buffer.js +0 -89
- package/.output/server/node_modules/execa/lib/io/output-async.js +0 -80
- package/.output/server/node_modules/execa/lib/io/output-sync.js +0 -135
- package/.output/server/node_modules/execa/lib/io/pipeline.js +0 -48
- package/.output/server/node_modules/execa/lib/io/strip-newline.js +0 -12
- package/.output/server/node_modules/execa/lib/ipc/array.js +0 -4
- package/.output/server/node_modules/execa/lib/ipc/buffer-messages.js +0 -47
- package/.output/server/node_modules/execa/lib/ipc/forward.js +0 -56
- package/.output/server/node_modules/execa/lib/ipc/get-each.js +0 -89
- package/.output/server/node_modules/execa/lib/ipc/get-one.js +0 -69
- package/.output/server/node_modules/execa/lib/ipc/graceful.js +0 -72
- package/.output/server/node_modules/execa/lib/ipc/incoming.js +0 -79
- package/.output/server/node_modules/execa/lib/ipc/ipc-input.js +0 -44
- package/.output/server/node_modules/execa/lib/ipc/methods.js +0 -49
- package/.output/server/node_modules/execa/lib/ipc/outgoing.js +0 -47
- package/.output/server/node_modules/execa/lib/ipc/reference.js +0 -44
- package/.output/server/node_modules/execa/lib/ipc/send.js +0 -91
- package/.output/server/node_modules/execa/lib/ipc/strict.js +0 -113
- package/.output/server/node_modules/execa/lib/ipc/validation.js +0 -111
- package/.output/server/node_modules/execa/lib/methods/bind.js +0 -23
- package/.output/server/node_modules/execa/lib/methods/command.js +0 -43
- package/.output/server/node_modules/execa/lib/methods/create.js +0 -65
- package/.output/server/node_modules/execa/lib/methods/main-async.js +0 -194
- package/.output/server/node_modules/execa/lib/methods/main-sync.js +0 -163
- package/.output/server/node_modules/execa/lib/methods/node.js +0 -51
- package/.output/server/node_modules/execa/lib/methods/parameters.js +0 -31
- package/.output/server/node_modules/execa/lib/methods/promise.js +0 -15
- package/.output/server/node_modules/execa/lib/methods/script.js +0 -22
- package/.output/server/node_modules/execa/lib/methods/template.js +0 -153
- package/.output/server/node_modules/execa/lib/pipe/abort.js +0 -20
- package/.output/server/node_modules/execa/lib/pipe/pipe-arguments.js +0 -91
- package/.output/server/node_modules/execa/lib/pipe/sequence.js +0 -24
- package/.output/server/node_modules/execa/lib/pipe/setup.js +0 -72
- package/.output/server/node_modules/execa/lib/pipe/streaming.js +0 -51
- package/.output/server/node_modules/execa/lib/pipe/throw.js +0 -58
- package/.output/server/node_modules/execa/lib/resolve/all-async.js +0 -46
- package/.output/server/node_modules/execa/lib/resolve/all-sync.js +0 -33
- package/.output/server/node_modules/execa/lib/resolve/exit-async.js +0 -54
- package/.output/server/node_modules/execa/lib/resolve/exit-sync.js +0 -25
- package/.output/server/node_modules/execa/lib/resolve/stdio.js +0 -47
- package/.output/server/node_modules/execa/lib/resolve/wait-stream.js +0 -96
- package/.output/server/node_modules/execa/lib/resolve/wait-subprocess.js +0 -146
- package/.output/server/node_modules/execa/lib/return/duration.js +0 -8
- package/.output/server/node_modules/execa/lib/return/early-error.js +0 -60
- package/.output/server/node_modules/execa/lib/return/final-error.js +0 -40
- package/.output/server/node_modules/execa/lib/return/message.js +0 -157
- package/.output/server/node_modules/execa/lib/return/reject.js +0 -13
- package/.output/server/node_modules/execa/lib/return/result.js +0 -186
- package/.output/server/node_modules/execa/lib/stdio/direction.js +0 -76
- package/.output/server/node_modules/execa/lib/stdio/duplicate.js +0 -116
- package/.output/server/node_modules/execa/lib/stdio/handle-async.js +0 -52
- package/.output/server/node_modules/execa/lib/stdio/handle-sync.js +0 -57
- package/.output/server/node_modules/execa/lib/stdio/handle.js +0 -214
- package/.output/server/node_modules/execa/lib/stdio/input-option.js +0 -50
- package/.output/server/node_modules/execa/lib/stdio/native.js +0 -106
- package/.output/server/node_modules/execa/lib/stdio/stdio-option.js +0 -60
- package/.output/server/node_modules/execa/lib/stdio/type.js +0 -173
- package/.output/server/node_modules/execa/lib/terminate/cancel.js +0 -20
- package/.output/server/node_modules/execa/lib/terminate/cleanup.js +0 -16
- package/.output/server/node_modules/execa/lib/terminate/graceful.js +0 -71
- package/.output/server/node_modules/execa/lib/terminate/kill.js +0 -93
- package/.output/server/node_modules/execa/lib/terminate/signal.js +0 -70
- package/.output/server/node_modules/execa/lib/terminate/timeout.js +0 -21
- package/.output/server/node_modules/execa/lib/transform/encoding-transform.js +0 -51
- package/.output/server/node_modules/execa/lib/transform/generator.js +0 -107
- package/.output/server/node_modules/execa/lib/transform/normalize.js +0 -111
- package/.output/server/node_modules/execa/lib/transform/object-mode.js +0 -41
- package/.output/server/node_modules/execa/lib/transform/run-async.js +0 -60
- package/.output/server/node_modules/execa/lib/transform/run-sync.js +0 -50
- package/.output/server/node_modules/execa/lib/transform/split.js +0 -110
- package/.output/server/node_modules/execa/lib/transform/validate.js +0 -43
- package/.output/server/node_modules/execa/lib/utils/abort-signal.js +0 -8
- package/.output/server/node_modules/execa/lib/utils/deferred.js +0 -7
- package/.output/server/node_modules/execa/lib/utils/max-listeners.js +0 -14
- package/.output/server/node_modules/execa/lib/utils/standard-stream.js +0 -6
- package/.output/server/node_modules/execa/lib/utils/uint-array.js +0 -69
- package/.output/server/node_modules/execa/lib/verbose/complete.js +0 -24
- package/.output/server/node_modules/execa/lib/verbose/custom.js +0 -26
- package/.output/server/node_modules/execa/lib/verbose/default.js +0 -54
- package/.output/server/node_modules/execa/lib/verbose/error.js +0 -13
- package/.output/server/node_modules/execa/lib/verbose/info.js +0 -39
- package/.output/server/node_modules/execa/lib/verbose/ipc.js +0 -15
- package/.output/server/node_modules/execa/lib/verbose/log.js +0 -54
- package/.output/server/node_modules/execa/lib/verbose/output.js +0 -60
- package/.output/server/node_modules/execa/lib/verbose/start.js +0 -15
- package/.output/server/node_modules/execa/lib/verbose/values.js +0 -33
- package/.output/server/node_modules/execa/package.json +0 -105
- package/.output/server/node_modules/figures/index.js +0 -292
- package/.output/server/node_modules/figures/package.json +0 -49
- package/.output/server/node_modules/fs-extra/lib/copy/copy-sync.js +0 -176
- package/.output/server/node_modules/fs-extra/lib/copy/copy.js +0 -180
- package/.output/server/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/.output/server/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/.output/server/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/.output/server/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/.output/server/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/.output/server/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/.output/server/node_modules/fs-extra/lib/index.js +0 -16
- package/.output/server/node_modules/fs-extra/lib/json/index.js +0 -16
- package/.output/server/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/.output/server/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/.output/server/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/.output/server/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/.output/server/node_modules/fs-extra/lib/move/index.js +0 -7
- package/.output/server/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/.output/server/node_modules/fs-extra/lib/move/move.js +0 -59
- package/.output/server/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/.output/server/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/.output/server/node_modules/fs-extra/lib/util/async.js +0 -29
- package/.output/server/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/.output/server/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/.output/server/node_modules/fs-extra/package.json +0 -71
- package/.output/server/node_modules/get-stream/package.json +0 -60
- package/.output/server/node_modules/get-stream/source/array-buffer.js +0 -84
- package/.output/server/node_modules/get-stream/source/array.js +0 -32
- package/.output/server/node_modules/get-stream/source/buffer.js +0 -19
- package/.output/server/node_modules/get-stream/source/contents.js +0 -121
- package/.output/server/node_modules/get-stream/source/exports.js +0 -5
- package/.output/server/node_modules/get-stream/source/index.js +0 -13
- package/.output/server/node_modules/get-stream/source/stream.js +0 -65
- package/.output/server/node_modules/get-stream/source/string.js +0 -41
- package/.output/server/node_modules/get-stream/source/utils.js +0 -11
- package/.output/server/node_modules/graceful-fs/clone.js +0 -23
- package/.output/server/node_modules/graceful-fs/graceful-fs.js +0 -448
- package/.output/server/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/.output/server/node_modules/graceful-fs/package.json +0 -53
- package/.output/server/node_modules/graceful-fs/polyfills.js +0 -355
- package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
- package/.output/server/node_modules/human-signals/build/src/main.js +0 -70
- package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -16
- package/.output/server/node_modules/human-signals/build/src/signals.js +0 -34
- package/.output/server/node_modules/human-signals/package.json +0 -66
- package/.output/server/node_modules/is-plain-obj/index.js +0 -8
- package/.output/server/node_modules/is-plain-obj/package.json +0 -41
- package/.output/server/node_modules/is-stream/index.js +0 -37
- package/.output/server/node_modules/is-stream/package.json +0 -48
- package/.output/server/node_modules/is-unicode-supported/index.js +0 -21
- package/.output/server/node_modules/is-unicode-supported/package.json +0 -47
- package/.output/server/node_modules/isexe/index.js +0 -57
- package/.output/server/node_modules/isexe/mode.js +0 -41
- package/.output/server/node_modules/isexe/package.json +0 -31
- package/.output/server/node_modules/isexe/windows.js +0 -42
- package/.output/server/node_modules/js-runtime/dist/index.js +0 -5
- package/.output/server/node_modules/js-runtime/package.json +0 -72
- package/.output/server/node_modules/jsonfile/index.js +0 -88
- package/.output/server/node_modules/jsonfile/package.json +0 -40
- package/.output/server/node_modules/jsonfile/utils.js +0 -14
- package/.output/server/node_modules/mime-db/db.json +0 -7088
- package/.output/server/node_modules/mime-db/index.js +0 -11
- package/.output/server/node_modules/mime-db/package.json +0 -57
- package/.output/server/node_modules/mime-types/index.js +0 -188
- package/.output/server/node_modules/mime-types/package.json +0 -43
- package/.output/server/node_modules/minimatch/minimatch.js +0 -947
- package/.output/server/node_modules/minimatch/package.json +0 -33
- package/.output/server/node_modules/natural-orderby/dist/main.js +0 -19
- package/.output/server/node_modules/natural-orderby/dist/umd/natural-orderby.development.js +0 -420
- package/.output/server/node_modules/natural-orderby/dist/umd/natural-orderby.production.min.js +0 -11
- package/.output/server/node_modules/natural-orderby/package.json +0 -119
- package/.output/server/node_modules/npm-run-path/index.js +0 -55
- package/.output/server/node_modules/npm-run-path/package.json +0 -52
- package/.output/server/node_modules/parse-ms/index.js +0 -45
- package/.output/server/node_modules/parse-ms/package.json +0 -47
- package/.output/server/node_modules/path-is-inside/lib/path-is-inside.js +0 -28
- package/.output/server/node_modules/path-is-inside/package.json +0 -27
- package/.output/server/node_modules/pretty-ms/index.js +0 -149
- package/.output/server/node_modules/pretty-ms/package.json +0 -55
- package/.output/server/node_modules/range-parser/index.js +0 -158
- package/.output/server/node_modules/range-parser/package.json +0 -40
- package/.output/server/node_modules/serve-handler/package.json +0 -68
- package/.output/server/node_modules/serve-handler/src/directory.js +0 -16
- package/.output/server/node_modules/serve-handler/src/error.js +0 -10
- package/.output/server/node_modules/serve-handler/src/glob-slash.js +0 -9
- package/.output/server/node_modules/serve-handler/src/index.js +0 -769
- package/.output/server/node_modules/shebang-command/index.js +0 -19
- package/.output/server/node_modules/shebang-command/package.json +0 -34
- package/.output/server/node_modules/shebang-regex/index.js +0 -2
- package/.output/server/node_modules/shebang-regex/package.json +0 -35
- package/.output/server/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/.output/server/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/.output/server/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/.output/server/node_modules/signal-exit/package.json +0 -106
- package/.output/server/node_modules/string-argv/index.js +0 -41
- package/.output/server/node_modules/string-argv/package.json +0 -51
- package/.output/server/node_modules/strip-final-newline/index.js +0 -26
- package/.output/server/node_modules/strip-final-newline/package.json +0 -49
- package/.output/server/node_modules/unicorn-magic/default.js +0 -14
- package/.output/server/node_modules/unicorn-magic/node.js +0 -49
- package/.output/server/node_modules/unicorn-magic/package.json +0 -62
- package/.output/server/node_modules/universalify/index.js +0 -24
- package/.output/server/node_modules/universalify/package.json +0 -34
- package/.output/server/node_modules/which/package.json +0 -43
- package/.output/server/node_modules/which/which.js +0 -125
- package/.output/server/node_modules/yoctocolors/base.js +0 -94
- package/.output/server/node_modules/yoctocolors/index.js +0 -2
- package/.output/server/node_modules/yoctocolors/package.json +0 -69
- /package/.output/server/node_modules/{.nitro/path-to-regexp@8.3.0 → path-to-regexp}/dist/index.js +0 -0
- /package/.output/server/node_modules/{.nitro/path-to-regexp@8.3.0 → path-to-regexp}/package.json +0 -0
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
var fs = require('fs')
|
|
2
|
-
var polyfills = require('./polyfills.js')
|
|
3
|
-
var legacy = require('./legacy-streams.js')
|
|
4
|
-
var clone = require('./clone.js')
|
|
5
|
-
|
|
6
|
-
var util = require('util')
|
|
7
|
-
|
|
8
|
-
/* istanbul ignore next - node 0.x polyfill */
|
|
9
|
-
var gracefulQueue
|
|
10
|
-
var previousSymbol
|
|
11
|
-
|
|
12
|
-
/* istanbul ignore else - node 0.x polyfill */
|
|
13
|
-
if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
|
|
14
|
-
gracefulQueue = Symbol.for('graceful-fs.queue')
|
|
15
|
-
// This is used in testing by future versions
|
|
16
|
-
previousSymbol = Symbol.for('graceful-fs.previous')
|
|
17
|
-
} else {
|
|
18
|
-
gracefulQueue = '___graceful-fs.queue'
|
|
19
|
-
previousSymbol = '___graceful-fs.previous'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function noop () {}
|
|
23
|
-
|
|
24
|
-
function publishQueue(context, queue) {
|
|
25
|
-
Object.defineProperty(context, gracefulQueue, {
|
|
26
|
-
get: function() {
|
|
27
|
-
return queue
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var debug = noop
|
|
33
|
-
if (util.debuglog)
|
|
34
|
-
debug = util.debuglog('gfs4')
|
|
35
|
-
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
|
|
36
|
-
debug = function() {
|
|
37
|
-
var m = util.format.apply(util, arguments)
|
|
38
|
-
m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
|
|
39
|
-
console.error(m)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Once time initialization
|
|
43
|
-
if (!fs[gracefulQueue]) {
|
|
44
|
-
// This queue can be shared by multiple loaded instances
|
|
45
|
-
var queue = global[gracefulQueue] || []
|
|
46
|
-
publishQueue(fs, queue)
|
|
47
|
-
|
|
48
|
-
// Patch fs.close/closeSync to shared queue version, because we need
|
|
49
|
-
// to retry() whenever a close happens *anywhere* in the program.
|
|
50
|
-
// This is essential when multiple graceful-fs instances are
|
|
51
|
-
// in play at the same time.
|
|
52
|
-
fs.close = (function (fs$close) {
|
|
53
|
-
function close (fd, cb) {
|
|
54
|
-
return fs$close.call(fs, fd, function (err) {
|
|
55
|
-
// This function uses the graceful-fs shared queue
|
|
56
|
-
if (!err) {
|
|
57
|
-
resetQueue()
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (typeof cb === 'function')
|
|
61
|
-
cb.apply(this, arguments)
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
Object.defineProperty(close, previousSymbol, {
|
|
66
|
-
value: fs$close
|
|
67
|
-
})
|
|
68
|
-
return close
|
|
69
|
-
})(fs.close)
|
|
70
|
-
|
|
71
|
-
fs.closeSync = (function (fs$closeSync) {
|
|
72
|
-
function closeSync (fd) {
|
|
73
|
-
// This function uses the graceful-fs shared queue
|
|
74
|
-
fs$closeSync.apply(fs, arguments)
|
|
75
|
-
resetQueue()
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
Object.defineProperty(closeSync, previousSymbol, {
|
|
79
|
-
value: fs$closeSync
|
|
80
|
-
})
|
|
81
|
-
return closeSync
|
|
82
|
-
})(fs.closeSync)
|
|
83
|
-
|
|
84
|
-
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
|
|
85
|
-
process.on('exit', function() {
|
|
86
|
-
debug(fs[gracefulQueue])
|
|
87
|
-
require('assert').equal(fs[gracefulQueue].length, 0)
|
|
88
|
-
})
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (!global[gracefulQueue]) {
|
|
93
|
-
publishQueue(global, fs[gracefulQueue]);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
module.exports = patch(clone(fs))
|
|
97
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
|
|
98
|
-
module.exports = patch(fs)
|
|
99
|
-
fs.__patched = true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function patch (fs) {
|
|
103
|
-
// Everything that references the open() function needs to be in here
|
|
104
|
-
polyfills(fs)
|
|
105
|
-
fs.gracefulify = patch
|
|
106
|
-
|
|
107
|
-
fs.createReadStream = createReadStream
|
|
108
|
-
fs.createWriteStream = createWriteStream
|
|
109
|
-
var fs$readFile = fs.readFile
|
|
110
|
-
fs.readFile = readFile
|
|
111
|
-
function readFile (path, options, cb) {
|
|
112
|
-
if (typeof options === 'function')
|
|
113
|
-
cb = options, options = null
|
|
114
|
-
|
|
115
|
-
return go$readFile(path, options, cb)
|
|
116
|
-
|
|
117
|
-
function go$readFile (path, options, cb, startTime) {
|
|
118
|
-
return fs$readFile(path, options, function (err) {
|
|
119
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
120
|
-
enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])
|
|
121
|
-
else {
|
|
122
|
-
if (typeof cb === 'function')
|
|
123
|
-
cb.apply(this, arguments)
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
var fs$writeFile = fs.writeFile
|
|
130
|
-
fs.writeFile = writeFile
|
|
131
|
-
function writeFile (path, data, options, cb) {
|
|
132
|
-
if (typeof options === 'function')
|
|
133
|
-
cb = options, options = null
|
|
134
|
-
|
|
135
|
-
return go$writeFile(path, data, options, cb)
|
|
136
|
-
|
|
137
|
-
function go$writeFile (path, data, options, cb, startTime) {
|
|
138
|
-
return fs$writeFile(path, data, options, function (err) {
|
|
139
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
140
|
-
enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
|
|
141
|
-
else {
|
|
142
|
-
if (typeof cb === 'function')
|
|
143
|
-
cb.apply(this, arguments)
|
|
144
|
-
}
|
|
145
|
-
})
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
var fs$appendFile = fs.appendFile
|
|
150
|
-
if (fs$appendFile)
|
|
151
|
-
fs.appendFile = appendFile
|
|
152
|
-
function appendFile (path, data, options, cb) {
|
|
153
|
-
if (typeof options === 'function')
|
|
154
|
-
cb = options, options = null
|
|
155
|
-
|
|
156
|
-
return go$appendFile(path, data, options, cb)
|
|
157
|
-
|
|
158
|
-
function go$appendFile (path, data, options, cb, startTime) {
|
|
159
|
-
return fs$appendFile(path, data, options, function (err) {
|
|
160
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
161
|
-
enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
|
|
162
|
-
else {
|
|
163
|
-
if (typeof cb === 'function')
|
|
164
|
-
cb.apply(this, arguments)
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
var fs$copyFile = fs.copyFile
|
|
171
|
-
if (fs$copyFile)
|
|
172
|
-
fs.copyFile = copyFile
|
|
173
|
-
function copyFile (src, dest, flags, cb) {
|
|
174
|
-
if (typeof flags === 'function') {
|
|
175
|
-
cb = flags
|
|
176
|
-
flags = 0
|
|
177
|
-
}
|
|
178
|
-
return go$copyFile(src, dest, flags, cb)
|
|
179
|
-
|
|
180
|
-
function go$copyFile (src, dest, flags, cb, startTime) {
|
|
181
|
-
return fs$copyFile(src, dest, flags, function (err) {
|
|
182
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
183
|
-
enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
|
|
184
|
-
else {
|
|
185
|
-
if (typeof cb === 'function')
|
|
186
|
-
cb.apply(this, arguments)
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
var fs$readdir = fs.readdir
|
|
193
|
-
fs.readdir = readdir
|
|
194
|
-
var noReaddirOptionVersions = /^v[0-5]\./
|
|
195
|
-
function readdir (path, options, cb) {
|
|
196
|
-
if (typeof options === 'function')
|
|
197
|
-
cb = options, options = null
|
|
198
|
-
|
|
199
|
-
var go$readdir = noReaddirOptionVersions.test(process.version)
|
|
200
|
-
? function go$readdir (path, options, cb, startTime) {
|
|
201
|
-
return fs$readdir(path, fs$readdirCallback(
|
|
202
|
-
path, options, cb, startTime
|
|
203
|
-
))
|
|
204
|
-
}
|
|
205
|
-
: function go$readdir (path, options, cb, startTime) {
|
|
206
|
-
return fs$readdir(path, options, fs$readdirCallback(
|
|
207
|
-
path, options, cb, startTime
|
|
208
|
-
))
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return go$readdir(path, options, cb)
|
|
212
|
-
|
|
213
|
-
function fs$readdirCallback (path, options, cb, startTime) {
|
|
214
|
-
return function (err, files) {
|
|
215
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
216
|
-
enqueue([
|
|
217
|
-
go$readdir,
|
|
218
|
-
[path, options, cb],
|
|
219
|
-
err,
|
|
220
|
-
startTime || Date.now(),
|
|
221
|
-
Date.now()
|
|
222
|
-
])
|
|
223
|
-
else {
|
|
224
|
-
if (files && files.sort)
|
|
225
|
-
files.sort()
|
|
226
|
-
|
|
227
|
-
if (typeof cb === 'function')
|
|
228
|
-
cb.call(this, err, files)
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
if (process.version.substr(0, 4) === 'v0.8') {
|
|
235
|
-
var legStreams = legacy(fs)
|
|
236
|
-
ReadStream = legStreams.ReadStream
|
|
237
|
-
WriteStream = legStreams.WriteStream
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
var fs$ReadStream = fs.ReadStream
|
|
241
|
-
if (fs$ReadStream) {
|
|
242
|
-
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
|
|
243
|
-
ReadStream.prototype.open = ReadStream$open
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
var fs$WriteStream = fs.WriteStream
|
|
247
|
-
if (fs$WriteStream) {
|
|
248
|
-
WriteStream.prototype = Object.create(fs$WriteStream.prototype)
|
|
249
|
-
WriteStream.prototype.open = WriteStream$open
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
Object.defineProperty(fs, 'ReadStream', {
|
|
253
|
-
get: function () {
|
|
254
|
-
return ReadStream
|
|
255
|
-
},
|
|
256
|
-
set: function (val) {
|
|
257
|
-
ReadStream = val
|
|
258
|
-
},
|
|
259
|
-
enumerable: true,
|
|
260
|
-
configurable: true
|
|
261
|
-
})
|
|
262
|
-
Object.defineProperty(fs, 'WriteStream', {
|
|
263
|
-
get: function () {
|
|
264
|
-
return WriteStream
|
|
265
|
-
},
|
|
266
|
-
set: function (val) {
|
|
267
|
-
WriteStream = val
|
|
268
|
-
},
|
|
269
|
-
enumerable: true,
|
|
270
|
-
configurable: true
|
|
271
|
-
})
|
|
272
|
-
|
|
273
|
-
// legacy names
|
|
274
|
-
var FileReadStream = ReadStream
|
|
275
|
-
Object.defineProperty(fs, 'FileReadStream', {
|
|
276
|
-
get: function () {
|
|
277
|
-
return FileReadStream
|
|
278
|
-
},
|
|
279
|
-
set: function (val) {
|
|
280
|
-
FileReadStream = val
|
|
281
|
-
},
|
|
282
|
-
enumerable: true,
|
|
283
|
-
configurable: true
|
|
284
|
-
})
|
|
285
|
-
var FileWriteStream = WriteStream
|
|
286
|
-
Object.defineProperty(fs, 'FileWriteStream', {
|
|
287
|
-
get: function () {
|
|
288
|
-
return FileWriteStream
|
|
289
|
-
},
|
|
290
|
-
set: function (val) {
|
|
291
|
-
FileWriteStream = val
|
|
292
|
-
},
|
|
293
|
-
enumerable: true,
|
|
294
|
-
configurable: true
|
|
295
|
-
})
|
|
296
|
-
|
|
297
|
-
function ReadStream (path, options) {
|
|
298
|
-
if (this instanceof ReadStream)
|
|
299
|
-
return fs$ReadStream.apply(this, arguments), this
|
|
300
|
-
else
|
|
301
|
-
return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
function ReadStream$open () {
|
|
305
|
-
var that = this
|
|
306
|
-
open(that.path, that.flags, that.mode, function (err, fd) {
|
|
307
|
-
if (err) {
|
|
308
|
-
if (that.autoClose)
|
|
309
|
-
that.destroy()
|
|
310
|
-
|
|
311
|
-
that.emit('error', err)
|
|
312
|
-
} else {
|
|
313
|
-
that.fd = fd
|
|
314
|
-
that.emit('open', fd)
|
|
315
|
-
that.read()
|
|
316
|
-
}
|
|
317
|
-
})
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function WriteStream (path, options) {
|
|
321
|
-
if (this instanceof WriteStream)
|
|
322
|
-
return fs$WriteStream.apply(this, arguments), this
|
|
323
|
-
else
|
|
324
|
-
return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
function WriteStream$open () {
|
|
328
|
-
var that = this
|
|
329
|
-
open(that.path, that.flags, that.mode, function (err, fd) {
|
|
330
|
-
if (err) {
|
|
331
|
-
that.destroy()
|
|
332
|
-
that.emit('error', err)
|
|
333
|
-
} else {
|
|
334
|
-
that.fd = fd
|
|
335
|
-
that.emit('open', fd)
|
|
336
|
-
}
|
|
337
|
-
})
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
function createReadStream (path, options) {
|
|
341
|
-
return new fs.ReadStream(path, options)
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function createWriteStream (path, options) {
|
|
345
|
-
return new fs.WriteStream(path, options)
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
var fs$open = fs.open
|
|
349
|
-
fs.open = open
|
|
350
|
-
function open (path, flags, mode, cb) {
|
|
351
|
-
if (typeof mode === 'function')
|
|
352
|
-
cb = mode, mode = null
|
|
353
|
-
|
|
354
|
-
return go$open(path, flags, mode, cb)
|
|
355
|
-
|
|
356
|
-
function go$open (path, flags, mode, cb, startTime) {
|
|
357
|
-
return fs$open(path, flags, mode, function (err, fd) {
|
|
358
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
|
359
|
-
enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])
|
|
360
|
-
else {
|
|
361
|
-
if (typeof cb === 'function')
|
|
362
|
-
cb.apply(this, arguments)
|
|
363
|
-
}
|
|
364
|
-
})
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
return fs
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
function enqueue (elem) {
|
|
372
|
-
debug('ENQUEUE', elem[0].name, elem[1])
|
|
373
|
-
fs[gracefulQueue].push(elem)
|
|
374
|
-
retry()
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// keep track of the timeout between retry() calls
|
|
378
|
-
var retryTimer
|
|
379
|
-
|
|
380
|
-
// reset the startTime and lastTime to now
|
|
381
|
-
// this resets the start of the 60 second overall timeout as well as the
|
|
382
|
-
// delay between attempts so that we'll retry these jobs sooner
|
|
383
|
-
function resetQueue () {
|
|
384
|
-
var now = Date.now()
|
|
385
|
-
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
|
|
386
|
-
// entries that are only a length of 2 are from an older version, don't
|
|
387
|
-
// bother modifying those since they'll be retried anyway.
|
|
388
|
-
if (fs[gracefulQueue][i].length > 2) {
|
|
389
|
-
fs[gracefulQueue][i][3] = now // startTime
|
|
390
|
-
fs[gracefulQueue][i][4] = now // lastTime
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
// call retry to make sure we're actively processing the queue
|
|
394
|
-
retry()
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
function retry () {
|
|
398
|
-
// clear the timer and remove it to help prevent unintended concurrency
|
|
399
|
-
clearTimeout(retryTimer)
|
|
400
|
-
retryTimer = undefined
|
|
401
|
-
|
|
402
|
-
if (fs[gracefulQueue].length === 0)
|
|
403
|
-
return
|
|
404
|
-
|
|
405
|
-
var elem = fs[gracefulQueue].shift()
|
|
406
|
-
var fn = elem[0]
|
|
407
|
-
var args = elem[1]
|
|
408
|
-
// these items may be unset if they were added by an older graceful-fs
|
|
409
|
-
var err = elem[2]
|
|
410
|
-
var startTime = elem[3]
|
|
411
|
-
var lastTime = elem[4]
|
|
412
|
-
|
|
413
|
-
// if we don't have a startTime we have no way of knowing if we've waited
|
|
414
|
-
// long enough, so go ahead and retry this item now
|
|
415
|
-
if (startTime === undefined) {
|
|
416
|
-
debug('RETRY', fn.name, args)
|
|
417
|
-
fn.apply(null, args)
|
|
418
|
-
} else if (Date.now() - startTime >= 60000) {
|
|
419
|
-
// it's been more than 60 seconds total, bail now
|
|
420
|
-
debug('TIMEOUT', fn.name, args)
|
|
421
|
-
var cb = args.pop()
|
|
422
|
-
if (typeof cb === 'function')
|
|
423
|
-
cb.call(null, err)
|
|
424
|
-
} else {
|
|
425
|
-
// the amount of time between the last attempt and right now
|
|
426
|
-
var sinceAttempt = Date.now() - lastTime
|
|
427
|
-
// the amount of time between when we first tried, and when we last tried
|
|
428
|
-
// rounded up to at least 1
|
|
429
|
-
var sinceStart = Math.max(lastTime - startTime, 1)
|
|
430
|
-
// backoff. wait longer than the total time we've been retrying, but only
|
|
431
|
-
// up to a maximum of 100ms
|
|
432
|
-
var desiredDelay = Math.min(sinceStart * 1.2, 100)
|
|
433
|
-
// it's been long enough since the last retry, do it again
|
|
434
|
-
if (sinceAttempt >= desiredDelay) {
|
|
435
|
-
debug('RETRY', fn.name, args)
|
|
436
|
-
fn.apply(null, args.concat([startTime]))
|
|
437
|
-
} else {
|
|
438
|
-
// if we can't do this job yet, push it to the end of the queue
|
|
439
|
-
// and let the next iteration check again
|
|
440
|
-
fs[gracefulQueue].push(elem)
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// schedule our next run if one isn't already scheduled
|
|
445
|
-
if (retryTimer === undefined) {
|
|
446
|
-
retryTimer = setTimeout(retry, 0)
|
|
447
|
-
}
|
|
448
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var Stream = require('stream').Stream
|
|
2
|
-
|
|
3
|
-
module.exports = legacy
|
|
4
|
-
|
|
5
|
-
function legacy (fs) {
|
|
6
|
-
return {
|
|
7
|
-
ReadStream: ReadStream,
|
|
8
|
-
WriteStream: WriteStream
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function ReadStream (path, options) {
|
|
12
|
-
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
|
|
13
|
-
|
|
14
|
-
Stream.call(this);
|
|
15
|
-
|
|
16
|
-
var self = this;
|
|
17
|
-
|
|
18
|
-
this.path = path;
|
|
19
|
-
this.fd = null;
|
|
20
|
-
this.readable = true;
|
|
21
|
-
this.paused = false;
|
|
22
|
-
|
|
23
|
-
this.flags = 'r';
|
|
24
|
-
this.mode = 438; /*=0666*/
|
|
25
|
-
this.bufferSize = 64 * 1024;
|
|
26
|
-
|
|
27
|
-
options = options || {};
|
|
28
|
-
|
|
29
|
-
// Mixin options into this
|
|
30
|
-
var keys = Object.keys(options);
|
|
31
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
|
32
|
-
var key = keys[index];
|
|
33
|
-
this[key] = options[key];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (this.encoding) this.setEncoding(this.encoding);
|
|
37
|
-
|
|
38
|
-
if (this.start !== undefined) {
|
|
39
|
-
if ('number' !== typeof this.start) {
|
|
40
|
-
throw TypeError('start must be a Number');
|
|
41
|
-
}
|
|
42
|
-
if (this.end === undefined) {
|
|
43
|
-
this.end = Infinity;
|
|
44
|
-
} else if ('number' !== typeof this.end) {
|
|
45
|
-
throw TypeError('end must be a Number');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (this.start > this.end) {
|
|
49
|
-
throw new Error('start must be <= end');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
this.pos = this.start;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (this.fd !== null) {
|
|
56
|
-
process.nextTick(function() {
|
|
57
|
-
self._read();
|
|
58
|
-
});
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
fs.open(this.path, this.flags, this.mode, function (err, fd) {
|
|
63
|
-
if (err) {
|
|
64
|
-
self.emit('error', err);
|
|
65
|
-
self.readable = false;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
self.fd = fd;
|
|
70
|
-
self.emit('open', fd);
|
|
71
|
-
self._read();
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function WriteStream (path, options) {
|
|
76
|
-
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
|
77
|
-
|
|
78
|
-
Stream.call(this);
|
|
79
|
-
|
|
80
|
-
this.path = path;
|
|
81
|
-
this.fd = null;
|
|
82
|
-
this.writable = true;
|
|
83
|
-
|
|
84
|
-
this.flags = 'w';
|
|
85
|
-
this.encoding = 'binary';
|
|
86
|
-
this.mode = 438; /*=0666*/
|
|
87
|
-
this.bytesWritten = 0;
|
|
88
|
-
|
|
89
|
-
options = options || {};
|
|
90
|
-
|
|
91
|
-
// Mixin options into this
|
|
92
|
-
var keys = Object.keys(options);
|
|
93
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
|
94
|
-
var key = keys[index];
|
|
95
|
-
this[key] = options[key];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (this.start !== undefined) {
|
|
99
|
-
if ('number' !== typeof this.start) {
|
|
100
|
-
throw TypeError('start must be a Number');
|
|
101
|
-
}
|
|
102
|
-
if (this.start < 0) {
|
|
103
|
-
throw new Error('start must be >= zero');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
this.pos = this.start;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
this.busy = false;
|
|
110
|
-
this._queue = [];
|
|
111
|
-
|
|
112
|
-
if (this.fd === null) {
|
|
113
|
-
this._open = fs.open;
|
|
114
|
-
this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
|
|
115
|
-
this.flush();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "graceful-fs",
|
|
3
|
-
"description": "A drop-in replacement for fs, making various improvements.",
|
|
4
|
-
"version": "4.2.11",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/isaacs/node-graceful-fs"
|
|
8
|
-
},
|
|
9
|
-
"main": "graceful-fs.js",
|
|
10
|
-
"directories": {
|
|
11
|
-
"test": "test"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"preversion": "npm test",
|
|
15
|
-
"postversion": "npm publish",
|
|
16
|
-
"postpublish": "git push origin --follow-tags",
|
|
17
|
-
"test": "nyc --silent node test.js | tap -c -",
|
|
18
|
-
"posttest": "nyc report"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"fs",
|
|
22
|
-
"module",
|
|
23
|
-
"reading",
|
|
24
|
-
"retry",
|
|
25
|
-
"retries",
|
|
26
|
-
"queue",
|
|
27
|
-
"error",
|
|
28
|
-
"errors",
|
|
29
|
-
"handling",
|
|
30
|
-
"EMFILE",
|
|
31
|
-
"EAGAIN",
|
|
32
|
-
"EINVAL",
|
|
33
|
-
"EPERM",
|
|
34
|
-
"EACCESS"
|
|
35
|
-
],
|
|
36
|
-
"license": "ISC",
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"import-fresh": "^2.0.0",
|
|
39
|
-
"mkdirp": "^0.5.0",
|
|
40
|
-
"rimraf": "^2.2.8",
|
|
41
|
-
"tap": "^16.3.4"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"fs.js",
|
|
45
|
-
"graceful-fs.js",
|
|
46
|
-
"legacy-streams.js",
|
|
47
|
-
"polyfills.js",
|
|
48
|
-
"clone.js"
|
|
49
|
-
],
|
|
50
|
-
"tap": {
|
|
51
|
-
"reporter": "classic"
|
|
52
|
-
}
|
|
53
|
-
}
|