ibm-cloud-sdk-core 4.3.3 → 4.3.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/iamtest.env +3 -0
- package/package.json +2 -2
- package/sdk-test-utilities/node_modules/.package-lock.json +508 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js +156 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/package.json +30 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js +119 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/index.js +165 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md +147 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js +228 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +93 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/package.json +71 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/readme.md +314 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/templates.js +128 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/conversions.js +868 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/index.js +78 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/package.json +46 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json +43 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/package.json +25 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/test.js +7 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/license +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json +41 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md +27 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/package.json +44 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/readme.md +70 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/index.js +131 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/readme.md +66 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/package.json +30 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/README.md +5 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/immutableUtils.js +66 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.d.ts +94 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.js +34 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/jasmineUtils.js +218 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/utils.js +462 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/package.json +35 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/README.md +3 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.js +60 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/package.json +29 -0
- package/sdk-test-utilities/node_modules/@jest/types/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/types/README.md +30 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Circus.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Config.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Global.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/TestResult.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.d.ts +1204 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/package.json +38 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.d.ts +35 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.js +577 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.d.ts +2 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.js +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.d.ts +88 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.js +609 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/license +23 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/package.json +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/readme.md +1424 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.js +90 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.d.ts +723 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.js +2220 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.d.ts +30 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.js +484 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.js +71 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.js +480 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.d.ts +43 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.js +204 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.js +80 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.js +208 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.d.ts +6 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.js +56 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.d.ts +11 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.js +53 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.js +121 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.d.ts +24 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.js +142 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.d.ts +39 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.js +99 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/index.d.ts +111 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/index.d.ts +184 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/README.md +86 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/index.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/node/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/node/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@types/node/assert.d.ts +1040 -0
- package/sdk-test-utilities/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/sdk-test-utilities/node_modules/@types/node/buffer.d.ts +2363 -0
- package/sdk-test-utilities/node_modules/@types/node/child_process.d.ts +1544 -0
- package/sdk-test-utilities/node_modules/@types/node/cluster.d.ts +578 -0
- package/sdk-test-utilities/node_modules/@types/node/console.d.ts +452 -0
- package/sdk-test-utilities/node_modules/@types/node/constants.d.ts +19 -0
- package/sdk-test-utilities/node_modules/@types/node/crypto.d.ts +4523 -0
- package/sdk-test-utilities/node_modules/@types/node/dgram.d.ts +596 -0
- package/sdk-test-utilities/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/sdk-test-utilities/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/sdk-test-utilities/node_modules/@types/node/dns.d.ts +864 -0
- package/sdk-test-utilities/node_modules/@types/node/dom-events.d.ts +124 -0
- package/sdk-test-utilities/node_modules/@types/node/domain.d.ts +170 -0
- package/sdk-test-utilities/node_modules/@types/node/events.d.ts +909 -0
- package/sdk-test-utilities/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/sdk-test-utilities/node_modules/@types/node/fs.d.ts +4317 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.d.ts +411 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.global.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@types/node/http.d.ts +1908 -0
- package/sdk-test-utilities/node_modules/@types/node/http2.d.ts +2418 -0
- package/sdk-test-utilities/node_modules/@types/node/https.d.ts +550 -0
- package/sdk-test-utilities/node_modules/@types/node/index.d.ts +89 -0
- package/sdk-test-utilities/node_modules/@types/node/inspector.d.ts +2746 -0
- package/sdk-test-utilities/node_modules/@types/node/module.d.ts +315 -0
- package/sdk-test-utilities/node_modules/@types/node/net.d.ts +999 -0
- package/sdk-test-utilities/node_modules/@types/node/os.d.ts +495 -0
- package/sdk-test-utilities/node_modules/@types/node/package.json +217 -0
- package/sdk-test-utilities/node_modules/@types/node/path.d.ts +191 -0
- package/sdk-test-utilities/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/sdk-test-utilities/node_modules/@types/node/process.d.ts +1754 -0
- package/sdk-test-utilities/node_modules/@types/node/punycode.d.ts +117 -0
- package/sdk-test-utilities/node_modules/@types/node/querystring.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/sdk-test-utilities/node_modules/@types/node/readline.d.ts +540 -0
- package/sdk-test-utilities/node_modules/@types/node/repl.d.ts +430 -0
- package/sdk-test-utilities/node_modules/@types/node/sea.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/web.d.ts +367 -0
- package/sdk-test-utilities/node_modules/@types/node/stream.d.ts +1707 -0
- package/sdk-test-utilities/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/node/test.d.ts +1718 -0
- package/sdk-test-utilities/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@types/node/timers.d.ts +240 -0
- package/sdk-test-utilities/node_modules/@types/node/tls.d.ts +1217 -0
- package/sdk-test-utilities/node_modules/@types/node/trace_events.d.ts +197 -0
- package/sdk-test-utilities/node_modules/@types/node/tty.d.ts +208 -0
- package/sdk-test-utilities/node_modules/@types/node/url.d.ts +952 -0
- package/sdk-test-utilities/node_modules/@types/node/util.d.ts +2292 -0
- package/sdk-test-utilities/node_modules/@types/node/v8.d.ts +808 -0
- package/sdk-test-utilities/node_modules/@types/node/vm.d.ts +924 -0
- package/sdk-test-utilities/node_modules/@types/node/wasi.d.ts +181 -0
- package/sdk-test-utilities/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/sdk-test-utilities/node_modules/@types/node/zlib.d.ts +530 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/README.md +78 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/index.d.ts +59 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/yargs/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.mts +1 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.ts +5 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.mts +46 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.ts +1031 -0
- package/sdk-test-utilities/node_modules/@types/yargs/package.json +87 -0
- package/sdk-test-utilities/node_modules/@types/yargs/yargs.d.ts +9 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/index.d.ts +112 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/package.json +25 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.d.ts +345 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.js +163 -0
- package/sdk-test-utilities/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/ansi-styles/readme.md +152 -0
- package/sdk-test-utilities/node_modules/braces/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/braces/README.md +586 -0
- package/sdk-test-utilities/node_modules/braces/index.js +170 -0
- package/sdk-test-utilities/node_modules/braces/lib/compile.js +60 -0
- package/sdk-test-utilities/node_modules/braces/lib/constants.js +57 -0
- package/sdk-test-utilities/node_modules/braces/lib/expand.js +113 -0
- package/sdk-test-utilities/node_modules/braces/lib/parse.js +331 -0
- package/sdk-test-utilities/node_modules/braces/lib/stringify.js +32 -0
- package/sdk-test-utilities/node_modules/braces/lib/utils.js +122 -0
- package/sdk-test-utilities/node_modules/braces/package.json +77 -0
- package/sdk-test-utilities/node_modules/chalk/index.d.ts +415 -0
- package/sdk-test-utilities/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/chalk/package.json +68 -0
- package/sdk-test-utilities/node_modules/chalk/readme.md +341 -0
- package/sdk-test-utilities/node_modules/chalk/source/index.js +229 -0
- package/sdk-test-utilities/node_modules/chalk/source/templates.js +134 -0
- package/sdk-test-utilities/node_modules/chalk/source/util.js +39 -0
- package/sdk-test-utilities/node_modules/ci-info/CHANGELOG.md +178 -0
- package/sdk-test-utilities/node_modules/ci-info/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/ci-info/README.md +135 -0
- package/sdk-test-utilities/node_modules/ci-info/index.d.ts +75 -0
- package/sdk-test-utilities/node_modules/ci-info/index.js +90 -0
- package/sdk-test-utilities/node_modules/ci-info/package.json +45 -0
- package/sdk-test-utilities/node_modules/ci-info/vendors.json +321 -0
- package/sdk-test-utilities/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/color-convert/conversions.js +839 -0
- package/sdk-test-utilities/node_modules/color-convert/index.js +81 -0
- package/sdk-test-utilities/node_modules/color-convert/package.json +48 -0
- package/sdk-test-utilities/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/color-name/package.json +28 -0
- package/sdk-test-utilities/node_modules/diff-sequences/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/diff-sequences/README.md +404 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.d.ts +38 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.js +798 -0
- package/sdk-test-utilities/node_modules/diff-sequences/package.json +39 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/license +9 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/package.json +43 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/readme.md +29 -0
- package/sdk-test-utilities/node_modules/expect/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/expect/README.md +3 -0
- package/sdk-test-utilities/node_modules/expect/build/asymmetricMatchers.js +375 -0
- package/sdk-test-utilities/node_modules/expect/build/extractExpectedAssertionsErrors.js +86 -0
- package/sdk-test-utilities/node_modules/expect/build/index.d.ts +370 -0
- package/sdk-test-utilities/node_modules/expect/build/index.js +410 -0
- package/sdk-test-utilities/node_modules/expect/build/jestMatchersObject.js +123 -0
- package/sdk-test-utilities/node_modules/expect/build/matchers.js +1292 -0
- package/sdk-test-utilities/node_modules/expect/build/print.js +122 -0
- package/sdk-test-utilities/node_modules/expect/build/spyMatchers.js +1254 -0
- package/sdk-test-utilities/node_modules/expect/build/toThrowMatchers.js +481 -0
- package/sdk-test-utilities/node_modules/expect/build/types.js +3 -0
- package/sdk-test-utilities/node_modules/expect/package.json +43 -0
- package/sdk-test-utilities/node_modules/fill-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/fill-range/README.md +237 -0
- package/sdk-test-utilities/node_modules/fill-range/index.js +248 -0
- package/sdk-test-utilities/node_modules/fill-range/package.json +74 -0
- package/sdk-test-utilities/node_modules/graceful-fs/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/graceful-fs/README.md +143 -0
- package/sdk-test-utilities/node_modules/graceful-fs/clone.js +23 -0
- package/sdk-test-utilities/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/sdk-test-utilities/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/sdk-test-utilities/node_modules/graceful-fs/package.json +53 -0
- package/sdk-test-utilities/node_modules/graceful-fs/polyfills.js +355 -0
- package/sdk-test-utilities/node_modules/has-flag/index.d.ts +39 -0
- package/sdk-test-utilities/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/has-flag/package.json +46 -0
- package/sdk-test-utilities/node_modules/has-flag/readme.md +89 -0
- package/sdk-test-utilities/node_modules/is-number/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/is-number/README.md +187 -0
- package/sdk-test-utilities/node_modules/is-number/index.js +18 -0
- package/sdk-test-utilities/node_modules/is-number/package.json +82 -0
- package/sdk-test-utilities/node_modules/jest-diff/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-diff/README.md +671 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/cleanupSemantic.js +599 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/constants.js +19 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffLines.js +193 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffStrings.js +66 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/getAlignedDiffs.js +223 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.d.ts +93 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.js +232 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/joinAlignedDiffs.js +271 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/normalizeDiffOptions.js +59 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/printDiffs.js +79 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-diff/package.json +36 -0
- package/sdk-test-utilities/node_modules/jest-get-type/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.d.ts +27 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.js +53 -0
- package/sdk-test-utilities/node_modules/jest-get-type/package.json +27 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/README.md +24 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/Replaceable.js +64 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +111 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.d.ts +138 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.js +542 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/package.json +37 -0
- package/sdk-test-utilities/node_modules/jest-message-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.d.ts +68 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.js +518 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-message-util/package.json +43 -0
- package/sdk-test-utilities/node_modules/jest-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-util/Readme.md +87 -0
- package/sdk-test-utilities/node_modules/jest-util/build/ErrorWithStack.js +28 -0
- package/sdk-test-utilities/node_modules/jest-util/build/clearLine.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/convertDescriptorToString.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createDirectory.js +71 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createProcessObject.js +109 -0
- package/sdk-test-utilities/node_modules/jest-util/build/deepCyclicCopy.js +76 -0
- package/sdk-test-utilities/node_modules/jest-util/build/formatTime.js +24 -0
- package/sdk-test-utilities/node_modules/jest-util/build/globsToMatcher.js +98 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.d.ts +136 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.js +199 -0
- package/sdk-test-utilities/node_modules/jest-util/build/installCommonGlobals.js +115 -0
- package/sdk-test-utilities/node_modules/jest-util/build/interopRequireDefault.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/invariant.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isInteractive.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isNonNullable.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isPromise.js +20 -0
- package/sdk-test-utilities/node_modules/jest-util/build/pluralize.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/preRunMessage.js +38 -0
- package/sdk-test-utilities/node_modules/jest-util/build/replacePathSepForGlob.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/requireOrImportModule.js +77 -0
- package/sdk-test-utilities/node_modules/jest-util/build/setGlobal.js +17 -0
- package/sdk-test-utilities/node_modules/jest-util/build/specialChars.js +25 -0
- package/sdk-test-utilities/node_modules/jest-util/build/testPathPatternToRegExp.js +19 -0
- package/sdk-test-utilities/node_modules/jest-util/build/tryRealpath.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/package.json +38 -0
- package/sdk-test-utilities/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/sdk-test-utilities/node_modules/js-tokens/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/js-tokens/README.md +240 -0
- package/sdk-test-utilities/node_modules/js-tokens/index.js +23 -0
- package/sdk-test-utilities/node_modules/js-tokens/package.json +30 -0
- package/sdk-test-utilities/node_modules/micromatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/micromatch/README.md +1017 -0
- package/sdk-test-utilities/node_modules/micromatch/index.js +467 -0
- package/sdk-test-utilities/node_modules/micromatch/package.json +101 -0
- package/sdk-test-utilities/node_modules/picocolors/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/picocolors/README.md +21 -0
- package/sdk-test-utilities/node_modules/picocolors/package.json +25 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.browser.js +4 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.js +65 -0
- package/sdk-test-utilities/node_modules/picomatch/CHANGELOG.md +136 -0
- package/sdk-test-utilities/node_modules/picomatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/picomatch/README.md +708 -0
- package/sdk-test-utilities/node_modules/picomatch/index.js +3 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/constants.js +179 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/parse.js +1091 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/picomatch.js +342 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/scan.js +391 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/utils.js +64 -0
- package/sdk-test-utilities/node_modules/picomatch/package.json +81 -0
- package/sdk-test-utilities/node_modules/pretty-format/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/pretty-format/README.md +463 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/collections.js +180 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.d.ts +163 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.js +478 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +89 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMCollection.js +67 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMElement.js +101 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/Immutable.js +217 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactElement.js +143 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactTestComponent.js +66 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/markup.js +113 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.d.ts +167 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.js +164 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/package.json +52 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/readme.md +144 -0
- package/sdk-test-utilities/node_modules/pretty-format/package.json +43 -0
- package/sdk-test-utilities/node_modules/react-is/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/react-is/README.md +104 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.development.js +221 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.production.min.js +14 -0
- package/sdk-test-utilities/node_modules/react-is/index.js +7 -0
- package/sdk-test-utilities/node_modules/react-is/package.json +26 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.development.js +220 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.production.min.js +15 -0
- package/sdk-test-utilities/node_modules/slash/index.d.ts +25 -0
- package/sdk-test-utilities/node_modules/slash/index.js +11 -0
- package/sdk-test-utilities/node_modules/slash/license +9 -0
- package/sdk-test-utilities/node_modules/slash/package.json +35 -0
- package/sdk-test-utilities/node_modules/slash/readme.md +44 -0
- package/sdk-test-utilities/node_modules/stack-utils/LICENSE.md +21 -0
- package/sdk-test-utilities/node_modules/stack-utils/index.js +344 -0
- package/sdk-test-utilities/node_modules/stack-utils/package.json +39 -0
- package/sdk-test-utilities/node_modules/stack-utils/readme.md +143 -0
- package/sdk-test-utilities/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/supports-color/index.js +135 -0
- package/sdk-test-utilities/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/supports-color/readme.md +76 -0
- package/sdk-test-utilities/node_modules/to-regex-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/to-regex-range/README.md +305 -0
- package/sdk-test-utilities/node_modules/to-regex-range/index.js +288 -0
- package/sdk-test-utilities/node_modules/to-regex-range/package.json +88 -0
- package/sdk-test-utilities/node_modules/undici-types/README.md +6 -0
- package/sdk-test-utilities/node_modules/undici-types/agent.d.ts +31 -0
- package/sdk-test-utilities/node_modules/undici-types/api.d.ts +43 -0
- package/sdk-test-utilities/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/sdk-test-utilities/node_modules/undici-types/cache.d.ts +36 -0
- package/sdk-test-utilities/node_modules/undici-types/client.d.ts +97 -0
- package/sdk-test-utilities/node_modules/undici-types/connector.d.ts +34 -0
- package/sdk-test-utilities/node_modules/undici-types/content-type.d.ts +21 -0
- package/sdk-test-utilities/node_modules/undici-types/cookies.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/sdk-test-utilities/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/sdk-test-utilities/node_modules/undici-types/errors.d.ts +128 -0
- package/sdk-test-utilities/node_modules/undici-types/fetch.d.ts +209 -0
- package/sdk-test-utilities/node_modules/undici-types/file.d.ts +39 -0
- package/sdk-test-utilities/node_modules/undici-types/filereader.d.ts +54 -0
- package/sdk-test-utilities/node_modules/undici-types/formdata.d.ts +108 -0
- package/sdk-test-utilities/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/global-origin.d.ts +7 -0
- package/sdk-test-utilities/node_modules/undici-types/handlers.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/header.d.ts +4 -0
- package/sdk-test-utilities/node_modules/undici-types/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/undici-types/interceptors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-client.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/package.json +55 -0
- package/sdk-test-utilities/node_modules/undici-types/patch.d.ts +71 -0
- package/sdk-test-utilities/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/sdk-test-utilities/node_modules/undici-types/pool.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/sdk-test-utilities/node_modules/undici-types/readable.d.ts +61 -0
- package/sdk-test-utilities/node_modules/undici-types/webidl.d.ts +220 -0
- package/sdk-test-utilities/node_modules/undici-types/websocket.d.ts +131 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# graceful-fs
|
|
2
|
+
|
|
3
|
+
graceful-fs functions as a drop-in replacement for the fs module,
|
|
4
|
+
making various improvements.
|
|
5
|
+
|
|
6
|
+
The improvements are meant to normalize behavior across different
|
|
7
|
+
platforms and environments, and to make filesystem access more
|
|
8
|
+
resilient to errors.
|
|
9
|
+
|
|
10
|
+
## Improvements over [fs module](https://nodejs.org/api/fs.html)
|
|
11
|
+
|
|
12
|
+
* Queues up `open` and `readdir` calls, and retries them once
|
|
13
|
+
something closes if there is an EMFILE error from too many file
|
|
14
|
+
descriptors.
|
|
15
|
+
* fixes `lchmod` for Node versions prior to 0.6.2.
|
|
16
|
+
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
|
|
17
|
+
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
|
|
18
|
+
`lchown` if the user isn't root.
|
|
19
|
+
* makes `lchmod` and `lchown` become noops, if not available.
|
|
20
|
+
* retries reading a file if `read` results in EAGAIN error.
|
|
21
|
+
|
|
22
|
+
On Windows, it retries renaming a file for up to one second if `EACCESS`
|
|
23
|
+
or `EPERM` error occurs, likely because antivirus software has locked
|
|
24
|
+
the directory.
|
|
25
|
+
|
|
26
|
+
## USAGE
|
|
27
|
+
|
|
28
|
+
```javascript
|
|
29
|
+
// use just like fs
|
|
30
|
+
var fs = require('graceful-fs')
|
|
31
|
+
|
|
32
|
+
// now go and do stuff with it...
|
|
33
|
+
fs.readFile('some-file-or-whatever', (err, data) => {
|
|
34
|
+
// Do stuff here.
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Sync methods
|
|
39
|
+
|
|
40
|
+
This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync
|
|
41
|
+
methods. If you use sync methods which open file descriptors then you are
|
|
42
|
+
responsible for dealing with any errors.
|
|
43
|
+
|
|
44
|
+
This is a known limitation, not a bug.
|
|
45
|
+
|
|
46
|
+
## Global Patching
|
|
47
|
+
|
|
48
|
+
If you want to patch the global fs module (or any other fs-like
|
|
49
|
+
module) you can do this:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
// Make sure to read the caveat below.
|
|
53
|
+
var realFs = require('fs')
|
|
54
|
+
var gracefulFs = require('graceful-fs')
|
|
55
|
+
gracefulFs.gracefulify(realFs)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This should only ever be done at the top-level application layer, in
|
|
59
|
+
order to delay on EMFILE errors from any fs-using dependencies. You
|
|
60
|
+
should **not** do this in a library, because it can cause unexpected
|
|
61
|
+
delays in other parts of the program.
|
|
62
|
+
|
|
63
|
+
## Changes
|
|
64
|
+
|
|
65
|
+
This module is fairly stable at this point, and used by a lot of
|
|
66
|
+
things. That being said, because it implements a subtle behavior
|
|
67
|
+
change in a core part of the node API, even modest changes can be
|
|
68
|
+
extremely breaking, and the versioning is thus biased towards
|
|
69
|
+
bumping the major when in doubt.
|
|
70
|
+
|
|
71
|
+
The main change between major versions has been switching between
|
|
72
|
+
providing a fully-patched `fs` module vs monkey-patching the node core
|
|
73
|
+
builtin, and the approach by which a non-monkey-patched `fs` was
|
|
74
|
+
created.
|
|
75
|
+
|
|
76
|
+
The goal is to trade `EMFILE` errors for slower fs operations. So, if
|
|
77
|
+
you try to open a zillion files, rather than crashing, `open`
|
|
78
|
+
operations will be queued up and wait for something else to `close`.
|
|
79
|
+
|
|
80
|
+
There are advantages to each approach. Monkey-patching the fs means
|
|
81
|
+
that no `EMFILE` errors can possibly occur anywhere in your
|
|
82
|
+
application, because everything is using the same core `fs` module,
|
|
83
|
+
which is patched. However, it can also obviously cause undesirable
|
|
84
|
+
side-effects, especially if the module is loaded multiple times.
|
|
85
|
+
|
|
86
|
+
Implementing a separate-but-identical patched `fs` module is more
|
|
87
|
+
surgical (and doesn't run the risk of patching multiple times), but
|
|
88
|
+
also imposes the challenge of keeping in sync with the core module.
|
|
89
|
+
|
|
90
|
+
The current approach loads the `fs` module, and then creates a
|
|
91
|
+
lookalike object that has all the same methods, except a few that are
|
|
92
|
+
patched. It is safe to use in all versions of Node from 0.8 through
|
|
93
|
+
7.0.
|
|
94
|
+
|
|
95
|
+
### v4
|
|
96
|
+
|
|
97
|
+
* Do not monkey-patch the fs module. This module may now be used as a
|
|
98
|
+
drop-in dep, and users can opt into monkey-patching the fs builtin
|
|
99
|
+
if their app requires it.
|
|
100
|
+
|
|
101
|
+
### v3
|
|
102
|
+
|
|
103
|
+
* Monkey-patch fs, because the eval approach no longer works on recent
|
|
104
|
+
node.
|
|
105
|
+
* fixed possible type-error throw if rename fails on windows
|
|
106
|
+
* verify that we *never* get EMFILE errors
|
|
107
|
+
* Ignore ENOSYS from chmod/chown
|
|
108
|
+
* clarify that graceful-fs must be used as a drop-in
|
|
109
|
+
|
|
110
|
+
### v2.1.0
|
|
111
|
+
|
|
112
|
+
* Use eval rather than monkey-patching fs.
|
|
113
|
+
* readdir: Always sort the results
|
|
114
|
+
* win32: requeue a file if error has an OK status
|
|
115
|
+
|
|
116
|
+
### v2.0
|
|
117
|
+
|
|
118
|
+
* A return to monkey patching
|
|
119
|
+
* wrap process.cwd
|
|
120
|
+
|
|
121
|
+
### v1.1
|
|
122
|
+
|
|
123
|
+
* wrap readFile
|
|
124
|
+
* Wrap fs.writeFile.
|
|
125
|
+
* readdir protection
|
|
126
|
+
* Don't clobber the fs builtin
|
|
127
|
+
* Handle fs.read EAGAIN errors by trying again
|
|
128
|
+
* Expose the curOpen counter
|
|
129
|
+
* No-op lchown/lchmod if not implemented
|
|
130
|
+
* fs.rename patch only for win32
|
|
131
|
+
* Patch fs.rename to handle AV software on Windows
|
|
132
|
+
* Close #4 Chown should not fail on einval or eperm if non-root
|
|
133
|
+
* Fix isaacs/fstream#1 Only wrap fs one time
|
|
134
|
+
* Fix #3 Start at 1024 max files, then back off on EMFILE
|
|
135
|
+
* lutimes that doens't blow up on Linux
|
|
136
|
+
* A full on-rewrite using a queue instead of just swallowing the EMFILE error
|
|
137
|
+
* Wrap Read/Write streams as well
|
|
138
|
+
|
|
139
|
+
### 1.0
|
|
140
|
+
|
|
141
|
+
* Update engines for node 0.6
|
|
142
|
+
* Be lstat-graceful on Windows
|
|
143
|
+
* first
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
module.exports = clone
|
|
4
|
+
|
|
5
|
+
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
|
|
6
|
+
return obj.__proto__
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function clone (obj) {
|
|
10
|
+
if (obj === null || typeof obj !== 'object')
|
|
11
|
+
return obj
|
|
12
|
+
|
|
13
|
+
if (obj instanceof Object)
|
|
14
|
+
var copy = { __proto__: getPrototypeOf(obj) }
|
|
15
|
+
else
|
|
16
|
+
var copy = Object.create(null)
|
|
17
|
+
|
|
18
|
+
Object.getOwnPropertyNames(obj).forEach(function (key) {
|
|
19
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
return copy
|
|
23
|
+
}
|
|
@@ -0,0 +1,448 @@
|
|
|
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
|
+
}
|