cmake-ts
Version:
cmake-js rewrite in typescript to support advanced build configurations
1 lines • 1.1 MB
Source Map (JSON)
{"version":3,"file":"lib.mjs","sources":["../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js","../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js","../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js","../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js","../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/fs/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/utils.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/mkdirs/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/path-exists/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/utimes.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/util/stat.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/copy-sync.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/copy/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/rimraf.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/remove/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/empty/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/file.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/link.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/symlink.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/ensure/index.js","../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js","../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/jsonfile.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/output-file/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/output-json-sync.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/json/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/move-sync.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/move/index.js","../node_modules/.pnpm/fs-extra@10.1.0/node_modules/fs-extra/lib/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/homedir.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/caller.js","../node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/node-modules-paths.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/normalize-options.js","../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js","../node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/async.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/async.js","../src/nodeAPIInclude/resolve.ts","../src/utils/fs.ts","../src/utils/logger.ts","../src/nodeAPIInclude/search.ts","../src/nodeAPIInclude/index.ts","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/debug.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/constants.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/re.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/parse-options.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/identifiers.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/classes/semver.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/compare.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/gte.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/lt.js","../src/utils/env.ts","../src/urlRegistry.ts","../src/vcvarsall.ts","../src/argumentBuilder.ts","../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/noop.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../src/utils/exec.ts","../src/generator.ts","../src/config.ts","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/internal/lrucache.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/eq.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/neq.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/gt.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/lte.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/cmp.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/classes/comparator.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/classes/range.js","../node_modules/.pnpm/semver@7.7.1/node_modules/semver/functions/satisfies.js","../src/override.ts","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js","../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js","../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js","../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js","../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js","../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js","../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js","../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js","../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js","../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js","../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js","../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js","../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js","../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js","../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js","../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js","../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js","../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js","../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js","../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js","../node_modules/.pnpm/fastq@1.19.1/node_modules/fastq/queue.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js","../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js","../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.js","../node_modules/.pnpm/url-join@4.0.1/node_modules/url-join/lib/url-join.js","../src/libc.ts","../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/high-level-opt.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/warn-mixin.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/types.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/large-numbers.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/header.js","../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js","../node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js","../node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/normalize-windows-path.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/read-entry.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/pax.js","../node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/constants.js","../node_modules/.pnpm/minipass@3.3.6/node_modules/minipass/index.js","../node_modules/.pnpm/minizlib@2.1.2/node_modules/minizlib/index.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/parse.js","../node_modules/.pnpm/fs-minipass@2.1.0/node_modules/fs-minipass/index.js","../src/deps/mkdirp.ts","../node_modules/.pnpm/chownr@2.0.0/node_modules/chownr/chownr.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/mkdir.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/winchars.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/normalize-unicode.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/strip-trailing-slashes.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/path-reservations.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/strip-absolute-path.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/get-write-flag.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/unpack.js","../node_modules/.pnpm/tar@6.2.1/node_modules/tar/lib/extract.js","../src/utils/retry.ts","../src/utils/download.ts","../src/runtimeDistribution.ts","../src/build.ts","../src/manifest.ts","../src/loader.ts"],"sourcesContent":["'use strict'\n\nexports.fromCallback = function (fn) {\n return Object.defineProperty(function (...args) {\n if (typeof args[args.length - 1] === 'function') fn.apply(this, args)\n else {\n return new Promise((resolve, reject) => {\n args.push((err, res) => (err != null) ? reject(err) : resolve(res))\n fn.apply(this, args)\n })\n }\n }, 'name', { value: fn.name })\n}\n\nexports.fromPromise = function (fn) {\n return Object.defineProperty(function (...args) {\n const cb = args[args.length - 1]\n if (typeof cb !== 'function') return fn.apply(this, args)\n else {\n args.pop()\n fn.apply(this, args).then(r => cb(null, r), cb)\n }\n }, 'name', { value: fn.name })\n}\n","var constants = require('constants')\n\nvar origCwd = process.cwd\nvar cwd = null\n\nvar platform = process.env.GRACEFUL_FS_PLATFORM || process.platform\n\nprocess.cwd = function() {\n if (!cwd)\n cwd = origCwd.call(process)\n return cwd\n}\ntry {\n process.cwd()\n} catch (er) {}\n\n// This check is needed until node.js 12 is required\nif (typeof process.chdir === 'function') {\n var chdir = process.chdir\n process.chdir = function (d) {\n cwd = null\n chdir.call(process, d)\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)\n}\n\nmodule.exports = patch\n\nfunction patch (fs) {\n // (re-)implement some things that are known busted or missing.\n\n // lchmod, broken prior to 0.6.2\n // back-port the fix here.\n if (constants.hasOwnProperty('O_SYMLINK') &&\n process.version.match(/^v0\\.6\\.[0-2]|^v0\\.5\\./)) {\n patchLchmod(fs)\n }\n\n // lutimes implementation, or no-op\n if (!fs.lutimes) {\n patchLutimes(fs)\n }\n\n // https://github.com/isaacs/node-graceful-fs/issues/4\n // Chown should not fail on einval or eperm if non-root.\n // It should not fail on enosys ever, as this just indicates\n // that a fs doesn't support the intended operation.\n\n fs.chown = chownFix(fs.chown)\n fs.fchown = chownFix(fs.fchown)\n fs.lchown = chownFix(fs.lchown)\n\n fs.chmod = chmodFix(fs.chmod)\n fs.fchmod = chmodFix(fs.fchmod)\n fs.lchmod = chmodFix(fs.lchmod)\n\n fs.chownSync = chownFixSync(fs.chownSync)\n fs.fchownSync = chownFixSync(fs.fchownSync)\n fs.lchownSync = chownFixSync(fs.lchownSync)\n\n fs.chmodSync = chmodFixSync(fs.chmodSync)\n fs.fchmodSync = chmodFixSync(fs.fchmodSync)\n fs.lchmodSync = chmodFixSync(fs.lchmodSync)\n\n fs.stat = statFix(fs.stat)\n fs.fstat = statFix(fs.fstat)\n fs.lstat = statFix(fs.lstat)\n\n fs.statSync = statFixSync(fs.statSync)\n fs.fstatSync = statFixSync(fs.fstatSync)\n fs.lstatSync = statFixSync(fs.lstatSync)\n\n // if lchmod/lchown do not exist, then make them no-ops\n if (fs.chmod && !fs.lchmod) {\n fs.lchmod = function (path, mode, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchmodSync = function () {}\n }\n if (fs.chown && !fs.lchown) {\n fs.lchown = function (path, uid, gid, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchownSync = function () {}\n }\n\n // on Windows, A/V software can lock the directory, causing this\n // to fail with an EACCES or EPERM if the directory contains newly\n // created files. Try again on failure, for up to 60 seconds.\n\n // Set the timeout this long because some Windows Anti-Virus, such as Parity\n // bit9, may lock files for up to a minute, causing npm package install\n // failures. Also, take care to yield the scheduler. Windows scheduling gives\n // CPU to a busy looping process, which can cause the program causing the lock\n // contention to be starved of CPU by node, so the contention doesn't resolve.\n if (platform === \"win32\") {\n fs.rename = typeof fs.rename !== 'function' ? fs.rename\n : (function (fs$rename) {\n function rename (from, to, cb) {\n var start = Date.now()\n var backoff = 0;\n fs$rename(from, to, function CB (er) {\n if (er\n && (er.code === \"EACCES\" || er.code === \"EPERM\" || er.code === \"EBUSY\")\n && Date.now() - start < 60000) {\n setTimeout(function() {\n fs.stat(to, function (stater, st) {\n if (stater && stater.code === \"ENOENT\")\n fs$rename(from, to, CB);\n else\n cb(er)\n })\n }, backoff)\n if (backoff < 100)\n backoff += 10;\n return;\n }\n if (cb) cb(er)\n })\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)\n return rename\n })(fs.rename)\n }\n\n // if read() returns EAGAIN, then just try it again.\n fs.read = typeof fs.read !== 'function' ? fs.read\n : (function (fs$read) {\n function read (fd, buffer, offset, length, position, callback_) {\n var callback\n if (callback_ && typeof callback_ === 'function') {\n var eagCounter = 0\n callback = function (er, _, __) {\n if (er && er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n callback_.apply(this, arguments)\n }\n }\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n\n // This ensures `util.promisify` works as it does for native `fs.read`.\n if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)\n return read\n })(fs.read)\n\n fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync\n : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {\n var eagCounter = 0\n while (true) {\n try {\n return fs$readSync.call(fs, fd, buffer, offset, length, position)\n } catch (er) {\n if (er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n continue\n }\n throw er\n }\n }\n }})(fs.readSync)\n\n function patchLchmod (fs) {\n fs.lchmod = function (path, mode, callback) {\n fs.open( path\n , constants.O_WRONLY | constants.O_SYMLINK\n , mode\n , function (err, fd) {\n if (err) {\n if (callback) callback(err)\n return\n }\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n fs.fchmod(fd, mode, function (err) {\n fs.close(fd, function(err2) {\n if (callback) callback(err || err2)\n })\n })\n })\n }\n\n fs.lchmodSync = function (path, mode) {\n var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)\n\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n var threw = true\n var ret\n try {\n ret = fs.fchmodSync(fd, mode)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n }\n\n function patchLutimes (fs) {\n if (constants.hasOwnProperty(\"O_SYMLINK\") && fs.futimes) {\n fs.lutimes = function (path, at, mt, cb) {\n fs.open(path, constants.O_SYMLINK, function (er, fd) {\n if (er) {\n if (cb) cb(er)\n return\n }\n fs.futimes(fd, at, mt, function (er) {\n fs.close(fd, function (er2) {\n if (cb) cb(er || er2)\n })\n })\n })\n }\n\n fs.lutimesSync = function (path, at, mt) {\n var fd = fs.openSync(path, constants.O_SYMLINK)\n var ret\n var threw = true\n try {\n ret = fs.futimesSync(fd, at, mt)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n\n } else if (fs.futimes) {\n fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }\n fs.lutimesSync = function () {}\n }\n }\n\n function chmodFix (orig) {\n if (!orig) return orig\n return function (target, mode, cb) {\n return orig.call(fs, target, mode, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chmodFixSync (orig) {\n if (!orig) return orig\n return function (target, mode) {\n try {\n return orig.call(fs, target, mode)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n\n function chownFix (orig) {\n if (!orig) return orig\n return function (target, uid, gid, cb) {\n return orig.call(fs, target, uid, gid, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chownFixSync (orig) {\n if (!orig) return orig\n return function (target, uid, gid) {\n try {\n return orig.call(fs, target, uid, gid)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n function statFix (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n function callback (er, stats) {\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n if (cb) cb.apply(this, arguments)\n }\n return options ? orig.call(fs, target, options, callback)\n : orig.call(fs, target, callback)\n }\n }\n\n function statFixSync (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options) {\n var stats = options ? orig.call(fs, target, options)\n : orig.call(fs, target)\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n return stats;\n }\n }\n\n // ENOSYS means that the fs doesn't support the op. Just ignore\n // that, because it doesn't matter.\n //\n // if there's no getuid, or if getuid() is something other\n // than 0, and the error is EINVAL or EPERM, then just ignore\n // it.\n //\n // This specific case is a silent failure in cp, install, tar,\n // and most other unix tools that manage permissions.\n //\n // When running as root, or if other types of errors are\n // encountered, then it's strict.\n function chownErOk (er) {\n if (!er)\n return true\n\n if (er.code === \"ENOSYS\")\n return true\n\n var nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (er.code === \"EINVAL\" || er.code === \"EPERM\")\n return true\n }\n\n return false\n }\n}\n","var Stream = require('stream').Stream\n\nmodule.exports = legacy\n\nfunction legacy (fs) {\n return {\n ReadStream: ReadStream,\n WriteStream: WriteStream\n }\n\n function ReadStream (path, options) {\n if (!(this instanceof ReadStream)) return new ReadStream(path, options);\n\n Stream.call(this);\n\n var self = this;\n\n this.path = path;\n this.fd = null;\n this.readable = true;\n this.paused = false;\n\n this.flags = 'r';\n this.mode = 438; /*=0666*/\n this.bufferSize = 64 * 1024;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.encoding) this.setEncoding(this.encoding);\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n } else if ('number' !== typeof this.end) {\n throw TypeError('end must be a Number');\n }\n\n if (this.start > this.end) {\n throw new Error('start must be <= end');\n }\n\n this.pos = this.start;\n }\n\n if (this.fd !== null) {\n process.nextTick(function() {\n self._read();\n });\n return;\n }\n\n fs.open(this.path, this.flags, this.mode, function (err, fd) {\n if (err) {\n self.emit('error', err);\n self.readable = false;\n return;\n }\n\n self.fd = fd;\n self.emit('open', fd);\n self._read();\n })\n }\n\n function WriteStream (path, options) {\n if (!(this instanceof WriteStream)) return new WriteStream(path, options);\n\n Stream.call(this);\n\n this.path = path;\n this.fd = null;\n this.writable = true;\n\n this.flags = 'w';\n this.encoding = 'binary';\n this.mode = 438; /*=0666*/\n this.bytesWritten = 0;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.start < 0) {\n throw new Error('start must be >= zero');\n }\n\n this.pos = this.start;\n }\n\n this.busy = false;\n this._queue = [];\n\n if (this.fd === null) {\n this._open = fs.open;\n this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);\n this.flush();\n }\n }\n}\n","'use strict'\n\nmodule.exports = clone\n\nvar getPrototypeOf = Object.getPrototypeOf || function (obj) {\n return obj.__proto__\n}\n\nfunction clone (obj) {\n if (obj === null || typeof obj !== 'object')\n return obj\n\n if (obj instanceof Object)\n var copy = { __proto__: getPrototypeOf(obj) }\n else\n var copy = Object.create(null)\n\n Object.getOwnPropertyNames(obj).forEach(function (key) {\n Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))\n })\n\n return copy\n}\n","var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n","'use strict'\n// This is adapted from https://github.com/normalize/mz\n// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\n\nconst api = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'lchmod',\n 'lchown',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'opendir',\n 'readdir',\n 'readFile',\n 'readlink',\n 'realpath',\n 'rename',\n 'rm',\n 'rmdir',\n 'stat',\n 'symlink',\n 'truncate',\n 'unlink',\n 'utimes',\n 'writeFile'\n].filter(key => {\n // Some commands are not available on some systems. Ex:\n // fs.opendir was added in Node.js v12.12.0\n // fs.rm was added in Node.js v14.14.0\n // fs.lchown is not available on at least some Linux\n return typeof fs[key] === 'function'\n})\n\n// Export cloned fs:\nObject.assign(exports, fs)\n\n// Universalify async methods:\napi.forEach(method => {\n exports[method] = u(fs[method])\n})\n\n// We differ from mz/fs in that we still ship the old, broken, fs.exists()\n// since we are a drop-in replacement for the native module\nexports.exists = function (filename, callback) {\n if (typeo