Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-07-11 04:19:53 +0300
committerisaacs <i@izs.me>2020-07-29 21:53:10 +0300
commite46400c9484f5c66a0ba405eeb8c1340594dbf05 (patch)
tree1c3c13d9024752c4b3dc129e2f86c7963544c5a4
parent73657ae140810da50847d0ff729ddbab99ba5aac (diff)
update dependencies, refactor config loading to async
This removes a lot of very outdated dependencies, updates many to their modern (usually promisified) versions, and updates (or removes) code to account for the change. Several dependencies have been completely removed, and others a bit shuffled around, so that the node_modules folder can be bundled somewhat more optimally than it would have otherwise.
-rwxr-xr-xbin/npm-cli.js1
-rw-r--r--lib/config.js33
-rw-r--r--lib/config/core.js187
-rw-r--r--lib/config/set-user.js13
-rw-r--r--lib/npm.js128
-rw-r--r--lib/utils/cache-file.js3
-rw-r--r--lib/utils/completion/file-completion.js8
-rw-r--r--lib/utils/correct-mkdir.js37
-rw-r--r--lib/utils/lifecycle.js14
-rw-r--r--lib/utils/locker.js73
-rw-r--r--node_modules/@npmcli/git/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/@npmcli/git/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/@npmcli/git/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/@npmcli/git/node_modules/mkdirp/package.json75
-rw-r--r--node_modules/@npmcli/git/node_modules/mkdirp/readme.markdown266
-rw-r--r--node_modules/@npmcli/git/package.json12
l---------node_modules/@npmcli/move-file/node_modules/.bin/mkdirp1
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md15
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js29
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js64
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js39
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js23
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js29
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js10
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/package.json75
-rw-r--r--node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown266
l---------node_modules/@npmcli/run-script/node_modules/.bin/node-gyp1
l---------node_modules/@npmcli/run-script/node_modules/.bin/semver1
l---------node_modules/@npmcli/run-script/node_modules/.bin/which1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/fs-minipass/README.md70
-rw-r--r--node_modules/@npmcli/run-script/node_modules/fs-minipass/index.js387
-rw-r--r--node_modules/@npmcli/run-script/node_modules/fs-minipass/package.json65
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minipass/LICENSE15
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minipass/README.md606
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minipass/index.js537
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minipass/package.json72
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minizlib/LICENSE26
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minizlib/README.md53
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minizlib/constants.js115
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minizlib/index.js320
-rw-r--r--node_modules/@npmcli/run-script/node_modules/minizlib/package.json71
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md17
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/.github/workflows/Python_tests.yml40
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/.travis.yml109
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/CHANGELOG.md420
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/CONTRIBUTING.md34
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/LICENSE24
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/README.md242
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi164
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/bin/node-gyp.js141
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/AUTHORS13
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/DEPS24
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/LICENSE27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/OWNERS1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/PRESUBMIT.py138
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/codereview.settings10
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc12
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp8
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp.bat5
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py50
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py338
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py208
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py1104
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py1489
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py58
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py147
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py270
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py455
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py557
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common.py638
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common_test.py72
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py163
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py106
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py54
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py0
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py743
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py1097
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py1226
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py115
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py100
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py431
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py94
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py56
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py2265
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py3522
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py40
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py2426
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py45
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py1301
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py23
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py2902
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input_test.py90
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py614
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py1104
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py160
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py50
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py327
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py1660
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py270
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py2922
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py69
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples81
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples.bat5
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/setup.py19
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/README15
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/README5
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec226
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/README12
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el63
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp.el275
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh7
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp1105
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified1107
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/graphviz.py102
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_gyp.py157
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_sln.py171
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_vcproj.py337
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/Find-VisualStudio.cs243
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js204
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/clean.js15
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/configure.js386
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-node-directory.js63
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-python.js321
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-visualstudio.js434
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/install.js448
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/list.js27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/node-gyp.js210
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/process-release.js147
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/proxy.js92
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/rebuild.js13
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/remove.js46
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/lib/util.js64
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/macOS_Catalina.md83
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/package.json86
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/src/win_delay_load_hook.cc39
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/common.js3
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt1
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca-bundle.crt40
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca.crt21
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.crt21
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.key27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/test-charmap.py30
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/process-exec-sync.js140
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/simple-proxy.js27
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-addon.js150
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-configure-python.js78
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-download.js268
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-accessible-sync.js84
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-node-directory.js119
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-python.js231
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-visualstudio.js676
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-install.js38
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-options.js25
-rw-r--r--node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-process-release.js434
-rw-r--r--node_modules/@npmcli/run-script/node_modules/semver/CHANGELOG.md39
-rw-r--r--node_modules/@npmcli/run-script/node_modules/semver/README.md412
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/semver/bin/semver160
-rw-r--r--node_modules/@npmcli/run-script/node_modules/semver/package.json60
-rw-r--r--node_modules/@npmcli/run-script/node_modules/semver/range.bnf16
-rw-r--r--node_modules/@npmcli/run-script/node_modules/semver/semver.js1483
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/README.md954
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/index.js18
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/buffer.js11
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/create.js105
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/extract.js112
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/header.js289
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/high-level-opt.js29
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/large-numbers.js97
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/list.js130
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/mkdir.js206
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/mode-fix.js14
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/pack.js404
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/parse.js428
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/pax.js146
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/read-entry.js98
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/replace.js220
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/types.js44
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/unpack.js621
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/update.js36
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/warn-mixin.js14
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/winchars.js23
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/lib/write-entry.js422
-rw-r--r--node_modules/@npmcli/run-script/node_modules/tar/package.json82
-rw-r--r--node_modules/@npmcli/run-script/node_modules/which/CHANGELOG.md152
-rw-r--r--node_modules/@npmcli/run-script/node_modules/which/LICENSE15
-rw-r--r--node_modules/@npmcli/run-script/node_modules/which/README.md51
-rwxr-xr-xnode_modules/@npmcli/run-script/node_modules/which/bin/which52
-rw-r--r--node_modules/@npmcli/run-script/node_modules/which/package.json65
-rw-r--r--node_modules/@npmcli/run-script/node_modules/which/which.js135
-rw-r--r--node_modules/@npmcli/run-script/node_modules/yallist/LICENSE15
-rw-r--r--node_modules/@npmcli/run-script/node_modules/yallist/package.json63
-rw-r--r--node_modules/@npmcli/run-script/package.json14
-rw-r--r--node_modules/agent-base/dist/src/index.d.ts3
-rw-r--r--node_modules/agent-base/dist/src/index.js1
-rw-r--r--node_modules/agent-base/dist/src/index.js.map2
-rw-r--r--node_modules/agent-base/package.json15
-rw-r--r--node_modules/agent-base/src/index.ts339
-rw-r--r--node_modules/agent-base/src/promisify.ts33
-rw-r--r--node_modules/agentkeepalive/History.md6
-rw-r--r--node_modules/agentkeepalive/lib/agent.js57
-rw-r--r--node_modules/agentkeepalive/package.json12
-rw-r--r--node_modules/bin-links/CHANGELOG.md4
-rw-r--r--node_modules/bin-links/LICENSE244
-rw-r--r--node_modules/bin-links/README.md43
-rw-r--r--node_modules/bin-links/index.js213
-rw-r--r--node_modules/bin-links/lib/bin-target.js9
-rw-r--r--node_modules/bin-links/lib/fix-bin.js44
-rw-r--r--node_modules/bin-links/lib/get-node-modules.js18
-rw-r--r--node_modules/bin-links/lib/get-paths.js48
-rw-r--r--node_modules/bin-links/lib/get-prefix.js3
-rw-r--r--node_modules/bin-links/lib/is-windows.js2
-rw-r--r--node_modules/bin-links/lib/link-bin.js9
-rw-r--r--node_modules/bin-links/lib/link-bins.js22
-rw-r--r--node_modules/bin-links/lib/link-gently.js57
-rw-r--r--node_modules/bin-links/lib/link-mans.js51
-rw-r--r--node_modules/bin-links/lib/man-target.js6
-rw-r--r--node_modules/bin-links/lib/shim-bin.js64
l---------node_modules/bin-links/node_modules/.bin/rimraf1
-rw-r--r--node_modules/bin-links/node_modules/rimraf/CHANGELOG.md65
-rw-r--r--node_modules/bin-links/node_modules/rimraf/LICENSE (renamed from node_modules/@npmcli/run-script/node_modules/fs-minipass/LICENSE)0
-rw-r--r--node_modules/bin-links/node_modules/rimraf/README.md101
-rwxr-xr-xnode_modules/bin-links/node_modules/rimraf/bin.js68
-rw-r--r--node_modules/bin-links/node_modules/rimraf/package.json70
-rw-r--r--node_modules/bin-links/node_modules/rimraf/rimraf.js360
-rw-r--r--node_modules/bin-links/package.json80
-rw-r--r--node_modules/bluebird/LICENSE21
-rw-r--r--node_modules/bluebird/README.md57
-rw-r--r--node_modules/bluebird/changelog.md1
-rw-r--r--node_modules/bluebird/js/browser/bluebird.core.js3824
-rw-r--r--node_modules/bluebird/js/browser/bluebird.core.min.js31
-rw-r--r--node_modules/bluebird/js/browser/bluebird.js5666
-rw-r--r--node_modules/bluebird/js/browser/bluebird.min.js31
-rw-r--r--node_modules/bluebird/js/release/any.js21
-rw-r--r--node_modules/bluebird/js/release/assert.js55
-rw-r--r--node_modules/bluebird/js/release/async.js165
-rw-r--r--node_modules/bluebird/js/release/bind.js67
-rw-r--r--node_modules/bluebird/js/release/bluebird.js11
-rw-r--r--node_modules/bluebird/js/release/call_get.js123
-rw-r--r--node_modules/bluebird/js/release/cancel.js129
-rw-r--r--node_modules/bluebird/js/release/catch_filter.js42
-rw-r--r--node_modules/bluebird/js/release/context.js69
-rw-r--r--node_modules/bluebird/js/release/debuggability.js934
-rw-r--r--node_modules/bluebird/js/release/direct_resolve.js46
-rw-r--r--node_modules/bluebird/js/release/each.js30
-rw-r--r--node_modules/bluebird/js/release/errors.js116
-rw-r--r--node_modules/bluebird/js/release/es5.js80
-rw-r--r--node_modules/bluebird/js/release/filter.js12
-rw-r--r--node_modules/bluebird/js/release/finally.js146
-rw-r--r--node_modules/bluebird/js/release/generators.js223
-rw-r--r--node_modules/bluebird/js/release/join.js168
-rw-r--r--node_modules/bluebird/js/release/map.js168
-rw-r--r--node_modules/bluebird/js/release/method.js55
-rw-r--r--node_modules/bluebird/js/release/nodeback.js51
-rw-r--r--node_modules/bluebird/js/release/nodeify.js58
-rw-r--r--node_modules/bluebird/js/release/promise.js789
-rw-r--r--node_modules/bluebird/js/release/promise_array.js185
-rw-r--r--node_modules/bluebird/js/release/promisify.js314
-rw-r--r--node_modules/bluebird/js/release/props.js118
-rw-r--r--node_modules/bluebird/js/release/queue.js73
-rw-r--r--node_modules/bluebird/js/release/race.js49
-rw-r--r--node_modules/bluebird/js/release/reduce.js172
-rw-r--r--node_modules/bluebird/js/release/schedule.js62
-rw-r--r--node_modules/bluebird/js/release/settle.js43
-rw-r--r--node_modules/bluebird/js/release/some.js148
-rw-r--r--node_modules/bluebird/js/release/synchronous_inspection.js103
-rw-r--r--node_modules/bluebird/js/release/thenables.js86
-rw-r--r--node_modules/bluebird/js/release/timers.js93
-rw-r--r--node_modules/bluebird/js/release/using.js226
-rw-r--r--node_modules/bluebird/js/release/util.js389
-rw-r--r--node_modules/bluebird/package.json109
-rw-r--r--node_modules/byline/LICENSE19
-rw-r--r--node_modules/byline/README.md147
-rw-r--r--node_modules/byline/lib/byline.js155
-rw-r--r--node_modules/byline/package.json56
-rw-r--r--node_modules/cacache/CHANGELOG.md2
l---------node_modules/cacache/node_modules/.bin/mkdirp1
-rw-r--r--node_modules/cacache/node_modules/chownr/LICENSE15
-rw-r--r--node_modules/cacache/node_modules/mkdirp/CHANGELOG.md15
-rw-r--r--node_modules/cacache/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/cacache/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/cacache/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/find-made.js29
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/mkdirp-manual.js64
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/mkdirp-native.js39
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/opts-arg.js23
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/path-arg.js29
-rw-r--r--node_modules/cacache/node_modules/mkdirp/lib/use-native.js10
-rw-r--r--node_modules/cacache/node_modules/mkdirp/package.json76
-rw-r--r--node_modules/cacache/node_modules/mkdirp/readme.markdown266
-rw-r--r--node_modules/cacache/node_modules/tar/CHANGELOG.md68
-rw-r--r--node_modules/cacache/node_modules/tar/LICENSE15
-rw-r--r--node_modules/cacache/node_modules/tar/README.md1031
-rw-r--r--node_modules/cacache/node_modules/tar/index.js18
-rw-r--r--node_modules/cacache/node_modules/tar/lib/create.js105
-rw-r--r--node_modules/cacache/node_modules/tar/lib/extract.js112
-rw-r--r--node_modules/cacache/node_modules/tar/lib/get-write-flag.js20
-rw-r--r--node_modules/cacache/node_modules/tar/lib/header.js288
-rw-r--r--node_modules/cacache/node_modules/tar/lib/high-level-opt.js29
-rw-r--r--node_modules/cacache/node_modules/tar/lib/large-numbers.js97
-rw-r--r--node_modules/cacache/node_modules/tar/lib/list.js128
-rw-r--r--node_modules/cacache/node_modules/tar/lib/mkdir.js206
-rw-r--r--node_modules/cacache/node_modules/tar/lib/mode-fix.js24
-rw-r--r--node_modules/cacache/node_modules/tar/lib/pack.js403
-rw-r--r--node_modules/cacache/node_modules/tar/lib/parse.js483
-rw-r--r--node_modules/cacache/node_modules/tar/lib/path-reservations.js125
-rw-r--r--node_modules/cacache/node_modules/tar/lib/pax.js145
-rw-r--r--node_modules/cacache/node_modules/tar/lib/read-entry.js98
-rw-r--r--node_modules/cacache/node_modules/tar/lib/replace.js219
-rw-r--r--node_modules/cacache/node_modules/tar/lib/types.js44
-rw-r--r--node_modules/cacache/node_modules/tar/lib/unpack.js680
-rw-r--r--node_modules/cacache/node_modules/tar/lib/update.js36
-rw-r--r--node_modules/cacache/node_modules/tar/lib/warn-mixin.js21
-rw-r--r--node_modules/cacache/node_modules/tar/lib/winchars.js23
-rw-r--r--node_modules/cacache/node_modules/tar/lib/write-entry.js436
-rw-r--r--node_modules/cacache/node_modules/tar/package.json81
-rw-r--r--node_modules/cacache/package.json21
-rw-r--r--node_modules/chownr/chownr.js74
-rw-r--r--node_modules/chownr/package.json44
-rw-r--r--node_modules/cmd-shim/README.md22
-rw-r--r--node_modules/cmd-shim/index.js276
-rw-r--r--node_modules/cmd-shim/lib/to-batch-syntax.js102
-rw-r--r--node_modules/cmd-shim/package.json48
-rw-r--r--node_modules/copy-concurrently/LICENSE14
-rw-r--r--node_modules/copy-concurrently/README.md128
-rw-r--r--node_modules/copy-concurrently/copy.js225
-rw-r--r--node_modules/copy-concurrently/is-windows.js2
-rw-r--r--node_modules/copy-concurrently/node_modules/aproba/LICENSE14
-rw-r--r--node_modules/copy-concurrently/node_modules/aproba/README.md94
-rw-r--r--node_modules/copy-concurrently/node_modules/aproba/index.js105
-rw-r--r--node_modules/copy-concurrently/node_modules/aproba/package.json62
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/.npmignore1
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/LICENSE21
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/README.md40
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/index.coffee24
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/index.js49
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/package.json55
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/test/index.coffee42
-rw-r--r--node_modules/copy-concurrently/node_modules/iferr/test/mocha.opts2
-rw-r--r--node_modules/copy-concurrently/package.json72
-rw-r--r--node_modules/encoding/.npmignore1
-rw-r--r--node_modules/encoding/.prettierrc.js8
-rw-r--r--node_modules/encoding/README.md23
-rw-r--r--node_modules/encoding/lib/encoding.js56
-rw-r--r--node_modules/encoding/lib/iconv-loader.js14
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/.github/dependabot.yml11
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/Changelog.md208
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/LICENSE21
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/README.md130
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js597
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js176
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/index.js23
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/internal.js198
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js72
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js451
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js179
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json122
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json264
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json273
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json177
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json182
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json1
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json56
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json125
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js197
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js319
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js290
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js52
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/lib/index.d.ts41
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/lib/index.js180
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/lib/streams.js109
-rw-r--r--node_modules/encoding/node_modules/iconv-lite/package.json74
-rw-r--r--node_modules/encoding/package.json36
-rw-r--r--node_modules/encoding/test/test.js76
-rw-r--r--node_modules/fs-vacuum/.eslintrc18
-rw-r--r--node_modules/fs-vacuum/.npmignore1
-rw-r--r--node_modules/fs-vacuum/.travis.yml14
-rw-r--r--node_modules/fs-vacuum/LICENSE13
-rw-r--r--node_modules/fs-vacuum/README.md33
-rw-r--r--node_modules/fs-vacuum/package.json69
-rw-r--r--node_modules/fs-vacuum/test/arguments.js24
-rw-r--r--node_modules/fs-vacuum/test/base-leaf-mismatch.js16
-rw-r--r--node_modules/fs-vacuum/test/no-entries-file-no-purge.js78
-rw-r--r--node_modules/fs-vacuum/test/no-entries-link-no-purge.js78
-rw-r--r--node_modules/fs-vacuum/test/no-entries-no-purge.js61
-rw-r--r--node_modules/fs-vacuum/test/no-entries-with-link-purge.js78
-rw-r--r--node_modules/fs-vacuum/test/no-entries-with-purge.js67
-rw-r--r--node_modules/fs-vacuum/test/not-remove-home-directory.js46
-rw-r--r--node_modules/fs-vacuum/test/other-directories-no-purge.js76
-rw-r--r--node_modules/fs-vacuum/test/racy-entries-eexist.js119
-rw-r--r--node_modules/fs-vacuum/test/racy-entries-enotempty.js119
-rw-r--r--node_modules/fs-vacuum/test/racy-entries.js104
-rw-r--r--node_modules/fs-vacuum/vacuum.js117
-rw-r--r--node_modules/gentle-fs/CHANGELOG.md108
-rw-r--r--node_modules/gentle-fs/LICENSE235
-rw-r--r--node_modules/gentle-fs/README.md74
-rw-r--r--node_modules/gentle-fs/index.js14
-rw-r--r--node_modules/gentle-fs/lib/bin-link.js96
-rw-r--r--node_modules/gentle-fs/lib/chown.js24
-rw-r--r--node_modules/gentle-fs/lib/link.js126
-rw-r--r--node_modules/gentle-fs/lib/mkdir.js22
-rw-r--r--node_modules/gentle-fs/lib/rm.js256
-rw-r--r--node_modules/gentle-fs/node_modules/aproba/LICENSE14
-rw-r--r--node_modules/gentle-fs/node_modules/aproba/README.md94
-rw-r--r--node_modules/gentle-fs/node_modules/aproba/index.js105
-rw-r--r--node_modules/gentle-fs/node_modules/aproba/package.json62
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/.npmignore1
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/LICENSE21
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/README.md40
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/index.coffee24
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/index.js49
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/package.json55
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/test/index.coffee42
-rw-r--r--node_modules/gentle-fs/node_modules/iferr/test/mocha.opts2
-rw-r--r--node_modules/gentle-fs/package.json86
-rw-r--r--node_modules/hosted-git-info/CHANGELOG.md20
-rw-r--r--node_modules/hosted-git-info/index.js25
-rw-r--r--node_modules/hosted-git-info/package.json20
-rw-r--r--node_modules/lru-cache/node_modules/yallist/LICENSE15
-rw-r--r--node_modules/lru-cache/node_modules/yallist/README.md204
-rw-r--r--node_modules/lru-cache/node_modules/yallist/iterator.js8
-rw-r--r--node_modules/lru-cache/node_modules/yallist/package.json62
-rw-r--r--node_modules/lru-cache/node_modules/yallist/yallist.js426
-rw-r--r--node_modules/lru-cache/package.json41
-rw-r--r--node_modules/make-fetch-happen/package.json16
-rw-r--r--node_modules/minimist/.travis.yml4
-rw-r--r--node_modules/minimist/example/parse.js2
-rw-r--r--node_modules/minimist/index.js166
-rw-r--r--node_modules/minimist/package.json38
-rw-r--r--node_modules/minimist/readme.markdown34
-rw-r--r--node_modules/minimist/test/dash.js24
-rw-r--r--node_modules/minimist/test/default_bool.js20
-rw-r--r--node_modules/minimist/test/dotted.js16
-rw-r--r--node_modules/minimist/test/long.js31
-rw-r--r--node_modules/minimist/test/parse.js318
-rw-r--r--node_modules/minimist/test/parse_modified.js9
-rw-r--r--node_modules/minimist/test/short.js67
-rw-r--r--node_modules/minimist/test/whitespace.js8
-rw-r--r--node_modules/minipass-pipeline/index.js2
-rw-r--r--node_modules/minipass-pipeline/package.json20
l---------node_modules/mkdirp-infer-owner/node_modules/.bin/mkdirp1
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/CHANGELOG.md15
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/mkdirp-infer-owner/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/find-made.js29
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-manual.js64
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-native.js39
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/opts-arg.js23
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/path-arg.js29
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/use-native.js10
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/package.json75
-rw-r--r--node_modules/mkdirp-infer-owner/node_modules/mkdirp/readme.markdown266
-rw-r--r--node_modules/mkdirp/.travis.yml8
-rw-r--r--node_modules/mkdirp/CHANGELOG.md (renamed from node_modules/@npmcli/git/node_modules/mkdirp/CHANGELOG.md)0
-rw-r--r--node_modules/mkdirp/LICENSE4
-rw-r--r--node_modules/mkdirp/README.markdown236
-rwxr-xr-xnode_modules/mkdirp/bin/cmd.js93
-rw-r--r--node_modules/mkdirp/examples/pow.js6
-rw-r--r--node_modules/mkdirp/index.js115
-rw-r--r--node_modules/mkdirp/lib/find-made.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/find-made.js)0
-rw-r--r--node_modules/mkdirp/lib/mkdirp-manual.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-manual.js)0
-rw-r--r--node_modules/mkdirp/lib/mkdirp-native.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-native.js)0
-rw-r--r--node_modules/mkdirp/lib/opts-arg.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/opts-arg.js)0
-rw-r--r--node_modules/mkdirp/lib/path-arg.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/path-arg.js)0
-rw-r--r--node_modules/mkdirp/lib/use-native.js (renamed from node_modules/@npmcli/git/node_modules/mkdirp/lib/use-native.js)0
-rw-r--r--node_modules/mkdirp/package.json92
-rw-r--r--node_modules/mkdirp/test/chmod.js41
-rw-r--r--node_modules/mkdirp/test/clobber.js38
-rw-r--r--node_modules/mkdirp/test/mkdirp.js28
-rw-r--r--node_modules/mkdirp/test/opts_fs.js29
-rw-r--r--node_modules/mkdirp/test/opts_fs_sync.js27
-rw-r--r--node_modules/mkdirp/test/perm.js32
-rw-r--r--node_modules/mkdirp/test/perm_sync.js36
-rw-r--r--node_modules/mkdirp/test/race.js37
-rw-r--r--node_modules/mkdirp/test/rel.js32
-rw-r--r--node_modules/mkdirp/test/return.js25
-rw-r--r--node_modules/mkdirp/test/return_sync.js24
-rw-r--r--node_modules/mkdirp/test/root.js19
-rw-r--r--node_modules/mkdirp/test/sync.js32
-rw-r--r--node_modules/mkdirp/test/umask.js28
-rw-r--r--node_modules/mkdirp/test/umask_sync.js32
-rw-r--r--node_modules/move-concurrently/LICENSE14
-rw-r--r--node_modules/move-concurrently/README.md53
-rw-r--r--node_modules/move-concurrently/move.js84
-rw-r--r--node_modules/move-concurrently/node_modules/aproba/LICENSE14
-rw-r--r--node_modules/move-concurrently/node_modules/aproba/README.md94
-rw-r--r--node_modules/move-concurrently/node_modules/aproba/index.js105
-rw-r--r--node_modules/move-concurrently/node_modules/aproba/package.json62
-rw-r--r--node_modules/move-concurrently/package.json77
-rw-r--r--node_modules/node-gyp/.travis.yml72
-rw-r--r--node_modules/node-gyp/CHANGELOG.md48
-rw-r--r--node_modules/node-gyp/README.md8
-rw-r--r--node_modules/node-gyp/gyp/pylib/gyp/input.py2
-rw-r--r--node_modules/node-gyp/lib/find-python.js32
-rw-r--r--node_modules/node-gyp/lib/install.js6
-rw-r--r--node_modules/node-gyp/lib/node-gyp.js1
-rw-r--r--node_modules/node-gyp/macOS_Catalina.md49
l---------node_modules/node-gyp/node_modules/.bin/mkdirp (renamed from node_modules/@npmcli/git/node_modules/.bin/mkdirp)0
-rw-r--r--node_modules/node-gyp/node_modules/chownr/LICENSE (renamed from node_modules/@npmcli/run-script/node_modules/semver/LICENSE)0
-rw-r--r--node_modules/node-gyp/node_modules/chownr/README.md (renamed from node_modules/cacache/node_modules/chownr/README.md)0
-rw-r--r--node_modules/node-gyp/node_modules/chownr/chownr.js (renamed from node_modules/cacache/node_modules/chownr/chownr.js)0
-rw-r--r--node_modules/node-gyp/node_modules/chownr/package.json (renamed from node_modules/cacache/node_modules/chownr/package.json)30
-rw-r--r--node_modules/node-gyp/node_modules/fs-minipass/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/minipass/node_modules/yallist/LICENSE15
-rw-r--r--node_modules/node-gyp/node_modules/minipass/node_modules/yallist/README.md204
-rw-r--r--node_modules/node-gyp/node_modules/minipass/node_modules/yallist/iterator.js8
-rw-r--r--node_modules/node-gyp/node_modules/minipass/node_modules/yallist/package.json62
-rw-r--r--node_modules/node-gyp/node_modules/minipass/node_modules/yallist/yallist.js426
-rw-r--r--node_modules/node-gyp/node_modules/minipass/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/minizlib/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/mkdirp/LICENSE (renamed from node_modules/stream-iterate/LICENSE)4
-rwxr-xr-xnode_modules/node-gyp/node_modules/mkdirp/bin/cmd.js33
-rw-r--r--node_modules/node-gyp/node_modules/mkdirp/bin/usage.txt (renamed from node_modules/mkdirp/bin/usage.txt)0
-rw-r--r--node_modules/node-gyp/node_modules/mkdirp/index.js99
-rw-r--r--node_modules/node-gyp/node_modules/mkdirp/package.json70
-rw-r--r--node_modules/node-gyp/node_modules/mkdirp/readme.markdown100
-rw-r--r--node_modules/node-gyp/node_modules/semver/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/yallist/LICENSE15
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/yallist/README.md204
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/yallist/iterator.js8
-rw-r--r--node_modules/node-gyp/node_modules/tar/node_modules/yallist/yallist.js426
-rw-r--r--node_modules/node-gyp/node_modules/tar/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/which/package.json2
-rw-r--r--node_modules/node-gyp/node_modules/yallist/LICENSE (renamed from node_modules/@npmcli/run-script/node_modules/tar/LICENSE)0
-rw-r--r--node_modules/node-gyp/node_modules/yallist/README.md (renamed from node_modules/@npmcli/run-script/node_modules/yallist/README.md)0
-rw-r--r--node_modules/node-gyp/node_modules/yallist/iterator.js (renamed from node_modules/@npmcli/run-script/node_modules/yallist/iterator.js)0
-rw-r--r--node_modules/node-gyp/node_modules/yallist/package.json (renamed from node_modules/node-gyp/node_modules/tar/node_modules/yallist/package.json)3
-rw-r--r--node_modules/node-gyp/node_modules/yallist/yallist.js (renamed from node_modules/@npmcli/run-script/node_modules/yallist/yallist.js)0
-rw-r--r--node_modules/node-gyp/package.json34
-rwxr-xr-xnode_modules/node-gyp/test/docker.sh112
-rw-r--r--node_modules/node-gyp/test/test-download.js97
-rw-r--r--node_modules/node-gyp/test/test-find-python.js15
-rw-r--r--node_modules/npm-lifecycle/CHANGELOG.md184
-rw-r--r--node_modules/npm-lifecycle/LICENSE235
-rw-r--r--node_modules/npm-lifecycle/README.md50
-rw-r--r--node_modules/npm-lifecycle/index.js497
-rw-r--r--node_modules/npm-lifecycle/lib/spawn.js65
-rwxr-xr-xnode_modules/npm-lifecycle/node-gyp-bin/node-gyp6
-rwxr-xr-xnode_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd5
l---------node_modules/npm-lifecycle/node_modules/.bin/which1
-rw-r--r--node_modules/npm-lifecycle/node_modules/which/CHANGELOG.md152
-rw-r--r--node_modules/npm-lifecycle/node_modules/which/LICENSE15
-rw-r--r--node_modules/npm-lifecycle/node_modules/which/README.md51
-rwxr-xr-xnode_modules/npm-lifecycle/node_modules/which/bin/which52
-rw-r--r--node_modules/npm-lifecycle/node_modules/which/package.json65
-rw-r--r--node_modules/npm-lifecycle/node_modules/which/which.js135
-rw-r--r--node_modules/npm-lifecycle/package.json86
-rw-r--r--node_modules/npm-registry-fetch/CHANGELOG.md4
-rw-r--r--node_modules/npm-registry-fetch/check-response.js11
-rw-r--r--node_modules/npm-registry-fetch/package.json17
l---------node_modules/pacote/node_modules/.bin/mkdirp1
-rw-r--r--node_modules/pacote/node_modules/chownr/LICENSE15
-rw-r--r--node_modules/pacote/node_modules/chownr/README.md3
-rw-r--r--node_modules/pacote/node_modules/chownr/chownr.js167
-rw-r--r--node_modules/pacote/node_modules/chownr/package.json67
-rw-r--r--node_modules/pacote/node_modules/mkdirp/CHANGELOG.md15
-rw-r--r--node_modules/pacote/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/pacote/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/pacote/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/find-made.js29
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/mkdirp-manual.js64
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/mkdirp-native.js39
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/opts-arg.js23
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/path-arg.js29
-rw-r--r--node_modules/pacote/node_modules/mkdirp/lib/use-native.js10
-rw-r--r--node_modules/pacote/node_modules/mkdirp/package.json77
-rw-r--r--node_modules/pacote/node_modules/mkdirp/readme.markdown266
-rw-r--r--node_modules/read-cmd-shim/README.md11
-rw-r--r--node_modules/read-cmd-shim/index.js54
-rw-r--r--node_modules/read-cmd-shim/package.json52
-rw-r--r--node_modules/run-queue/README.md86
-rw-r--r--node_modules/run-queue/node_modules/aproba/LICENSE14
-rw-r--r--node_modules/run-queue/node_modules/aproba/README.md94
-rw-r--r--node_modules/run-queue/node_modules/aproba/index.js105
-rw-r--r--node_modules/run-queue/node_modules/aproba/package.json62
-rw-r--r--node_modules/run-queue/package.json63
-rw-r--r--node_modules/run-queue/queue.js95
-rw-r--r--node_modules/socks/.prettierrc.yaml4
-rw-r--r--node_modules/socks/.travis.yml3
-rw-r--r--node_modules/socks/README.md2
-rw-r--r--node_modules/socks/build/client/socksclient.js319
-rw-r--r--node_modules/socks/build/client/socksclient.js.map2
-rw-r--r--node_modules/socks/build/common/constants.js3
-rw-r--r--node_modules/socks/build/common/constants.js.map2
-rw-r--r--node_modules/socks/build/common/helpers.js1
-rw-r--r--node_modules/socks/build/common/helpers.js.map2
-rw-r--r--node_modules/socks/build/common/receivebuffer.js33
-rw-r--r--node_modules/socks/build/common/receivebuffer.js.map2
-rw-r--r--node_modules/socks/build/common/util.js4
-rw-r--r--node_modules/socks/build/common/util.js.map2
-rw-r--r--node_modules/socks/build/index.js15
-rw-r--r--node_modules/socks/build/index.js.map2
-rw-r--r--node_modules/socks/package.json46
-rw-r--r--node_modules/socks/typings/client/socksclient.d.ts40
-rw-r--r--node_modules/socks/typings/common/constants.d.ts2
-rw-r--r--node_modules/socks/typings/common/receiveBuffer.d.ts6
-rw-r--r--node_modules/sorted-union-stream/.npmignore1
-rw-r--r--node_modules/sorted-union-stream/.travis.yml5
-rw-r--r--node_modules/sorted-union-stream/LICENSE21
-rw-r--r--node_modules/sorted-union-stream/README.md80
-rw-r--r--node_modules/sorted-union-stream/example.js15
-rw-r--r--node_modules/sorted-union-stream/index.js59
-rw-r--r--node_modules/sorted-union-stream/node_modules/from2/LICENSE.md21
-rw-r--r--node_modules/sorted-union-stream/node_modules/from2/README.md67
-rw-r--r--node_modules/sorted-union-stream/node_modules/from2/index.js93
-rw-r--r--node_modules/sorted-union-stream/node_modules/from2/package.json69
-rw-r--r--node_modules/sorted-union-stream/node_modules/from2/test.js86
-rw-r--r--node_modules/sorted-union-stream/node_modules/isarray/README.md54
-rw-r--r--node_modules/sorted-union-stream/node_modules/isarray/build/build.js209
-rw-r--r--node_modules/sorted-union-stream/node_modules/isarray/component.json19
-rw-r--r--node_modules/sorted-union-stream/node_modules/isarray/index.js3
-rw-r--r--node_modules/sorted-union-stream/node_modules/isarray/package.json57
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/.npmignore5
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/LICENSE18
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/README.md15
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/float.patch923
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_duplex.js89
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_passthrough.js46
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_readable.js951
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_transform.js209
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_writable.js477
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/package.json65
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/readable.js10
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/sorted-union-stream/node_modules/readable-stream/writable.js1
-rw-r--r--node_modules/sorted-union-stream/node_modules/string_decoder/.npmignore2
-rw-r--r--node_modules/sorted-union-stream/node_modules/string_decoder/LICENSE20
-rw-r--r--node_modules/sorted-union-stream/node_modules/string_decoder/README.md7
-rw-r--r--node_modules/sorted-union-stream/node_modules/string_decoder/index.js221
-rw-r--r--node_modules/sorted-union-stream/node_modules/string_decoder/package.json53
-rw-r--r--node_modules/sorted-union-stream/package.json66
-rw-r--r--node_modules/sorted-union-stream/test.js154
-rw-r--r--node_modules/stream-iterate/.npmignore1
-rw-r--r--node_modules/stream-iterate/.travis.yml5
-rw-r--r--node_modules/stream-iterate/README.md39
-rw-r--r--node_modules/stream-iterate/index.js70
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/.travis.yml55
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md38
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md136
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/LICENSE47
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/README.md58
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md60
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/duplex.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js131
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js47
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js1019
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js214
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js687
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js79
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js74
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/package.json81
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/passthrough.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js7
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/readable.js19
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/transform.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js1
-rw-r--r--node_modules/stream-iterate/node_modules/readable-stream/writable.js8
-rw-r--r--node_modules/stream-iterate/node_modules/string_decoder/.travis.yml50
-rw-r--r--node_modules/stream-iterate/node_modules/string_decoder/LICENSE48
-rw-r--r--node_modules/stream-iterate/node_modules/string_decoder/README.md47
-rw-r--r--node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js296
-rw-r--r--node_modules/stream-iterate/node_modules/string_decoder/package.json59
-rw-r--r--node_modules/stream-iterate/package.json56
-rw-r--r--node_modules/stream-iterate/test.js60
-rw-r--r--node_modules/stream-shift/.npmignore1
-rw-r--r--node_modules/stream-shift/.travis.yml6
-rw-r--r--node_modules/stream-shift/LICENSE21
-rw-r--r--node_modules/stream-shift/README.md25
-rw-r--r--node_modules/stream-shift/index.js20
-rw-r--r--node_modules/stream-shift/package.json55
-rw-r--r--node_modules/stream-shift/test.js48
-rw-r--r--node_modules/tar/CHANGELOG.md2
l---------node_modules/tar/node_modules/.bin/mkdirp1
-rw-r--r--node_modules/tar/node_modules/mkdirp/CHANGELOG.md15
-rw-r--r--node_modules/tar/node_modules/mkdirp/LICENSE21
-rwxr-xr-xnode_modules/tar/node_modules/mkdirp/bin/cmd.js68
-rw-r--r--node_modules/tar/node_modules/mkdirp/index.js31
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/find-made.js29
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/mkdirp-manual.js64
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/mkdirp-native.js39
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/opts-arg.js23
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/path-arg.js29
-rw-r--r--node_modules/tar/node_modules/mkdirp/lib/use-native.js10
-rw-r--r--node_modules/tar/node_modules/mkdirp/package.json75
-rw-r--r--node_modules/tar/node_modules/mkdirp/readme.markdown266
-rw-r--r--node_modules/tar/package.json12
-rw-r--r--package-lock.json1058
-rw-r--r--package.json38
-rw-r--r--test/common-tap.js9
-rw-r--r--test/tap/bin-overwriting.js108
-rw-r--r--test/tap/config-meta.js128
-rw-r--r--test/tap/correct-mkdir.js167
-rw-r--r--test/tap/do-not-remove-other-bins.js117
-rw-r--r--test/tap/locker.js77
-rw-r--r--test/tap/verify-no-lifecycle-on-repo.js73
711 files changed, 8602 insertions, 94844 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index 1380e320d..d760e8cdb 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -68,6 +68,7 @@ npm.load(conf, function (er) {
// XXX move update notifier stuff into separate module
const pkg = require('../package.json')
let notifier = require('update-notifier')({pkg})
+ // XXX should use @npmcli/ci-detect
const isCI = require('ci-info').isCI
if (
notifier.update &&
diff --git a/lib/config.js b/lib/config.js
index 2f6955329..94f580f24 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -1,21 +1,21 @@
/* eslint-disable standard/no-callback-literal */
module.exports = config
-var log = require('npmlog')
-var npm = require('./npm.js')
-var npmconf = require('./config/core.js')
-var fs = require('graceful-fs')
-var writeFileAtomic = require('write-file-atomic')
-var types = npmconf.defs.types
-var ini = require('ini')
-var editor = require('editor')
-var os = require('os')
-var path = require('path')
-var mkdirp = require('gentle-fs').mkdir
-var umask = require('./utils/umask')
-var usage = require('./utils/usage')
-var output = require('./utils/output')
-var noProgressTillDone = require('./utils/no-progress-while-running').tillDone
+const log = require('npmlog')
+const npm = require('./npm.js')
+const npmconf = require('./config/core.js')
+const fs = require('graceful-fs')
+const writeFileAtomic = require('write-file-atomic')
+const types = npmconf.defs.types
+const ini = require('ini')
+const editor = require('editor')
+const os = require('os')
+const path = require('path')
+const mkdirp = require('mkdirp-infer-owner')
+const umask = require('./utils/umask')
+const usage = require('./utils/usage')
+const output = require('./utils/output')
+const noProgressTillDone = require('./utils/no-progress-while-running').tillDone
config.usage = usage(
'config',
@@ -115,8 +115,7 @@ function edit (cb) {
}, []))
.concat([''])
.join(os.EOL)
- mkdirp(path.dirname(f), function (er) {
- if (er) return cb(er)
+ mkdirp(path.dirname(f)).catch(cb).then(() => {
writeFileAtomic(
f,
data,
diff --git a/lib/config/core.js b/lib/config/core.js
index a3110464e..78725aeda 100644
--- a/lib/config/core.js
+++ b/lib/config/core.js
@@ -1,112 +1,50 @@
-var CC = require('config-chain').ConfigChain
-var inherits = require('inherits')
-var configDefs = require('./defaults.js')
-var types = configDefs.types
-var once = require('once')
-var fs = require('fs')
-var path = require('path')
-var nopt = require('nopt')
-var ini = require('ini')
-var Umask = configDefs.Umask
-var mkdirp = require('gentle-fs').mkdir
-var umask = require('../utils/umask')
-var isWindows = require('../utils/is-windows.js')
-
-exports.load = load
-exports.Conf = Conf
-exports.loaded = false
-exports.rootConf = null
-exports.usingBuiltin = false
-exports.defs = configDefs
-
-Object.defineProperty(exports, 'defaults', { get: function () {
- return configDefs.defaults
-},
-enumerable: true })
-
-Object.defineProperty(exports, 'types', { get: function () {
- return configDefs.types
-},
-enumerable: true })
-
-exports.validate = validate
-
-var myUid = process.getuid && process.getuid()
-var myGid = process.getgid && process.getgid()
-
-var loading = false
-var loadCbs = []
-function load () {
- var cli, builtin, cb
- for (var i = 0; i < arguments.length; i++) {
- switch (typeof arguments[i]) {
- case 'string': builtin = arguments[i]; break
- case 'object': cli = arguments[i]; break
- case 'function': cb = arguments[i]; break
- }
- }
-
- if (!cb) cb = function () {}
-
- if (exports.loaded) {
- var ret = exports.loaded
- if (cli) {
- ret = new Conf(ret)
- ret.unshift(cli)
- }
- return process.nextTick(cb.bind(null, null, ret))
- }
-
- // either a fresh object, or a clone of the passed in obj
- if (!cli) {
- cli = {}
- } else {
- cli = Object.keys(cli).reduce(function (c, k) {
- c[k] = cli[k]
- return c
- }, {})
- }
-
- loadCbs.push(cb)
- if (loading) return
-
- loading = true
-
- cb = once(function (er, conf) {
- if (!er) {
- exports.loaded = conf
- loading = false
- }
- loadCbs.forEach(function (fn) {
- fn(er, conf)
- })
- loadCbs.length = 0
- })
+const CC = require('config-chain').ConfigChain
+const inherits = require('inherits')
+const configDefs = require('./defaults.js')
+const types = configDefs.types
+const once = require('once')
+const fs = require('fs')
+const path = require('path')
+const nopt = require('nopt')
+const ini = require('ini')
+const Umask = configDefs.Umask
+const mkdirp = require('mkdirp-infer-owner')
+const umask = require('../utils/umask')
+const isWindows = require('../utils/is-windows.js')
+
+
+const myUid = process.getuid && process.getuid()
+const myGid = process.getgid && process.getgid()
+
+const loadCbs = []
+
+const { promisify } = require('util')
+const load = async (cli, builtin) => {
+ // clone the cli object that's passed in, so we don't mutate it
+ cli = { ...cli }
// check for a builtin if provided.
exports.usingBuiltin = !!builtin
- var rc = exports.rootConf = new Conf()
+ const rc = exports.rootConf = new Conf()
if (builtin) {
rc.addFile(builtin, 'builtin')
} else {
rc.add({}, 'builtin')
}
- rc.on('load', function () {
- load_(builtin, rc, cli, cb)
- })
- rc.on('error', cb)
+ return load_(builtin, rc, cli)
}
-function load_ (builtin, rc, cli, cb) {
- var defaults = configDefs.defaults
- var conf = new Conf(rc)
+// XXX promisify this the rest of the way, and all the Conf class methods
+const load_ = promisify(function load_ (builtin, rc, cli, cb) {
+ const defaults = configDefs.defaults
+ const conf = new Conf(rc)
conf.usingBuiltin = !!builtin
conf.add(cli, 'cli')
conf.addEnv()
- conf.loadPrefix(function (er) {
+ conf.loadPrefix(er => {
if (er) return cb(er)
// If you're doing `npm --userconfig=~/foo.npmrc` then you'd expect
@@ -125,9 +63,9 @@ function load_ (builtin, rc, cli, cb) {
// the default or resolved userconfig value. npm will log a "verbose"
// message about this when it happens, but it is a rare enough edge case
// that we don't have to be super concerned about it.
- var projectConf = path.resolve(conf.localPrefix, '.npmrc')
- var defaultUserConfig = rc.get('userconfig')
- var resolvedUserConfig = conf.get('userconfig')
+ const projectConf = path.resolve(conf.localPrefix, '.npmrc')
+ const defaultUserConfig = rc.get('userconfig')
+ const resolvedUserConfig = conf.get('userconfig')
if (!conf.get('global') &&
projectConf !== defaultUserConfig &&
projectConf !== resolvedUserConfig) {
@@ -152,7 +90,7 @@ function load_ (builtin, rc, cli, cb) {
// return `~/local/etc/npmrc`
// annoying humans and their expectations!
if (conf.get('prefix')) {
- var etc = path.resolve(conf.get('prefix'), 'etc')
+ const etc = path.resolve(conf.get('prefix'), 'etc')
defaults.globalconfig = path.resolve(etc, 'npmrc')
defaults.globalignorefile = path.resolve(etc, 'npmignore')
}
@@ -173,7 +111,7 @@ function load_ (builtin, rc, cli, cb) {
// warn about invalid bits.
validate(conf)
- var cafile = conf.get('cafile')
+ const cafile = conf.get('cafile')
if (cafile) {
return conf.loadCAFile(cafile, finalize)
@@ -190,7 +128,7 @@ function load_ (builtin, rc, cli, cb) {
exports.loaded = conf
cb(er, conf)
}
-}
+})
// Basically the same as CC, but:
// 1. Always ini
@@ -225,24 +163,24 @@ Conf.prototype.loadExtras = function (cb) {
this.setUser(function (er) {
if (er) return cb(er)
// Without prefix, nothing will ever work
- mkdirp(this.prefix, cb)
+ mkdirp(this.prefix).then(() => cb()).catch(cb)
}.bind(this))
}
Conf.prototype.save = function (where, cb) {
- var target = this.sources[where]
+ const target = this.sources[where]
if (!target || !(target.path || target.source) || !target.data) {
- var er
+ let er
if (where !== 'builtin') er = new Error('bad save target: ' + where)
if (cb) {
- process.nextTick(cb.bind(null, er))
+ process.nextTick(() => cb(er))
return this
}
return this.emit('error', er)
}
if (target.source) {
- var pref = target.prefix || ''
+ const pref = target.prefix || ''
Object.keys(target.data).forEach(function (k) {
target.source[pref + k] = target.data[k]
})
@@ -250,15 +188,14 @@ Conf.prototype.save = function (where, cb) {
return this
}
- var data = ini.stringify(target.data)
+ const data = ini.stringify(target.data)
- var then = function then (er) {
+ const then = er => {
if (er) return done(er)
-
fs.chmod(target.path, mode, done)
}
- var done = function done (er) {
+ const done = er => {
if (er) {
if (cb) return cb(er)
else return this.emit('error', er)
@@ -270,22 +207,15 @@ Conf.prototype.save = function (where, cb) {
}
}
- then = then.bind(this)
- done = done.bind(this)
this._saving++
- var mode = where === 'user' ? '0600' : '0666'
+ const mode = where === 'user' ? 0o600 : 0o666
if (!data.trim()) {
- fs.unlink(target.path, function () {
- // ignore the possible error (e.g. the file doesn't exist)
- done(null)
- })
+ // ignore the possible error (e.g. the file doesn't exist)
+ fs.unlink(target.path, () => done())
} else {
- // we don't have to use inferOwner here, because gentle-fs will
- // mkdir with the correctly inferred ownership. Just preserve it.
const dir = path.dirname(target.path)
- mkdirp(dir, function (er) {
- if (er) return then(er)
+ mkdirp(dir).catch(then).then(() => {
fs.stat(dir, (er, st) => {
if (er) return then(er)
fs.writeFile(target.path, data, 'utf8', function (er) {
@@ -427,3 +357,22 @@ function validate (cl) {
nopt.clean(cl.root, configDefs.types)
}
+
+exports.load = load
+exports.Conf = Conf
+exports.loaded = false
+exports.rootConf = null
+exports.usingBuiltin = false
+exports.defs = configDefs
+
+Object.defineProperty(exports, 'defaults', { get: function () {
+ return configDefs.defaults
+},
+enumerable: true })
+
+Object.defineProperty(exports, 'types', { get: function () {
+ return configDefs.types
+},
+enumerable: true })
+
+exports.validate = validate
diff --git a/lib/config/set-user.js b/lib/config/set-user.js
index 570a1f54e..8579a8863 100644
--- a/lib/config/set-user.js
+++ b/lib/config/set-user.js
@@ -1,9 +1,9 @@
module.exports = setUser
-var assert = require('assert')
-var path = require('path')
-var fs = require('fs')
-var mkdirp = require('gentle-fs').mkdir
+const assert = require('assert')
+const path = require('path')
+const fs = require('fs')
+const mkdirp = require('mkdirp-infer-owner')
function setUser (cb) {
var defaultConf = this.root
@@ -18,9 +18,8 @@ function setUser (cb) {
return cb()
}
- var prefix = path.resolve(this.get('prefix'))
- mkdirp(prefix, function (er) {
- if (er) return cb(er)
+ const prefix = path.resolve(this.get('prefix'))
+ mkdirp(prefix).catch(cb).then(() => {
fs.stat(prefix, function (er, st) {
defaultConf.user = st && st.uid
return cb(er)
diff --git a/lib/npm.js b/lib/npm.js
index a84eb4e6d..d2001eedd 100644
--- a/lib/npm.js
+++ b/lib/npm.js
@@ -36,6 +36,8 @@ const npm = module.exports = new class extends EventEmitter {
this.command = null
const cmds = {}
+ // the first time `npm.commands.xyz` is loaded, it gets added
+ // to the cmds object, so we don't have to load it again.
this.commands = new Proxy(cmds, {
get: (prop, cmd) => {
if (cmds.hasOwnProperty(cmd)) {
@@ -119,11 +121,7 @@ const npm = module.exports = new class extends EventEmitter {
this.loading = true
this.log.pause()
- this[_load](cli)
- }
-
- [_load] (cli) {
- const cb = (er) => {
+ return this[_load](cli).catch(er => er).then((er) => {
this.loading = false
this.loaded = true
this.config.loaded = true
@@ -132,79 +130,68 @@ const npm = module.exports = new class extends EventEmitter {
this.log.warn('using --force', 'Recommended protections disabled.')
}
this.emit('load', er)
- }
- // if node is a symlink, we should use the symlink location as the
- // effective "prefix" designator, not the process.execPath.
- which(process.argv[0], (er, node) => {
- if (!er && node.toUpperCase() !== process.execPath.toUpperCase()) {
- log.verbose('node symlink', noode)
- process.execPath = node
- }
-
- // look up configs
- const builtin = resolve(__dirname, '../npmrc')
- npmconf.load(cli, builtin, (er, config) => {
- if (er === config) {
- er = null
- }
- this.config = config
- if (er) {
- return cb(er)
- }
+ })
+ }
- // if the 'project' config is not a filename, and we're
- // not in global mode, then that means that it collided
- // with either the default or effective userland config
- if (!config.get('global') &&
- config.sources.project &&
- config.sources.project.type !== 'ini') {
- log.verbose(
- 'config',
- 'Skipping project config: %s. (matches userconfig)',
- config.localPrefix + '/.npmrc'
- )
- }
+ async [_load] (cli) {
+ const node = await which(process.argv[0]).catch(er => null)
+ if (node && node.toUpperCase() !== process.execPath.toUpperCase()) {
+ log.verbose('node symlink', node)
+ process.execPath = node
+ }
- // Expand placeholder values in user-agent
- const ciName = ciDetect()
- const ci = ciName ? `ci/${ciName}` : ''
- const ua = (config.get('user-agent') || '')
- .replace(/\{node-version\}/gi, config.get('node-version'))
- .replace(/\{npm-version\}/gi, this.version)
- .replace(/\{platform\}/gi, process.platform)
- .replace(/\{arch\}/gi, process.arch)
- .replace(/\{ci\}/gi, ci)
+ const builtin = resolve(__dirname, '../npmrc')
+ const config = this.config = await npmconf.load(cli, builtin)
+
+ // if the 'project' config is not a filename, and we're
+ // not in global mode, then that means that it collided
+ // with either the default or effective userland config
+ if (!config.get('global') &&
+ config.sources.project &&
+ config.sources.project.type !== 'ini') {
+ log.verbose(
+ 'config',
+ 'Skipping project config: %s. (matches userconfig)',
+ config.localPrefix + '/.npmrc'
+ )
+ }
- config.set('user-agent', ua.trim())
+ // Expand placeholder values in user-agent
+ const ciName = ciDetect()
+ const ci = ciName ? `ci/${ciName}` : ''
+ const ua = (config.get('user-agent') || '')
+ .replace(/\{node-version\}/gi, config.get('node-version'))
+ .replace(/\{npm-version\}/gi, this.version)
+ .replace(/\{platform\}/gi, process.platform)
+ .replace(/\{arch\}/gi, process.arch)
+ .replace(/\{ci\}/gi, ci)
- if (config.get('metrics-registry') === null) {
- config.set('metrics-registry', config.get('registry'))
- }
+ config.set('user-agent', ua.trim())
- this.color = setupLog(config, this)
+ if (config.get('metrics-registry') === null) {
+ config.set('metrics-registry', config.get('registry'))
+ }
- cleanUpLogFiles(this.cache, config.get('logs-max'), log.warn)
+ this.color = setupLog(config, this)
- log.resume()
- const umask = config.get('umask')
- this.modes = {
- exec: 0o777 & (~umask),
- file: 0o666 & (~umask),
- umask
- }
+ cleanUpLogFiles(this.cache, config.get('logs-max'), log.warn)
- const configScope = config.get('scope')
- if (configScope && !/^@/.test(configScope)) {
- config.set('scope', `@${configScope}`)
- }
- this.projectScope = config.get('scope') ||
- getProjectScope(this.prefix)
+ log.resume()
+ const umask = config.get('umask')
+ this.modes = {
+ exec: 0o777 & (~umask),
+ file: 0o666 & (~umask),
+ umask
+ }
- startMetrics()
+ const configScope = config.get('scope')
+ if (configScope && !/^@/.test(configScope)) {
+ config.set('scope', `@${configScope}`)
+ }
+ this.projectScope = config.get('scope') ||
+ getProjectScope(this.prefix)
- return cb(null, this)
- })
- })
+ startMetrics()
}
get flatOptions () {
@@ -290,12 +277,11 @@ const npm = module.exports = new class extends EventEmitter {
const npmconf = require('./config/core.js')
const log = require('npmlog')
-const { inspect } = require('util')
+const { inspect, promisify } = require('util')
const ciDetect = require('@npmcli/ci-detect')
const startMetrics = require('./utils/metrics.js').start
-const which = require('which')
-const glob = require('glob')
+const which = promisify(require('which'))
const deref = require('./utils/deref-command.js')
const setupLog = require('./utils/setup-log.js')
diff --git a/lib/utils/cache-file.js b/lib/utils/cache-file.js
index 7b3136b2e..9db253a3b 100644
--- a/lib/utils/cache-file.js
+++ b/lib/utils/cache-file.js
@@ -1,9 +1,8 @@
-// XXX use infer-owner or gentle-fs.mkdir here
const npm = require('../npm.js')
const path = require('path')
const chownr = require('chownr')
const writeFileAtomic = require('write-file-atomic')
-const mkdirp = require('mkdirp')
+const mkdirp = require('mkdirp-infer-owner')
const fs = require('graceful-fs')
let cache = null
diff --git a/lib/utils/completion/file-completion.js b/lib/utils/completion/file-completion.js
index e16b636a6..e4daa4dd4 100644
--- a/lib/utils/completion/file-completion.js
+++ b/lib/utils/completion/file-completion.js
@@ -1,16 +1,14 @@
module.exports = fileCompletion
-var mkdir = require('mkdirp')
-var glob = require('glob')
+const mkdir = require('mkdirp')
+const glob = require('glob')
function fileCompletion (root, req, depth, cb) {
if (typeof cb !== 'function') {
cb = depth
depth = Infinity
}
- mkdir(root, function (er) {
- if (er) return cb(er)
-
+ mkdir(root).catch(cb).then(() => {
// can be either exactly the req, or a descendent
var pattern = root + '/{' + req + ',' + req + '/**/*}'
var opts = { mark: true, dot: true, maxDepth: depth }
diff --git a/lib/utils/correct-mkdir.js b/lib/utils/correct-mkdir.js
deleted file mode 100644
index 57368e946..000000000
--- a/lib/utils/correct-mkdir.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// XXX this can probably be replaced with gentle-fs.mkdir everywhere it's used
-const chownr = require('chownr')
-const inflight = require('inflight')
-const log = require('npmlog')
-const mkdirp = require('mkdirp')
-const inferOwner = require('infer-owner')
-
-// retain ownership of the parent dir
-// this matches behavior in cacache to infer the cache ownership
-// based on the ownership of the cache folder or it is parent.
-
-module.exports = function correctMkdir (path, cb) {
- cb = inflight('correctMkdir: ' + path, cb)
- if (!cb) {
- return log.verbose('correctMkdir', path, 'correctMkdir already in flight; waiting')
- } else {
- log.verbose('correctMkdir', path, 'correctMkdir not in flight; initializing')
- }
-
- if (!process.getuid) {
- log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform)
- return mkdirp(path, (er, made) => cb(er, { uid: 0, gid: 0 }))
- }
-
- inferOwner(path).then(owner => {
- mkdirp(path, (er, made) => {
- if (er) {
- log.error('correctMkdir', 'failed to make directory %s', path)
- return cb(er)
- }
- chownr(made || path, owner.uid, owner.gid, (er) => cb(er, owner))
- })
- }, er => {
- log.error('correctMkdir', 'failed to infer path ownership %s', path)
- return cb(er)
- })
-}
diff --git a/lib/utils/lifecycle.js b/lib/utils/lifecycle.js
deleted file mode 100644
index 2d3265e0e..000000000
--- a/lib/utils/lifecycle.js
+++ /dev/null
@@ -1,14 +0,0 @@
-exports = module.exports = runLifecycle
-
-const lifecycleOpts = require('../config/lifecycle')
-const lifecycle = require('npm-lifecycle')
-
-function runLifecycle (pkg, stage, wd, moreOpts, cb) {
- if (typeof moreOpts === 'function') {
- cb = moreOpts
- moreOpts = null
- }
-
- const opts = lifecycleOpts(moreOpts)
- lifecycle(pkg, stage, wd, opts).then(cb, cb)
-}
diff --git a/lib/utils/locker.js b/lib/utils/locker.js
deleted file mode 100644
index 9cd8b2c4f..000000000
--- a/lib/utils/locker.js
+++ /dev/null
@@ -1,73 +0,0 @@
-var crypto = require('crypto')
-var resolve = require('path').resolve
-
-var lockfile = require('lockfile')
-var log = require('npmlog')
-
-var npm = require('../npm.js')
-var correctMkdir = require('../utils/correct-mkdir.js')
-
-var installLocks = {}
-
-function lockFileName (base, name) {
- var c = name.replace(/[^a-zA-Z0-9]+/g, '-').replace(/^-+|-+$/g, '')
- var p = resolve(base, name)
- var h = crypto.createHash('sha1').update(p).digest('hex')
- var l = resolve(npm.cache, '_locks')
-
- return resolve(l, c.substr(0, 24) + '-' + h.substr(0, 16) + '.lock')
-}
-
-function lock (base, name, cb) {
- var lockDir = resolve(npm.cache, '_locks')
- correctMkdir(lockDir, function (er) {
- if (er) return cb(er)
-
- var opts = {
- stale: npm.config.get('cache-lock-stale'),
- retries: npm.config.get('cache-lock-retries'),
- wait: npm.config.get('cache-lock-wait')
- }
- var lf = lockFileName(base, name)
- lockfile.lock(lf, opts, function (er) {
- if (er) log.warn('locking', lf, 'failed', er)
-
- if (!er) {
- log.verbose('lock', 'using', lf, 'for', resolve(base, name))
- installLocks[lf] = true
- }
-
- cb(er)
- })
- })
-}
-
-function unlock (base, name, cb) {
- var lf = lockFileName(base, name)
- var locked = installLocks[lf]
- if (locked === false) {
- return process.nextTick(cb)
- } else if (locked === true) {
- lockfile.unlock(lf, function (er) {
- if (er) {
- log.warn('unlocking', lf, 'failed', er)
- } else {
- installLocks[lf] = false
- log.verbose('unlock', 'done using', lf, 'for', resolve(base, name))
- }
-
- cb(er)
- })
- } else {
- var notLocked = new Error(
- 'Attempt to unlock ' + resolve(base, name) + ", which hasn't been locked"
- )
- notLocked.code = 'ENOTLOCKED'
- throw notLocked
- }
-}
-
-module.exports = {
- lock: lock,
- unlock: unlock
-}
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/LICENSE b/node_modules/@npmcli/git/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/@npmcli/git/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/bin/cmd.js b/node_modules/@npmcli/git/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/@npmcli/git/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/index.js b/node_modules/@npmcli/git/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/@npmcli/git/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/package.json b/node_modules/@npmcli/git/node_modules/mkdirp/package.json
deleted file mode 100644
index 9341da149..000000000
--- a/node_modules/@npmcli/git/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "_from": "mkdirp@^1.0.3",
- "_id": "mkdirp@1.0.4",
- "_inBundle": false,
- "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "_location": "/@npmcli/git/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.3",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/@npmcli/git"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
- "_spec": "mkdirp@^1.0.3",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/git",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.7"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.4"
-}
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/readme.markdown b/node_modules/@npmcli/git/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/@npmcli/git/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/@npmcli/git/package.json b/node_modules/@npmcli/git/package.json
index 42f4995e9..ab992de13 100644
--- a/node_modules/@npmcli/git/package.json
+++ b/node_modules/@npmcli/git/package.json
@@ -1,8 +1,8 @@
{
"_from": "@npmcli/git@latest",
- "_id": "@npmcli/git@2.0.2",
+ "_id": "@npmcli/git@2.0.3",
"_inBundle": false,
- "_integrity": "sha512-uv9+EuP5YWluNPgkEOL+iyB/+MVt4U5PMBCfl+I8korKluFdiSp7RxjXYzpWM/wU4wXaROAUFiOiCMmBftonjw==",
+ "_integrity": "sha512-c/ODsV5ppjB12VDXKc6hzVNgg6ZJX/etILUn3WgF5NLAYBhQLJ3fBq6uB2jQD4OwqOzJdPT1/xA3Xh3aaWGk5w==",
"_location": "/@npmcli/git",
"_phantomChildren": {},
"_requested": {
@@ -22,8 +22,8 @@
"/libnpmversion",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.2.tgz",
- "_shasum": "41d75caf59e4799c62b354a3e4eed3b0e64310c0",
+ "_resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.3.tgz",
+ "_shasum": "41a13cc698d257c7e38a287e233dafe7354dd4ab",
"_spec": "@npmcli/git@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -37,7 +37,7 @@
"bundleDependencies": false,
"dependencies": {
"@npmcli/promise-spawn": "^1.1.0",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"mkdirp": "^1.0.3",
"npm-pick-manifest": "^6.0.0",
"promise-inflight": "^1.0.1",
@@ -74,5 +74,5 @@
"check-coverage": true,
"coverage-map": "map.js"
},
- "version": "2.0.2"
+ "version": "2.0.3"
}
diff --git a/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp b/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896ceb..000000000
--- a/node_modules/@npmcli/move-file/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md b/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md
deleted file mode 100644
index 81458380b..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changers Lorgs!
-
-## 1.0
-
-Full rewrite. Essentially a brand new module.
-
-- Return a promise instead of taking a callback.
-- Use native `fs.mkdir(path, { recursive: true })` when available.
-- Drop support for outdated Node.js versions. (Technically still works on
- Node.js v8, but only 10 and above are officially supported.)
-
-## 0.x
-
-Original and most widely used recursive directory creation implementation
-in JavaScript, dating back to 2010.
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE b/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492c0..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent)
- return Promise.resolve()
-
- return opts.statAsync(parent).then(
- st => st.isDirectory() ? path : undefined, // will fail later
- er => er.code === 'ENOENT'
- ? findMade(opts, dirname(parent), parent)
- : undefined
- )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
- if (path === parent)
- return undefined
-
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined
- } catch (er) {
- return er.code === 'ENOENT'
- ? findMadeSync(opts, dirname(parent), parent)
- : undefined
- }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd64..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
- opts.recursive = false
- const parent = dirname(path)
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- })
- }
-
- return opts.mkdirAsync(path, opts).then(() => made || path, er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(parent, opts)
- .then(made => mkdirpManual(path, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- return opts.statAsync(path).then(st => {
- if (st.isDirectory())
- return made
- else
- throw er
- }, () => { throw er })
- })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
- const parent = dirname(path)
- opts.recursive = false
-
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts)
- } catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- else
- return
- }
- }
-
- try {
- opts.mkdirSync(path, opts)
- return made || path
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- try {
- if (!opts.statSync(path).isDirectory())
- throw er
- } catch (_) {
- throw er
- }
- }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b6980..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirAsync(path, opts)
-
- return findMade(opts, path).then(made =>
- opts.mkdirAsync(path, opts).then(() => made)
- .catch(er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(path, opts)
- else
- throw er
- }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirSync(path, opts)
-
- const made = findMadeSync(opts, path)
- try {
- opts.mkdirSync(path, opts)
- return made
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts)
- else
- throw er
- }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 2fa4833fa..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
- if (!opts)
- opts = { mode: 0o777, fs }
- else if (typeof opts === 'object')
- opts = { mode: 0o777, fs, ...opts }
- else if (typeof opts === 'number')
- opts = { mode: opts, fs }
- else if (typeof opts === 'string')
- opts = { mode: parseInt(opts, 8), fs }
- else
- throw new TypeError('invalid options argument')
-
- opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
- opts.mkdirAsync = promisify(opts.mkdir)
- opts.stat = opts.stat || opts.fs.stat || fs.stat
- opts.statAsync = promisify(opts.stat)
- opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
- opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
- return opts
-}
-module.exports = optsArg
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5a6..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
- if (/\0/.test(path)) {
- // simulate same failure that node raises
- throw Object.assign(
- new TypeError('path must be a string without null bytes'),
- {
- path,
- code: 'ERR_INVALID_ARG_VALUE',
- }
- )
- }
-
- path = resolve(path)
- if (platform === 'win32') {
- const badWinChars = /[*|"<>?:]/
- const {root} = parse(path)
- if (badWinChars.test(path.substr(root.length))) {
- throw Object.assign(new Error('Illegal characters in path.'), {
- path,
- code: 'EINVAL',
- })
- }
- }
-
- return path
-}
-module.exports = pathArg
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js b/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361de1..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json b/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json
deleted file mode 100644
index 269d165d8..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "_from": "mkdirp@^1.0.4",
- "_id": "mkdirp@1.0.4",
- "_inBundle": false,
- "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "_location": "/@npmcli/move-file/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.4",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.4",
- "saveSpec": null,
- "fetchSpec": "^1.0.4"
- },
- "_requiredBy": [
- "/@npmcli/move-file"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
- "_spec": "mkdirp@^1.0.4",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/move-file",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.7"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.4"
-}
diff --git a/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown b/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/@npmcli/run-script/node_modules/.bin/node-gyp b/node_modules/@npmcli/run-script/node_modules/.bin/node-gyp
deleted file mode 120000
index 9b31a4fe4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/.bin/node-gyp
+++ /dev/null
@@ -1 +0,0 @@
-../node-gyp/bin/node-gyp.js \ No newline at end of file
diff --git a/node_modules/@npmcli/run-script/node_modules/.bin/semver b/node_modules/@npmcli/run-script/node_modules/.bin/semver
deleted file mode 120000
index 317eb293d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/.bin/semver
+++ /dev/null
@@ -1 +0,0 @@
-../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/@npmcli/run-script/node_modules/.bin/which b/node_modules/@npmcli/run-script/node_modules/.bin/which
deleted file mode 120000
index f62471c85..000000000
--- a/node_modules/@npmcli/run-script/node_modules/.bin/which
+++ /dev/null
@@ -1 +0,0 @@
-../which/bin/which \ No newline at end of file
diff --git a/node_modules/@npmcli/run-script/node_modules/fs-minipass/README.md b/node_modules/@npmcli/run-script/node_modules/fs-minipass/README.md
deleted file mode 100644
index 1e61241cf..000000000
--- a/node_modules/@npmcli/run-script/node_modules/fs-minipass/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# fs-minipass
-
-Filesystem streams based on [minipass](http://npm.im/minipass).
-
-4 classes are exported:
-
-- ReadStream
-- ReadStreamSync
-- WriteStream
-- WriteStreamSync
-
-When using `ReadStreamSync`, all of the data is made available
-immediately upon consuming the stream. Nothing is buffered in memory
-when the stream is constructed. If the stream is piped to a writer,
-then it will synchronously `read()` and emit data into the writer as
-fast as the writer can consume it. (That is, it will respect
-backpressure.) If you call `stream.read()` then it will read the
-entire file and return the contents.
-
-When using `WriteStreamSync`, every write is flushed to the file
-synchronously. If your writes all come in a single tick, then it'll
-write it all out in a single tick. It's as synchronous as you are.
-
-The async versions work much like their node builtin counterparts,
-with the exception of introducing significantly less Stream machinery
-overhead.
-
-## USAGE
-
-It's just streams, you pipe them or read() them or write() to them.
-
-```js
-const fsm = require('fs-minipass')
-const readStream = new fsm.ReadStream('file.txt')
-const writeStream = new fsm.WriteStream('output.txt')
-writeStream.write('some file header or whatever\n')
-readStream.pipe(writeStream)
-```
-
-## ReadStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `readSize` The size of reads to do, defaults to 16MB
-- `size` The size of the file, if known. Prevents zero-byte read()
- call at the end.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the file is done being read.
-
-## WriteStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `mode` The mode to create the file with. Defaults to `0o666`.
-- `start` The position in the file to start reading. If not
- specified, then the file will start writing at position zero, and be
- truncated by default.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the stream is ended.
-- `flags` Flags to use when opening the file. Irrelevant if `fd` is
- passed in, since file won't be opened in that case. Defaults to
- `'a'` if a `pos` is specified, or `'w'` otherwise.
diff --git a/node_modules/@npmcli/run-script/node_modules/fs-minipass/index.js b/node_modules/@npmcli/run-script/node_modules/fs-minipass/index.js
deleted file mode 100644
index cd585a83c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/fs-minipass/index.js
+++ /dev/null
@@ -1,387 +0,0 @@
-'use strict'
-const MiniPass = require('minipass')
-const EE = require('events').EventEmitter
-const fs = require('fs')
-
-// for writev
-const binding = process.binding('fs')
-const writeBuffers = binding.writeBuffers
-/* istanbul ignore next */
-const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback
-
-const _autoClose = Symbol('_autoClose')
-const _close = Symbol('_close')
-const _ended = Symbol('_ended')
-const _fd = Symbol('_fd')
-const _finished = Symbol('_finished')
-const _flags = Symbol('_flags')
-const _flush = Symbol('_flush')
-const _handleChunk = Symbol('_handleChunk')
-const _makeBuf = Symbol('_makeBuf')
-const _mode = Symbol('_mode')
-const _needDrain = Symbol('_needDrain')
-const _onerror = Symbol('_onerror')
-const _onopen = Symbol('_onopen')
-const _onread = Symbol('_onread')
-const _onwrite = Symbol('_onwrite')
-const _open = Symbol('_open')
-const _path = Symbol('_path')
-const _pos = Symbol('_pos')
-const _queue = Symbol('_queue')
-const _read = Symbol('_read')
-const _readSize = Symbol('_readSize')
-const _reading = Symbol('_reading')
-const _remain = Symbol('_remain')
-const _size = Symbol('_size')
-const _write = Symbol('_write')
-const _writing = Symbol('_writing')
-const _defaultFlag = Symbol('_defaultFlag')
-
-class ReadStream extends MiniPass {
- constructor (path, opt) {
- opt = opt || {}
- super(opt)
-
- this.writable = false
-
- if (typeof path !== 'string')
- throw new TypeError('path must be a string')
-
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
- this[_path] = path
- this[_readSize] = opt.readSize || 16*1024*1024
- this[_reading] = false
- this[_size] = typeof opt.size === 'number' ? opt.size : Infinity
- this[_remain] = this[_size]
- this[_autoClose] = typeof opt.autoClose === 'boolean' ?
- opt.autoClose : true
-
- if (typeof this[_fd] === 'number')
- this[_read]()
- else
- this[_open]()
- }
-
- get fd () { return this[_fd] }
- get path () { return this[_path] }
-
- write () {
- throw new TypeError('this is a readable stream')
- }
-
- end () {
- throw new TypeError('this is a readable stream')
- }
-
- [_open] () {
- fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))
- }
-
- [_onopen] (er, fd) {
- if (er)
- this[_onerror](er)
- else {
- this[_fd] = fd
- this.emit('open', fd)
- this[_read]()
- }
- }
-
- [_makeBuf] () {
- return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))
- }
-
- [_read] () {
- if (!this[_reading]) {
- this[_reading] = true
- const buf = this[_makeBuf]()
- /* istanbul ignore if */
- if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf))
- fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) =>
- this[_onread](er, br, buf))
- }
- }
-
- [_onread] (er, br, buf) {
- this[_reading] = false
- if (er)
- this[_onerror](er)
- else if (this[_handleChunk](br, buf))
- this[_read]()
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- fs.close(this[_fd], _ => this.emit('close'))
- this[_fd] = null
- }
- }
-
- [_onerror] (er) {
- this[_reading] = true
- this[_close]()
- this.emit('error', er)
- }
-
- [_handleChunk] (br, buf) {
- let ret = false
- // no effect if infinite
- this[_remain] -= br
- if (br > 0)
- ret = super.write(br < buf.length ? buf.slice(0, br) : buf)
-
- if (br === 0 || this[_remain] <= 0) {
- ret = false
- this[_close]()
- super.end()
- }
-
- return ret
- }
-
- emit (ev, data) {
- switch (ev) {
- case 'prefinish':
- case 'finish':
- break
-
- case 'drain':
- if (typeof this[_fd] === 'number')
- this[_read]()
- break
-
- default:
- return super.emit(ev, data)
- }
- }
-}
-
-class ReadStreamSync extends ReadStream {
- [_open] () {
- let threw = true
- try {
- this[_onopen](null, fs.openSync(this[_path], 'r'))
- threw = false
- } finally {
- if (threw)
- this[_close]()
- }
- }
-
- [_read] () {
- let threw = true
- try {
- if (!this[_reading]) {
- this[_reading] = true
- do {
- const buf = this[_makeBuf]()
- /* istanbul ignore next */
- const br = buf.length === 0 ? 0 : fs.readSync(this[_fd], buf, 0, buf.length, null)
- if (!this[_handleChunk](br, buf))
- break
- } while (true)
- this[_reading] = false
- }
- threw = false
- } finally {
- if (threw)
- this[_close]()
- }
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- try {
- fs.closeSync(this[_fd])
- } catch (er) {}
- this[_fd] = null
- this.emit('close')
- }
- }
-}
-
-class WriteStream extends EE {
- constructor (path, opt) {
- opt = opt || {}
- super(opt)
- this.readable = false
- this[_writing] = false
- this[_ended] = false
- this[_needDrain] = false
- this[_queue] = []
- this[_path] = path
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
- this[_mode] = opt.mode === undefined ? 0o666 : opt.mode
- this[_pos] = typeof opt.start === 'number' ? opt.start : null
- this[_autoClose] = typeof opt.autoClose === 'boolean' ?
- opt.autoClose : true
-
- // truncating makes no sense when writing into the middle
- const defaultFlag = this[_pos] !== null ? 'r+' : 'w'
- this[_defaultFlag] = opt.flags === undefined
- this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags
-
- if (this[_fd] === null)
- this[_open]()
- }
-
- get fd () { return this[_fd] }
- get path () { return this[_path] }
-
- [_onerror] (er) {
- this[_close]()
- this[_writing] = true
- this.emit('error', er)
- }
-
- [_open] () {
- fs.open(this[_path], this[_flags], this[_mode],
- (er, fd) => this[_onopen](er, fd))
- }
-
- [_onopen] (er, fd) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er && er.code === 'ENOENT') {
- this[_flags] = 'w'
- this[_open]()
- } else if (er)
- this[_onerror](er)
- else {
- this[_fd] = fd
- this.emit('open', fd)
- this[_flush]()
- }
- }
-
- end (buf, enc) {
- if (buf)
- this.write(buf, enc)
-
- this[_ended] = true
-
- // synthetic after-write logic, where drain/finish live
- if (!this[_writing] && !this[_queue].length &&
- typeof this[_fd] === 'number')
- this[_onwrite](null, 0)
- }
-
- write (buf, enc) {
- if (typeof buf === 'string')
- buf = new Buffer(buf, enc)
-
- if (this[_ended]) {
- this.emit('error', new Error('write() after end()'))
- return false
- }
-
- if (this[_fd] === null || this[_writing] || this[_queue].length) {
- this[_queue].push(buf)
- this[_needDrain] = true
- return false
- }
-
- this[_writing] = true
- this[_write](buf)
- return true
- }
-
- [_write] (buf) {
- fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) =>
- this[_onwrite](er, bw))
- }
-
- [_onwrite] (er, bw) {
- if (er)
- this[_onerror](er)
- else {
- if (this[_pos] !== null)
- this[_pos] += bw
- if (this[_queue].length)
- this[_flush]()
- else {
- this[_writing] = false
-
- if (this[_ended] && !this[_finished]) {
- this[_finished] = true
- this[_close]()
- this.emit('finish')
- } else if (this[_needDrain]) {
- this[_needDrain] = false
- this.emit('drain')
- }
- }
- }
- }
-
- [_flush] () {
- if (this[_queue].length === 0) {
- if (this[_ended])
- this[_onwrite](null, 0)
- } else if (this[_queue].length === 1)
- this[_write](this[_queue].pop())
- else {
- const iovec = this[_queue]
- this[_queue] = []
- writev(this[_fd], iovec, this[_pos],
- (er, bw) => this[_onwrite](er, bw))
- }
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- fs.close(this[_fd], _ => this.emit('close'))
- this[_fd] = null
- }
- }
-}
-
-class WriteStreamSync extends WriteStream {
- [_open] () {
- let fd
- try {
- fd = fs.openSync(this[_path], this[_flags], this[_mode])
- } catch (er) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er && er.code === 'ENOENT') {
- this[_flags] = 'w'
- return this[_open]()
- } else
- throw er
- }
- this[_onopen](null, fd)
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- try {
- fs.closeSync(this[_fd])
- } catch (er) {}
- this[_fd] = null
- this.emit('close')
- }
- }
-
- [_write] (buf) {
- try {
- this[_onwrite](null,
- fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos]))
- } catch (er) {
- this[_onwrite](er, 0)
- }
- }
-}
-
-const writev = (fd, iovec, pos, cb) => {
- const done = (er, bw) => cb(er, bw, iovec)
- const req = new FSReqWrap()
- req.oncomplete = done
- binding.writeBuffers(fd, iovec, pos, req)
-}
-
-exports.ReadStream = ReadStream
-exports.ReadStreamSync = ReadStreamSync
-
-exports.WriteStream = WriteStream
-exports.WriteStreamSync = WriteStreamSync
diff --git a/node_modules/@npmcli/run-script/node_modules/fs-minipass/package.json b/node_modules/@npmcli/run-script/node_modules/fs-minipass/package.json
deleted file mode 100644
index ab121f687..000000000
--- a/node_modules/@npmcli/run-script/node_modules/fs-minipass/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "fs-minipass@^1.2.5",
- "_id": "fs-minipass@1.2.7",
- "_inBundle": false,
- "_integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
- "_location": "/@npmcli/run-script/fs-minipass",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "fs-minipass@^1.2.5",
- "name": "fs-minipass",
- "escapedName": "fs-minipass",
- "rawSpec": "^1.2.5",
- "saveSpec": null,
- "fetchSpec": "^1.2.5"
- },
- "_requiredBy": [
- "/@npmcli/run-script/tar"
- ],
- "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
- "_shasum": "ccff8570841e7fe4265693da88936c55aed7f7c7",
- "_spec": "fs-minipass@^1.2.5",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script/node_modules/tar",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/fs-minipass/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "minipass": "^2.6.0"
- },
- "deprecated": false,
- "description": "fs read and write streams based on minipass",
- "devDependencies": {
- "mutate-fs": "^2.0.1",
- "tap": "^14.6.4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/npm/fs-minipass#readme",
- "keywords": [],
- "license": "ISC",
- "main": "index.js",
- "name": "fs-minipass",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/fs-minipass.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true
- },
- "version": "1.2.7"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/minipass/LICENSE b/node_modules/@npmcli/run-script/node_modules/minipass/LICENSE
deleted file mode 100644
index 20a476254..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm, Inc. and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@npmcli/run-script/node_modules/minipass/README.md b/node_modules/@npmcli/run-script/node_modules/minipass/README.md
deleted file mode 100644
index c989beea0..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minipass/README.md
+++ /dev/null
@@ -1,606 +0,0 @@
-# minipass
-
-A _very_ minimal implementation of a [PassThrough
-stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough)
-
-[It's very
-fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0)
-for objects, strings, and buffers.
-
-Supports pipe()ing (including multi-pipe() and backpressure
-transmission), buffering data until either a `data` event handler or
-`pipe()` is added (so you don't lose the first chunk), and most other
-cases where PassThrough is a good idea.
-
-There is a `read()` method, but it's much more efficient to consume
-data from this stream via `'data'` events or by calling `pipe()` into
-some other stream. Calling `read()` requires the buffer to be
-flattened in some cases, which requires copying memory.
-
-There is also no `unpipe()` method. Once you start piping, there is
-no stopping it!
-
-If you set `objectMode: true` in the options, then whatever is written
-will be emitted. Otherwise, it'll do a minimal amount of Buffer
-copying to ensure proper Streams semantics when `read(n)` is called.
-
-`objectMode` can also be set by doing `stream.objectMode = true`, or by
-writing any non-string/non-buffer data. `objectMode` cannot be set to
-false once it is set.
-
-This is not a `through` or `through2` stream. It doesn't transform
-the data, it just passes it right through. If you want to transform
-the data, extend the class, and override the `write()` method. Once
-you're done transforming the data however you want, call
-`super.write()` with the transform output.
-
-For some examples of streams that extend Minipass in various ways, check
-out:
-
-- [minizlib](http://npm.im/minizlib)
-- [fs-minipass](http://npm.im/fs-minipass)
-- [tar](http://npm.im/tar)
-- [minipass-collect](http://npm.im/minipass-collect)
-- [minipass-flush](http://npm.im/minipass-flush)
-- [minipass-pipeline](http://npm.im/minipass-pipeline)
-- [tap](http://npm.im/tap)
-- [tap-parser](http://npm.im/tap)
-- [treport](http://npm.im/tap)
-
-## Differences from Node.js Streams
-
-There are several things that make Minipass streams different from (and in
-some ways superior to) Node.js core streams.
-
-Please read these caveats if you are familiar with noode-core streams and
-intend to use Minipass streams in your programs.
-
-### Timing
-
-Minipass streams are designed to support synchronous use-cases. Thus, data
-is emitted as soon as it is available, always. It is buffered until read,
-but no longer. Another way to look at it is that Minipass streams are
-exactly as synchronous as the logic that writes into them.
-
-This can be surprising if your code relies on `PassThrough.write()` always
-providing data on the next tick rather than the current one, or being able
-to call `resume()` and not have the entire buffer disappear immediately.
-
-However, without this synchronicity guarantee, there would be no way for
-Minipass to achieve the speeds it does, or support the synchronous use
-cases that it does. Simply put, waiting takes time.
-
-This non-deferring approach makes Minipass streams much easier to reason
-about, especially in the context of Promises and other flow-control
-mechanisms.
-
-### No High/Low Water Marks
-
-Node.js core streams will optimistically fill up a buffer, returning `true`
-on all writes until the limit is hit, even if the data has nowhere to go.
-Then, they will not attempt to draw more data in until the buffer size dips
-below a minimum value.
-
-Minipass streams are much simpler. The `write()` method will return `true`
-if the data has somewhere to go (which is to say, given the timing
-guarantees, that the data is already there by the time `write()` returns).
-
-If the data has nowhere to go, then `write()` returns false, and the data
-sits in a buffer, to be drained out immediately as soon as anyone consumes
-it.
-
-### Hazards of Buffering (or: Why Minipass Is So Fast)
-
-Since data written to a Minipass stream is immediately written all the way
-through the pipeline, and `write()` always returns true/false based on
-whether the data was fully flushed, backpressure is communicated
-immediately to the upstream caller. This minimizes buffering.
-
-Consider this case:
-
-```js
-const {PassThrough} = require('stream')
-const p1 = new PassThrough({ highWaterMark: 1024 })
-const p2 = new PassThrough({ highWaterMark: 1024 })
-const p3 = new PassThrough({ highWaterMark: 1024 })
-const p4 = new PassThrough({ highWaterMark: 1024 })
-
-p1.pipe(p2).pipe(p3).pipe(p4)
-p4.on('data', () => console.log('made it through'))
-
-// this returns false and buffers, then writes to p2 on next tick (1)
-// p2 returns false and buffers, pausing p1, then writes to p3 on next tick (2)
-// p3 returns false and buffers, pausing p2, then writes to p4 on next tick (3)
-// p4 returns false and buffers, pausing p3, then emits 'data' and 'drain'
-// on next tick (4)
-// p3 sees p4's 'drain' event, and calls resume(), emitting 'resume' and
-// 'drain' on next tick (5)
-// p2 sees p3's 'drain', calls resume(), emits 'resume' and 'drain' on next tick (6)
-// p1 sees p2's 'drain', calls resume(), emits 'resume' and 'drain' on next
-// tick (7)
-
-p1.write(Buffer.alloc(2048)) // returns false
-```
-
-Along the way, the data was buffered and deferred at each stage, and
-multiple event deferrals happened, for an unblocked pipeline where it was
-perfectly safe to write all the way through!
-
-Furthermore, setting a `highWaterMark` of `1024` might lead someone reading
-the code to think an advisory maximum of 1KiB is being set for the
-pipeline. However, the actual advisory buffering level is the _sum_ of
-`highWaterMark` values, since each one has its own bucket.
-
-Consider the Minipass case:
-
-```js
-const m1 = new Minipass()
-const m2 = new Minipass()
-const m3 = new Minipass()
-const m4 = new Minipass()
-
-m1.pipe(m2).pipe(m3).pipe(m4)
-m4.on('data', () => console.log('made it through'))
-
-// m1 is flowing, so it writes the data to m2 immediately
-// m2 is flowing, so it writes the data to m3 immediately
-// m3 is flowing, so it writes the data to m4 immediately
-// m4 is flowing, so it fires the 'data' event immediately, returns true
-// m4's write returned true, so m3 is still flowing, returns true
-// m3's write returned true, so m2 is still flowing, returns true
-// m2's write returned true, so m1 is still flowing, returns true
-// No event deferrals or buffering along the way!
-
-m1.write(Buffer.alloc(2048)) // returns true
-```
-
-It is extremely unlikely that you _don't_ want to buffer any data written,
-or _ever_ buffer data that can be flushed all the way through. Neither
-node-core streams nor Minipass ever fail to buffer written data, but
-node-core streams do a lot of unnecessary buffering and pausing.
-
-As always, the faster implementation is the one that does less stuff and
-waits less time to do it.
-
-### Immediately emit `end` for empty streams (when not paused)
-
-If a stream is not paused, and `end()` is called before writing any data
-into it, then it will emit `end` immediately.
-
-If you have logic that occurs on the `end` event which you don't want to
-potentially happen immediately (for example, closing file descriptors,
-moving on to the next entry in an archive parse stream, etc.) then be sure
-to call `stream.pause()` on creation, and then `stream.resume()` once you
-are ready to respond to the `end` event.
-
-### Emit `end` When Asked
-
-One hazard of immediately emitting `'end'` is that you may not yet have had
-a chance to add a listener. In order to avoid this hazard, Minipass
-streams safely re-emit the `'end'` event if a new listener is added after
-`'end'` has been emitted.
-
-Ie, if you do `stream.on('end', someFunction)`, and the stream has already
-emitted `end`, then it will call the handler right away. (You can think of
-this somewhat like attaching a new `.then(fn)` to a previously-resolved
-Promise.)
-
-To prevent calling handlers multiple times who would not expect multiple
-ends to occur, all listeners are removed from the `'end'` event whenever it
-is emitted.
-
-### Impact of "immediate flow" on Tee-streams
-
-A "tee stream" is a stream piping to multiple destinations:
-
-```js
-const tee = new Minipass()
-t.pipe(dest1)
-t.pipe(dest2)
-t.write('foo') // goes to both destinations
-```
-
-Since Minipass streams _immediately_ process any pending data through the
-pipeline when a new pipe destination is added, this can have surprising
-effects, especially when a stream comes in from some other function and may
-or may not have data in its buffer.
-
-```js
-// WARNING! WILL LOSE DATA!
-const src = new Minipass()
-src.write('foo')
-src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone
-src.pipe(dest2) // gets nothing!
-```
-
-The solution is to create a dedicated tee-stream junction that pipes to
-both locations, and then pipe to _that_ instead.
-
-```js
-// Safe example: tee to both places
-const src = new Minipass()
-src.write('foo')
-const tee = new Minipass()
-tee.pipe(dest1)
-tee.pipe(dest2)
-stream.pipe(tee) // tee gets 'foo', pipes to both locations
-```
-
-The same caveat applies to `on('data')` event listeners. The first one
-added will _immediately_ receive all of the data, leaving nothing for the
-second:
-
-```js
-// WARNING! WILL LOSE DATA!
-const src = new Minipass()
-src.write('foo')
-src.on('data', handler1) // receives 'foo' right away
-src.on('data', handler2) // nothing to see here!
-```
-
-Using a dedicated tee-stream can be used in this case as well:
-
-```js
-// Safe example: tee to both data handlers
-const src = new Minipass()
-src.write('foo')
-const tee = new Minipass()
-tee.on('data', handler1)
-tee.on('data', handler2)
-src.pipe(tee)
-```
-
-## USAGE
-
-It's a stream! Use it like a stream and it'll most likely do what you want.
-
-```js
-const Minipass = require('minipass')
-const mp = new Minipass(options) // optional: { encoding, objectMode }
-mp.write('foo')
-mp.pipe(someOtherStream)
-mp.end('bar')
-```
-
-### OPTIONS
-
-* `encoding` How would you like the data coming _out_ of the stream to be
- encoded? Accepts any values that can be passed to `Buffer.toString()`.
-* `objectMode` Emit data exactly as it comes in. This will be flipped on
- by default if you write() something other than a string or Buffer at any
- point. Setting `objectMode: true` will prevent setting any encoding
- value.
-
-### API
-
-Implements the user-facing portions of Node.js's `Readable` and `Writable`
-streams.
-
-### Methods
-
-* `write(chunk, [encoding], [callback])` - Put data in. (Note that, in the
- base Minipass class, the same data will come out.) Returns `false` if
- the stream will buffer the next write, or true if it's still in
- "flowing" mode.
-* `end([chunk, [encoding]], [callback])` - Signal that you have no more
- data to write. This will queue an `end` event to be fired when all the
- data has been consumed.
-* `setEncoding(encoding)` - Set the encoding for data coming of the
- stream. This can only be done once.
-* `pause()` - No more data for a while, please. This also prevents `end`
- from being emitted for empty streams until the stream is resumed.
-* `resume()` - Resume the stream. If there's data in the buffer, it is
- all discarded. Any buffered events are immediately emitted.
-* `pipe(dest)` - Send all output to the stream provided. There is no way
- to unpipe. When data is emitted, it is immediately written to any and
- all pipe destinations.
-* `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are EventEmitters.
- Some events are given special treatment, however. (See below under
- "events".)
-* `promise()` - Returns a Promise that resolves when the stream emits
- `end`, or rejects if the stream emits `error`.
-* `collect()` - Return a Promise that resolves on `end` with an array
- containing each chunk of data that was emitted, or rejects if the
- stream emits `error`. Note that this consumes the stream data.
-* `concat()` - Same as `collect()`, but concatenates the data into a
- single Buffer object. Will reject the returned promise if the stream is
- in objectMode, or if it goes into objectMode by the end of the data.
-* `read(n)` - Consume `n` bytes of data out of the buffer. If `n` is not
- provided, then consume all of it. If `n` bytes are not available, then
- it returns null. **Note** consuming streams in this way is less
- efficient, and can lead to unnecessary Buffer copying.
-* `destroy([er])` - Destroy the stream. If an error is provided, then an
- `'error'` event is emitted. If the stream has a `close()` method, and
- has not emitted a `'close'` event yet, then `stream.close()` will be
- called. Any Promises returned by `.promise()`, `.collect()` or
- `.concat()` will be rejected. After being destroyed, writing to the
- stream will emit an error. No more data will be emitted if the stream is
- destroyed, even if it was previously buffered.
-
-### Properties
-
-* `bufferLength` Read-only. Total number of bytes buffered, or in the case
- of objectMode, the total number of objects.
-* `encoding` The encoding that has been set. (Setting this is equivalent
- to calling `setEncoding(enc)` and has the same prohibition against
- setting multiple times.)
-* `flowing` Read-only. Boolean indicating whether a chunk written to the
- stream will be immediately emitted.
-* `emittedEnd` Read-only. Boolean indicating whether the end-ish events
- (ie, `end`, `prefinish`, `finish`) have been emitted. Note that
- listening on any end-ish event will immediateyl re-emit it if it has
- already been emitted.
-* `writable` Whether the stream is writable. Default `true`. Set to
- `false` when `end()`
-* `readable` Whether the stream is readable. Default `true`.
-* `buffer` A [yallist](http://npm.im/yallist) linked list of chunks written
- to the stream that have not yet been emitted. (It's probably a bad idea
- to mess with this.)
-* `pipes` A [yallist](http://npm.im/yallist) linked list of streams that
- this stream is piping into. (It's probably a bad idea to mess with
- this.)
-* `destroyed` A getter that indicates whether the stream was destroyed.
-* `paused` True if the stream has been explicitly paused, otherwise false.
-* `objectMode` Indicates whether the stream is in `objectMode`. Once set
- to `true`, it cannot be set to `false`.
-
-### Events
-
-* `data` Emitted when there's data to read. Argument is the data to read.
- This is never emitted while not flowing. If a listener is attached, that
- will resume the stream.
-* `end` Emitted when there's no more data to read. This will be emitted
- immediately for empty streams when `end()` is called. If a listener is
- attached, and `end` was already emitted, then it will be emitted again.
- All listeners are removed when `end` is emitted.
-* `prefinish` An end-ish event that follows the same logic as `end` and is
- emitted in the same conditions where `end` is emitted. Emitted after
- `'end'`.
-* `finish` An end-ish event that follows the same logic as `end` and is
- emitted in the same conditions where `end` is emitted. Emitted after
- `'prefinish'`.
-* `close` An indication that an underlying resource has been released.
- Minipass does not emit this event, but will defer it until after `end`
- has been emitted, since it throws off some stream libraries otherwise.
-* `drain` Emitted when the internal buffer empties, and it is again
- suitable to `write()` into the stream.
-* `readable` Emitted when data is buffered and ready to be read by a
- consumer.
-* `resume` Emitted when stream changes state from buffering to flowing
- mode. (Ie, when `resume` is called, `pipe` is called, or a `data` event
- listener is added.)
-
-### Static Methods
-
-* `Minipass.isStream(stream)` Returns `true` if the argument is a stream,
- and false otherwise. To be considered a stream, the object must be
- either an instance of Minipass, or an EventEmitter that has either a
- `pipe()` method, or both `write()` and `end()` methods. (Pretty much any
- stream in node-land will return `true` for this.)
-
-## EXAMPLES
-
-Here are some examples of things you can do with Minipass streams.
-
-### simple "are you done yet" promise
-
-```js
-mp.promise().then(() => {
- // stream is finished
-}, er => {
- // stream emitted an error
-})
-```
-
-### collecting
-
-```js
-mp.collect().then(all => {
- // all is an array of all the data emitted
- // encoding is supported in this case, so
- // so the result will be a collection of strings if
- // an encoding is specified, or buffers/objects if not.
- //
- // In an async function, you may do
- // const data = await stream.collect()
-})
-```
-
-### collecting into a single blob
-
-This is a bit slower because it concatenates the data into one chunk for
-you, but if you're going to do it yourself anyway, it's convenient this
-way:
-
-```js
-mp.concat().then(onebigchunk => {
- // onebigchunk is a string if the stream
- // had an encoding set, or a buffer otherwise.
-})
-```
-
-### iteration
-
-You can iterate over streams synchronously or asynchronously in
-platforms that support it.
-
-Synchronous iteration will end when the currently available data is
-consumed, even if the `end` event has not been reached. In string and
-buffer mode, the data is concatenated, so unless multiple writes are
-occurring in the same tick as the `read()`, sync iteration loops will
-generally only have a single iteration.
-
-To consume chunks in this way exactly as they have been written, with
-no flattening, create the stream with the `{ objectMode: true }`
-option.
-
-```js
-const mp = new Minipass({ objectMode: true })
-mp.write('a')
-mp.write('b')
-for (let letter of mp) {
- console.log(letter) // a, b
-}
-mp.write('c')
-mp.write('d')
-for (let letter of mp) {
- console.log(letter) // c, d
-}
-mp.write('e')
-mp.end()
-for (let letter of mp) {
- console.log(letter) // e
-}
-for (let letter of mp) {
- console.log(letter) // nothing
-}
-```
-
-Asynchronous iteration will continue until the end event is reached,
-consuming all of the data.
-
-```js
-const mp = new Minipass({ encoding: 'utf8' })
-
-// some source of some data
-let i = 5
-const inter = setInterval(() => {
- if (i --> 0)
- mp.write(Buffer.from('foo\n', 'utf8'))
- else {
- mp.end()
- clearInterval(inter)
- }
-}, 100)
-
-// consume the data with asynchronous iteration
-async function consume () {
- for await (let chunk of mp) {
- console.log(chunk)
- }
- return 'ok'
-}
-
-consume().then(res => console.log(res))
-// logs `foo\n` 5 times, and then `ok`
-```
-
-### subclass that `console.log()`s everything written into it
-
-```js
-class Logger extends Minipass {
- write (chunk, encoding, callback) {
- console.log('WRITE', chunk, encoding)
- return super.write(chunk, encoding, callback)
- }
- end (chunk, encoding, callback) {
- console.log('END', chunk, encoding)
- return super.end(chunk, encoding, callback)
- }
-}
-
-someSource.pipe(new Logger()).pipe(someDest)
-```
-
-### same thing, but using an inline anonymous class
-
-```js
-// js classes are fun
-someSource
- .pipe(new (class extends Minipass {
- emit (ev, ...data) {
- // let's also log events, because debugging some weird thing
- console.log('EMIT', ev)
- return super.emit(ev, ...data)
- }
- write (chunk, encoding, callback) {
- console.log('WRITE', chunk, encoding)
- return super.write(chunk, encoding, callback)
- }
- end (chunk, encoding, callback) {
- console.log('END', chunk, encoding)
- return super.end(chunk, encoding, callback)
- }
- }))
- .pipe(someDest)
-```
-
-### subclass that defers 'end' for some reason
-
-```js
-class SlowEnd extends Minipass {
- emit (ev, ...args) {
- if (ev === 'end') {
- console.log('going to end, hold on a sec')
- setTimeout(() => {
- console.log('ok, ready to end now')
- super.emit('end', ...args)
- }, 100)
- } else {
- return super.emit(ev, ...args)
- }
- }
-}
-```
-
-### transform that creates newline-delimited JSON
-
-```js
-class NDJSONEncode extends Minipass {
- write (obj, cb) {
- try {
- // JSON.stringify can throw, emit an error on that
- return super.write(JSON.stringify(obj) + '\n', 'utf8', cb)
- } catch (er) {
- this.emit('error', er)
- }
- }
- end (obj, cb) {
- if (typeof obj === 'function') {
- cb = obj
- obj = undefined
- }
- if (obj !== undefined) {
- this.write(obj)
- }
- return super.end(cb)
- }
-}
-```
-
-### transform that parses newline-delimited JSON
-
-```js
-class NDJSONDecode extends Minipass {
- constructor (options) {
- // always be in object mode, as far as Minipass is concerned
- super({ objectMode: true })
- this._jsonBuffer = ''
- }
- write (chunk, encoding, cb) {
- if (typeof chunk === 'string' &&
- typeof encoding === 'string' &&
- encoding !== 'utf8') {
- chunk = Buffer.from(chunk, encoding).toString()
- } else if (Buffer.isBuffer(chunk))
- chunk = chunk.toString()
- }
- if (typeof encoding === 'function') {
- cb = encoding
- }
- const jsonData = (this._jsonBuffer + chunk).split('\n')
- this._jsonBuffer = jsonData.pop()
- for (let i = 0; i < jsonData.length; i++) {
- let parsed
- try {
- super.write(parsed)
- } catch (er) {
- this.emit('error', er)
- continue
- }
- }
- if (cb)
- cb()
- }
-}
-```
diff --git a/node_modules/@npmcli/run-script/node_modules/minipass/index.js b/node_modules/@npmcli/run-script/node_modules/minipass/index.js
deleted file mode 100644
index c072352d4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minipass/index.js
+++ /dev/null
@@ -1,537 +0,0 @@
-'use strict'
-const EE = require('events')
-const Yallist = require('yallist')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
- || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
- || Symbol('iterator not implemented')
-
-// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from
-// or Buffer.alloc, and Buffer in node 10 deprecated the ctor.
-// .M, this is fine .\^/M..
-const B = Buffer.alloc ? Buffer
- : /* istanbul ignore next */ require('safe-buffer').Buffer
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
- ev === 'end' ||
- ev === 'finish' ||
- ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
- typeof b === 'object' &&
- b.constructor &&
- b.constructor.name === 'ArrayBuffer' &&
- b.byteLength >= 0
-
-const isArrayBufferView = b => !B.isBuffer(b) && ArrayBuffer.isView(b)
-
-module.exports = class Minipass extends EE {
- constructor (options) {
- super()
- this[FLOWING] = false
- // whether we're explicitly paused
- this[PAUSED] = false
- this.pipes = new Yallist()
- this.buffer = new Yallist()
- this[OBJECTMODE] = options && options.objectMode || false
- if (this[OBJECTMODE])
- this[ENCODING] = null
- else
- this[ENCODING] = options && options.encoding || null
- if (this[ENCODING] === 'buffer')
- this[ENCODING] = null
- this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
- this[EOF] = false
- this[EMITTED_END] = false
- this[EMITTING_END] = false
- this[CLOSED] = false
- this.writable = true
- this.readable = true
- this[BUFFERLENGTH] = 0
- this[DESTROYED] = false
- }
-
- get bufferLength () { return this[BUFFERLENGTH] }
-
- get encoding () { return this[ENCODING] }
- set encoding (enc) {
- if (this[OBJECTMODE])
- throw new Error('cannot set encoding in objectMode')
-
- if (this[ENCODING] && enc !== this[ENCODING] &&
- (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
- throw new Error('cannot change encoding')
-
- if (this[ENCODING] !== enc) {
- this[DECODER] = enc ? new SD(enc) : null
- if (this.buffer.length)
- this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
- }
-
- this[ENCODING] = enc
- }
-
- setEncoding (enc) {
- this.encoding = enc
- }
-
- get objectMode () { return this[OBJECTMODE] }
- set objectMode (ॐ ) { this[OBJECTMODE] = this[OBJECTMODE] || !!ॐ }
-
- write (chunk, encoding, cb) {
- if (this[EOF])
- throw new Error('write after end')
-
- if (this[DESTROYED]) {
- this.emit('error', Object.assign(
- new Error('Cannot call write after a stream was destroyed'),
- { code: 'ERR_STREAM_DESTROYED' }
- ))
- return true
- }
-
- if (typeof encoding === 'function')
- cb = encoding, encoding = 'utf8'
-
- if (!encoding)
- encoding = 'utf8'
-
- // convert array buffers and typed array views into buffers
- // at some point in the future, we may want to do the opposite!
- // leave strings and buffers as-is
- // anything else switches us into object mode
- if (!this[OBJECTMODE] && !B.isBuffer(chunk)) {
- if (isArrayBufferView(chunk))
- chunk = B.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
- else if (isArrayBuffer(chunk))
- chunk = B.from(chunk)
- else if (typeof chunk !== 'string')
- // use the setter so we throw if we have encoding set
- this.objectMode = true
- }
-
- // this ensures at this point that the chunk is a buffer or string
- // don't buffer it up or send it to the decoder
- if (!this.objectMode && !chunk.length) {
- const ret = this.flowing
- if (this[BUFFERLENGTH] !== 0)
- this.emit('readable')
- if (cb)
- cb()
- return ret
- }
-
- // fast-path writing strings of same encoding to a stream with
- // an empty buffer, skipping the buffer/decoder dance
- if (typeof chunk === 'string' && !this[OBJECTMODE] &&
- // unless it is a string already ready for us to use
- !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
- chunk = B.from(chunk, encoding)
- }
-
- if (B.isBuffer(chunk) && this[ENCODING])
- chunk = this[DECODER].write(chunk)
-
- try {
- return this.flowing
- ? (this.emit('data', chunk), this.flowing)
- : (this[BUFFERPUSH](chunk), false)
- } finally {
- if (this[BUFFERLENGTH] !== 0)
- this.emit('readable')
- if (cb)
- cb()
- }
- }
-
- read (n) {
- if (this[DESTROYED])
- return null
-
- try {
- if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH])
- return null
-
- if (this[OBJECTMODE])
- n = null
-
- if (this.buffer.length > 1 && !this[OBJECTMODE]) {
- if (this.encoding)
- this.buffer = new Yallist([
- Array.from(this.buffer).join('')
- ])
- else
- this.buffer = new Yallist([
- B.concat(Array.from(this.buffer), this[BUFFERLENGTH])
- ])
- }
-
- return this[READ](n || null, this.buffer.head.value)
- } finally {
- this[MAYBE_EMIT_END]()
- }
- }
-
- [READ] (n, chunk) {
- if (n === chunk.length || n === null)
- this[BUFFERSHIFT]()
- else {
- this.buffer.head.value = chunk.slice(n)
- chunk = chunk.slice(0, n)
- this[BUFFERLENGTH] -= n
- }
-
- this.emit('data', chunk)
-
- if (!this.buffer.length && !this[EOF])
- this.emit('drain')
-
- return chunk
- }
-
- end (chunk, encoding, cb) {
- if (typeof chunk === 'function')
- cb = chunk, chunk = null
- if (typeof encoding === 'function')
- cb = encoding, encoding = 'utf8'
- if (chunk)
- this.write(chunk, encoding)
- if (cb)
- this.once('end', cb)
- this[EOF] = true
- this.writable = false
-
- // if we haven't written anything, then go ahead and emit,
- // even if we're not reading.
- // we'll re-emit if a new 'end' listener is added anyway.
- // This makes MP more suitable to write-only use cases.
- if (this.flowing || !this[PAUSED])
- this[MAYBE_EMIT_END]()
- return this
- }
-
- // don't let the internal resume be overwritten
- [RESUME] () {
- if (this[DESTROYED])
- return
-
- this[PAUSED] = false
- this[FLOWING] = true
- this.emit('resume')
- if (this.buffer.length)
- this[FLUSH]()
- else if (this[EOF])
- this[MAYBE_EMIT_END]()
- else
- this.emit('drain')
- }
-
- resume () {
- return this[RESUME]()
- }
-
- pause () {
- this[FLOWING] = false
- this[PAUSED] = true
- }
-
- get destroyed () {
- return this[DESTROYED]
- }
-
- get flowing () {
- return this[FLOWING]
- }
-
- get paused () {
- return this[PAUSED]
- }
-
- [BUFFERPUSH] (chunk) {
- if (this[OBJECTMODE])
- this[BUFFERLENGTH] += 1
- else
- this[BUFFERLENGTH] += chunk.length
- return this.buffer.push(chunk)
- }
-
- [BUFFERSHIFT] () {
- if (this.buffer.length) {
- if (this[OBJECTMODE])
- this[BUFFERLENGTH] -= 1
- else
- this[BUFFERLENGTH] -= this.buffer.head.value.length
- }
- return this.buffer.shift()
- }
-
- [FLUSH] () {
- do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
- if (!this.buffer.length && !this[EOF])
- this.emit('drain')
- }
-
- [FLUSHCHUNK] (chunk) {
- return chunk ? (this.emit('data', chunk), this.flowing) : false
- }
-
- pipe (dest, opts) {
- if (this[DESTROYED])
- return
-
- const ended = this[EMITTED_END]
- opts = opts || {}
- if (dest === process.stdout || dest === process.stderr)
- opts.end = false
- else
- opts.end = opts.end !== false
-
- const p = { dest: dest, opts: opts, ondrain: _ => this[RESUME]() }
- this.pipes.push(p)
-
- dest.on('drain', p.ondrain)
- this[RESUME]()
- // piping an ended stream ends immediately
- if (ended && p.opts.end)
- p.dest.end()
- return dest
- }
-
- addListener (ev, fn) {
- return this.on(ev, fn)
- }
-
- on (ev, fn) {
- try {
- return super.on(ev, fn)
- } finally {
- if (ev === 'data' && !this.pipes.length && !this.flowing)
- this[RESUME]()
- else if (isEndish(ev) && this[EMITTED_END]) {
- super.emit(ev)
- this.removeAllListeners(ev)
- }
- }
- }
-
- get emittedEnd () {
- return this[EMITTED_END]
- }
-
- [MAYBE_EMIT_END] () {
- if (!this[EMITTING_END] &&
- !this[EMITTED_END] &&
- !this[DESTROYED] &&
- this.buffer.length === 0 &&
- this[EOF]) {
- this[EMITTING_END] = true
- this.emit('end')
- this.emit('prefinish')
- this.emit('finish')
- if (this[CLOSED])
- this.emit('close')
- this[EMITTING_END] = false
- }
- }
-
- emit (ev, data) {
- // error and close are only events allowed after calling destroy()
- if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
- return
- else if (ev === 'data') {
- if (!data)
- return
-
- if (this.pipes.length)
- this.pipes.forEach(p =>
- p.dest.write(data) === false && this.pause())
- } else if (ev === 'end') {
- // only actual end gets this treatment
- if (this[EMITTED_END] === true)
- return
-
- this[EMITTED_END] = true
- this.readable = false
-
- if (this[DECODER]) {
- data = this[DECODER].end()
- if (data) {
- this.pipes.forEach(p => p.dest.write(data))
- super.emit('data', data)
- }
- }
-
- this.pipes.forEach(p => {
- p.dest.removeListener('drain', p.ondrain)
- if (p.opts.end)
- p.dest.end()
- })
- } else if (ev === 'close') {
- this[CLOSED] = true
- // don't emit close before 'end' and 'finish'
- if (!this[EMITTED_END] && !this[DESTROYED])
- return
- }
-
- // TODO: replace with a spread operator when Node v4 support drops
- const args = new Array(arguments.length)
- args[0] = ev
- args[1] = data
- if (arguments.length > 2) {
- for (let i = 2; i < arguments.length; i++) {
- args[i] = arguments[i]
- }
- }
-
- try {
- return super.emit.apply(this, args)
- } finally {
- if (!isEndish(ev))
- this[MAYBE_EMIT_END]()
- else
- this.removeAllListeners(ev)
- }
- }
-
- // const all = await stream.collect()
- collect () {
- const buf = []
- buf.dataLength = 0
- this.on('data', c => {
- buf.push(c)
- buf.dataLength += c.length
- })
- return this.promise().then(() => buf)
- }
-
- // const data = await stream.concat()
- concat () {
- return this[OBJECTMODE]
- ? Promise.reject(new Error('cannot concat in objectMode'))
- : this.collect().then(buf =>
- this[OBJECTMODE]
- ? Promise.reject(new Error('cannot concat in objectMode'))
- : this[ENCODING] ? buf.join('') : B.concat(buf, buf.dataLength))
- }
-
- // stream.promise().then(() => done, er => emitted error)
- promise () {
- return new Promise((resolve, reject) => {
- this.on(DESTROYED, () => reject(new Error('stream destroyed')))
- this.on('end', () => resolve())
- this.on('error', er => reject(er))
- })
- }
-
- // for await (let chunk of stream)
- [ASYNCITERATOR] () {
- const next = () => {
- const res = this.read()
- if (res !== null)
- return Promise.resolve({ done: false, value: res })
-
- if (this[EOF])
- return Promise.resolve({ done: true })
-
- let resolve = null
- let reject = null
- const onerr = er => {
- this.removeListener('data', ondata)
- this.removeListener('end', onend)
- reject(er)
- }
- const ondata = value => {
- this.removeListener('error', onerr)
- this.removeListener('end', onend)
- this.pause()
- resolve({ value: value, done: !!this[EOF] })
- }
- const onend = () => {
- this.removeListener('error', onerr)
- this.removeListener('data', ondata)
- resolve({ done: true })
- }
- const ondestroy = () => onerr(new Error('stream destroyed'))
- return new Promise((res, rej) => {
- reject = rej
- resolve = res
- this.once(DESTROYED, ondestroy)
- this.once('error', onerr)
- this.once('end', onend)
- this.once('data', ondata)
- })
- }
-
- return { next }
- }
-
- // for (let chunk of stream)
- [ITERATOR] () {
- const next = () => {
- const value = this.read()
- const done = value === null
- return { value, done }
- }
- return { next }
- }
-
- destroy (er) {
- if (this[DESTROYED]) {
- if (er)
- this.emit('error', er)
- else
- this.emit(DESTROYED)
- return this
- }
-
- this[DESTROYED] = true
-
- // throw away all buffered data, it's never coming out
- this.buffer = new Yallist()
- this[BUFFERLENGTH] = 0
-
- if (typeof this.close === 'function' && !this[CLOSED])
- this.close()
-
- if (er)
- this.emit('error', er)
- else // if no error to emit, still reject pending promises
- this.emit(DESTROYED)
-
- return this
- }
-
- static isStream (s) {
- return !!s && (s instanceof Minipass || s instanceof EE && (
- typeof s.pipe === 'function' || // readable
- (typeof s.write === 'function' && typeof s.end === 'function') // writable
- ))
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/minipass/package.json b/node_modules/@npmcli/run-script/node_modules/minipass/package.json
deleted file mode 100644
index c38dd409e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minipass/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "_from": "minipass@^2.8.6",
- "_id": "minipass@2.9.0",
- "_inBundle": false,
- "_integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
- "_location": "/@npmcli/run-script/minipass",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "minipass@^2.8.6",
- "name": "minipass",
- "escapedName": "minipass",
- "rawSpec": "^2.8.6",
- "saveSpec": null,
- "fetchSpec": "^2.8.6"
- },
- "_requiredBy": [
- "/@npmcli/run-script/fs-minipass",
- "/@npmcli/run-script/minizlib",
- "/@npmcli/run-script/tar"
- ],
- "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
- "_shasum": "e713762e7d3e32fed803115cf93e04bca9fcc9a6",
- "_spec": "minipass@^2.8.6",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script/node_modules/tar",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/minipass/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.0"
- },
- "deprecated": false,
- "description": "minimal implementation of a PassThrough stream",
- "devDependencies": {
- "end-of-stream": "^1.4.0",
- "tap": "^14.6.5",
- "through2": "^2.0.3"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/minipass#readme",
- "keywords": [
- "passthrough",
- "stream"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "minipass",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/minipass.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true
- },
- "version": "2.9.0"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/minizlib/LICENSE b/node_modules/@npmcli/run-script/node_modules/minizlib/LICENSE
deleted file mode 100644
index ffce7383f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minizlib/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Minizlib was created by Isaac Z. Schlueter.
-It is a derivative work of the Node.js project.
-
-"""
-Copyright Isaac Z. Schlueter and Contributors
-Copyright Node.js contributors. All rights reserved.
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-"""
diff --git a/node_modules/@npmcli/run-script/node_modules/minizlib/README.md b/node_modules/@npmcli/run-script/node_modules/minizlib/README.md
deleted file mode 100644
index 4097b8522..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minizlib/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# minizlib
-
-A fast zlib stream built on [minipass](http://npm.im/minipass) and
-Node.js's zlib binding.
-
-This module was created to serve the needs of
-[node-tar](http://npm.im/tar) and
-[minipass-fetch](http://npm.im/minipass-fetch).
-
-Brotli is supported in versions of node with a Brotli binding.
-
-## How does this differ from the streams in `require('zlib')`?
-
-First, there are no convenience methods to compress or decompress a
-buffer. If you want those, use the built-in `zlib` module. This is
-only streams. That being said, Minipass streams to make it fairly easy to
-use as one-liners: `new zlib.Deflate().end(data).read()` will return the
-deflate compressed result.
-
-This module compresses and decompresses the data as fast as you feed
-it in. It is synchronous, and runs on the main process thread. Zlib
-and Brotli operations can be high CPU, but they're very fast, and doing it
-this way means much less bookkeeping and artificial deferral.
-
-Node's built in zlib streams are built on top of `stream.Transform`.
-They do the maximally safe thing with respect to consistent
-asynchrony, buffering, and backpressure.
-
-See [Minipass](http://npm.im/minipass) for more on the differences between
-Node.js core streams and Minipass streams, and the convenience methods
-provided by that class.
-
-## Classes
-
-- Deflate
-- Inflate
-- Gzip
-- Gunzip
-- DeflateRaw
-- InflateRaw
-- Unzip
-- BrotliCompress (Node v10 and higher)
-- BrotliDecompress (Node v10 and higher)
-
-## USAGE
-
-```js
-const zlib = require('minizlib')
-const input = sourceOfCompressedData()
-const decode = new zlib.BrotliDecompress()
-const output = whereToWriteTheDecodedData()
-input.pipe(decode).pipe(output)
-```
diff --git a/node_modules/@npmcli/run-script/node_modules/minizlib/constants.js b/node_modules/@npmcli/run-script/node_modules/minizlib/constants.js
deleted file mode 100644
index 641ebc731..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minizlib/constants.js
+++ /dev/null
@@ -1,115 +0,0 @@
-// Update with any zlib constants that are added or changed in the future.
-// Node v6 didn't export this, so we just hard code the version and rely
-// on all the other hard-coded values from zlib v4736. When node v6
-// support drops, we can just export the realZlibConstants object.
-const realZlibConstants = require('zlib').constants ||
- /* istanbul ignore next */ { ZLIB_VERNUM: 4736 }
-
-module.exports = Object.freeze(Object.assign(Object.create(null), {
- Z_NO_FLUSH: 0,
- Z_PARTIAL_FLUSH: 1,
- Z_SYNC_FLUSH: 2,
- Z_FULL_FLUSH: 3,
- Z_FINISH: 4,
- Z_BLOCK: 5,
- Z_OK: 0,
- Z_STREAM_END: 1,
- Z_NEED_DICT: 2,
- Z_ERRNO: -1,
- Z_STREAM_ERROR: -2,
- Z_DATA_ERROR: -3,
- Z_MEM_ERROR: -4,
- Z_BUF_ERROR: -5,
- Z_VERSION_ERROR: -6,
- Z_NO_COMPRESSION: 0,
- Z_BEST_SPEED: 1,
- Z_BEST_COMPRESSION: 9,
- Z_DEFAULT_COMPRESSION: -1,
- Z_FILTERED: 1,
- Z_HUFFMAN_ONLY: 2,
- Z_RLE: 3,
- Z_FIXED: 4,
- Z_DEFAULT_STRATEGY: 0,
- DEFLATE: 1,
- INFLATE: 2,
- GZIP: 3,
- GUNZIP: 4,
- DEFLATERAW: 5,
- INFLATERAW: 6,
- UNZIP: 7,
- BROTLI_DECODE: 8,
- BROTLI_ENCODE: 9,
- Z_MIN_WINDOWBITS: 8,
- Z_MAX_WINDOWBITS: 15,
- Z_DEFAULT_WINDOWBITS: 15,
- Z_MIN_CHUNK: 64,
- Z_MAX_CHUNK: Infinity,
- Z_DEFAULT_CHUNK: 16384,
- Z_MIN_MEMLEVEL: 1,
- Z_MAX_MEMLEVEL: 9,
- Z_DEFAULT_MEMLEVEL: 8,
- Z_MIN_LEVEL: -1,
- Z_MAX_LEVEL: 9,
- Z_DEFAULT_LEVEL: -1,
- BROTLI_OPERATION_PROCESS: 0,
- BROTLI_OPERATION_FLUSH: 1,
- BROTLI_OPERATION_FINISH: 2,
- BROTLI_OPERATION_EMIT_METADATA: 3,
- BROTLI_MODE_GENERIC: 0,
- BROTLI_MODE_TEXT: 1,
- BROTLI_MODE_FONT: 2,
- BROTLI_DEFAULT_MODE: 0,
- BROTLI_MIN_QUALITY: 0,
- BROTLI_MAX_QUALITY: 11,
- BROTLI_DEFAULT_QUALITY: 11,
- BROTLI_MIN_WINDOW_BITS: 10,
- BROTLI_MAX_WINDOW_BITS: 24,
- BROTLI_LARGE_MAX_WINDOW_BITS: 30,
- BROTLI_DEFAULT_WINDOW: 22,
- BROTLI_MIN_INPUT_BLOCK_BITS: 16,
- BROTLI_MAX_INPUT_BLOCK_BITS: 24,
- BROTLI_PARAM_MODE: 0,
- BROTLI_PARAM_QUALITY: 1,
- BROTLI_PARAM_LGWIN: 2,
- BROTLI_PARAM_LGBLOCK: 3,
- BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
- BROTLI_PARAM_SIZE_HINT: 5,
- BROTLI_PARAM_LARGE_WINDOW: 6,
- BROTLI_PARAM_NPOSTFIX: 7,
- BROTLI_PARAM_NDIRECT: 8,
- BROTLI_DECODER_RESULT_ERROR: 0,
- BROTLI_DECODER_RESULT_SUCCESS: 1,
- BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
- BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
- BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
- BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
- BROTLI_DECODER_NO_ERROR: 0,
- BROTLI_DECODER_SUCCESS: 1,
- BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
- BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
- BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
- BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
- BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
- BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
- BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
- BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
- BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
- BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
- BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
- BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
- BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
- BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
- BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
- BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
- BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
- BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
- BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
- BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
- BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
- BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
- BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
- BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
- BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
- BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
- BROTLI_DECODER_ERROR_UNREACHABLE: -31,
-}, realZlibConstants))
diff --git a/node_modules/@npmcli/run-script/node_modules/minizlib/index.js b/node_modules/@npmcli/run-script/node_modules/minizlib/index.js
deleted file mode 100644
index 295047b9c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minizlib/index.js
+++ /dev/null
@@ -1,320 +0,0 @@
-'use strict'
-
-const assert = require('assert')
-const Buffer = require('buffer').Buffer
-const realZlib = require('zlib')
-
-const constants = exports.constants = require('./constants.js')
-const Minipass = require('minipass')
-
-const OriginalBufferConcat = Buffer.concat
-
-class ZlibError extends Error {
- constructor (err) {
- super('zlib: ' + err.message)
- this.code = err.code
- this.errno = err.errno
- /* istanbul ignore if */
- if (!this.code)
- this.code = 'ZLIB_ERROR'
-
- this.message = 'zlib: ' + err.message
- Error.captureStackTrace(this, this.constructor)
- }
-
- get name () {
- return 'ZlibError'
- }
-}
-
-// the Zlib class they all inherit from
-// This thing manages the queue of requests, and returns
-// true or false if there is anything in the queue when
-// you call the .write() method.
-const _opts = Symbol('opts')
-const _flushFlag = Symbol('flushFlag')
-const _finishFlushFlag = Symbol('finishFlushFlag')
-const _fullFlushFlag = Symbol('fullFlushFlag')
-const _handle = Symbol('handle')
-const _onError = Symbol('onError')
-const _sawError = Symbol('sawError')
-const _level = Symbol('level')
-const _strategy = Symbol('strategy')
-const _ended = Symbol('ended')
-const _defaultFullFlush = Symbol('_defaultFullFlush')
-
-class ZlibBase extends Minipass {
- constructor (opts, mode) {
- if (!opts || typeof opts !== 'object')
- throw new TypeError('invalid options for ZlibBase constructor')
-
- super(opts)
- this[_ended] = false
- this[_opts] = opts
-
- this[_flushFlag] = opts.flush
- this[_finishFlushFlag] = opts.finishFlush
- // this will throw if any options are invalid for the class selected
- try {
- this[_handle] = new realZlib[mode](opts)
- } catch (er) {
- // make sure that all errors get decorated properly
- throw new ZlibError(er)
- }
-
- this[_onError] = (err) => {
- this[_sawError] = true
- // there is no way to cleanly recover.
- // continuing only obscures problems.
- this.close()
- this.emit('error', err)
- }
-
- this[_handle].on('error', er => this[_onError](new ZlibError(er)))
- this.once('end', () => this.close)
- }
-
- close () {
- if (this[_handle]) {
- this[_handle].close()
- this[_handle] = null
- this.emit('close')
- }
- }
-
- reset () {
- if (!this[_sawError]) {
- assert(this[_handle], 'zlib binding closed')
- return this[_handle].reset()
- }
- }
-
- flush (flushFlag) {
- if (this.ended)
- return
-
- if (typeof flushFlag !== 'number')
- flushFlag = this[_fullFlushFlag]
- this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag }))
- }
-
- end (chunk, encoding, cb) {
- if (chunk)
- this.write(chunk, encoding)
- this.flush(this[_finishFlushFlag])
- this[_ended] = true
- return super.end(null, null, cb)
- }
-
- get ended () {
- return this[_ended]
- }
-
- write (chunk, encoding, cb) {
- // process the chunk using the sync process
- // then super.write() all the outputted chunks
- if (typeof encoding === 'function')
- cb = encoding, encoding = 'utf8'
-
- if (typeof chunk === 'string')
- chunk = Buffer.from(chunk, encoding)
-
- if (this[_sawError])
- return
- assert(this[_handle], 'zlib binding closed')
-
- // _processChunk tries to .close() the native handle after it's done, so we
- // intercept that by temporarily making it a no-op.
- const nativeHandle = this[_handle]._handle
- const originalNativeClose = nativeHandle.close
- nativeHandle.close = () => {}
- const originalClose = this[_handle].close
- this[_handle].close = () => {}
- // It also calls `Buffer.concat()` at the end, which may be convenient
- // for some, but which we are not interested in as it slows us down.
- Buffer.concat = (args) => args
- let result
- try {
- const flushFlag = typeof chunk[_flushFlag] === 'number'
- ? chunk[_flushFlag] : this[_flushFlag]
- result = this[_handle]._processChunk(chunk, flushFlag)
- // if we don't throw, reset it back how it was
- Buffer.concat = OriginalBufferConcat
- } catch (err) {
- // or if we do, put Buffer.concat() back before we emit error
- // Error events call into user code, which may call Buffer.concat()
- Buffer.concat = OriginalBufferConcat
- this[_onError](new ZlibError(err))
- } finally {
- if (this[_handle]) {
- // Core zlib resets `_handle` to null after attempting to close the
- // native handle. Our no-op handler prevented actual closure, but we
- // need to restore the `._handle` property.
- this[_handle]._handle = nativeHandle
- nativeHandle.close = originalNativeClose
- this[_handle].close = originalClose
- // `_processChunk()` adds an 'error' listener. If we don't remove it
- // after each call, these handlers start piling up.
- this[_handle].removeAllListeners('error')
- }
- }
-
- let writeReturn
- if (result) {
- if (Array.isArray(result) && result.length > 0) {
- // The first buffer is always `handle._outBuffer`, which would be
- // re-used for later invocations; so, we always have to copy that one.
- writeReturn = super.write(Buffer.from(result[0]))
- for (let i = 1; i < result.length; i++) {
- writeReturn = super.write(result[i])
- }
- } else {
- writeReturn = super.write(Buffer.from(result))
- }
- }
-
- if (cb)
- cb()
- return writeReturn
- }
-}
-
-class Zlib extends ZlibBase {
- constructor (opts, mode) {
- opts = opts || {}
-
- opts.flush = opts.flush || constants.Z_NO_FLUSH
- opts.finishFlush = opts.finishFlush || constants.Z_FINISH
- super(opts, mode)
-
- this[_fullFlushFlag] = constants.Z_FULL_FLUSH
- this[_level] = opts.level
- this[_strategy] = opts.strategy
- }
-
- params (level, strategy) {
- if (this[_sawError])
- return
-
- if (!this[_handle])
- throw new Error('cannot switch params when binding is closed')
-
- // no way to test this without also not supporting params at all
- /* istanbul ignore if */
- if (!this[_handle].params)
- throw new Error('not supported in this implementation')
-
- if (this[_level] !== level || this[_strategy] !== strategy) {
- this.flush(constants.Z_SYNC_FLUSH)
- assert(this[_handle], 'zlib binding closed')
- // .params() calls .flush(), but the latter is always async in the
- // core zlib. We override .flush() temporarily to intercept that and
- // flush synchronously.
- const origFlush = this[_handle].flush
- this[_handle].flush = (flushFlag, cb) => {
- this.flush(flushFlag)
- cb()
- }
- try {
- this[_handle].params(level, strategy)
- } finally {
- this[_handle].flush = origFlush
- }
- /* istanbul ignore else */
- if (this[_handle]) {
- this[_level] = level
- this[_strategy] = strategy
- }
- }
- }
-}
-
-// minimal 2-byte header
-class Deflate extends Zlib {
- constructor (opts) {
- super(opts, 'Deflate')
- }
-}
-
-class Inflate extends Zlib {
- constructor (opts) {
- super(opts, 'Inflate')
- }
-}
-
-// gzip - bigger header, same deflate compression
-class Gzip extends Zlib {
- constructor (opts) {
- super(opts, 'Gzip')
- }
-}
-
-class Gunzip extends Zlib {
- constructor (opts) {
- super(opts, 'Gunzip')
- }
-}
-
-// raw - no header
-class DeflateRaw extends Zlib {
- constructor (opts) {
- super(opts, 'DeflateRaw')
- }
-}
-
-class InflateRaw extends Zlib {
- constructor (opts) {
- super(opts, 'InflateRaw')
- }
-}
-
-// auto-detect header.
-class Unzip extends Zlib {
- constructor (opts) {
- super(opts, 'Unzip')
- }
-}
-
-class Brotli extends ZlibBase {
- constructor (opts, mode) {
- opts = opts || {}
-
- opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS
- opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH
-
- super(opts, mode)
-
- this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH
- }
-}
-
-class BrotliCompress extends Brotli {
- constructor (opts) {
- super(opts, 'BrotliCompress')
- }
-}
-
-class BrotliDecompress extends Brotli {
- constructor (opts) {
- super(opts, 'BrotliDecompress')
- }
-}
-
-exports.Deflate = Deflate
-exports.Inflate = Inflate
-exports.Gzip = Gzip
-exports.Gunzip = Gunzip
-exports.DeflateRaw = DeflateRaw
-exports.InflateRaw = InflateRaw
-exports.Unzip = Unzip
-/* istanbul ignore else */
-if (typeof realZlib.BrotliCompress === 'function') {
- exports.BrotliCompress = BrotliCompress
- exports.BrotliDecompress = BrotliDecompress
-} else {
- exports.BrotliCompress = exports.BrotliDecompress = class {
- constructor () {
- throw new Error('Brotli is not supported in this version of Node.js')
- }
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/minizlib/package.json b/node_modules/@npmcli/run-script/node_modules/minizlib/package.json
deleted file mode 100644
index 75eeb01e3..000000000
--- a/node_modules/@npmcli/run-script/node_modules/minizlib/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "_from": "minizlib@^1.2.1",
- "_id": "minizlib@1.3.3",
- "_inBundle": false,
- "_integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
- "_location": "/@npmcli/run-script/minizlib",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "minizlib@^1.2.1",
- "name": "minizlib",
- "escapedName": "minizlib",
- "rawSpec": "^1.2.1",
- "saveSpec": null,
- "fetchSpec": "^1.2.1"
- },
- "_requiredBy": [
- "/@npmcli/run-script/tar"
- ],
- "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
- "_shasum": "2290de96818a34c29551c8a8d301216bd65a861d",
- "_spec": "minizlib@^1.2.1",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script/node_modules/tar",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/minizlib/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "minipass": "^2.9.0"
- },
- "deprecated": false,
- "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.",
- "devDependencies": {
- "tap": "^12.0.1"
- },
- "files": [
- "index.js",
- "constants.js"
- ],
- "homepage": "https://github.com/isaacs/minizlib#readme",
- "keywords": [
- "zlib",
- "gzip",
- "gunzip",
- "deflate",
- "inflate",
- "compression",
- "zip",
- "unzip"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "minizlib",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/minizlib.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --100 -J"
- },
- "version": "1.3.3"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index b5bed7fdd..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-Thank you for reporting an issue. The more information you can give us, the
-better the chance we can fix your problem.
-
-This issue tracker is for issues with node-gyp,
-if you have an issue installing a specific module, please file an issue on
-that module's issue tracker (`npm issues modulename`).
--->
-
-* **Node Version**: <!-- `node -v` and `npm -v` -->
-* **Platform**: <!-- `uname -a` (UNIX), or `systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"` (Windows) -->
-* **Compiler**: <!-- `cc -v` (UNIX) or `msbuild /version & cl` (Windows) -->
-* **Module**: <!-- what you tried to build/install -->
-
-<details><summary>Verbose output (from npm or node-gyp):</summary>
-
-```
-Paste your log here, between the backticks. It can be:
- - npm --verbose output,
- - or contents of npm-debug.log,
- - or output of node-gyp rebuild --verbose.
-```
-
-</details>
-
-<!-- Any further details -->
-
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 10156d89a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,17 +0,0 @@
-<!--
-Thank you for your pull request. Please review the below requirements.
-
-Contributor guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
--->
-
-##### Checklist
-<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
-
-- [ ] `npm install && npm test` passes
-- [ ] tests are included <!-- Bug fixes and new features should include tests -->
-- [ ] documentation is changed or added
-- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)
-
-##### Description of change
-<!-- Provide a description of the change -->
-
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/workflows/Python_tests.yml b/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/workflows/Python_tests.yml
deleted file mode 100644
index dba9d1093..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/.github/workflows/Python_tests.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# TODO: Line 15, enable python-version: 3.5
-# TODO: Line 36, enable pytest --doctest-modules
-
-name: Python_tests
-on: [push, pull_request]
-jobs:
- Python_tests:
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- max-parallel: 15
- matrix:
- os: [macos-latest, ubuntu-latest, windows-latest]
- python-version: [2.7, 3.6, 3.7, 3.8] # 3.5,
- steps:
- - uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install flake8 pytest # -r requirements.txt
- - name: Lint with flake8
- if: matrix.os == 'ubuntu-latest'
- run: |
- # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- - name: Test with pytest (Linux and macOS)
- if: matrix.os != 'windows-latest'
- run: pytest
- - name: Test with pytest (Windows)
- if: matrix.os == 'windows-latest'
- shell: bash
- run: GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
- # - name: Run doctests with pytest
- # run: pytest --doctest-modules
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/.travis.yml b/node_modules/@npmcli/run-script/node_modules/node-gyp/.travis.yml
deleted file mode 100644
index c281373ec..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/.travis.yml
+++ /dev/null
@@ -1,109 +0,0 @@
-dist: xenial
-language: python
-cache: pip
-addons:
- homebrew:
- update: true
- packages:
- - npm
- - pyenv
-jobs:
- include:
- - name: "Python 2.7 on Linux"
- env: NODE_GYP_FORCE_PYTHON=python2
- python: 2.7
-
- - name: "Node.js 6 & Python 3.8 on Linux"
- python: 3.8
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 6
- - name: "Node.js 8 & Python 3.8 on Linux"
- python: 3.8
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 8
- - name: "Node.js 10 & Python 3.8 on Linux"
- python: 3.8
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 10
-
- - name: "Node.js 12 & Python 3.5 on Linux"
- python: 3.5
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 12
- - name: "Node.js 12 & Python 3.6 on Linux"
- python: 3.6
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 12
- - name: "Node.js 12 & Python 3.7 on Linux"
- python: 3.7
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 12
- - name: "Node.js 12 & Python 3.8 on Linux"
- python: 3.8
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: nvm install 12
-
- - name: "Python 2.7 on macOS"
- os: osx
- osx_image: xcode11.2
- language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python2 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=2.7.17
- before_install: pyenv install $PYENV_VERSION
- - name: "Python 3.8 on macOS"
- os: osx
- osx_image: xcode11.2
- language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python3 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=3.8.0
- before_install: pyenv install $PYENV_VERSION
-
- - name: "Node.js 6 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 6 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
- - name: "Node.js 12 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 12 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
-
- - name: "Node.js 12 & Python 3.7 on Windows"
- os: windows
- language: node_js
- node_js: 12 # node
- env: >-
- PATH=/c/Python37:/c/Python37/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe
- before_install: choco install python --version=3.7.4
- - name: "Node.js 12 & Python 3.8 on Windows"
- os: windows
- language: node_js
- node_js: 12 # node
- env: >-
- PATH=/c/Python38:/c/Python38/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python38/python.exe
- before_install: choco install python
-
-install:
- - python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
-before_script:
- - python -m flake8 --version
- # stop the build if there are Python syntax errors or undefined names
- - python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide
- - python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
- - npm install
- - npm list
-script:
- - node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
- - npm test
- - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
-notifications:
- on_success: change
- on_failure: change # `always` will be the setting once code changes slow down
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/CHANGELOG.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/CHANGELOG.md
deleted file mode 100644
index 80da1b1e9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/CHANGELOG.md
+++ /dev/null
@@ -1,420 +0,0 @@
-v6.1.0 2019-01-08
-=================
-
-* [[`9a7dd16b76`](https://github.com/nodejs/node-gyp/commit/9a7dd16b76)] - **doc**: remove backticks from Python version list (Rod Vagg) [#2011](https://github.com/nodejs/node-gyp/pull/2011)
-* [[`26cd6eaea6`](https://github.com/nodejs/node-gyp/commit/26cd6eaea6)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
-* [[`312c12ef4f`](https://github.com/nodejs/node-gyp/commit/312c12ef4f)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
-* [[`f7b6b6b77b`](https://github.com/nodejs/node-gyp/commit/f7b6b6b77b)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-* [[`6b8f2652dd`](https://github.com/nodejs/node-gyp/commit/6b8f2652dd)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
-* [[`20aa0b44f7`](https://github.com/nodejs/node-gyp/commit/20aa0b44f7)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962)
-* [[`14f2a07a39`](https://github.com/nodejs/node-gyp/commit/14f2a07a39)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
-* [[`f242ce4d2c`](https://github.com/nodejs/node-gyp/commit/f242ce4d2c)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
-* [[`3bcba2a01a`](https://github.com/nodejs/node-gyp/commit/3bcba2a01a)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
-* [[`470cc2178e`](https://github.com/nodejs/node-gyp/commit/470cc2178e)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
-* [[`31ecc8421d`](https://github.com/nodejs/node-gyp/commit/31ecc8421d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
-* [[`5a729e86ee`](https://github.com/nodejs/node-gyp/commit/5a729e86ee)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
-* [[`345c70e56d`](https://github.com/nodejs/node-gyp/commit/345c70e56d)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`d6a7e0e1fb`](https://github.com/nodejs/node-gyp/commit/d6a7e0e1fb)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`5a64e9bd32`](https://github.com/nodejs/node-gyp/commit/5a64e9bd32)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-* [[`04da736d38`](https://github.com/nodejs/node-gyp/commit/04da736d38)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961)
-* [[`0670e5189d`](https://github.com/nodejs/node-gyp/commit/0670e5189d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`c506a6a150`](https://github.com/nodejs/node-gyp/commit/c506a6a150)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-
-v6.0.1 2019-11-01
-=================
-
-* [[`8ec2e681d5`](https://github.com/nodejs/node-gyp/commit/8ec2e681d5)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940)
-* [[`1b11be63cc`](https://github.com/nodejs/node-gyp/commit/1b11be63cc)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925)
-* [[`c0282daa48`](https://github.com/nodejs/node-gyp/commit/c0282daa48)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947)
-* [[`d8e09a1b6a`](https://github.com/nodejs/node-gyp/commit/d8e09a1b6a)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944)
-* [[`9c0f3404f0`](https://github.com/nodejs/node-gyp/commit/9c0f3404f0)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939)
-* [[`bb2eb72a3f`](https://github.com/nodejs/node-gyp/commit/bb2eb72a3f)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937)
-* [[`f0693413d9`](https://github.com/nodejs/node-gyp/commit/f0693413d9)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934)
-* [[`c60c22de58`](https://github.com/nodejs/node-gyp/commit/c60c22de58)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920)
-* [[`b91718eefc`](https://github.com/nodejs/node-gyp/commit/b91718eefc)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923)
-* [[`3538a317b6`](https://github.com/nodejs/node-gyp/commit/3538a317b6)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919)
-* [[`4fff8458c0`](https://github.com/nodejs/node-gyp/commit/4fff8458c0)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`60e4488f08`](https://github.com/nodejs/node-gyp/commit/60e4488f08)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`032db2a2d0`](https://github.com/nodejs/node-gyp/commit/032db2a2d0)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926)
-* [[`5a83630c33`](https://github.com/nodejs/node-gyp/commit/5a83630c33)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921)
-
-v6.0.0 2019-10-04
-=================
-
-* [[`dd0e97ef0b`](https://github.com/nodejs/node-gyp/commit/dd0e97ef0b)] - **(SEMVER-MAJOR)** **lib**: try to find `python` after `python3` (Sam Roberts) [#1907](https://github.com/nodejs/node-gyp/pull/1907)
-* [[`f60ed47d14`](https://github.com/nodejs/node-gyp/commit/f60ed47d14)] - **travis**: add Python 3.5 and 3.6 tests on Linux (Christian Clauss) [#1903](https://github.com/nodejs/node-gyp/pull/1903)
-* [[`c763ca1838`](https://github.com/nodejs/node-gyp/commit/c763ca1838)] - **(SEMVER-MAJOR)** **doc**: Declare that node-gyp is Python 3 compatible (cclauss) [#1811](https://github.com/nodejs/node-gyp/pull/1811)
-* [[`3d1c60ab81`](https://github.com/nodejs/node-gyp/commit/3d1c60ab81)] - **(SEMVER-MAJOR)** **lib**: accept Python 3 by default (João Reis) [#1844](https://github.com/nodejs/node-gyp/pull/1844)
-* [[`c6e3b65a23`](https://github.com/nodejs/node-gyp/commit/c6e3b65a23)] - **(SEMVER-MAJOR)** **lib**: raise the minimum Python version from 2.6 to 2.7 (cclauss) [#1818](https://github.com/nodejs/node-gyp/pull/1818)
-
-v5.0.6 2019-12-16
-=================
-
-* [[`cdec00286f`](https://github.com/nodejs/node-gyp/commit/cdec00286f)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919)
-* [[`b7c8233ef2`](https://github.com/nodejs/node-gyp/commit/b7c8233ef2)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961)
-* [[`e12b00ab0a`](https://github.com/nodejs/node-gyp/commit/e12b00ab0a)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962)
-* [[`70b9890c0d`](https://github.com/nodejs/node-gyp/commit/70b9890c0d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`4029fa8629`](https://github.com/nodejs/node-gyp/commit/4029fa8629)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`fe8b02cc8b`](https://github.com/nodejs/node-gyp/commit/fe8b02cc8b)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940)
-* [[`8ea47ce365`](https://github.com/nodejs/node-gyp/commit/8ea47ce365)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925)
-* [[`c7229716ba`](https://github.com/nodejs/node-gyp/commit/c7229716ba)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947)
-* [[`2a18b2a0f8`](https://github.com/nodejs/node-gyp/commit/2a18b2a0f8)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944)
-* [[`70f391e844`](https://github.com/nodejs/node-gyp/commit/70f391e844)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939)
-* [[`9f4f0fa34e`](https://github.com/nodejs/node-gyp/commit/9f4f0fa34e)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937)
-* [[`7cf507906d`](https://github.com/nodejs/node-gyp/commit/7cf507906d)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934)
-* [[`ad0d182c01`](https://github.com/nodejs/node-gyp/commit/ad0d182c01)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920)
-* [[`1553081ed6`](https://github.com/nodejs/node-gyp/commit/1553081ed6)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923)
-* [[`0705cae9aa`](https://github.com/nodejs/node-gyp/commit/0705cae9aa)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`7bfdb6f5bf`](https://github.com/nodejs/node-gyp/commit/7bfdb6f5bf)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`7edf7658fa`](https://github.com/nodejs/node-gyp/commit/7edf7658fa)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926)
-* [[`69056d04fe`](https://github.com/nodejs/node-gyp/commit/69056d04fe)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921)
-
-v5.0.5 2019-10-04
-=================
-
-* [[`3891391746`](https://github.com/nodejs/node-gyp/commit/3891391746)] - **doc**: reconcile README with Python 3 compat changes (Rod Vagg) [#1911](https://github.com/nodejs/node-gyp/pull/1911)
-* [[`07f81f1920`](https://github.com/nodejs/node-gyp/commit/07f81f1920)] - **lib**: accept Python 3 after Python 2 (Sam Roberts) [#1910](https://github.com/nodejs/node-gyp/pull/1910)
-* [[`04ce59f4a2`](https://github.com/nodejs/node-gyp/commit/04ce59f4a2)] - **doc**: clarify Python configuration, etc (Sam Roberts) [#1908](https://github.com/nodejs/node-gyp/pull/1908)
-* [[`01c46ee3df`](https://github.com/nodejs/node-gyp/commit/01c46ee3df)] - **gyp**: add \_\_lt\_\_ to MSVSSolutionEntry (João Reis) [#1904](https://github.com/nodejs/node-gyp/pull/1904)
-* [[`735d961b99`](https://github.com/nodejs/node-gyp/commit/735d961b99)] - **win**: support VS 2017 Desktop Express (João Reis) [#1902](https://github.com/nodejs/node-gyp/pull/1902)
-* [[`3834156a92`](https://github.com/nodejs/node-gyp/commit/3834156a92)] - **test**: add Python 3.5 and 3.6 tests on Linux (cclauss) [#1909](https://github.com/nodejs/node-gyp/pull/1909)
-* [[`1196e990d8`](https://github.com/nodejs/node-gyp/commit/1196e990d8)] - **src**: update to standard@14 (Rod Vagg) [#1899](https://github.com/nodejs/node-gyp/pull/1899)
-* [[`53ee7dfe89`](https://github.com/nodejs/node-gyp/commit/53ee7dfe89)] - **gyp**: fix undefined name: cflags --\> ldflags (Christian Clauss) [#1901](https://github.com/nodejs/node-gyp/pull/1901)
-* [[`5871dcf6c9`](https://github.com/nodejs/node-gyp/commit/5871dcf6c9)] - **src,win**: add support for fetching arm64 node.lib (Richard Townsend) [#1875](https://github.com/nodejs/node-gyp/pull/1875)
-
-v5.0.4 2019-09-27
-=================
-
-* [[`1236869ffc`](https://github.com/nodejs/node-gyp/commit/1236869ffc)] - **gyp**: modify XcodeVersion() to convert "4.2" to "0420" and "10.0" to "1000" (Christian Clauss) [#1895](https://github.com/nodejs/node-gyp/pull/1895)
-* [[`36638afe48`](https://github.com/nodejs/node-gyp/commit/36638afe48)] - **gyp**: more decode stdout on Python 3 (cclauss) [#1894](https://github.com/nodejs/node-gyp/pull/1894)
-* [[`f753c167c5`](https://github.com/nodejs/node-gyp/commit/f753c167c5)] - **gyp**: decode stdout on Python 3 (cclauss) [#1890](https://github.com/nodejs/node-gyp/pull/1890)
-* [[`60a4083523`](https://github.com/nodejs/node-gyp/commit/60a4083523)] - **doc**: update xcode install instructions to match Node's BUILDING (Nhan Khong) [#1884](https://github.com/nodejs/node-gyp/pull/1884)
-* [[`19dbc9ac32`](https://github.com/nodejs/node-gyp/commit/19dbc9ac32)] - **deps**: update tar to 4.4.12 (Matheus Marchini) [#1889](https://github.com/nodejs/node-gyp/pull/1889)
-* [[`5f3ed92181`](https://github.com/nodejs/node-gyp/commit/5f3ed92181)] - **bin**: fix the usage instructions (Halit Ogunc) [#1888](https://github.com/nodejs/node-gyp/pull/1888)
-* [[`aab118edf1`](https://github.com/nodejs/node-gyp/commit/aab118edf1)] - **lib**: adding keep-alive header to download requests (Milad Farazmand) [#1863](https://github.com/nodejs/node-gyp/pull/1863)
-* [[`1186e89326`](https://github.com/nodejs/node-gyp/commit/1186e89326)] - **lib**: ignore non-critical os.userInfo() failures (Rod Vagg) [#1835](https://github.com/nodejs/node-gyp/pull/1835)
-* [[`785e527c3d`](https://github.com/nodejs/node-gyp/commit/785e527c3d)] - **doc**: fix missing argument for setting python path (lagorsse) [#1802](https://github.com/nodejs/node-gyp/pull/1802)
-* [[`a97615196c`](https://github.com/nodejs/node-gyp/commit/a97615196c)] - **gyp**: rm semicolons (Python != JavaScript) (MattIPv4) [#1858](https://github.com/nodejs/node-gyp/pull/1858)
-* [[`06019bac24`](https://github.com/nodejs/node-gyp/commit/06019bac24)] - **gyp**: assorted typo fixes (XhmikosR) [#1853](https://github.com/nodejs/node-gyp/pull/1853)
-* [[`3f4972c1ca`](https://github.com/nodejs/node-gyp/commit/3f4972c1ca)] - **gyp**: use "is" when comparing to None (Vladyslav Burzakovskyy) [#1860](https://github.com/nodejs/node-gyp/pull/1860)
-* [[`1cb4708073`](https://github.com/nodejs/node-gyp/commit/1cb4708073)] - **src,win**: improve unmanaged handling (Peter Sabath) [#1852](https://github.com/nodejs/node-gyp/pull/1852)
-* [[`5553cd910e`](https://github.com/nodejs/node-gyp/commit/5553cd910e)] - **gyp**: improve Windows+Cygwin compatibility (Jose Quijada) [#1817](https://github.com/nodejs/node-gyp/pull/1817)
-* [[`8bcb1fbb43`](https://github.com/nodejs/node-gyp/commit/8bcb1fbb43)] - **gyp**: Python 3 Windows fixes (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`2e24d0a326`](https://github.com/nodejs/node-gyp/commit/2e24d0a326)] - **test**: accept Python 3 in test-find-python.js (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`1267b4dc1c`](https://github.com/nodejs/node-gyp/commit/1267b4dc1c)] - **build**: add test run Python 3.7 on macOS (Christian Clauss) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`da1b031aa3`](https://github.com/nodejs/node-gyp/commit/da1b031aa3)] - **build**: import StringIO on Python 2 and Python 3 (Christian Clauss) [#1836](https://github.com/nodejs/node-gyp/pull/1836)
-* [[`fa0ed4aa42`](https://github.com/nodejs/node-gyp/commit/fa0ed4aa42)] - **build**: more Python 3 compat, replace compile with ast (cclauss) [#1820](https://github.com/nodejs/node-gyp/pull/1820)
-* [[`18d5c7c9d0`](https://github.com/nodejs/node-gyp/commit/18d5c7c9d0)] - **win,src**: update win\_delay\_load\_hook.cc to work with /clr (Ivan Petrovic) [#1819](https://github.com/nodejs/node-gyp/pull/1819)
-
-v5.0.3 2019-07-17
-=================
-
-* [[`66ad305775`](https://github.com/nodejs/node-gyp/commit/66ad305775)] - **python**: accept Python 3 conditionally (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815)
-* [[`7e7fce3fed`](https://github.com/nodejs/node-gyp/commit/7e7fce3fed)] - **python**: move Python detection to its own file (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815)
-* [[`e40c99e283`](https://github.com/nodejs/node-gyp/commit/e40c99e283)] - **src**: implement standard.js linting (Rod Vagg) [#1794](https://github.com/nodejs/node-gyp/pull/1794)
-* [[`bb92c761a9`](https://github.com/nodejs/node-gyp/commit/bb92c761a9)] - **test**: add Node.js 6 on Windows to Travis CI (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812)
-* [[`7fd924079f`](https://github.com/nodejs/node-gyp/commit/7fd924079f)] - **test**: increase tap timeout (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812)
-* [[`7e8127068f`](https://github.com/nodejs/node-gyp/commit/7e8127068f)] - **test**: cover supported node versions with travis (Rod Vagg) [#1809](https://github.com/nodejs/node-gyp/pull/1809)
-* [[`24109148df`](https://github.com/nodejs/node-gyp/commit/24109148df)] - **test**: downgrade to tap@^12 for continued Node 6 support (Rod Vagg) [#1808](https://github.com/nodejs/node-gyp/pull/1808)
-* [[`656117cc4a`](https://github.com/nodejs/node-gyp/commit/656117cc4a)] - **win**: make VS path match case-insensitive (João Reis) [#1806](https://github.com/nodejs/node-gyp/pull/1806)
-
-v5.0.2 2019-06-27
-=================
-
-* [[`2761afbf73`](https://github.com/nodejs/node-gyp/commit/2761afbf73)] - **build,test**: add duplicate symbol test (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689)
-* [[`82f129d6de`](https://github.com/nodejs/node-gyp/commit/82f129d6de)] - **gyp**: replace optparse to argparse (KiYugadgeter) [#1591](https://github.com/nodejs/node-gyp/pull/1591)
-* [[`afaaa29c61`](https://github.com/nodejs/node-gyp/commit/afaaa29c61)] - **gyp**: remove from \_\_future\_\_ import with\_statement (cclauss) [#1799](https://github.com/nodejs/node-gyp/pull/1799)
-* [[`a991f633d6`](https://github.com/nodejs/node-gyp/commit/a991f633d6)] - **gyp**: fix the remaining Python 3 issues (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793)
-* [[`f952b08f84`](https://github.com/nodejs/node-gyp/commit/f952b08f84)] - **gyp**: move from \_\_future\_\_ import to the top of the file (cclauss) [#1789](https://github.com/nodejs/node-gyp/pull/1789)
-* [[`4f4a677dfa`](https://github.com/nodejs/node-gyp/commit/4f4a677dfa)] - **gyp**: use different default compiler for z/OS (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768)
-* [[`03683f09d6`](https://github.com/nodejs/node-gyp/commit/03683f09d6)] - **lib**: code de-duplication (Pavel Medvedev) [#965](https://github.com/nodejs/node-gyp/pull/965)
-* [[`611bc3c89f`](https://github.com/nodejs/node-gyp/commit/611bc3c89f)] - **lib**: add .json suffix for explicit require (Rod Vagg) [#1787](https://github.com/nodejs/node-gyp/pull/1787)
-* [[`d3478d7b0b`](https://github.com/nodejs/node-gyp/commit/d3478d7b0b)] - **meta**: add to .gitignore (Refael Ackermann) [#1573](https://github.com/nodejs/node-gyp/pull/1573)
-* [[`7a9a038e9e`](https://github.com/nodejs/node-gyp/commit/7a9a038e9e)] - **test**: add parallel test runs on macOS and Windows (cclauss) [#1800](https://github.com/nodejs/node-gyp/pull/1800)
-* [[`7dd7f2b2a2`](https://github.com/nodejs/node-gyp/commit/7dd7f2b2a2)] - **test**: fix Python syntax error in test-adding.js (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793)
-* [[`395f843de0`](https://github.com/nodejs/node-gyp/commit/395f843de0)] - **test**: replace self-signed cert with 'localhost' (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795)
-* [[`a52c6eb9e8`](https://github.com/nodejs/node-gyp/commit/a52c6eb9e8)] - **test**: migrate from tape to tap (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795)
-* [[`ec2eb44a30`](https://github.com/nodejs/node-gyp/commit/ec2eb44a30)] - **test**: use Nan in duplicate\_symbols (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689)
-* [[`1597c84aad`](https://github.com/nodejs/node-gyp/commit/1597c84aad)] - **test**: use Travis CI to run tests on every pull request (cclauss) [#1752](https://github.com/nodejs/node-gyp/pull/1752)
-* [[`dd9bf929ac`](https://github.com/nodejs/node-gyp/commit/dd9bf929ac)] - **zos**: update compiler options (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768)
-
-v5.0.1 2019-06-20
-=================
-
-* [[`e3861722ed`](https://github.com/nodejs/node-gyp/commit/e3861722ed)] - **doc**: document --jobs max (David Sanders) [#1770](https://github.com/nodejs/node-gyp/pull/1770)
-* [[`1cfdb28886`](https://github.com/nodejs/node-gyp/commit/1cfdb28886)] - **lib**: reintroduce support for iojs file naming for releases \>= 1 && \< 4 (Samuel Attard) [#1777](https://github.com/nodejs/node-gyp/pull/1777)
-
-v5.0.0 2019-06-13
-=================
-
-* [[`8a83972743`](https://github.com/nodejs/node-gyp/commit/8a83972743)] - **(SEMVER-MAJOR)** **bin**: follow XDG OS conventions for storing data (Selwyn) [#1570](https://github.com/nodejs/node-gyp/pull/1570)
-* [[`9e46872ea3`](https://github.com/nodejs/node-gyp/commit/9e46872ea3)] - **bin,lib**: remove extra comments/lines/spaces (Jon Moss) [#1508](https://github.com/nodejs/node-gyp/pull/1508)
-* [[`8098ebdeb4`](https://github.com/nodejs/node-gyp/commit/8098ebdeb4)] - **deps**: replace `osenv` dependency with native `os` (Selwyn)
-* [[`f83b457e03`](https://github.com/nodejs/node-gyp/commit/f83b457e03)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`323cee7323`](https://github.com/nodejs/node-gyp/commit/323cee7323)] - **deps**: pin `request` version range (Refael Ackermann) [#1300](https://github.com/nodejs/node-gyp/pull/1300)
-* [[`c515912d08`](https://github.com/nodejs/node-gyp/commit/c515912d08)] - **doc**: improve issue template (Bartosz Sosnowski) [#1618](https://github.com/nodejs/node-gyp/pull/1618)
-* [[`cca2d66727`](https://github.com/nodejs/node-gyp/commit/cca2d66727)] - **doc**: python info needs own header (Taylor D. Lee) [#1245](https://github.com/nodejs/node-gyp/pull/1245)
-* [[`3e64c780f5`](https://github.com/nodejs/node-gyp/commit/3e64c780f5)] - **doc**: lint README.md (Jon Moss) [#1498](https://github.com/nodejs/node-gyp/pull/1498)
-* [[`a20faedc91`](https://github.com/nodejs/node-gyp/commit/a20faedc91)] - **(SEMVER-MAJOR)** **gyp**: enable MARMASM items only on new VS versions (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`721eb691cf`](https://github.com/nodejs/node-gyp/commit/721eb691cf)] - **gyp**: teach MSVS generator about MARMASM Items (Jon Kunkee) [#1679](https://github.com/nodejs/node-gyp/pull/1679)
-* [[`91744bfecc`](https://github.com/nodejs/node-gyp/commit/91744bfecc)] - **gyp**: add support for Windows on Arm (Richard Townsend) [#1739](https://github.com/nodejs/node-gyp/pull/1739)
-* [[`a6e0a6c7ed`](https://github.com/nodejs/node-gyp/commit/a6e0a6c7ed)] - **gyp**: move compile\_commands\_json (Paul Maréchal) [#1661](https://github.com/nodejs/node-gyp/pull/1661)
-* [[`92e8b52cee`](https://github.com/nodejs/node-gyp/commit/92e8b52cee)] - **gyp**: fix target --\> self.target (cclauss)
-* [[`febdfa2137`](https://github.com/nodejs/node-gyp/commit/febdfa2137)] - **gyp**: fix sntex error (cclauss) [#1333](https://github.com/nodejs/node-gyp/pull/1333)
-* [[`588d333c14`](https://github.com/nodejs/node-gyp/commit/588d333c14)] - **gyp**: \_winreg module was renamed to winreg in Python 3. (Craig Rodrigues)
-* [[`98226d198c`](https://github.com/nodejs/node-gyp/commit/98226d198c)] - **gyp**: replace basestring with str, but only on Python 3. (Craig Rodrigues)
-* [[`7535e4478e`](https://github.com/nodejs/node-gyp/commit/7535e4478e)] - **gyp**: replace deprecated functions (Craig Rodrigues)
-* [[`2040cd21cc`](https://github.com/nodejs/node-gyp/commit/2040cd21cc)] - **gyp**: use print as a function, as specified in PEP 3105. (Craig Rodrigues)
-* [[`abef93ded5`](https://github.com/nodejs/node-gyp/commit/abef93ded5)] - **gyp**: get ready for python 3 (cclauss)
-* [[`43031fadcb`](https://github.com/nodejs/node-gyp/commit/43031fadcb)] - **python**: clean-up detection (João Reis) [#1582](https://github.com/nodejs/node-gyp/pull/1582)
-* [[`49ab79d221`](https://github.com/nodejs/node-gyp/commit/49ab79d221)] - **python**: more informative error (Refael Ackermann) [#1269](https://github.com/nodejs/node-gyp/pull/1269)
-* [[`997bc3c748`](https://github.com/nodejs/node-gyp/commit/997bc3c748)] - **readme**: add ARM64 info to MSVC setup instructions (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655)
-* [[`788e767179`](https://github.com/nodejs/node-gyp/commit/788e767179)] - **test**: remove unused variable (João Reis)
-* [[`6f5a408934`](https://github.com/nodejs/node-gyp/commit/6f5a408934)] - **tools**: fix usage of inherited -fPIC and -fPIE (Jens) [#1340](https://github.com/nodejs/node-gyp/pull/1340)
-* [[`0efb8fb34b`](https://github.com/nodejs/node-gyp/commit/0efb8fb34b)] - **(SEMVER-MAJOR)** **win**: support running in VS Command Prompt (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`360ddbdf3a`](https://github.com/nodejs/node-gyp/commit/360ddbdf3a)] - **(SEMVER-MAJOR)** **win**: add support for Visual Studio 2019 (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`8f43f68275`](https://github.com/nodejs/node-gyp/commit/8f43f68275)] - **(SEMVER-MAJOR)** **win**: detect all VS versions in node-gyp (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`7fe4095974`](https://github.com/nodejs/node-gyp/commit/7fe4095974)] - **(SEMVER-MAJOR)** **win**: generic Visual Studio 2017 detection (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`7a71d68bce`](https://github.com/nodejs/node-gyp/commit/7a71d68bce)] - **win**: use msbuild from the configure stage (Bartosz Sosnowski) [#1654](https://github.com/nodejs/node-gyp/pull/1654)
-* [[`d3b21220a0`](https://github.com/nodejs/node-gyp/commit/d3b21220a0)] - **win**: fix delay-load hook for electron 4 (Andy Dill)
-* [[`81f3a92338`](https://github.com/nodejs/node-gyp/commit/81f3a92338)] - Update list of Node.js versions to test against. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670)
-* [[`4748f6ab75`](https://github.com/nodejs/node-gyp/commit/4748f6ab75)] - Remove deprecated compatibility code. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670)
-* [[`45e3221fd4`](https://github.com/nodejs/node-gyp/commit/45e3221fd4)] - Remove an outdated workaround for Python 2.4 (cclauss) [#1650](https://github.com/nodejs/node-gyp/pull/1650)
-* [[`721dc7d314`](https://github.com/nodejs/node-gyp/commit/721dc7d314)] - Add ARM64 to MSBuild /Platform logic (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655)
-* [[`a5b7410497`](https://github.com/nodejs/node-gyp/commit/a5b7410497)] - Add ESLint no-unused-vars rule (Jon Moss) [#1497](https://github.com/nodejs/node-gyp/pull/1497)
-
-v4.0.0 2019-04-24
-=================
-
-* [[`ceed5cbe10`](https://github.com/nodejs/node-gyp/commit/ceed5cbe10)] - **deps**: updated tar package version to 4.4.8 (Pobegaylo Maksim) [#1713](https://github.com/nodejs/node-gyp/pull/1713)
-* [[`374519e066`](https://github.com/nodejs/node-gyp/commit/374519e066)] - **(SEMVER-MAJOR)** Upgrade to tar v3 (isaacs) [#1212](https://github.com/nodejs/node-gyp/pull/1212)
-* [[`e6699d13cd`](https://github.com/nodejs/node-gyp/commit/e6699d13cd)] - **test**: fix addon test for Node.js 12 and V8 7.4 (Richard Lau) [#1705](https://github.com/nodejs/node-gyp/pull/1705)
-* [[`0c6bf530a0`](https://github.com/nodejs/node-gyp/commit/0c6bf530a0)] - **lib**: use print() for python version detection (GreenAddress) [#1534](https://github.com/nodejs/node-gyp/pull/1534)
-
-v3.8.0 2018-08-09
-=================
-
-* [[`c5929cb4fe`](https://github.com/nodejs/node-gyp/commit/c5929cb4fe)] - **doc**: update Xcode preferences tab name. (Ivan Daniluk) [#1330](https://github.com/nodejs/node-gyp/pull/1330)
-* [[`8b488da8b9`](https://github.com/nodejs/node-gyp/commit/8b488da8b9)] - **doc**: update link to commit guidelines (Jonas Hermsmeier) [#1456](https://github.com/nodejs/node-gyp/pull/1456)
-* [[`b4fe8c16f9`](https://github.com/nodejs/node-gyp/commit/b4fe8c16f9)] - **doc**: fix visual studio links (Bartosz Sosnowski) [#1490](https://github.com/nodejs/node-gyp/pull/1490)
-* [[`536759c7e9`](https://github.com/nodejs/node-gyp/commit/536759c7e9)] - **configure**: use sys.version\_info to get python version (Yang Guo) [#1504](https://github.com/nodejs/node-gyp/pull/1504)
-* [[`94c39c604e`](https://github.com/nodejs/node-gyp/commit/94c39c604e)] - **gyp**: fix ninja build failure (GYP patch) (Daniel Bevenius) [nodejs/node#12484](https://github.com/nodejs/node/pull/12484)
-* [[`e8ea74e0fa`](https://github.com/nodejs/node-gyp/commit/e8ea74e0fa)] - **tools**: patch gyp to avoid xcrun errors (Ujjwal Sharma) [nodejs/node#21520](https://github.com/nodejs/node/pull/21520)
-* [[`ea9aff44f2`](https://github.com/nodejs/node-gyp/commit/ea9aff44f2)] - **tools**: fix "the the" typos in comments (Masashi Hirano) [nodejs/node#20716](https://github.com/nodejs/node/pull/20716)
-* [[`207e5aa4fd`](https://github.com/nodejs/node-gyp/commit/207e5aa4fd)] - **gyp**: implement LD/LDXX for ninja and FIPS (Sam Roberts)
-* [[`b416c5f4b7`](https://github.com/nodejs/node-gyp/commit/b416c5f4b7)] - **gyp**: enable cctest to use objects (gyp part) (Daniel Bevenius) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
-* [[`40692d016b`](https://github.com/nodejs/node-gyp/commit/40692d016b)] - **gyp**: add compile\_commands.json gyp generator (Ben Noordhuis) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
-* [[`fc3c4e2b10`](https://github.com/nodejs/node-gyp/commit/fc3c4e2b10)] - **gyp**: float gyp patch for long filenames (Anna Henningsen) [nodejs/node#7963](https://github.com/nodejs/node/pull/7963)
-* [[`8aedbfdef6`](https://github.com/nodejs/node-gyp/commit/8aedbfdef6)] - **gyp**: backport GYP fix to fix AIX shared suffix (Stewart Addison)
-* [[`6cd84b84fc`](https://github.com/nodejs/node-gyp/commit/6cd84b84fc)] - **test**: formatting and minor fixes for execFileSync replacement (Rod Vagg) [#1521](https://github.com/nodejs/node-gyp/pull/1521)
-* [[`60e421363f`](https://github.com/nodejs/node-gyp/commit/60e421363f)] - **test**: added test/processExecSync.js for when execFileSync is not available. (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`969447c5bd`](https://github.com/nodejs/node-gyp/commit/969447c5bd)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`340403ccfe`](https://github.com/nodejs/node-gyp/commit/340403ccfe)] - **win**: improve parsing of SDK version (Alessandro Vergani) [#1516](https://github.com/nodejs/node-gyp/pull/1516)
-
-v3.7.0 2018-06-08
-=================
-
-* [[`84cea7b30d`](https://github.com/nodejs/node-gyp/commit/84cea7b30d)] - Remove unused gyp test scripts. (Ben Noordhuis) [#1458](https://github.com/nodejs/node-gyp/pull/1458)
-* [[`0540e4ec63`](https://github.com/nodejs/node-gyp/commit/0540e4ec63)] - **gyp**: escape spaces in filenames in make generator (Jeff Senn) [#1436](https://github.com/nodejs/node-gyp/pull/1436)
-* [[`88fc6fa0ec`](https://github.com/nodejs/node-gyp/commit/88fc6fa0ec)] - Drop dependency on minimatch. (Brian Woodward) [#1158](https://github.com/nodejs/node-gyp/pull/1158)
-* [[`1e203c5148`](https://github.com/nodejs/node-gyp/commit/1e203c5148)] - Fix include path when pointing to Node.js source (Richard Lau) [#1055](https://github.com/nodejs/node-gyp/pull/1055)
-* [[`53d8cb967c`](https://github.com/nodejs/node-gyp/commit/53d8cb967c)] - Prefix build targets with /t: on Windows (Natalie Wolfe) [#1164](https://github.com/nodejs/node-gyp/pull/1164)
-* [[`53a5f8ff38`](https://github.com/nodejs/node-gyp/commit/53a5f8ff38)] - **gyp**: add support for .mm files to msvs generator (Julien Racle) [#1167](https://github.com/nodejs/node-gyp/pull/1167)
-* [[`dd8561e528`](https://github.com/nodejs/node-gyp/commit/dd8561e528)] - **zos**: don't use universal-new-lines mode (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
-* [[`e5a69010ed`](https://github.com/nodejs/node-gyp/commit/e5a69010ed)] - **zos**: add search locations for libnode.x (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
-* [[`79febace53`](https://github.com/nodejs/node-gyp/commit/79febace53)] - **doc**: update macOS information in README (Josh Parnham) [#1323](https://github.com/nodejs/node-gyp/pull/1323)
-* [[`9425448945`](https://github.com/nodejs/node-gyp/commit/9425448945)] - **gyp**: don't print xcodebuild not found errors (Gibson Fahnestock) [#1370](https://github.com/nodejs/node-gyp/pull/1370)
-* [[`6f1286f5b2`](https://github.com/nodejs/node-gyp/commit/6f1286f5b2)] - Fix infinite install loop. (Ben Noordhuis) [#1384](https://github.com/nodejs/node-gyp/pull/1384)
-* [[`2580b9139e`](https://github.com/nodejs/node-gyp/commit/2580b9139e)] - Update `--nodedir` description in README. (Ben Noordhuis) [#1372](https://github.com/nodejs/node-gyp/pull/1372)
-* [[`a61360391a`](https://github.com/nodejs/node-gyp/commit/a61360391a)] - Update README with another way to install on windows (JeffAtDeere) [#1352](https://github.com/nodejs/node-gyp/pull/1352)
-* [[`47496bf6dc`](https://github.com/nodejs/node-gyp/commit/47496bf6dc)] - Fix IndexError when parsing GYP files. (Ben Noordhuis) [#1267](https://github.com/nodejs/node-gyp/pull/1267)
-* [[`b2024dee7b`](https://github.com/nodejs/node-gyp/commit/b2024dee7b)] - **zos**: support platform (John Barboza) [#1276](https://github.com/nodejs/node-gyp/pull/1276)
-* [[`90d86512f4`](https://github.com/nodejs/node-gyp/commit/90d86512f4)] - **win**: run PS with `-NoProfile` (Refael Ackermann) [#1292](https://github.com/nodejs/node-gyp/pull/1292)
-* [[`2da5f86ef7`](https://github.com/nodejs/node-gyp/commit/2da5f86ef7)] - **doc**: add github PR and Issue templates (Gibson Fahnestock) [#1228](https://github.com/nodejs/node-gyp/pull/1228)
-* [[`a46a770d68`](https://github.com/nodejs/node-gyp/commit/a46a770d68)] - **doc**: update proposed DCO and CoC (Mikeal Rogers) [#1229](https://github.com/nodejs/node-gyp/pull/1229)
-* [[`7e803d58e0`](https://github.com/nodejs/node-gyp/commit/7e803d58e0)] - **doc**: headerify the Install instructions (Nick Schonning) [#1225](https://github.com/nodejs/node-gyp/pull/1225)
-* [[`f27599193a`](https://github.com/nodejs/node-gyp/commit/f27599193a)] - **gyp**: update xml string encoding conversion (Liu Chao) [#1203](https://github.com/nodejs/node-gyp/pull/1203)
-* [[`0a07e481f7`](https://github.com/nodejs/node-gyp/commit/0a07e481f7)] - **configure**: don't set ensure if tarball is set (Gibson Fahnestock) [#1220](https://github.com/nodejs/node-gyp/pull/1220)
-
-v3.6.3 2018-06-08
-=================
-
-* [[`90cd2e8da9`](https://github.com/nodejs/node-gyp/commit/90cd2e8da9)] - **gyp**: fix regex to match multi-digit versions (Jonas Hermsmeier) [#1455](https://github.com/nodejs/node-gyp/pull/1455)
-* [[`7900122337`](https://github.com/nodejs/node-gyp/commit/7900122337)] - deps: pin `request` version range (Refael Ackerman) [#1300](https://github.com/nodejs/node-gyp/pull/1300)
-
-v3.6.2 2017-06-01
-=================
-
-* [[`72afdd62cd`](https://github.com/nodejs/node-gyp/commit/72afdd62cd)] - **build**: rename copyNodeLib() to doBuild() (Liu Chao) [#1206](https://github.com/nodejs/node-gyp/pull/1206)
-* [[`bad903ac70`](https://github.com/nodejs/node-gyp/commit/bad903ac70)] - **win**: more robust parsing of SDK version (Refael Ackermann) [#1198](https://github.com/nodejs/node-gyp/pull/1198)
-* [[`241752f381`](https://github.com/nodejs/node-gyp/commit/241752f381)] - Log dist-url. (Ben Noordhuis) [#1170](https://github.com/nodejs/node-gyp/pull/1170)
-* [[`386746c7d1`](https://github.com/nodejs/node-gyp/commit/386746c7d1)] - **configure**: use full path in node_lib_file GYP var (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964)
-* [[`0913b2dd99`](https://github.com/nodejs/node-gyp/commit/0913b2dd99)] - **build, win**: use target_arch to link with node.lib (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964)
-* [[`c307b302f7`](https://github.com/nodejs/node-gyp/commit/c307b302f7)] - **doc**: blorb about setting `npm_config_OPTION_NAME` (Refael Ackermann) [#1185](https://github.com/nodejs/node-gyp/pull/1185)
-
-v3.6.1 2017-04-30
-=================
-
-* [[`49801716c2`](https://github.com/nodejs/node-gyp/commit/49801716c2)] - **test**: fix test-find-python on v0.10.x buildbot. (Ben Noordhuis) [#1172](https://github.com/nodejs/node-gyp/pull/1172)
-* [[`a83a3801fc`](https://github.com/nodejs/node-gyp/commit/a83a3801fc)] - **test**: fix test/test-configure-python on AIX (Richard Lau) [#1131](https://github.com/nodejs/node-gyp/pull/1131)
-* [[`8a767145c9`](https://github.com/nodejs/node-gyp/commit/8a767145c9)] - **gyp**: Revert quote_cmd workaround (Kunal Pathak) [#1153](https://github.com/nodejs/node-gyp/pull/1153)
-* [[`c09cf7671e`](https://github.com/nodejs/node-gyp/commit/c09cf7671e)] - **doc**: add a note for using `configure` on Windows (Vse Mozhet Byt) [#1152](https://github.com/nodejs/node-gyp/pull/1152)
-* [[`da9cb5f411`](https://github.com/nodejs/node-gyp/commit/da9cb5f411)] - Delete superfluous .patch files. (Ben Noordhuis) [#1122](https://github.com/nodejs/node-gyp/pull/1122)
-
-v3.6.0 2017-03-16
-=================
-
-* [[`ae141e1906`](https://github.com/nodejs/node-gyp/commit/ae141e1906)] - **win**: find and setup for VS2017 (Refael Ackermann) [#1130](https://github.com/nodejs/node-gyp/pull/1130)
-* [[`ec5fc36a80`](https://github.com/nodejs/node-gyp/commit/ec5fc36a80)] - Add support to build node.js with chakracore for ARM. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873)
-* [[`a04ea3051a`](https://github.com/nodejs/node-gyp/commit/a04ea3051a)] - Add support to build node.js with chakracore. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873)
-* [[`93d7fa83c8`](https://github.com/nodejs/node-gyp/commit/93d7fa83c8)] - Upgrade semver dependency. (Ben Noordhuis) [#1107](https://github.com/nodejs/node-gyp/pull/1107)
-* [[`ff9a6fadfd`](https://github.com/nodejs/node-gyp/commit/ff9a6fadfd)] - Update link of gyp as Google code is shutting down (Peter Dave Hello) [#1061](https://github.com/nodejs/node-gyp/pull/1061)
-
-
-v3.5.0 2017-01-10
-=================
-
-* [[`762d19a39e`](https://github.com/nodejs/node-gyp/commit/762d19a39e)] - \[doc\] merge History.md and CHANGELOG.md (Rod Vagg)
-* [[`80fc5c3d31`](https://github.com/nodejs/node-gyp/commit/80fc5c3d31)] - Fix deprecated dependency warning (Simone Primarosa) [#1069](https://github.com/nodejs/node-gyp/pull/1069)
-* [[`05c44944fd`](https://github.com/nodejs/node-gyp/commit/05c44944fd)] - Open the build file with universal-newlines mode (Guy Margalit) [#1053](https://github.com/nodejs/node-gyp/pull/1053)
-* [[`37ae7be114`](https://github.com/nodejs/node-gyp/commit/37ae7be114)] - Try python launcher when stock python is python 3. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992)
-* [[`e3778d9907`](https://github.com/nodejs/node-gyp/commit/e3778d9907)] - Add lots of findPython() tests. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992)
-* [[`afc766adf6`](https://github.com/nodejs/node-gyp/commit/afc766adf6)] - Unset executable bit for .bat files (Pavel Medvedev) [#969](https://github.com/nodejs/node-gyp/pull/969)
-* [[`ddac348991`](https://github.com/nodejs/node-gyp/commit/ddac348991)] - Use push on PYTHONPATH and add tests (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`b182a19042`](https://github.com/nodejs/node-gyp/commit/b182a19042)] - ***Revert*** "add "path-array" dep" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`7c08b85c5a`](https://github.com/nodejs/node-gyp/commit/7c08b85c5a)] - ***Revert*** "**configure**: use "path-array" for PYTHONPATH" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`9c8d275526`](https://github.com/nodejs/node-gyp/commit/9c8d275526)] - Add --devdir flag. (Ben Noordhuis) [#916](https://github.com/nodejs/node-gyp/pull/916)
-* [[`f6eab1f9e4`](https://github.com/nodejs/node-gyp/commit/f6eab1f9e4)] - **doc**: add windows-build-tools to readme (Felix Rieseberg) [#970](https://github.com/nodejs/node-gyp/pull/970)
-
-v3.4.0 2016-06-28
-=================
-
-* [[`ce5fd04e94`](https://github.com/nodejs/node-gyp/commit/ce5fd04e94)] - **deps**: update minimatch version (delphiactual) [#961](https://github.com/nodejs/node-gyp/pull/961)
-* [[`77383ddd85`](https://github.com/nodejs/node-gyp/commit/77383ddd85)] - Replace fs.accessSync call to fs.statSync (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
-* [[`0dba4bda57`](https://github.com/nodejs/node-gyp/commit/0dba4bda57)] - **test**: add simple addon test (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
-* [[`c4344b3889`](https://github.com/nodejs/node-gyp/commit/c4344b3889)] - **doc**: add --target option to README (Gibson Fahnestock) [#958](https://github.com/nodejs/node-gyp/pull/958)
-* [[`cc778e9215`](https://github.com/nodejs/node-gyp/commit/cc778e9215)] - Override BUILDING_UV_SHARED, BUILDING_V8_SHARED. (Ben Noordhuis) [#915](https://github.com/nodejs/node-gyp/pull/915)
-* [[`af35b2ad32`](https://github.com/nodejs/node-gyp/commit/af35b2ad32)] - Move VC++ Build Tools to Build Tools landing page. (Andrew Pardoe) [#953](https://github.com/nodejs/node-gyp/pull/953)
-* [[`f31482e226`](https://github.com/nodejs/node-gyp/commit/f31482e226)] - **win**: work around __pfnDliNotifyHook2 type change (Alexis Campailla) [#952](https://github.com/nodejs/node-gyp/pull/952)
-* [[`3df8222fa5`](https://github.com/nodejs/node-gyp/commit/3df8222fa5)] - Allow for npmlog@3.x (Rebecca Turner) [#950](https://github.com/nodejs/node-gyp/pull/950)
-* [[`a4fa07b390`](https://github.com/nodejs/node-gyp/commit/a4fa07b390)] - More verbose error on locating msbuild.exe failure. (Mateusz Jaworski) [#930](https://github.com/nodejs/node-gyp/pull/930)
-* [[`4ee31329e0`](https://github.com/nodejs/node-gyp/commit/4ee31329e0)] - **doc**: add command options to README.md (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
-* [[`c8c7ca86b9`](https://github.com/nodejs/node-gyp/commit/c8c7ca86b9)] - Add --silent option for zero output. (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
-* [[`ac29d23a7c`](https://github.com/nodejs/node-gyp/commit/ac29d23a7c)] - Upgrade to glob@7.0.3. (Ben Noordhuis) [#943](https://github.com/nodejs/node-gyp/pull/943)
-* [[`15fd56be3d`](https://github.com/nodejs/node-gyp/commit/15fd56be3d)] - Enable V8 deprecation warnings for native modules (Matt Loring) [#920](https://github.com/nodejs/node-gyp/pull/920)
-* [[`7f1c1b960c`](https://github.com/nodejs/node-gyp/commit/7f1c1b960c)] - **gyp**: improvements for android generator (Robert Chiras) [#935](https://github.com/nodejs/node-gyp/pull/935)
-* [[`088082766c`](https://github.com/nodejs/node-gyp/commit/088082766c)] - Update Windows install instructions (Sara Itani) [#867](https://github.com/nodejs/node-gyp/pull/867)
-* [[`625c1515f9`](https://github.com/nodejs/node-gyp/commit/625c1515f9)] - **gyp**: inherit CC/CXX for CC/CXX.host (Johan Bergström) [#908](https://github.com/nodejs/node-gyp/pull/908)
-* [[`3bcb1720e4`](https://github.com/nodejs/node-gyp/commit/3bcb1720e4)] - Add support for the Python launcher on Windows (Patrick Westerhoff) [#894](https://github.com/nodejs/node-gyp/pull/894
-
-v3.3.1 2016-03-04
-=================
-
-* [[`a981ef847a`](https://github.com/nodejs/node-gyp/commit/a981ef847a)] - **gyp**: fix android generator (Robert Chiras) [#889](https://github.com/nodejs/node-gyp/pull/889)
-
-v3.3.0 2016-02-16
-=================
-
-* [[`818d854a4d`](https://github.com/nodejs/node-gyp/commit/818d854a4d)] - Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR (Rod Vagg) [#878](https://github.com/nodejs/node-gyp/pull/878)
-* [[`d1e4cc4b62`](https://github.com/nodejs/node-gyp/commit/d1e4cc4b62)] - **(SEMVER-MINOR)** Download headers tarball for ~0.12.10 || ~0.10.42 (Rod Vagg) [#877](https://github.com/nodejs/node-gyp/pull/877)
-* [[`6e28ad1bea`](https://github.com/nodejs/node-gyp/commit/6e28ad1bea)] - Allow for npmlog@2.x (Rebecca Turner) [#861](https://github.com/nodejs/node-gyp/pull/861)
-* [[`07371e5812`](https://github.com/nodejs/node-gyp/commit/07371e5812)] - Use -fPIC for NetBSD. (Marcin Cieślak) [#856](https://github.com/nodejs/node-gyp/pull/856)
-* [[`8c4b0ffa50`](https://github.com/nodejs/node-gyp/commit/8c4b0ffa50)] - **(SEMVER-MINOR)** Add --cafile command line option. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837)
-* [[`b3ad43498e`](https://github.com/nodejs/node-gyp/commit/b3ad43498e)] - **(SEMVER-MINOR)** Make download() function testable. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837)
-
-v3.2.1 2015-12-03
-=================
-
-* [[`ab89b477c4`](https://github.com/nodejs/node-gyp/commit/ab89b477c4)] - Upgrade gyp to b3cef02. (Ben Noordhuis) [#831](https://github.com/nodejs/node-gyp/pull/831)
-* [[`90078ecb17`](https://github.com/nodejs/node-gyp/commit/90078ecb17)] - Define WIN32_LEAN_AND_MEAN conditionally. (Ben Noordhuis) [#824](https://github.com/nodejs/node-gyp/pull/824)
-
-v3.2.0 2015-11-25
-=================
-
-* [[`268f1ca4c7`](https://github.com/nodejs/node-gyp/commit/268f1ca4c7)] - Use result of `which` when searching for python. (Refael Ackermann) [#668](https://github.com/nodejs/node-gyp/pull/668)
-* [[`817ed9bd78`](https://github.com/nodejs/node-gyp/commit/817ed9bd78)] - Add test for python executable search logic. (Ben Noordhuis) [#756](https://github.com/nodejs/node-gyp/pull/756)
-* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755)
-* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753)
-* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766)
-* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton)
-
-v3.1.0 2015-11-14
-=================
-
-* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks)
-* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich)
-* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich)
-* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781)
-* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797)
-* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745)
-* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738)
-
-v3.0.3 2015-09-14
-=================
-
-* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729)
-
-v3.0.2 2015-09-12
-=================
-
-* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723)
-* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722)
-
-v3.0.1 2015-09-08
-=================
-
-* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716)
-
-v3.0.0 2015-09-08
-=================
-
-* [[`9720d0373c`](https://github.com/nodejs/node-gyp/commit/9720d0373c)] - remove node_modules from tree (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`6dcf220db7`](https://github.com/nodejs/node-gyp/commit/6dcf220db7)] - test version major directly, don't use semver.satisfies() (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`938dd18d1c`](https://github.com/nodejs/node-gyp/commit/938dd18d1c)] - refactor for clarity, fix dist-url, add env var dist-url functionality (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`9e9df66a06`](https://github.com/nodejs/node-gyp/commit/9e9df66a06)] - use process.release, make aware of io.js & node v4 differences (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`1ea7ed01f4`](https://github.com/nodejs/node-gyp/commit/1ea7ed01f4)] - **deps**: update graceful-fs dependency to the latest (Sakthipriyan Vairamani) [#714](https://github.com/nodejs/node-gyp/pull/714)
-* [[`0fbc387b35`](https://github.com/nodejs/node-gyp/commit/0fbc387b35)] - Update repository URLs. (Ben Noordhuis) [#715](https://github.com/nodejs/node-gyp/pull/715)
-* [[`bbedb8868b`](https://github.com/nodejs/node-gyp/commit/bbedb8868b)] - **(SEMVER-MAJOR)** **win**: enable delay-load hook by default (Jeremiah Senkpiel) [#708](https://github.com/nodejs/node-gyp/pull/708)
-* [[`85ed107565`](https://github.com/nodejs/node-gyp/commit/85ed107565)] - Merge pull request #664 from othiym23/othiym23/allow-semver-5 (Nathan Rajlich)
-* [[`0c720d234c`](https://github.com/nodejs/node-gyp/commit/0c720d234c)] - allow semver@5 (Forrest L Norvell)
-
-2.0.2 / 2015-07-14
-==================
-
- * Use HTTPS for dist url (#656, @SonicHedgehog)
- * Merge pull request #648 from nevosegal/master
- * Merge pull request #650 from magic890/patch-1
- * Updated Installation section on README
- * Updated link to gyp user documentation
- * Fix download error message spelling (#643, @tomxtobin)
- * Merge pull request #637 from lygstate/master
- * Set NODE_GYP_DIR for addon.gypi to setting absolute path for
- src/win_delay_load_hook.c, and fixes of the long relative path issue on Win32.
- Fixes #636 (#637, @lygstate).
-
-2.0.1 / 2015-05-28
-==================
-
- * configure: try/catch the semver range.test() call
- * README: update for visual studio 2013 (#510, @samccone)
-
-2.0.0 / 2015-05-24
-==================
-
- * configure: check for python2 executable by default, fallback to python
- * configure: don't clobber existing $PYTHONPATH
- * configure: use "path-array" for PYTHONPATH
- * gyp: fix for non-acsii userprofile name on Windows
- * gyp: always install into $PRODUCT_DIR
- * gyp: apply https://codereview.chromium.org/11361103/
- * gyp: don't use links at all, just copy the files instead
- * gyp: update gyp to e1c8fcf7
- * Updated README.md with updated Windows build info
- * Show URL when a download fails
- * package: add a "license" field
- * move HMODULE m declaration to top
- * Only add "-undefined dynamic_lookup" to loadable_module targets
- * win: optionally allow node.exe/iojs.exe to be renamed
- * Avoid downloading shasums if using tarPath
- * Add target name preprocessor define: `NODE_GYP_MODULE_NAME`
- * Show better error message in case of bad network settings
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/CONTRIBUTING.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/CONTRIBUTING.md
deleted file mode 100644
index f48786bd8..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/CONTRIBUTING.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Contributing to node-gyp
-
-## Code of Conduct
-
-Please read the
-[Code of Conduct](https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md)
-which explains the minimum behavior expectations for node-gyp contributors.
-
-<a id="developers-certificate-of-origin"></a>
-## Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/LICENSE b/node_modules/@npmcli/run-script/node_modules/node-gyp/LICENSE
deleted file mode 100644
index 2ea4dc5ef..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/README.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/README.md
deleted file mode 100644
index 79abf4ba7..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/README.md
+++ /dev/null
@@ -1,242 +0,0 @@
-# `node-gyp` - Node.js native addon build tool
-
-[![Travis CI](https://travis-ci.com/nodejs/node-gyp.svg?branch=master)](https://travis-ci.com/nodejs/node-gyp)
-[![Build Status](https://github.com/nodejs/node-gyp/workflows/Python_tests/badge.svg)](https://github.com/nodejs/node-gyp/actions?workflow=Python_tests)
-
-`node-gyp` is a cross-platform command-line tool written in Node.js for
-compiling native addon modules for Node.js. It contains a fork of the
-[gyp](https://gyp.gsrc.io) project that was previously used by the Chromium
-team, extended to support the development of Node.js native addons.
-
-Note that `node-gyp` is _not_ used to build Node.js itself.
-
-Multiple target versions of Node.js are supported (i.e. `0.8`, ..., `4`, `5`, `6`,
-etc.), regardless of what version of Node.js is actually installed on your system
-(`node-gyp` downloads the necessary development files or headers for the target version).
-
-## Features
-
- * The same build commands work on any of the supported platforms
- * Supports the targeting of different versions of Node.js
-
-## Installation
-
-You can install `node-gyp` using `npm`:
-
-``` bash
-$ npm install -g node-gyp
-```
-
-Depending on your operating system, you will need to install:
-
-### On Unix
-
- * Python v2.7, v3.5, v3.6, or v3.7
- * `make`
- * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
-
-### On macOS
-
- * Python v2.7, v3.5, v3.6, or v3.7
- * [Xcode](https://developer.apple.com/xcode/download/)
- * You also need to install the `XCode Command Line Tools` by running `xcode-select --install`. Alternatively, if you already have the full Xcode installed, you can find them under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`. This step will install `clang`, `clang++`, and `make`.
- * If your Mac has been _upgraded_ to macOS Catalina (10.15), please read [macOS_Catalina.md](macOS_Catalina.md).
-
-### On Windows
-
-Install the current version of Python from the [Microsoft Store package](https://docs.python.org/3/using/windows.html#the-microsoft-store-package).
-
-#### Option 1
-
-Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).
-
-#### Option 2
-
-Install tools and configuration manually:
- * Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
- (using "Visual C++ build tools" workload) or [Visual Studio 2017 Community](https://visualstudio.microsoft.com/pl/thank-you-downloading-visual-studio/?sku=Community)
- (using the "Desktop development with C++" workload)
- * Launch cmd, `npm config set msvs_version 2017`
-
- If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
-
- To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".
-
-### Configuring Python Dependency
-
-`node-gyp` requires that you have installed a compatible version of Python, one of: v2.7, v3.5, v3.6,
-or v3.7. If you have multiple Python versions installed, you can identify which Python
-version `node-gyp` should use in one of the following ways:
-
-1. by setting the `--python` command-line option, e.g.:
-
-``` bash
-$ node-gyp <command> --python /path/to/executable/python
-```
-
-2. If `node-gyp` is called by way of `npm`, *and* you have multiple versions of
-Python installed, then you can set `npm`'s 'python' config key to the appropriate
-value:
-
-``` bash
-$ npm config set python /path/to/executable/python
-```
-
-3. If the `PYTHON` environment variable is set to the path of a Python executable,
-then that version will be used, if it is a compatible version.
-
-4. If the `NODE_GYP_FORCE_PYTHON` environment variable is set to the path of a
-Python executable, it will be used instead of any of the other configured or
-builtin Python search paths. If it's not a compatible version, no further
-searching will be done.
-
-## How to Use
-
-To compile your native addon, first go to its root directory:
-
-``` bash
-$ cd my_node_addon
-```
-
-The next step is to generate the appropriate project build files for the current
-platform. Use `configure` for that:
-
-``` bash
-$ node-gyp configure
-```
-
-Auto-detection fails for Visual C++ Build Tools 2015, so `--msvs_version=2015`
-needs to be added (not needed when run by npm as configured above):
-``` bash
-$ node-gyp configure --msvs_version=2015
-```
-
-__Note__: The `configure` step looks for a `binding.gyp` file in the current
-directory to process. See below for instructions on creating a `binding.gyp` file.
-
-Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file
-(on Windows) in the `build/` directory. Next, invoke the `build` command:
-
-``` bash
-$ node-gyp build
-```
-
-Now you have your compiled `.node` bindings file! The compiled bindings end up
-in `build/Debug/` or `build/Release/`, depending on the build mode. At this point,
-you can require the `.node` file with Node.js and run your tests!
-
-__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or
-`-d`) switch when running either the `configure`, `build` or `rebuild` commands.
-
-## The `binding.gyp` file
-
-A `binding.gyp` file describes the configuration to build your module, in a
-JSON-like format. This file gets placed in the root of your package, alongside
-`package.json`.
-
-A barebones `gyp` file appropriate for building a Node.js addon could look like:
-
-```python
-{
- "targets": [
- {
- "target_name": "binding",
- "sources": [ "src/binding.cc" ]
- }
- ]
-}
-```
-
-## Further reading
-
-Some additional resources for Node.js native addons and writing `gyp` configuration files:
-
- * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative)
- * ["Hello World" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world)
- * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md)
- * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md)
- * [*"binding.gyp" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)
-
-## Commands
-
-`node-gyp` responds to the following commands:
-
-| **Command** | **Description**
-|:--------------|:---------------------------------------------------------------
-| `help` | Shows the help dialog
-| `build` | Invokes `make`/`msbuild.exe` and builds the native addon
-| `clean` | Removes the `build` directory if it exists
-| `configure` | Generates project build files for the current platform
-| `rebuild` | Runs `clean`, `configure` and `build` all in a row
-| `install` | Installs Node.js header files for the given version
-| `list` | Lists the currently installed Node.js header versions
-| `remove` | Removes the Node.js header files for the given version
-
-
-## Command Options
-
-`node-gyp` accepts the following command options:
-
-| **Command** | **Description**
-|:----------------------------------|:------------------------------------------
-| `-j n`, `--jobs n` | Run `make` in parallel. The value `max` will use all available CPU cores
-| `--target=v6.2.1` | Node.js version to build for (default is `process.version`)
-| `--silly`, `--loglevel=silly` | Log all progress to console
-| `--verbose`, `--loglevel=verbose` | Log most progress to console
-| `--silent`, `--loglevel=silent` | Don't log anything to console
-| `debug`, `--debug` | Make Debug build (default is `Release`)
-| `--release`, `--no-debug` | Make Release build
-| `-C $dir`, `--directory=$dir` | Run command in different directory
-| `--make=$make` | Override `make` command (e.g. `gmake`)
-| `--thin=yes` | Enable thin static libraries
-| `--arch=$arch` | Set target architecture (e.g. ia32)
-| `--tarball=$path` | Get headers from a local tarball
-| `--devdir=$path` | SDK download directory (default is OS cache directory)
-| `--ensure` | Don't reinstall headers if already present
-| `--dist-url=$url` | Download header tarball from custom URL
-| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball
-| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball
-| `--cafile=$cafile` | Override default CA chain (to download tarball)
-| `--nodedir=$path` | Set the path to the node source code
-| `--python=$path` | Set path to the Python binary
-| `--msvs_version=$version` | Set Visual Studio version (Windows only)
-| `--solution=$solution` | Set Visual Studio Solution version (Windows only)
-
-## Configuration
-
-### Environment variables
-
-Use the form `npm_config_OPTION_NAME` for any of the command options listed
-above (dashes in option names should be replaced by underscores).
-
-For example, to set `devdir` equal to `/tmp/.gyp`, you would:
-
-Run this on Unix:
-
-```bash
-$ export npm_config_devdir=/tmp/.gyp
-```
-
-Or this on Windows:
-
-```console
-> set npm_config_devdir=c:\temp\.gyp
-```
-
-### `npm` configuration
-
-Use the form `OPTION_NAME` for any of the command options listed above.
-
-For example, to set `devdir` equal to `/tmp/.gyp`, you would run:
-
-```bash
-$ npm config set [--global] devdir /tmp/.gyp
-```
-
-**Note:** Configuration set via `npm` will only be used when `node-gyp`
-is run via `npm`, not when `node-gyp` is run directly.
-
-## License
-
-`node-gyp` is available under the MIT license. See the [LICENSE
-file](LICENSE) for details.
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi b/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi
deleted file mode 100644
index 6462f539f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- 'variables' : {
- 'node_engine_include_dir%': 'deps/v8/include',
- 'node_host_binary%': 'node'
- },
- 'target_defaults': {
- 'type': 'loadable_module',
- 'win_delay_load_hook': 'true',
- 'product_prefix': '',
-
- 'conditions': [
- [ 'node_engine=="chakracore"', {
- 'variables': {
- 'node_engine_include_dir%': 'deps/chakrashim/include'
- },
- }]
- ],
-
- 'include_dirs': [
- '<(node_root_dir)/include/node',
- '<(node_root_dir)/src',
- '<(node_root_dir)/deps/openssl/config',
- '<(node_root_dir)/deps/openssl/openssl/include',
- '<(node_root_dir)/deps/uv/include',
- '<(node_root_dir)/deps/zlib',
- '<(node_root_dir)/<(node_engine_include_dir)'
- ],
- 'defines!': [
- 'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
- 'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
- ],
- 'defines': [
- 'NODE_GYP_MODULE_NAME=>(_target_name)',
- 'USING_UV_SHARED=1',
- 'USING_V8_SHARED=1',
- # Warn when using deprecated V8 APIs.
- 'V8_DEPRECATION_WARNINGS=1'
- ],
-
- 'target_conditions': [
- ['_type=="loadable_module"', {
- 'product_extension': 'node',
- 'defines': [
- 'BUILDING_NODE_EXTENSION'
- ],
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '-undefined dynamic_lookup'
- ],
- },
- }],
-
- ['_type=="static_library"', {
- # set to `1` to *disable* the -T thin archive 'ld' flag.
- # older linkers don't support this flag.
- 'standalone_static_library': '<(standalone_static_library)'
- }],
-
- ['_type!="executable"', {
- 'conditions': [
- [ 'OS=="android"', {
- 'cflags!': [ '-fPIE' ],
- }]
- ]
- }],
-
- ['_win_delay_load_hook=="true"', {
- # If the addon specifies `'win_delay_load_hook': 'true'` in its
- # binding.gyp, link a delay-load hook into the DLL. This hook ensures
- # that the addon will work regardless of whether the node/iojs binary
- # is named node.exe, iojs.exe, or something else.
- 'conditions': [
- [ 'OS=="win"', {
- 'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
- 'sources': [
- '<(node_gyp_dir)/src/win_delay_load_hook.cc',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ],
- # Don't print a linker warning when no imports from either .exe
- # are used.
- 'AdditionalOptions': [ '/ignore:4199' ],
- },
- },
- }],
- ],
- }],
- ],
-
- 'conditions': [
- [ 'OS=="mac"', {
- 'defines': [
- '_DARWIN_USE_64_BIT_INODE=1'
- ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@rpath'
- },
- }],
- [ 'OS=="aix"', {
- 'ldflags': [
- '-Wl,-bimport:<(node_exp_file)'
- ],
- }],
- [ 'OS=="zos"', {
- 'cflags': [
- '-q64',
- '-Wc,DLL',
- '-qlonglong',
- '-qenum=int',
- '-qxclang=-fexec-charset=ISO8859-1'
- ],
- 'defines': [
- '_ALL_SOURCE=1',
- 'MAP_FAILED=-1',
- '_UNIX03_SOURCE=1'
- ],
- 'ldflags': [
- '-q64',
- '<(node_exp_file)'
- ],
- }],
- [ 'OS=="win"', {
- 'conditions': [
- ['node_engine=="chakracore"', {
- 'library_dirs': [ '<(node_root_dir)/$(ConfigurationName)' ],
- 'libraries': [ '<@(node_engine_libs)' ],
- }],
- ],
- 'libraries': [
- '-lkernel32.lib',
- '-luser32.lib',
- '-lgdi32.lib',
- '-lwinspool.lib',
- '-lcomdlg32.lib',
- '-ladvapi32.lib',
- '-lshell32.lib',
- '-lole32.lib',
- '-loleaut32.lib',
- '-luuid.lib',
- '-lodbc32.lib',
- '-lDelayImp.lib',
- '-l"<(node_lib_file)"'
- ],
- 'msvs_disabled_warnings': [
- # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
- # needs to have dll-interface to be used by
- # clients of class 'node::ObjectWrap'
- 4251
- ],
- }, {
- # OS!="win"
- 'defines': [
- '_LARGEFILE_SOURCE',
- '_FILE_OFFSET_BITS=64'
- ],
- }],
- [ 'OS in "freebsd openbsd netbsd solaris android" or \
- (OS=="linux" and target_arch!="ia32")', {
- 'cflags': [ '-fPIC' ],
- }],
- ]
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/bin/node-gyp.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/bin/node-gyp.js
deleted file mode 100755
index 49b5721d0..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/bin/node-gyp.js
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/usr/bin/env node
-
-'use strict'
-
-process.title = 'node-gyp'
-
-const envPaths = require('env-paths')
-const gyp = require('../')
-const log = require('npmlog')
-const os = require('os')
-
-/**
- * Process and execute the selected commands.
- */
-
-const prog = gyp()
-var completed = false
-prog.parseArgv(process.argv)
-prog.devDir = prog.opts.devdir
-
-var homeDir = os.homedir()
-if (prog.devDir) {
- prog.devDir = prog.devDir.replace(/^~/, homeDir)
-} else if (homeDir) {
- prog.devDir = envPaths('node-gyp', { suffix: '' }).cache
-} else {
- throw new Error(
- "node-gyp requires that the user's home directory is specified " +
- 'in either of the environmental variables HOME or USERPROFILE. ' +
- 'Overide with: --devdir /path/to/.node-gyp')
-}
-
-if (prog.todo.length === 0) {
- if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
- console.log('v%s', prog.version)
- } else {
- console.log('%s', prog.usage())
- }
- process.exit(0)
-}
-
-log.info('it worked if it ends with', 'ok')
-log.verbose('cli', process.argv)
-log.info('using', 'node-gyp@%s', prog.version)
-log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch)
-
-/**
- * Change dir if -C/--directory was passed.
- */
-
-var dir = prog.opts.directory
-if (dir) {
- var fs = require('fs')
- try {
- var stat = fs.statSync(dir)
- if (stat.isDirectory()) {
- log.info('chdir', dir)
- process.chdir(dir)
- } else {
- log.warn('chdir', dir + ' is not a directory')
- }
- } catch (e) {
- if (e.code === 'ENOENT') {
- log.warn('chdir', dir + ' is not a directory')
- } else {
- log.warn('chdir', 'error during chdir() "%s"', e.message)
- }
- }
-}
-
-function run () {
- var command = prog.todo.shift()
- if (!command) {
- // done!
- completed = true
- log.info('ok')
- return
- }
-
- prog.commands[command.name](command.args, function (err) {
- if (err) {
- log.error(command.name + ' error')
- log.error('stack', err.stack)
- errorMessage()
- log.error('not ok')
- return process.exit(1)
- }
- if (command.name === 'list') {
- var versions = arguments[1]
- if (versions.length > 0) {
- versions.forEach(function (version) {
- console.log(version)
- })
- } else {
- console.log('No node development files installed. Use `node-gyp install` to install a version.')
- }
- } else if (arguments.length >= 2) {
- console.log.apply(console, [].slice.call(arguments, 1))
- }
-
- // now run the next command in the queue
- process.nextTick(run)
- })
-}
-
-process.on('exit', function (code) {
- if (!completed && !code) {
- log.error('Completion callback never invoked!')
- issueMessage()
- process.exit(6)
- }
-})
-
-process.on('uncaughtException', function (err) {
- log.error('UNCAUGHT EXCEPTION')
- log.error('stack', err.stack)
- issueMessage()
- process.exit(7)
-})
-
-function errorMessage () {
- // copied from npm's lib/utils/error-handler.js
- var os = require('os')
- log.error('System', os.type() + ' ' + os.release())
- log.error('command', process.argv
- .map(JSON.stringify).join(' '))
- log.error('cwd', process.cwd())
- log.error('node -v', process.version)
- log.error('node-gyp -v', 'v' + prog.package.version)
-}
-
-function issueMessage () {
- errorMessage()
- log.error('', ['This is a bug in `node-gyp`.',
- 'Try to update node-gyp and file an Issue if it does not help:',
- ' <https://github.com/nodejs/node-gyp/issues>'
- ].join('\n'))
-}
-
-// start running the given commands!
-run()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/AUTHORS b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/AUTHORS
deleted file mode 100644
index d76d8cd76..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/AUTHORS
+++ /dev/null
@@ -1,13 +0,0 @@
-# Names should be added to this file like so:
-# Name or Organization <email address>
-
-Google Inc. <*@google.com>
-Bloomberg Finance L.P. <*@bloomberg.net>
-IBM Inc. <*@*.ibm.com>
-Yandex LLC <*@yandex-team.ru>
-
-Steven Knight <knight@baldmt.com>
-Ryan Norton <rnorton10@gmail.com>
-David J. Sankel <david@sankelsoftware.com>
-Eric N. Vander Weele <ericvw@gmail.com>
-Tom Freudenberg <th.freudenberg@gmail.com>
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/DEPS b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/DEPS
deleted file mode 100644
index 2e1120f27..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/DEPS
+++ /dev/null
@@ -1,24 +0,0 @@
-# DEPS file for gclient use in buildbot execution of gyp tests.
-#
-# (You don't need to use gclient for normal GYP development work.)
-
-vars = {
- "chrome_trunk": "http://src.chromium.org/svn/trunk",
- "googlecode_url": "http://%s.googlecode.com/svn",
-}
-
-deps = {
-}
-
-deps_os = {
- "win": {
- "third_party/cygwin":
- Var("chrome_trunk") + "/deps/third_party/cygwin@66844",
-
- "third_party/python_26":
- Var("chrome_trunk") + "/tools/third_party/python_26@89111",
-
- "src/third_party/pefile":
- (Var("googlecode_url") % "pefile") + "/trunk@63",
- },
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/LICENSE b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/LICENSE
deleted file mode 100644
index ab6b011a1..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/OWNERS b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/OWNERS
deleted file mode 100644
index 72e8ffc0d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-*
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/PRESUBMIT.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/PRESUBMIT.py
deleted file mode 100644
index e52f9d2d2..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/PRESUBMIT.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-"""Top-level presubmit script for GYP.
-
-See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
-for more details about the presubmit API built into gcl.
-"""
-
-
-PYLINT_BLACKLIST = [
- # TODO: fix me.
- # From SCons, not done in google style.
- 'test/lib/TestCmd.py',
- 'test/lib/TestCommon.py',
- 'test/lib/TestGyp.py',
-]
-
-
-PYLINT_DISABLED_WARNINGS = [
- # TODO: fix me.
- # Many tests include modules they don't use.
- 'W0611',
- # Possible unbalanced tuple unpacking with sequence.
- 'W0632',
- # Attempting to unpack a non-sequence.
- 'W0633',
- # Include order doesn't properly include local files?
- 'F0401',
- # Some use of built-in names.
- 'W0622',
- # Some unused variables.
- 'W0612',
- # Operator not preceded/followed by space.
- 'C0323',
- 'C0322',
- # Unnecessary semicolon.
- 'W0301',
- # Unused argument.
- 'W0613',
- # String has no effect (docstring in wrong place).
- 'W0105',
- # map/filter on lambda could be replaced by comprehension.
- 'W0110',
- # Use of eval.
- 'W0123',
- # Comma not followed by space.
- 'C0324',
- # Access to a protected member.
- 'W0212',
- # Bad indent.
- 'W0311',
- # Line too long.
- 'C0301',
- # Undefined variable.
- 'E0602',
- # Not exception type specified.
- 'W0702',
- # No member of that name.
- 'E1101',
- # Dangerous default {}.
- 'W0102',
- # Cyclic import.
- 'R0401',
- # Others, too many to sort.
- 'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
- 'R0201', 'E0101', 'C0321',
- # ************* Module copy
- # W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
- 'W0104',
-]
-
-
-def _LicenseHeader(input_api):
- # Accept any year number from 2009 to the current year.
- current_year = int(input_api.time.strftime('%Y'))
- allowed_years = (str(s) for s in reversed(range(2009, current_year + 1)))
- years_re = '(' + '|'.join(allowed_years) + ')'
-
- # The (c) is deprecated, but tolerate it until it's removed from all files.
- return (
- r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
- r'.*? Use of this source code is governed by a BSD-style license that '
- r'can be\n'
- r'.*? found in the LICENSE file\.\n'
- ) % {
- 'year': years_re,
- }
-
-def CheckChangeOnUpload(input_api, output_api):
- report = []
- report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api, license_header=_LicenseHeader(input_api)))
- return report
-
-
-def CheckChangeOnCommit(input_api, output_api):
- report = []
-
- report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api, license_header=_LicenseHeader(input_api)))
- report.extend(input_api.canned_checks.CheckTreeIsOpen(
- input_api, output_api,
- 'http://gyp-status.appspot.com/status',
- 'http://gyp-status.appspot.com/current'))
-
- import os
- import sys
- old_sys_path = sys.path
- try:
- sys.path = ['pylib', 'test/lib'] + sys.path
- blacklist = PYLINT_BLACKLIST
- if sys.platform == 'win32':
- blacklist = [os.path.normpath(x).replace('\\', '\\\\')
- for x in PYLINT_BLACKLIST]
- report.extend(input_api.canned_checks.RunPylint(
- input_api,
- output_api,
- black_list=blacklist,
- disabled_warnings=PYLINT_DISABLED_WARNINGS))
- finally:
- sys.path = old_sys_path
- return report
-
-
-TRYBOTS = [
- 'linux_try',
- 'mac_try',
- 'win_try',
-]
-
-
-def GetPreferredTryMasters(_, change):
- return {
- 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS },
- }
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/codereview.settings b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/codereview.settings
deleted file mode 100644
index faf37f114..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/codereview.settings
+++ /dev/null
@@ -1,10 +0,0 @@
-# This file is used by gcl to get repository specific information.
-CODE_REVIEW_SERVER: codereview.chromium.org
-CC_LIST: gyp-developer@googlegroups.com
-VIEW_VC: https://chromium.googlesource.com/external/gyp/+/
-TRY_ON_UPLOAD: False
-TRYSERVER_PROJECT: gyp
-TRYSERVER_PATCHLEVEL: 1
-TRYSERVER_ROOT: gyp
-TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl
-PROJECT: gyp
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
deleted file mode 100644
index 8bca51081..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
-// then used during the final link for modules that have large PDBs. Otherwise,
-// the linker will generate a pdb with a page size of 1KB, which imposes a limit
-// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
-// (rather than the linker), this limit is avoided. With this in place PDBs may
-// grow to 2GB.
-//
-// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp
deleted file mode 100755
index 1b8b9bdfb..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-base=$(dirname "$0")
-exec python "${base}/gyp_main.py" "$@"
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp.bat b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp.bat
deleted file mode 100644
index c0b4ca24e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python "%~dp0gyp_main.py" %*
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py
deleted file mode 100755
index f738e8009..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-import subprocess
-
-PY3 = bytes != str
-
-# Below IsCygwin() function copied from pylib/gyp/common.py
-def IsCygwin():
- try:
- out = subprocess.Popen("uname",
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- stdout, stderr = out.communicate()
- if PY3:
- stdout = stdout.decode("utf-8")
- return "CYGWIN" in str(stdout)
- except Exception:
- return False
-
-
-def UnixifyPath(path):
- try:
- if not IsCygwin():
- return path
- out = subprocess.Popen(["cygpath", "-u", path],
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- stdout, _ = out.communicate()
- if PY3:
- stdout = stdout.decode("utf-8")
- return str(stdout)
- except Exception:
- return path
-
-
-# Make sure we're using the version of pylib in this repo, not one installed
-# elsewhere on the system. Also convert to Unix style path on Cygwin systems,
-# else the 'gyp' library will not be found
-path = UnixifyPath(sys.argv[0])
-sys.path.insert(0, os.path.join(os.path.dirname(path), 'pylib'))
-import gyp
-
-if __name__ == '__main__':
- sys.exit(gyp.script_main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
deleted file mode 100644
index 76c4b95c0..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""New implementation of Visual Studio project generation."""
-
-import hashlib
-import os
-import random
-
-import gyp.common
-
-try:
- cmp
-except NameError:
- def cmp(x, y):
- return (x > y) - (x < y)
-
-# Initialize random number generator
-random.seed()
-
-# GUIDs for project types
-ENTRY_TYPE_GUIDS = {
- 'project': '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}',
- 'folder': '{2150E333-8FDC-42A3-9474-1A3956D46DE8}',
-}
-
-#------------------------------------------------------------------------------
-# Helper functions
-
-
-def MakeGuid(name, seed='msvs_new'):
- """Returns a GUID for the specified target name.
-
- Args:
- name: Target name.
- seed: Seed for MD5 hash.
- Returns:
- A GUID-line string calculated from the name and seed.
-
- This generates something which looks like a GUID, but depends only on the
- name and seed. This means the same name/seed will always generate the same
- GUID, so that projects and solutions which refer to each other can explicitly
- determine the GUID to refer to explicitly. It also means that the GUID will
- not change when the project for a target is rebuilt.
- """
- # Calculate a MD5 signature for the seed and name.
- d = hashlib.md5((str(seed) + str(name)).encode('utf-8')).hexdigest().upper()
- # Convert most of the signature to GUID form (discard the rest)
- guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20]
- + '-' + d[20:32] + '}')
- return guid
-
-#------------------------------------------------------------------------------
-
-
-class MSVSSolutionEntry(object):
- def __cmp__(self, other):
- # Sort by name then guid (so things are in order on vs2008).
- return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
-
- def __lt__(self, other):
- return self.__cmp__(other) < 0
-
-
-class MSVSFolder(MSVSSolutionEntry):
- """Folder in a Visual Studio project or solution."""
-
- def __init__(self, path, name = None, entries = None,
- guid = None, items = None):
- """Initializes the folder.
-
- Args:
- path: Full path to the folder.
- name: Name of the folder.
- entries: List of folder entries to nest inside this folder. May contain
- Folder or Project objects. May be None, if the folder is empty.
- guid: GUID to use for folder, if not None.
- items: List of solution items to include in the folder project. May be
- None, if the folder does not directly contain items.
- """
- if name:
- self.name = name
- else:
- # Use last layer.
- self.name = os.path.basename(path)
-
- self.path = path
- self.guid = guid
-
- # Copy passed lists (or set to empty lists)
- self.entries = sorted(list(entries or []))
- self.items = list(items or [])
-
- self.entry_type_guid = ENTRY_TYPE_GUIDS['folder']
-
- def get_guid(self):
- if self.guid is None:
- # Use consistent guids for folders (so things don't regenerate).
- self.guid = MakeGuid(self.path, seed='msvs_folder')
- return self.guid
-
-
-#------------------------------------------------------------------------------
-
-
-class MSVSProject(MSVSSolutionEntry):
- """Visual Studio project."""
-
- def __init__(self, path, name = None, dependencies = None, guid = None,
- spec = None, build_file = None, config_platform_overrides = None,
- fixpath_prefix = None):
- """Initializes the project.
-
- Args:
- path: Absolute path to the project file.
- name: Name of project. If None, the name will be the same as the base
- name of the project file.
- dependencies: List of other Project objects this project is dependent
- upon, if not None.
- guid: GUID to use for project, if not None.
- spec: Dictionary specifying how to build this project.
- build_file: Filename of the .gyp file that the vcproj file comes from.
- config_platform_overrides: optional dict of configuration platforms to
- used in place of the default for this target.
- fixpath_prefix: the path used to adjust the behavior of _fixpath
- """
- self.path = path
- self.guid = guid
- self.spec = spec
- self.build_file = build_file
- # Use project filename if name not specified
- self.name = name or os.path.splitext(os.path.basename(path))[0]
-
- # Copy passed lists (or set to empty lists)
- self.dependencies = list(dependencies or [])
-
- self.entry_type_guid = ENTRY_TYPE_GUIDS['project']
-
- if config_platform_overrides:
- self.config_platform_overrides = config_platform_overrides
- else:
- self.config_platform_overrides = {}
- self.fixpath_prefix = fixpath_prefix
- self.msbuild_toolset = None
-
- def set_dependencies(self, dependencies):
- self.dependencies = list(dependencies or [])
-
- def get_guid(self):
- if self.guid is None:
- # Set GUID from path
- # TODO(rspangler): This is fragile.
- # 1. We can't just use the project filename sans path, since there could
- # be multiple projects with the same base name (for example,
- # foo/unittest.vcproj and bar/unittest.vcproj).
- # 2. The path needs to be relative to $SOURCE_ROOT, so that the project
- # GUID is the same whether it's included from base/base.sln or
- # foo/bar/baz/baz.sln.
- # 3. The GUID needs to be the same each time this builder is invoked, so
- # that we don't need to rebuild the solution when the project changes.
- # 4. We should be able to handle pre-built project files by reading the
- # GUID from the files.
- self.guid = MakeGuid(self.name)
- return self.guid
-
- def set_msbuild_toolset(self, msbuild_toolset):
- self.msbuild_toolset = msbuild_toolset
-
-#------------------------------------------------------------------------------
-
-
-class MSVSSolution(object):
- """Visual Studio solution."""
-
- def __init__(self, path, version, entries=None, variants=None,
- websiteProperties=True):
- """Initializes the solution.
-
- Args:
- path: Path to solution file.
- version: Format version to emit.
- entries: List of entries in solution. May contain Folder or Project
- objects. May be None, if the folder is empty.
- variants: List of build variant strings. If none, a default list will
- be used.
- websiteProperties: Flag to decide if the website properties section
- is generated.
- """
- self.path = path
- self.websiteProperties = websiteProperties
- self.version = version
-
- # Copy passed lists (or set to empty lists)
- self.entries = list(entries or [])
-
- if variants:
- # Copy passed list
- self.variants = variants[:]
- else:
- # Use default
- self.variants = ['Debug|Win32', 'Release|Win32']
- # TODO(rspangler): Need to be able to handle a mapping of solution config
- # to project config. Should we be able to handle variants being a dict,
- # or add a separate variant_map variable? If it's a dict, we can't
- # guarantee the order of variants since dict keys aren't ordered.
-
-
- # TODO(rspangler): Automatically write to disk for now; should delay until
- # node-evaluation time.
- self.Write()
-
-
- def Write(self, writer=gyp.common.WriteOnDiff):
- """Writes the solution file to disk.
-
- Raises:
- IndexError: An entry appears multiple times.
- """
- # Walk the entry tree and collect all the folders and projects.
- all_entries = set()
- entries_to_check = self.entries[:]
- while entries_to_check:
- e = entries_to_check.pop(0)
-
- # If this entry has been visited, nothing to do.
- if e in all_entries:
- continue
-
- all_entries.add(e)
-
- # If this is a folder, check its entries too.
- if isinstance(e, MSVSFolder):
- entries_to_check += e.entries
-
- all_entries = sorted(all_entries)
-
- # Open file and print header
- f = writer(self.path)
- f.write('Microsoft Visual Studio Solution File, '
- 'Format Version %s\r\n' % self.version.SolutionVersion())
- f.write('# %s\r\n' % self.version.Description())
-
- # Project entries
- sln_root = os.path.split(self.path)[0]
- for e in all_entries:
- relative_path = gyp.common.RelativePath(e.path, sln_root)
- # msbuild does not accept an empty folder_name.
- # use '.' in case relative_path is empty.
- folder_name = relative_path.replace('/', '\\') or '.'
- f.write('Project("%s") = "%s", "%s", "%s"\r\n' % (
- e.entry_type_guid, # Entry type GUID
- e.name, # Folder name
- folder_name, # Folder name (again)
- e.get_guid(), # Entry GUID
- ))
-
- # TODO(rspangler): Need a way to configure this stuff
- if self.websiteProperties:
- f.write('\tProjectSection(WebsiteProperties) = preProject\r\n'
- '\t\tDebug.AspNetCompiler.Debug = "True"\r\n'
- '\t\tRelease.AspNetCompiler.Debug = "False"\r\n'
- '\tEndProjectSection\r\n')
-
- if isinstance(e, MSVSFolder):
- if e.items:
- f.write('\tProjectSection(SolutionItems) = preProject\r\n')
- for i in e.items:
- f.write('\t\t%s = %s\r\n' % (i, i))
- f.write('\tEndProjectSection\r\n')
-
- if isinstance(e, MSVSProject):
- if e.dependencies:
- f.write('\tProjectSection(ProjectDependencies) = postProject\r\n')
- for d in e.dependencies:
- f.write('\t\t%s = %s\r\n' % (d.get_guid(), d.get_guid()))
- f.write('\tEndProjectSection\r\n')
-
- f.write('EndProject\r\n')
-
- # Global section
- f.write('Global\r\n')
-
- # Configurations (variants)
- f.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n')
- for v in self.variants:
- f.write('\t\t%s = %s\r\n' % (v, v))
- f.write('\tEndGlobalSection\r\n')
-
- # Sort config guids for easier diffing of solution changes.
- config_guids = []
- config_guids_overrides = {}
- for e in all_entries:
- if isinstance(e, MSVSProject):
- config_guids.append(e.get_guid())
- config_guids_overrides[e.get_guid()] = e.config_platform_overrides
- config_guids.sort()
-
- f.write('\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n')
- for g in config_guids:
- for v in self.variants:
- nv = config_guids_overrides[g].get(v, v)
- # Pick which project configuration to build for this solution
- # configuration.
- f.write('\t\t%s.%s.ActiveCfg = %s\r\n' % (
- g, # Project GUID
- v, # Solution build configuration
- nv, # Project build config for that solution config
- ))
-
- # Enable project in this solution configuration.
- f.write('\t\t%s.%s.Build.0 = %s\r\n' % (
- g, # Project GUID
- v, # Solution build configuration
- nv, # Project build config for that solution config
- ))
- f.write('\tEndGlobalSection\r\n')
-
- # TODO(rspangler): Should be able to configure this stuff too (though I've
- # never seen this be any different)
- f.write('\tGlobalSection(SolutionProperties) = preSolution\r\n')
- f.write('\t\tHideSolutionNode = FALSE\r\n')
- f.write('\tEndGlobalSection\r\n')
-
- # Folder mappings
- # Omit this section if there are no folders
- if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]):
- f.write('\tGlobalSection(NestedProjects) = preSolution\r\n')
- for e in all_entries:
- if not isinstance(e, MSVSFolder):
- continue # Does not apply to projects, only folders
- for subentry in e.entries:
- f.write('\t\t%s = %s\r\n' % (subentry.get_guid(), e.get_guid()))
- f.write('\tEndGlobalSection\r\n')
-
- f.write('EndGlobal\r\n')
-
- f.close()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
deleted file mode 100644
index db1ceede3..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio project reader/writer."""
-
-import gyp.common
-import gyp.easy_xml as easy_xml
-
-#------------------------------------------------------------------------------
-
-
-class Tool(object):
- """Visual Studio tool."""
-
- def __init__(self, name, attrs=None):
- """Initializes the tool.
-
- Args:
- name: Tool name.
- attrs: Dict of tool attributes; may be None.
- """
- self._attrs = attrs or {}
- self._attrs['Name'] = name
-
- def _GetSpecification(self):
- """Creates an element for the tool.
-
- Returns:
- A new xml.dom.Element for the tool.
- """
- return ['Tool', self._attrs]
-
-class Filter(object):
- """Visual Studio filter - that is, a virtual folder."""
-
- def __init__(self, name, contents=None):
- """Initializes the folder.
-
- Args:
- name: Filter (folder) name.
- contents: List of filenames and/or Filter objects contained.
- """
- self.name = name
- self.contents = list(contents or [])
-
-
-#------------------------------------------------------------------------------
-
-
-class Writer(object):
- """Visual Studio XML project writer."""
-
- def __init__(self, project_path, version, name, guid=None, platforms=None):
- """Initializes the project.
-
- Args:
- project_path: Path to the project file.
- version: Format version to emit.
- name: Name of the project.
- guid: GUID to use for project, if not None.
- platforms: Array of string, the supported platforms. If null, ['Win32']
- """
- self.project_path = project_path
- self.version = version
- self.name = name
- self.guid = guid
-
- # Default to Win32 for platforms.
- if not platforms:
- platforms = ['Win32']
-
- # Initialize the specifications of the various sections.
- self.platform_section = ['Platforms']
- for platform in platforms:
- self.platform_section.append(['Platform', {'Name': platform}])
- self.tool_files_section = ['ToolFiles']
- self.configurations_section = ['Configurations']
- self.files_section = ['Files']
-
- # Keep a dict keyed on filename to speed up access.
- self.files_dict = dict()
-
- def AddToolFile(self, path):
- """Adds a tool file to the project.
-
- Args:
- path: Relative path from project to tool file.
- """
- self.tool_files_section.append(['ToolFile', {'RelativePath': path}])
-
- def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools):
- """Returns the specification for a configuration.
-
- Args:
- config_type: Type of configuration node.
- config_name: Configuration name.
- attrs: Dict of configuration attributes; may be None.
- tools: List of tools (strings or Tool objects); may be None.
- Returns:
- """
- # Handle defaults
- if not attrs:
- attrs = {}
- if not tools:
- tools = []
-
- # Add configuration node and its attributes
- node_attrs = attrs.copy()
- node_attrs['Name'] = config_name
- specification = [config_type, node_attrs]
-
- # Add tool nodes and their attributes
- if tools:
- for t in tools:
- if isinstance(t, Tool):
- specification.append(t._GetSpecification())
- else:
- specification.append(Tool(t)._GetSpecification())
- return specification
-
-
- def AddConfig(self, name, attrs=None, tools=None):
- """Adds a configuration to the project.
-
- Args:
- name: Configuration name.
- attrs: Dict of configuration attributes; may be None.
- tools: List of tools (strings or Tool objects); may be None.
- """
- spec = self._GetSpecForConfiguration('Configuration', name, attrs, tools)
- self.configurations_section.append(spec)
-
- def _AddFilesToNode(self, parent, files):
- """Adds files and/or filters to the parent node.
-
- Args:
- parent: Destination node
- files: A list of Filter objects and/or relative paths to files.
-
- Will call itself recursively, if the files list contains Filter objects.
- """
- for f in files:
- if isinstance(f, Filter):
- node = ['Filter', {'Name': f.name}]
- self._AddFilesToNode(node, f.contents)
- else:
- node = ['File', {'RelativePath': f}]
- self.files_dict[f] = node
- parent.append(node)
-
- def AddFiles(self, files):
- """Adds files to the project.
-
- Args:
- files: A list of Filter objects and/or relative paths to files.
-
- This makes a copy of the file/filter tree at the time of this call. If you
- later add files to a Filter object which was passed into a previous call
- to AddFiles(), it will not be reflected in this project.
- """
- self._AddFilesToNode(self.files_section, files)
- # TODO(rspangler) This also doesn't handle adding files to an existing
- # filter. That is, it doesn't merge the trees.
-
- def AddFileConfig(self, path, config, attrs=None, tools=None):
- """Adds a configuration to a file.
-
- Args:
- path: Relative path to the file.
- config: Name of configuration to add.
- attrs: Dict of configuration attributes; may be None.
- tools: List of tools (strings or Tool objects); may be None.
-
- Raises:
- ValueError: Relative path does not match any file added via AddFiles().
- """
- # Find the file node with the right relative path
- parent = self.files_dict.get(path)
- if not parent:
- raise ValueError('AddFileConfig: file "%s" not in project.' % path)
-
- # Add the config to the file node
- spec = self._GetSpecForConfiguration('FileConfiguration', config, attrs,
- tools)
- parent.append(spec)
-
- def WriteIfChanged(self):
- """Writes the project file."""
- # First create XML content definition
- content = [
- 'VisualStudioProject',
- {'ProjectType': 'Visual C++',
- 'Version': self.version.ProjectVersion(),
- 'Name': self.name,
- 'ProjectGUID': self.guid,
- 'RootNamespace': self.name,
- 'Keyword': 'Win32Proj'
- },
- self.platform_section,
- self.tool_files_section,
- self.configurations_section,
- ['References'], # empty section
- self.files_section,
- ['Globals'] # empty section
- ]
- easy_xml.WriteXmlIfChanged(content, self.project_path,
- encoding="Windows-1252")
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
deleted file mode 100644
index 065a339a8..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
+++ /dev/null
@@ -1,1104 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-r"""Code to validate and convert settings of the Microsoft build tools.
-
-This file contains code to validate and convert settings of the Microsoft
-build tools. The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
-and ValidateMSBuildSettings() are the entry points.
-
-This file was created by comparing the projects created by Visual Studio 2008
-and Visual Studio 2010 for all available settings through the user interface.
-The MSBuild schemas were also considered. They are typically found in the
-MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild
-"""
-
-from __future__ import print_function
-
-from gyp import string_types
-
-import sys
-import re
-
-# Dictionaries of settings validators. The key is the tool name, the value is
-# a dictionary mapping setting names to validation functions.
-_msvs_validators = {}
-_msbuild_validators = {}
-
-
-# A dictionary of settings converters. The key is the tool name, the value is
-# a dictionary mapping setting names to conversion functions.
-_msvs_to_msbuild_converters = {}
-
-
-# Tool name mapping from MSVS to MSBuild.
-_msbuild_name_of_tool = {}
-
-
-class _Tool(object):
- """Represents a tool used by MSVS or MSBuild.
-
- Attributes:
- msvs_name: The name of the tool in MSVS.
- msbuild_name: The name of the tool in MSBuild.
- """
-
- def __init__(self, msvs_name, msbuild_name):
- self.msvs_name = msvs_name
- self.msbuild_name = msbuild_name
-
-
-def _AddTool(tool):
- """Adds a tool to the four dictionaries used to process settings.
-
- This only defines the tool. Each setting also needs to be added.
-
- Args:
- tool: The _Tool object to be added.
- """
- _msvs_validators[tool.msvs_name] = {}
- _msbuild_validators[tool.msbuild_name] = {}
- _msvs_to_msbuild_converters[tool.msvs_name] = {}
- _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name
-
-
-def _GetMSBuildToolSettings(msbuild_settings, tool):
- """Returns an MSBuild tool dictionary. Creates it if needed."""
- return msbuild_settings.setdefault(tool.msbuild_name, {})
-
-
-class _Type(object):
- """Type of settings (Base class)."""
-
- def ValidateMSVS(self, value):
- """Verifies that the value is legal for MSVS.
-
- Args:
- value: the value to check for this type.
-
- Raises:
- ValueError if value is not valid for MSVS.
- """
-
- def ValidateMSBuild(self, value):
- """Verifies that the value is legal for MSBuild.
-
- Args:
- value: the value to check for this type.
-
- Raises:
- ValueError if value is not valid for MSBuild.
- """
-
- def ConvertToMSBuild(self, value):
- """Returns the MSBuild equivalent of the MSVS value given.
-
- Args:
- value: the MSVS value to convert.
-
- Returns:
- the MSBuild equivalent.
-
- Raises:
- ValueError if value is not valid.
- """
- return value
-
-
-class _String(_Type):
- """A setting that's just a string."""
-
- def ValidateMSVS(self, value):
- if not isinstance(value, string_types):
- raise ValueError('expected string; got %r' % value)
-
- def ValidateMSBuild(self, value):
- if not isinstance(value, string_types):
- raise ValueError('expected string; got %r' % value)
-
- def ConvertToMSBuild(self, value):
- # Convert the macros
- return ConvertVCMacrosToMSBuild(value)
-
-
-class _StringList(_Type):
- """A settings that's a list of strings."""
-
- def ValidateMSVS(self, value):
- if not isinstance(value, string_types) and not isinstance(value, list):
- raise ValueError('expected string list; got %r' % value)
-
- def ValidateMSBuild(self, value):
- if not isinstance(value, string_types) and not isinstance(value, list):
- raise ValueError('expected string list; got %r' % value)
-
- def ConvertToMSBuild(self, value):
- # Convert the macros
- if isinstance(value, list):
- return [ConvertVCMacrosToMSBuild(i) for i in value]
- else:
- return ConvertVCMacrosToMSBuild(value)
-
-
-class _Boolean(_Type):
- """Boolean settings, can have the values 'false' or 'true'."""
-
- def _Validate(self, value):
- if value != 'true' and value != 'false':
- raise ValueError('expected bool; got %r' % value)
-
- def ValidateMSVS(self, value):
- self._Validate(value)
-
- def ValidateMSBuild(self, value):
- self._Validate(value)
-
- def ConvertToMSBuild(self, value):
- self._Validate(value)
- return value
-
-
-class _Integer(_Type):
- """Integer settings."""
-
- def __init__(self, msbuild_base=10):
- _Type.__init__(self)
- self._msbuild_base = msbuild_base
-
- def ValidateMSVS(self, value):
- # Try to convert, this will raise ValueError if invalid.
- self.ConvertToMSBuild(value)
-
- def ValidateMSBuild(self, value):
- # Try to convert, this will raise ValueError if invalid.
- int(value, self._msbuild_base)
-
- def ConvertToMSBuild(self, value):
- msbuild_format = (self._msbuild_base == 10) and '%d' or '0x%04x'
- return msbuild_format % int(value)
-
-
-class _Enumeration(_Type):
- """Type of settings that is an enumeration.
-
- In MSVS, the values are indexes like '0', '1', and '2'.
- MSBuild uses text labels that are more representative, like 'Win32'.
-
- Constructor args:
- label_list: an array of MSBuild labels that correspond to the MSVS index.
- In the rare cases where MSVS has skipped an index value, None is
- used in the array to indicate the unused spot.
- new: an array of labels that are new to MSBuild.
- """
-
- def __init__(self, label_list, new=None):
- _Type.__init__(self)
- self._label_list = label_list
- self._msbuild_values = set(value for value in label_list
- if value is not None)
- if new is not None:
- self._msbuild_values.update(new)
-
- def ValidateMSVS(self, value):
- # Try to convert. It will raise an exception if not valid.
- self.ConvertToMSBuild(value)
-
- def ValidateMSBuild(self, value):
- if value not in self._msbuild_values:
- raise ValueError('unrecognized enumerated value %s' % value)
-
- def ConvertToMSBuild(self, value):
- index = int(value)
- if index < 0 or index >= len(self._label_list):
- raise ValueError('index value (%d) not in expected range [0, %d)' %
- (index, len(self._label_list)))
- label = self._label_list[index]
- if label is None:
- raise ValueError('converted value for %s not specified.' % value)
- return label
-
-
-# Instantiate the various generic types.
-_boolean = _Boolean()
-_integer = _Integer()
-# For now, we don't do any special validation on these types:
-_string = _String()
-_file_name = _String()
-_folder_name = _String()
-_file_list = _StringList()
-_folder_list = _StringList()
-_string_list = _StringList()
-# Some boolean settings went from numerical values to boolean. The
-# mapping is 0: default, 1: false, 2: true.
-_newly_boolean = _Enumeration(['', 'false', 'true'])
-
-
-def _Same(tool, name, setting_type):
- """Defines a setting that has the same name in MSVS and MSBuild.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- name: the name of the setting.
- setting_type: the type of this setting.
- """
- _Renamed(tool, name, name, setting_type)
-
-
-def _Renamed(tool, msvs_name, msbuild_name, setting_type):
- """Defines a setting for which the name has changed.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- msvs_name: the name of the MSVS setting.
- msbuild_name: the name of the MSBuild setting.
- setting_type: the type of this setting.
- """
-
- def _Translate(value, msbuild_settings):
- msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
- msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value)
-
- _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS
- _msbuild_validators[tool.msbuild_name][msbuild_name] = (
- setting_type.ValidateMSBuild)
- _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-def _Moved(tool, settings_name, msbuild_tool_name, setting_type):
- _MovedAndRenamed(tool, settings_name, msbuild_tool_name, settings_name,
- setting_type)
-
-
-def _MovedAndRenamed(tool, msvs_settings_name, msbuild_tool_name,
- msbuild_settings_name, setting_type):
- """Defines a setting that may have moved to a new section.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- msvs_settings_name: the MSVS name of the setting.
- msbuild_tool_name: the name of the MSBuild tool to place the setting under.
- msbuild_settings_name: the MSBuild name of the setting.
- setting_type: the type of this setting.
- """
-
- def _Translate(value, msbuild_settings):
- tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {})
- tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value)
-
- _msvs_validators[tool.msvs_name][msvs_settings_name] = (
- setting_type.ValidateMSVS)
- validator = setting_type.ValidateMSBuild
- _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator
- _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate
-
-
-def _MSVSOnly(tool, name, setting_type):
- """Defines a setting that is only found in MSVS.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- name: the name of the setting.
- setting_type: the type of this setting.
- """
-
- def _Translate(unused_value, unused_msbuild_settings):
- # Since this is for MSVS only settings, no translation will happen.
- pass
-
- _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS
- _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
-
-
-def _MSBuildOnly(tool, name, setting_type):
- """Defines a setting that is only found in MSBuild.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- name: the name of the setting.
- setting_type: the type of this setting.
- """
-
- def _Translate(value, msbuild_settings):
- # Let msbuild-only properties get translated as-is from msvs_settings.
- tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {})
- tool_settings[name] = value
-
- _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild
- _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
-
-
-def _ConvertedToAdditionalOption(tool, msvs_name, flag):
- """Defines a setting that's handled via a command line option in MSBuild.
-
- Args:
- tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
- msvs_name: the name of the MSVS setting that if 'true' becomes a flag
- flag: the flag to insert at the end of the AdditionalOptions
- """
-
- def _Translate(value, msbuild_settings):
- if value == 'true':
- tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
- if 'AdditionalOptions' in tool_settings:
- new_flags = '%s %s' % (tool_settings['AdditionalOptions'], flag)
- else:
- new_flags = flag
- tool_settings['AdditionalOptions'] = new_flags
- _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS
- _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-def _CustomGeneratePreprocessedFile(tool, msvs_name):
- def _Translate(value, msbuild_settings):
- tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
- if value == '0':
- tool_settings['PreprocessToFile'] = 'false'
- tool_settings['PreprocessSuppressLineNumbers'] = 'false'
- elif value == '1': # /P
- tool_settings['PreprocessToFile'] = 'true'
- tool_settings['PreprocessSuppressLineNumbers'] = 'false'
- elif value == '2': # /EP /P
- tool_settings['PreprocessToFile'] = 'true'
- tool_settings['PreprocessSuppressLineNumbers'] = 'true'
- else:
- raise ValueError('value must be one of [0, 1, 2]; got %s' % value)
- # Create a bogus validator that looks for '0', '1', or '2'
- msvs_validator = _Enumeration(['a', 'b', 'c']).ValidateMSVS
- _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator
- msbuild_validator = _boolean.ValidateMSBuild
- msbuild_tool_validators = _msbuild_validators[tool.msbuild_name]
- msbuild_tool_validators['PreprocessToFile'] = msbuild_validator
- msbuild_tool_validators['PreprocessSuppressLineNumbers'] = msbuild_validator
- _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-fix_vc_macro_slashes_regex_list = ('IntDir', 'OutDir')
-fix_vc_macro_slashes_regex = re.compile(
- r'(\$\((?:%s)\))(?:[\\/]+)' % "|".join(fix_vc_macro_slashes_regex_list)
-)
-
-# Regular expression to detect keys that were generated by exclusion lists
-_EXCLUDED_SUFFIX_RE = re.compile('^(.*)_excluded$')
-
-
-def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr):
- """Verify that 'setting' is valid if it is generated from an exclusion list.
-
- If the setting appears to be generated from an exclusion list, the root name
- is checked.
-
- Args:
- setting: A string that is the setting name to validate
- settings: A dictionary where the keys are valid settings
- error_msg: The message to emit in the event of error
- stderr: The stream receiving the error messages.
- """
- # This may be unrecognized because it's an exclusion list. If the
- # setting name has the _excluded suffix, then check the root name.
- unrecognized = True
- m = re.match(_EXCLUDED_SUFFIX_RE, setting)
- if m:
- root_setting = m.group(1)
- unrecognized = root_setting not in settings
-
- if unrecognized:
- # We don't know this setting. Give a warning.
- print(error_msg, file=stderr)
-
-
-def FixVCMacroSlashes(s):
- """Replace macros which have excessive following slashes.
-
- These macros are known to have a built-in trailing slash. Furthermore, many
- scripts hiccup on processing paths with extra slashes in the middle.
-
- This list is probably not exhaustive. Add as needed.
- """
- if '$' in s:
- s = fix_vc_macro_slashes_regex.sub(r'\1', s)
- return s
-
-
-def ConvertVCMacrosToMSBuild(s):
- """Convert the MSVS macros found in the string to the MSBuild equivalent.
-
- This list is probably not exhaustive. Add as needed.
- """
- if '$' in s:
- replace_map = {
- '$(ConfigurationName)': '$(Configuration)',
- '$(InputDir)': '%(RelativeDir)',
- '$(InputExt)': '%(Extension)',
- '$(InputFileName)': '%(Filename)%(Extension)',
- '$(InputName)': '%(Filename)',
- '$(InputPath)': '%(Identity)',
- '$(ParentName)': '$(ProjectFileName)',
- '$(PlatformName)': '$(Platform)',
- '$(SafeInputName)': '%(Filename)',
- }
- for old, new in replace_map.items():
- s = s.replace(old, new)
- s = FixVCMacroSlashes(s)
- return s
-
-
-def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr):
- """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
-
- Args:
- msvs_settings: A dictionary. The key is the tool name. The values are
- themselves dictionaries of settings and their values.
- stderr: The stream receiving the error messages.
-
- Returns:
- A dictionary of MSBuild settings. The key is either the MSBuild tool name
- or the empty string (for the global settings). The values are themselves
- dictionaries of settings and their values.
- """
- msbuild_settings = {}
- for msvs_tool_name, msvs_tool_settings in msvs_settings.items():
- if msvs_tool_name in _msvs_to_msbuild_converters:
- msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name]
- for msvs_setting, msvs_value in msvs_tool_settings.items():
- if msvs_setting in msvs_tool:
- # Invoke the translation function.
- try:
- msvs_tool[msvs_setting](msvs_value, msbuild_settings)
- except ValueError as e:
- print('Warning: while converting %s/%s to MSBuild, '
- '%s' % (msvs_tool_name, msvs_setting, e), file=stderr)
- else:
- _ValidateExclusionSetting(msvs_setting,
- msvs_tool,
- ('Warning: unrecognized setting %s/%s '
- 'while converting to MSBuild.' %
- (msvs_tool_name, msvs_setting)),
- stderr)
- else:
- print('Warning: unrecognized tool %s while converting to '
- 'MSBuild.' % msvs_tool_name, file=stderr)
- return msbuild_settings
-
-
-def ValidateMSVSSettings(settings, stderr=sys.stderr):
- """Validates that the names of the settings are valid for MSVS.
-
- Args:
- settings: A dictionary. The key is the tool name. The values are
- themselves dictionaries of settings and their values.
- stderr: The stream receiving the error messages.
- """
- _ValidateSettings(_msvs_validators, settings, stderr)
-
-
-def ValidateMSBuildSettings(settings, stderr=sys.stderr):
- """Validates that the names of the settings are valid for MSBuild.
-
- Args:
- settings: A dictionary. The key is the tool name. The values are
- themselves dictionaries of settings and their values.
- stderr: The stream receiving the error messages.
- """
- _ValidateSettings(_msbuild_validators, settings, stderr)
-
-
-def _ValidateSettings(validators, settings, stderr):
- """Validates that the settings are valid for MSBuild or MSVS.
-
- We currently only validate the names of the settings, not their values.
-
- Args:
- validators: A dictionary of tools and their validators.
- settings: A dictionary. The key is the tool name. The values are
- themselves dictionaries of settings and their values.
- stderr: The stream receiving the error messages.
- """
- for tool_name in settings:
- if tool_name in validators:
- tool_validators = validators[tool_name]
- for setting, value in settings[tool_name].items():
- if setting in tool_validators:
- try:
- tool_validators[setting](value)
- except ValueError as e:
- print('Warning: for %s/%s, %s' %
- (tool_name, setting, e), file=stderr)
- else:
- _ValidateExclusionSetting(setting,
- tool_validators,
- ('Warning: unrecognized setting %s/%s' %
- (tool_name, setting)),
- stderr)
-
- else:
- print('Warning: unrecognized tool %s' % (tool_name), file=stderr)
-
-
-# MSVS and MBuild names of the tools.
-_compile = _Tool('VCCLCompilerTool', 'ClCompile')
-_link = _Tool('VCLinkerTool', 'Link')
-_midl = _Tool('VCMIDLTool', 'Midl')
-_rc = _Tool('VCResourceCompilerTool', 'ResourceCompile')
-_lib = _Tool('VCLibrarianTool', 'Lib')
-_manifest = _Tool('VCManifestTool', 'Manifest')
-_masm = _Tool('MASM', 'MASM')
-_armasm = _Tool('ARMASM', 'ARMASM')
-
-
-_AddTool(_compile)
-_AddTool(_link)
-_AddTool(_midl)
-_AddTool(_rc)
-_AddTool(_lib)
-_AddTool(_manifest)
-_AddTool(_masm)
-_AddTool(_armasm)
-# Add sections only found in the MSBuild settings.
-_msbuild_validators[''] = {}
-_msbuild_validators['ProjectReference'] = {}
-_msbuild_validators['ManifestResourceCompile'] = {}
-
-# Descriptions of the compiler options, i.e. VCCLCompilerTool in MSVS and
-# ClCompile in MSBuild.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\cl.xml" for
-# the schema of the MSBuild ClCompile settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_compile, 'AdditionalIncludeDirectories', _folder_list) # /I
-_Same(_compile, 'AdditionalOptions', _string_list)
-_Same(_compile, 'AdditionalUsingDirectories', _folder_list) # /AI
-_Same(_compile, 'AssemblerListingLocation', _file_name) # /Fa
-_Same(_compile, 'BrowseInformationFile', _file_name)
-_Same(_compile, 'BufferSecurityCheck', _boolean) # /GS
-_Same(_compile, 'DisableLanguageExtensions', _boolean) # /Za
-_Same(_compile, 'DisableSpecificWarnings', _string_list) # /wd
-_Same(_compile, 'EnableFiberSafeOptimizations', _boolean) # /GT
-_Same(_compile, 'EnablePREfast', _boolean) # /analyze Visible='false'
-_Same(_compile, 'ExpandAttributedSource', _boolean) # /Fx
-_Same(_compile, 'FloatingPointExceptions', _boolean) # /fp:except
-_Same(_compile, 'ForceConformanceInForLoopScope', _boolean) # /Zc:forScope
-_Same(_compile, 'ForcedIncludeFiles', _file_list) # /FI
-_Same(_compile, 'ForcedUsingFiles', _file_list) # /FU
-_Same(_compile, 'GenerateXMLDocumentationFiles', _boolean) # /doc
-_Same(_compile, 'IgnoreStandardIncludePath', _boolean) # /X
-_Same(_compile, 'MinimalRebuild', _boolean) # /Gm
-_Same(_compile, 'OmitDefaultLibName', _boolean) # /Zl
-_Same(_compile, 'OmitFramePointers', _boolean) # /Oy
-_Same(_compile, 'PreprocessorDefinitions', _string_list) # /D
-_Same(_compile, 'ProgramDataBaseFileName', _file_name) # /Fd
-_Same(_compile, 'RuntimeTypeInfo', _boolean) # /GR
-_Same(_compile, 'ShowIncludes', _boolean) # /showIncludes
-_Same(_compile, 'SmallerTypeCheck', _boolean) # /RTCc
-_Same(_compile, 'StringPooling', _boolean) # /GF
-_Same(_compile, 'SuppressStartupBanner', _boolean) # /nologo
-_Same(_compile, 'TreatWChar_tAsBuiltInType', _boolean) # /Zc:wchar_t
-_Same(_compile, 'UndefineAllPreprocessorDefinitions', _boolean) # /u
-_Same(_compile, 'UndefinePreprocessorDefinitions', _string_list) # /U
-_Same(_compile, 'UseFullPaths', _boolean) # /FC
-_Same(_compile, 'WholeProgramOptimization', _boolean) # /GL
-_Same(_compile, 'XMLDocumentationFileName', _file_name)
-
-_Same(_compile, 'AssemblerOutput',
- _Enumeration(['NoListing',
- 'AssemblyCode', # /FA
- 'All', # /FAcs
- 'AssemblyAndMachineCode', # /FAc
- 'AssemblyAndSourceCode'])) # /FAs
-_Same(_compile, 'BasicRuntimeChecks',
- _Enumeration(['Default',
- 'StackFrameRuntimeCheck', # /RTCs
- 'UninitializedLocalUsageCheck', # /RTCu
- 'EnableFastChecks'])) # /RTC1
-_Same(_compile, 'BrowseInformation',
- _Enumeration(['false',
- 'true', # /FR
- 'true'])) # /Fr
-_Same(_compile, 'CallingConvention',
- _Enumeration(['Cdecl', # /Gd
- 'FastCall', # /Gr
- 'StdCall', # /Gz
- 'VectorCall'])) # /Gv
-_Same(_compile, 'CompileAs',
- _Enumeration(['Default',
- 'CompileAsC', # /TC
- 'CompileAsCpp'])) # /TP
-_Same(_compile, 'DebugInformationFormat',
- _Enumeration(['', # Disabled
- 'OldStyle', # /Z7
- None,
- 'ProgramDatabase', # /Zi
- 'EditAndContinue'])) # /ZI
-_Same(_compile, 'EnableEnhancedInstructionSet',
- _Enumeration(['NotSet',
- 'StreamingSIMDExtensions', # /arch:SSE
- 'StreamingSIMDExtensions2', # /arch:SSE2
- 'AdvancedVectorExtensions', # /arch:AVX (vs2012+)
- 'NoExtensions', # /arch:IA32 (vs2012+)
- # This one only exists in the new msbuild format.
- 'AdvancedVectorExtensions2', # /arch:AVX2 (vs2013r2+)
- ]))
-_Same(_compile, 'ErrorReporting',
- _Enumeration(['None', # /errorReport:none
- 'Prompt', # /errorReport:prompt
- 'Queue'], # /errorReport:queue
- new=['Send'])) # /errorReport:send"
-_Same(_compile, 'ExceptionHandling',
- _Enumeration(['false',
- 'Sync', # /EHsc
- 'Async'], # /EHa
- new=['SyncCThrow'])) # /EHs
-_Same(_compile, 'FavorSizeOrSpeed',
- _Enumeration(['Neither',
- 'Speed', # /Ot
- 'Size'])) # /Os
-_Same(_compile, 'FloatingPointModel',
- _Enumeration(['Precise', # /fp:precise
- 'Strict', # /fp:strict
- 'Fast'])) # /fp:fast
-_Same(_compile, 'InlineFunctionExpansion',
- _Enumeration(['Default',
- 'OnlyExplicitInline', # /Ob1
- 'AnySuitable'], # /Ob2
- new=['Disabled'])) # /Ob0
-_Same(_compile, 'Optimization',
- _Enumeration(['Disabled', # /Od
- 'MinSpace', # /O1
- 'MaxSpeed', # /O2
- 'Full'])) # /Ox
-_Same(_compile, 'RuntimeLibrary',
- _Enumeration(['MultiThreaded', # /MT
- 'MultiThreadedDebug', # /MTd
- 'MultiThreadedDLL', # /MD
- 'MultiThreadedDebugDLL'])) # /MDd
-_Same(_compile, 'StructMemberAlignment',
- _Enumeration(['Default',
- '1Byte', # /Zp1
- '2Bytes', # /Zp2
- '4Bytes', # /Zp4
- '8Bytes', # /Zp8
- '16Bytes'])) # /Zp16
-_Same(_compile, 'WarningLevel',
- _Enumeration(['TurnOffAllWarnings', # /W0
- 'Level1', # /W1
- 'Level2', # /W2
- 'Level3', # /W3
- 'Level4'], # /W4
- new=['EnableAllWarnings'])) # /Wall
-
-# Options found in MSVS that have been renamed in MSBuild.
-_Renamed(_compile, 'EnableFunctionLevelLinking', 'FunctionLevelLinking',
- _boolean) # /Gy
-_Renamed(_compile, 'EnableIntrinsicFunctions', 'IntrinsicFunctions',
- _boolean) # /Oi
-_Renamed(_compile, 'KeepComments', 'PreprocessKeepComments', _boolean) # /C
-_Renamed(_compile, 'ObjectFile', 'ObjectFileName', _file_name) # /Fo
-_Renamed(_compile, 'OpenMP', 'OpenMPSupport', _boolean) # /openmp
-_Renamed(_compile, 'PrecompiledHeaderThrough', 'PrecompiledHeaderFile',
- _file_name) # Used with /Yc and /Yu
-_Renamed(_compile, 'PrecompiledHeaderFile', 'PrecompiledHeaderOutputFile',
- _file_name) # /Fp
-_Renamed(_compile, 'UsePrecompiledHeader', 'PrecompiledHeader',
- _Enumeration(['NotUsing', # VS recognized '' for this value too.
- 'Create', # /Yc
- 'Use'])) # /Yu
-_Renamed(_compile, 'WarnAsError', 'TreatWarningAsError', _boolean) # /WX
-
-_ConvertedToAdditionalOption(_compile, 'DefaultCharIsUnsigned', '/J')
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_compile, 'Detect64BitPortabilityProblems', _boolean)
-_MSVSOnly(_compile, 'UseUnicodeResponseFiles', _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_compile, 'BuildingInIDE', _boolean)
-_MSBuildOnly(_compile, 'CompileAsManaged',
- _Enumeration([], new=['false',
- 'true'])) # /clr
-_MSBuildOnly(_compile, 'CreateHotpatchableImage', _boolean) # /hotpatch
-_MSBuildOnly(_compile, 'MultiProcessorCompilation', _boolean) # /MP
-_MSBuildOnly(_compile, 'PreprocessOutputPath', _string) # /Fi
-_MSBuildOnly(_compile, 'ProcessorNumber', _integer) # the number of processors
-_MSBuildOnly(_compile, 'TrackerLogDirectory', _folder_name)
-_MSBuildOnly(_compile, 'TreatSpecificWarningsAsErrors', _string_list) # /we
-_MSBuildOnly(_compile, 'UseUnicodeForAssemblerListing', _boolean) # /FAu
-
-# Defines a setting that needs very customized processing
-_CustomGeneratePreprocessedFile(_compile, 'GeneratePreprocessedFile')
-
-
-# Directives for converting MSVS VCLinkerTool to MSBuild Link.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\link.xml" for
-# the schema of the MSBuild Link settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_link, 'AdditionalDependencies', _file_list)
-_Same(_link, 'AdditionalLibraryDirectories', _folder_list) # /LIBPATH
-# /MANIFESTDEPENDENCY:
-_Same(_link, 'AdditionalManifestDependencies', _file_list)
-_Same(_link, 'AdditionalOptions', _string_list)
-_Same(_link, 'AddModuleNamesToAssembly', _file_list) # /ASSEMBLYMODULE
-_Same(_link, 'AllowIsolation', _boolean) # /ALLOWISOLATION
-_Same(_link, 'AssemblyLinkResource', _file_list) # /ASSEMBLYLINKRESOURCE
-_Same(_link, 'BaseAddress', _string) # /BASE
-_Same(_link, 'CLRUnmanagedCodeCheck', _boolean) # /CLRUNMANAGEDCODECHECK
-_Same(_link, 'DelayLoadDLLs', _file_list) # /DELAYLOAD
-_Same(_link, 'DelaySign', _boolean) # /DELAYSIGN
-_Same(_link, 'EmbedManagedResourceFile', _file_list) # /ASSEMBLYRESOURCE
-_Same(_link, 'EnableUAC', _boolean) # /MANIFESTUAC
-_Same(_link, 'EntryPointSymbol', _string) # /ENTRY
-_Same(_link, 'ForceSymbolReferences', _file_list) # /INCLUDE
-_Same(_link, 'FunctionOrder', _file_name) # /ORDER
-_Same(_link, 'GenerateDebugInformation', _boolean) # /DEBUG
-_Same(_link, 'GenerateMapFile', _boolean) # /MAP
-_Same(_link, 'HeapCommitSize', _string)
-_Same(_link, 'HeapReserveSize', _string) # /HEAP
-_Same(_link, 'IgnoreAllDefaultLibraries', _boolean) # /NODEFAULTLIB
-_Same(_link, 'IgnoreEmbeddedIDL', _boolean) # /IGNOREIDL
-_Same(_link, 'ImportLibrary', _file_name) # /IMPLIB
-_Same(_link, 'KeyContainer', _file_name) # /KEYCONTAINER
-_Same(_link, 'KeyFile', _file_name) # /KEYFILE
-_Same(_link, 'ManifestFile', _file_name) # /ManifestFile
-_Same(_link, 'MapExports', _boolean) # /MAPINFO:EXPORTS
-_Same(_link, 'MapFileName', _file_name)
-_Same(_link, 'MergedIDLBaseFileName', _file_name) # /IDLOUT
-_Same(_link, 'MergeSections', _string) # /MERGE
-_Same(_link, 'MidlCommandFile', _file_name) # /MIDL
-_Same(_link, 'ModuleDefinitionFile', _file_name) # /DEF
-_Same(_link, 'OutputFile', _file_name) # /OUT
-_Same(_link, 'PerUserRedirection', _boolean)
-_Same(_link, 'Profile', _boolean) # /PROFILE
-_Same(_link, 'ProfileGuidedDatabase', _file_name) # /PGD
-_Same(_link, 'ProgramDatabaseFile', _file_name) # /PDB
-_Same(_link, 'RegisterOutput', _boolean)
-_Same(_link, 'SetChecksum', _boolean) # /RELEASE
-_Same(_link, 'StackCommitSize', _string)
-_Same(_link, 'StackReserveSize', _string) # /STACK
-_Same(_link, 'StripPrivateSymbols', _file_name) # /PDBSTRIPPED
-_Same(_link, 'SupportUnloadOfDelayLoadedDLL', _boolean) # /DELAY:UNLOAD
-_Same(_link, 'SuppressStartupBanner', _boolean) # /NOLOGO
-_Same(_link, 'SwapRunFromCD', _boolean) # /SWAPRUN:CD
-_Same(_link, 'TurnOffAssemblyGeneration', _boolean) # /NOASSEMBLY
-_Same(_link, 'TypeLibraryFile', _file_name) # /TLBOUT
-_Same(_link, 'TypeLibraryResourceID', _integer) # /TLBID
-_Same(_link, 'UACUIAccess', _boolean) # /uiAccess='true'
-_Same(_link, 'Version', _string) # /VERSION
-
-_Same(_link, 'EnableCOMDATFolding', _newly_boolean) # /OPT:ICF
-_Same(_link, 'FixedBaseAddress', _newly_boolean) # /FIXED
-_Same(_link, 'LargeAddressAware', _newly_boolean) # /LARGEADDRESSAWARE
-_Same(_link, 'OptimizeReferences', _newly_boolean) # /OPT:REF
-_Same(_link, 'RandomizedBaseAddress', _newly_boolean) # /DYNAMICBASE
-_Same(_link, 'TerminalServerAware', _newly_boolean) # /TSAWARE
-
-_subsystem_enumeration = _Enumeration(
- ['NotSet',
- 'Console', # /SUBSYSTEM:CONSOLE
- 'Windows', # /SUBSYSTEM:WINDOWS
- 'Native', # /SUBSYSTEM:NATIVE
- 'EFI Application', # /SUBSYSTEM:EFI_APPLICATION
- 'EFI Boot Service Driver', # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
- 'EFI ROM', # /SUBSYSTEM:EFI_ROM
- 'EFI Runtime', # /SUBSYSTEM:EFI_RUNTIME_DRIVER
- 'WindowsCE'], # /SUBSYSTEM:WINDOWSCE
- new=['POSIX']) # /SUBSYSTEM:POSIX
-
-_target_machine_enumeration = _Enumeration(
- ['NotSet',
- 'MachineX86', # /MACHINE:X86
- None,
- 'MachineARM', # /MACHINE:ARM
- 'MachineEBC', # /MACHINE:EBC
- 'MachineIA64', # /MACHINE:IA64
- None,
- 'MachineMIPS', # /MACHINE:MIPS
- 'MachineMIPS16', # /MACHINE:MIPS16
- 'MachineMIPSFPU', # /MACHINE:MIPSFPU
- 'MachineMIPSFPU16', # /MACHINE:MIPSFPU16
- None,
- None,
- None,
- 'MachineSH4', # /MACHINE:SH4
- None,
- 'MachineTHUMB', # /MACHINE:THUMB
- 'MachineX64']) # /MACHINE:X64
-
-_Same(_link, 'AssemblyDebug',
- _Enumeration(['',
- 'true', # /ASSEMBLYDEBUG
- 'false'])) # /ASSEMBLYDEBUG:DISABLE
-_Same(_link, 'CLRImageType',
- _Enumeration(['Default',
- 'ForceIJWImage', # /CLRIMAGETYPE:IJW
- 'ForcePureILImage', # /Switch="CLRIMAGETYPE:PURE
- 'ForceSafeILImage'])) # /Switch="CLRIMAGETYPE:SAFE
-_Same(_link, 'CLRThreadAttribute',
- _Enumeration(['DefaultThreadingAttribute', # /CLRTHREADATTRIBUTE:NONE
- 'MTAThreadingAttribute', # /CLRTHREADATTRIBUTE:MTA
- 'STAThreadingAttribute'])) # /CLRTHREADATTRIBUTE:STA
-_Same(_link, 'DataExecutionPrevention',
- _Enumeration(['',
- 'false', # /NXCOMPAT:NO
- 'true'])) # /NXCOMPAT
-_Same(_link, 'Driver',
- _Enumeration(['NotSet',
- 'Driver', # /Driver
- 'UpOnly', # /DRIVER:UPONLY
- 'WDM'])) # /DRIVER:WDM
-_Same(_link, 'LinkTimeCodeGeneration',
- _Enumeration(['Default',
- 'UseLinkTimeCodeGeneration', # /LTCG
- 'PGInstrument', # /LTCG:PGInstrument
- 'PGOptimization', # /LTCG:PGOptimize
- 'PGUpdate'])) # /LTCG:PGUpdate
-_Same(_link, 'ShowProgress',
- _Enumeration(['NotSet',
- 'LinkVerbose', # /VERBOSE
- 'LinkVerboseLib'], # /VERBOSE:Lib
- new=['LinkVerboseICF', # /VERBOSE:ICF
- 'LinkVerboseREF', # /VERBOSE:REF
- 'LinkVerboseSAFESEH', # /VERBOSE:SAFESEH
- 'LinkVerboseCLR'])) # /VERBOSE:CLR
-_Same(_link, 'SubSystem', _subsystem_enumeration)
-_Same(_link, 'TargetMachine', _target_machine_enumeration)
-_Same(_link, 'UACExecutionLevel',
- _Enumeration(['AsInvoker', # /level='asInvoker'
- 'HighestAvailable', # /level='highestAvailable'
- 'RequireAdministrator'])) # /level='requireAdministrator'
-_Same(_link, 'MinimumRequiredVersion', _string)
-_Same(_link, 'TreatLinkerWarningAsErrors', _boolean) # /WX
-
-
-# Options found in MSVS that have been renamed in MSBuild.
-_Renamed(_link, 'ErrorReporting', 'LinkErrorReporting',
- _Enumeration(['NoErrorReport', # /ERRORREPORT:NONE
- 'PromptImmediately', # /ERRORREPORT:PROMPT
- 'QueueForNextLogin'], # /ERRORREPORT:QUEUE
- new=['SendErrorReport'])) # /ERRORREPORT:SEND
-_Renamed(_link, 'IgnoreDefaultLibraryNames', 'IgnoreSpecificDefaultLibraries',
- _file_list) # /NODEFAULTLIB
-_Renamed(_link, 'ResourceOnlyDLL', 'NoEntryPoint', _boolean) # /NOENTRY
-_Renamed(_link, 'SwapRunFromNet', 'SwapRunFromNET', _boolean) # /SWAPRUN:NET
-
-_Moved(_link, 'GenerateManifest', '', _boolean)
-_Moved(_link, 'IgnoreImportLibrary', '', _boolean)
-_Moved(_link, 'LinkIncremental', '', _newly_boolean)
-_Moved(_link, 'LinkLibraryDependencies', 'ProjectReference', _boolean)
-_Moved(_link, 'UseLibraryDependencyInputs', 'ProjectReference', _boolean)
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_link, 'OptimizeForWindows98', _newly_boolean)
-_MSVSOnly(_link, 'UseUnicodeResponseFiles', _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_link, 'BuildingInIDE', _boolean)
-_MSBuildOnly(_link, 'ImageHasSafeExceptionHandlers', _boolean) # /SAFESEH
-_MSBuildOnly(_link, 'LinkDLL', _boolean) # /DLL Visible='false'
-_MSBuildOnly(_link, 'LinkStatus', _boolean) # /LTCG:STATUS
-_MSBuildOnly(_link, 'PreventDllBinding', _boolean) # /ALLOWBIND
-_MSBuildOnly(_link, 'SupportNobindOfDelayLoadedDLL', _boolean) # /DELAY:NOBIND
-_MSBuildOnly(_link, 'TrackerLogDirectory', _folder_name)
-_MSBuildOnly(_link, 'MSDOSStubFileName', _file_name) # /STUB Visible='false'
-_MSBuildOnly(_link, 'SectionAlignment', _integer) # /ALIGN
-_MSBuildOnly(_link, 'SpecifySectionAttributes', _string) # /SECTION
-_MSBuildOnly(_link, 'ForceFileOutput',
- _Enumeration([], new=['Enabled', # /FORCE
- # /FORCE:MULTIPLE
- 'MultiplyDefinedSymbolOnly',
- 'UndefinedSymbolOnly'])) # /FORCE:UNRESOLVED
-_MSBuildOnly(_link, 'CreateHotPatchableImage',
- _Enumeration([], new=['Enabled', # /FUNCTIONPADMIN
- 'X86Image', # /FUNCTIONPADMIN:5
- 'X64Image', # /FUNCTIONPADMIN:6
- 'ItaniumImage'])) # /FUNCTIONPADMIN:16
-_MSBuildOnly(_link, 'CLRSupportLastError',
- _Enumeration([], new=['Enabled', # /CLRSupportLastError
- 'Disabled', # /CLRSupportLastError:NO
- # /CLRSupportLastError:SYSTEMDLL
- 'SystemDlls']))
-
-
-# Directives for converting VCResourceCompilerTool to ResourceCompile.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\rc.xml" for
-# the schema of the MSBuild ResourceCompile settings.
-
-_Same(_rc, 'AdditionalOptions', _string_list)
-_Same(_rc, 'AdditionalIncludeDirectories', _folder_list) # /I
-_Same(_rc, 'Culture', _Integer(msbuild_base=16))
-_Same(_rc, 'IgnoreStandardIncludePath', _boolean) # /X
-_Same(_rc, 'PreprocessorDefinitions', _string_list) # /D
-_Same(_rc, 'ResourceOutputFileName', _string) # /fo
-_Same(_rc, 'ShowProgress', _boolean) # /v
-# There is no UI in VisualStudio 2008 to set the following properties.
-# However they are found in CL and other tools. Include them here for
-# completeness, as they are very likely to have the same usage pattern.
-_Same(_rc, 'SuppressStartupBanner', _boolean) # /nologo
-_Same(_rc, 'UndefinePreprocessorDefinitions', _string_list) # /u
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_rc, 'NullTerminateStrings', _boolean) # /n
-_MSBuildOnly(_rc, 'TrackerLogDirectory', _folder_name)
-
-
-# Directives for converting VCMIDLTool to Midl.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\midl.xml" for
-# the schema of the MSBuild Midl settings.
-
-_Same(_midl, 'AdditionalIncludeDirectories', _folder_list) # /I
-_Same(_midl, 'AdditionalOptions', _string_list)
-_Same(_midl, 'CPreprocessOptions', _string) # /cpp_opt
-_Same(_midl, 'ErrorCheckAllocations', _boolean) # /error allocation
-_Same(_midl, 'ErrorCheckBounds', _boolean) # /error bounds_check
-_Same(_midl, 'ErrorCheckEnumRange', _boolean) # /error enum
-_Same(_midl, 'ErrorCheckRefPointers', _boolean) # /error ref
-_Same(_midl, 'ErrorCheckStubData', _boolean) # /error stub_data
-_Same(_midl, 'GenerateStublessProxies', _boolean) # /Oicf
-_Same(_midl, 'GenerateTypeLibrary', _boolean)
-_Same(_midl, 'HeaderFileName', _file_name) # /h
-_Same(_midl, 'IgnoreStandardIncludePath', _boolean) # /no_def_idir
-_Same(_midl, 'InterfaceIdentifierFileName', _file_name) # /iid
-_Same(_midl, 'MkTypLibCompatible', _boolean) # /mktyplib203
-_Same(_midl, 'OutputDirectory', _string) # /out
-_Same(_midl, 'PreprocessorDefinitions', _string_list) # /D
-_Same(_midl, 'ProxyFileName', _file_name) # /proxy
-_Same(_midl, 'RedirectOutputAndErrors', _file_name) # /o
-_Same(_midl, 'SuppressStartupBanner', _boolean) # /nologo
-_Same(_midl, 'TypeLibraryName', _file_name) # /tlb
-_Same(_midl, 'UndefinePreprocessorDefinitions', _string_list) # /U
-_Same(_midl, 'WarnAsError', _boolean) # /WX
-
-_Same(_midl, 'DefaultCharType',
- _Enumeration(['Unsigned', # /char unsigned
- 'Signed', # /char signed
- 'Ascii'])) # /char ascii7
-_Same(_midl, 'TargetEnvironment',
- _Enumeration(['NotSet',
- 'Win32', # /env win32
- 'Itanium', # /env ia64
- 'X64', # /env x64
- 'ARM64', # /env arm64
- ]))
-_Same(_midl, 'EnableErrorChecks',
- _Enumeration(['EnableCustom',
- 'None', # /error none
- 'All'])) # /error all
-_Same(_midl, 'StructMemberAlignment',
- _Enumeration(['NotSet',
- '1', # Zp1
- '2', # Zp2
- '4', # Zp4
- '8'])) # Zp8
-_Same(_midl, 'WarningLevel',
- _Enumeration(['0', # /W0
- '1', # /W1
- '2', # /W2
- '3', # /W3
- '4'])) # /W4
-
-_Renamed(_midl, 'DLLDataFileName', 'DllDataFileName', _file_name) # /dlldata
-_Renamed(_midl, 'ValidateParameters', 'ValidateAllParameters',
- _boolean) # /robust
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_midl, 'ApplicationConfigurationMode', _boolean) # /app_config
-_MSBuildOnly(_midl, 'ClientStubFile', _file_name) # /cstub
-_MSBuildOnly(_midl, 'GenerateClientFiles',
- _Enumeration([], new=['Stub', # /client stub
- 'None'])) # /client none
-_MSBuildOnly(_midl, 'GenerateServerFiles',
- _Enumeration([], new=['Stub', # /client stub
- 'None'])) # /client none
-_MSBuildOnly(_midl, 'LocaleID', _integer) # /lcid DECIMAL
-_MSBuildOnly(_midl, 'ServerStubFile', _file_name) # /sstub
-_MSBuildOnly(_midl, 'SuppressCompilerWarnings', _boolean) # /no_warn
-_MSBuildOnly(_midl, 'TrackerLogDirectory', _folder_name)
-_MSBuildOnly(_midl, 'TypeLibFormat',
- _Enumeration([], new=['NewFormat', # /newtlb
- 'OldFormat'])) # /oldtlb
-
-
-# Directives for converting VCLibrarianTool to Lib.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\lib.xml" for
-# the schema of the MSBuild Lib settings.
-
-_Same(_lib, 'AdditionalDependencies', _file_list)
-_Same(_lib, 'AdditionalLibraryDirectories', _folder_list) # /LIBPATH
-_Same(_lib, 'AdditionalOptions', _string_list)
-_Same(_lib, 'ExportNamedFunctions', _string_list) # /EXPORT
-_Same(_lib, 'ForceSymbolReferences', _string) # /INCLUDE
-_Same(_lib, 'IgnoreAllDefaultLibraries', _boolean) # /NODEFAULTLIB
-_Same(_lib, 'IgnoreSpecificDefaultLibraries', _file_list) # /NODEFAULTLIB
-_Same(_lib, 'ModuleDefinitionFile', _file_name) # /DEF
-_Same(_lib, 'OutputFile', _file_name) # /OUT
-_Same(_lib, 'SuppressStartupBanner', _boolean) # /NOLOGO
-_Same(_lib, 'UseUnicodeResponseFiles', _boolean)
-_Same(_lib, 'LinkTimeCodeGeneration', _boolean) # /LTCG
-_Same(_lib, 'TargetMachine', _target_machine_enumeration)
-
-# TODO(jeanluc) _link defines the same value that gets moved to
-# ProjectReference. We may want to validate that they are consistent.
-_Moved(_lib, 'LinkLibraryDependencies', 'ProjectReference', _boolean)
-
-_MSBuildOnly(_lib, 'DisplayLibrary', _string) # /LIST Visible='false'
-_MSBuildOnly(_lib, 'ErrorReporting',
- _Enumeration([], new=['PromptImmediately', # /ERRORREPORT:PROMPT
- 'QueueForNextLogin', # /ERRORREPORT:QUEUE
- 'SendErrorReport', # /ERRORREPORT:SEND
- 'NoErrorReport'])) # /ERRORREPORT:NONE
-_MSBuildOnly(_lib, 'MinimumRequiredVersion', _string)
-_MSBuildOnly(_lib, 'Name', _file_name) # /NAME
-_MSBuildOnly(_lib, 'RemoveObjects', _file_list) # /REMOVE
-_MSBuildOnly(_lib, 'SubSystem', _subsystem_enumeration)
-_MSBuildOnly(_lib, 'TrackerLogDirectory', _folder_name)
-_MSBuildOnly(_lib, 'TreatLibWarningAsErrors', _boolean) # /WX
-_MSBuildOnly(_lib, 'Verbose', _boolean)
-
-
-# Directives for converting VCManifestTool to Mt.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\mt.xml" for
-# the schema of the MSBuild Lib settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_manifest, 'AdditionalManifestFiles', _file_list) # /manifest
-_Same(_manifest, 'AdditionalOptions', _string_list)
-_Same(_manifest, 'AssemblyIdentity', _string) # /identity:
-_Same(_manifest, 'ComponentFileName', _file_name) # /dll
-_Same(_manifest, 'GenerateCatalogFiles', _boolean) # /makecdfs
-_Same(_manifest, 'InputResourceManifests', _string) # /inputresource
-_Same(_manifest, 'OutputManifestFile', _file_name) # /out
-_Same(_manifest, 'RegistrarScriptFile', _file_name) # /rgs
-_Same(_manifest, 'ReplacementsFile', _file_name) # /replacements
-_Same(_manifest, 'SuppressStartupBanner', _boolean) # /nologo
-_Same(_manifest, 'TypeLibraryFile', _file_name) # /tlb:
-_Same(_manifest, 'UpdateFileHashes', _boolean) # /hashupdate
-_Same(_manifest, 'UpdateFileHashesSearchPath', _file_name)
-_Same(_manifest, 'VerboseOutput', _boolean) # /verbose
-
-# Options that have moved location.
-_MovedAndRenamed(_manifest, 'ManifestResourceFile',
- 'ManifestResourceCompile',
- 'ResourceOutputFileName',
- _file_name)
-_Moved(_manifest, 'EmbedManifest', '', _boolean)
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_manifest, 'DependencyInformationFile', _file_name)
-_MSVSOnly(_manifest, 'UseFAT32Workaround', _boolean)
-_MSVSOnly(_manifest, 'UseUnicodeResponseFiles', _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_manifest, 'EnableDPIAwareness', _boolean)
-_MSBuildOnly(_manifest, 'GenerateCategoryTags', _boolean) # /category
-_MSBuildOnly(_manifest, 'ManifestFromManagedAssembly',
- _file_name) # /managedassemblyname
-_MSBuildOnly(_manifest, 'OutputResourceManifests', _string) # /outputresource
-_MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean) # /nodependency
-_MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name)
-
-
-# Directives for MASM.
-# See "$(VCTargetsPath)\BuildCustomizations\masm.xml" for the schema of the
-# MSBuild MASM settings.
-
-# Options that have the same name in MSVS and MSBuild.
-_Same(_masm, 'UseSafeExceptionHandlers', _boolean) # /safeseh
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
deleted file mode 100755
index ce71c38a9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
+++ /dev/null
@@ -1,1489 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for the MSVSSettings.py file."""
-
-try:
- from cStringIO import StringIO
-except ImportError:
- from io import StringIO
-
-import unittest
-import gyp.MSVSSettings as MSVSSettings
-
-
-class TestSequenceFunctions(unittest.TestCase):
-
- def setUp(self):
- self.stderr = StringIO()
-
- def _ExpectedWarnings(self, expected):
- """Compares recorded lines to expected warnings."""
- self.stderr.seek(0)
- actual = self.stderr.read().split('\n')
- actual = [line for line in actual if line]
- self.assertEqual(sorted(expected), sorted(actual))
-
- def testValidateMSVSSettings_tool_names(self):
- """Tests that only MSVS tool names are allowed."""
- MSVSSettings.ValidateMSVSSettings(
- {'VCCLCompilerTool': {},
- 'VCLinkerTool': {},
- 'VCMIDLTool': {},
- 'foo': {},
- 'VCResourceCompilerTool': {},
- 'VCLibrarianTool': {},
- 'VCManifestTool': {},
- 'ClCompile': {}},
- self.stderr)
- self._ExpectedWarnings([
- 'Warning: unrecognized tool foo',
- 'Warning: unrecognized tool ClCompile'])
-
- def testValidateMSVSSettings_settings(self):
- """Tests that for invalid MSVS settings."""
- MSVSSettings.ValidateMSVSSettings(
- {'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'AdditionalOptions': ['string1', 'string2'],
- 'AdditionalUsingDirectories': 'folder1;folder2',
- 'AssemblerListingLocation': 'a_file_name',
- 'AssemblerOutput': '0',
- 'BasicRuntimeChecks': '5',
- 'BrowseInformation': 'fdkslj',
- 'BrowseInformationFile': 'a_file_name',
- 'BufferSecurityCheck': 'true',
- 'CallingConvention': '-1',
- 'CompileAs': '1',
- 'DebugInformationFormat': '2',
- 'DefaultCharIsUnsigned': 'true',
- 'Detect64BitPortabilityProblems': 'true',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'string1;string2',
- 'EnableEnhancedInstructionSet': '1',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnableFunctionLevelLinking': 'true',
- 'EnableIntrinsicFunctions': 'true',
- 'EnablePREfast': 'true',
- 'Enableprefast': 'bogus',
- 'ErrorReporting': '1',
- 'ExceptionHandling': '1',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': '1',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': '1',
- 'ForceConformanceInForLoopScope': 'true',
- 'ForcedIncludeFiles': 'file1;file2',
- 'ForcedUsingFiles': 'file1;file2',
- 'GeneratePreprocessedFile': '1',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': '1',
- 'KeepComments': 'true',
- 'MinimalRebuild': 'true',
- 'ObjectFile': 'a_file_name',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMP': 'true',
- 'Optimization': '1',
- 'PrecompiledHeaderFile': 'a_file_name',
- 'PrecompiledHeaderThrough': 'a_file_name',
- 'PreprocessorDefinitions': 'string1;string2',
- 'ProgramDataBaseFileName': 'a_file_name',
- 'RuntimeLibrary': '1',
- 'RuntimeTypeInfo': 'true',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '1',
- 'SuppressStartupBanner': 'true',
- 'TreatWChar_tAsBuiltInType': 'true',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'string1;string2',
- 'UseFullPaths': 'true',
- 'UsePrecompiledHeader': '1',
- 'UseUnicodeResponseFiles': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '1',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': 'a_file_name',
- 'ZZXYZ': 'bogus'},
- 'VCLinkerTool': {
- 'AdditionalDependencies': 'file1;file2',
- 'AdditionalDependencies_excluded': 'file3',
- 'AdditionalLibraryDirectories': 'folder1;folder2',
- 'AdditionalManifestDependencies': 'file1;file2',
- 'AdditionalOptions': 'a string1',
- 'AddModuleNamesToAssembly': 'file1;file2',
- 'AllowIsolation': 'true',
- 'AssemblyDebug': '2',
- 'AssemblyLinkResource': 'file1;file2',
- 'BaseAddress': 'a string1',
- 'CLRImageType': '2',
- 'CLRThreadAttribute': '2',
- 'CLRUnmanagedCodeCheck': 'true',
- 'DataExecutionPrevention': '2',
- 'DelayLoadDLLs': 'file1;file2',
- 'DelaySign': 'true',
- 'Driver': '2',
- 'EmbedManagedResourceFile': 'file1;file2',
- 'EnableCOMDATFolding': '2',
- 'EnableUAC': 'true',
- 'EntryPointSymbol': 'a string1',
- 'ErrorReporting': '2',
- 'FixedBaseAddress': '2',
- 'ForceSymbolReferences': 'file1;file2',
- 'FunctionOrder': 'a_file_name',
- 'GenerateDebugInformation': 'true',
- 'GenerateManifest': 'true',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': 'a string1',
- 'HeapReserveSize': 'a string1',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreDefaultLibraryNames': 'file1;file2',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreImportLibrary': 'true',
- 'ImportLibrary': 'a_file_name',
- 'KeyContainer': 'a_file_name',
- 'KeyFile': 'a_file_name',
- 'LargeAddressAware': '2',
- 'LinkIncremental': '2',
- 'LinkLibraryDependencies': 'true',
- 'LinkTimeCodeGeneration': '2',
- 'ManifestFile': 'a_file_name',
- 'MapExports': 'true',
- 'MapFileName': 'a_file_name',
- 'MergedIDLBaseFileName': 'a_file_name',
- 'MergeSections': 'a string1',
- 'MidlCommandFile': 'a_file_name',
- 'ModuleDefinitionFile': 'a_file_name',
- 'OptimizeForWindows98': '1',
- 'OptimizeReferences': '2',
- 'OutputFile': 'a_file_name',
- 'PerUserRedirection': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': 'a_file_name',
- 'ProgramDatabaseFile': 'a_file_name',
- 'RandomizedBaseAddress': '2',
- 'RegisterOutput': 'true',
- 'ResourceOnlyDLL': 'true',
- 'SetChecksum': 'true',
- 'ShowProgress': '2',
- 'StackCommitSize': 'a string1',
- 'StackReserveSize': 'a string1',
- 'StripPrivateSymbols': 'a_file_name',
- 'SubSystem': '2',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'true',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNet': 'true',
- 'TargetMachine': '2',
- 'TerminalServerAware': '2',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'TypeLibraryResourceID': '33',
- 'UACExecutionLevel': '2',
- 'UACUIAccess': 'true',
- 'UseLibraryDependencyInputs': 'true',
- 'UseUnicodeResponseFiles': 'true',
- 'Version': 'a string1'},
- 'VCMIDLTool': {
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'AdditionalOptions': 'a string1',
- 'CPreprocessOptions': 'a string1',
- 'DefaultCharType': '1',
- 'DLLDataFileName': 'a_file_name',
- 'EnableErrorChecks': '1',
- 'ErrorCheckAllocations': 'true',
- 'ErrorCheckBounds': 'true',
- 'ErrorCheckEnumRange': 'true',
- 'ErrorCheckRefPointers': 'true',
- 'ErrorCheckStubData': 'true',
- 'GenerateStublessProxies': 'true',
- 'GenerateTypeLibrary': 'true',
- 'HeaderFileName': 'a_file_name',
- 'IgnoreStandardIncludePath': 'true',
- 'InterfaceIdentifierFileName': 'a_file_name',
- 'MkTypLibCompatible': 'true',
- 'notgood': 'bogus',
- 'OutputDirectory': 'a string1',
- 'PreprocessorDefinitions': 'string1;string2',
- 'ProxyFileName': 'a_file_name',
- 'RedirectOutputAndErrors': 'a_file_name',
- 'StructMemberAlignment': '1',
- 'SuppressStartupBanner': 'true',
- 'TargetEnvironment': '1',
- 'TypeLibraryName': 'a_file_name',
- 'UndefinePreprocessorDefinitions': 'string1;string2',
- 'ValidateParameters': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '1'},
- 'VCResourceCompilerTool': {
- 'AdditionalOptions': 'a string1',
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'Culture': '1003',
- 'IgnoreStandardIncludePath': 'true',
- 'notgood2': 'bogus',
- 'PreprocessorDefinitions': 'string1;string2',
- 'ResourceOutputFileName': 'a string1',
- 'ShowProgress': 'true',
- 'SuppressStartupBanner': 'true',
- 'UndefinePreprocessorDefinitions': 'string1;string2'},
- 'VCLibrarianTool': {
- 'AdditionalDependencies': 'file1;file2',
- 'AdditionalLibraryDirectories': 'folder1;folder2',
- 'AdditionalOptions': 'a string1',
- 'ExportNamedFunctions': 'string1;string2',
- 'ForceSymbolReferences': 'a string1',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreSpecificDefaultLibraries': 'file1;file2',
- 'LinkLibraryDependencies': 'true',
- 'ModuleDefinitionFile': 'a_file_name',
- 'OutputFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'UseUnicodeResponseFiles': 'true'},
- 'VCManifestTool': {
- 'AdditionalManifestFiles': 'file1;file2',
- 'AdditionalOptions': 'a string1',
- 'AssemblyIdentity': 'a string1',
- 'ComponentFileName': 'a_file_name',
- 'DependencyInformationFile': 'a_file_name',
- 'GenerateCatalogFiles': 'true',
- 'InputResourceManifests': 'a string1',
- 'ManifestResourceFile': 'a_file_name',
- 'OutputManifestFile': 'a_file_name',
- 'RegistrarScriptFile': 'a_file_name',
- 'ReplacementsFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'UpdateFileHashes': 'truel',
- 'UpdateFileHashesSearchPath': 'a_file_name',
- 'UseFAT32Workaround': 'true',
- 'UseUnicodeResponseFiles': 'true',
- 'VerboseOutput': 'true'}},
- self.stderr)
- self._ExpectedWarnings([
- 'Warning: for VCCLCompilerTool/BasicRuntimeChecks, '
- 'index value (5) not in expected range [0, 4)',
- 'Warning: for VCCLCompilerTool/BrowseInformation, '
- "invalid literal for int() with base 10: 'fdkslj'",
- 'Warning: for VCCLCompilerTool/CallingConvention, '
- 'index value (-1) not in expected range [0, 4)',
- 'Warning: for VCCLCompilerTool/DebugInformationFormat, '
- 'converted value for 2 not specified.',
- 'Warning: unrecognized setting VCCLCompilerTool/Enableprefast',
- 'Warning: unrecognized setting VCCLCompilerTool/ZZXYZ',
- 'Warning: for VCLinkerTool/TargetMachine, '
- 'converted value for 2 not specified.',
- 'Warning: unrecognized setting VCMIDLTool/notgood',
- 'Warning: unrecognized setting VCResourceCompilerTool/notgood2',
- 'Warning: for VCManifestTool/UpdateFileHashes, '
- "expected bool; got 'truel'"
- ''])
-
- def testValidateMSBuildSettings_settings(self):
- """Tests that for invalid MSBuild settings."""
- MSVSSettings.ValidateMSBuildSettings(
- {'ClCompile': {
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'AdditionalOptions': ['string1', 'string2'],
- 'AdditionalUsingDirectories': 'folder1;folder2',
- 'AssemblerListingLocation': 'a_file_name',
- 'AssemblerOutput': 'NoListing',
- 'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
- 'BrowseInformation': 'false',
- 'BrowseInformationFile': 'a_file_name',
- 'BufferSecurityCheck': 'true',
- 'BuildingInIDE': 'true',
- 'CallingConvention': 'Cdecl',
- 'CompileAs': 'CompileAsC',
- 'CompileAsManaged': 'true',
- 'CreateHotpatchableImage': 'true',
- 'DebugInformationFormat': 'ProgramDatabase',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'string1;string2',
- 'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnablePREfast': 'true',
- 'Enableprefast': 'bogus',
- 'ErrorReporting': 'Prompt',
- 'ExceptionHandling': 'SyncCThrow',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': 'Neither',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': 'Precise',
- 'ForceConformanceInForLoopScope': 'true',
- 'ForcedIncludeFiles': 'file1;file2',
- 'ForcedUsingFiles': 'file1;file2',
- 'FunctionLevelLinking': 'false',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': 'OnlyExplicitInline',
- 'IntrinsicFunctions': 'false',
- 'MinimalRebuild': 'true',
- 'MultiProcessorCompilation': 'true',
- 'ObjectFileName': 'a_file_name',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMPSupport': 'true',
- 'Optimization': 'Disabled',
- 'PrecompiledHeader': 'NotUsing',
- 'PrecompiledHeaderFile': 'a_file_name',
- 'PrecompiledHeaderOutputFile': 'a_file_name',
- 'PreprocessKeepComments': 'true',
- 'PreprocessorDefinitions': 'string1;string2',
- 'PreprocessOutputPath': 'a string1',
- 'PreprocessSuppressLineNumbers': 'false',
- 'PreprocessToFile': 'false',
- 'ProcessorNumber': '33',
- 'ProgramDataBaseFileName': 'a_file_name',
- 'RuntimeLibrary': 'MultiThreaded',
- 'RuntimeTypeInfo': 'true',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '1Byte',
- 'SuppressStartupBanner': 'true',
- 'TrackerLogDirectory': 'a_folder',
- 'TreatSpecificWarningsAsErrors': 'string1;string2',
- 'TreatWarningAsError': 'true',
- 'TreatWChar_tAsBuiltInType': 'true',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'string1;string2',
- 'UseFullPaths': 'true',
- 'UseUnicodeForAssemblerListing': 'true',
- 'WarningLevel': 'TurnOffAllWarnings',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': 'a_file_name',
- 'ZZXYZ': 'bogus'},
- 'Link': {
- 'AdditionalDependencies': 'file1;file2',
- 'AdditionalLibraryDirectories': 'folder1;folder2',
- 'AdditionalManifestDependencies': 'file1;file2',
- 'AdditionalOptions': 'a string1',
- 'AddModuleNamesToAssembly': 'file1;file2',
- 'AllowIsolation': 'true',
- 'AssemblyDebug': '',
- 'AssemblyLinkResource': 'file1;file2',
- 'BaseAddress': 'a string1',
- 'BuildingInIDE': 'true',
- 'CLRImageType': 'ForceIJWImage',
- 'CLRSupportLastError': 'Enabled',
- 'CLRThreadAttribute': 'MTAThreadingAttribute',
- 'CLRUnmanagedCodeCheck': 'true',
- 'CreateHotPatchableImage': 'X86Image',
- 'DataExecutionPrevention': 'false',
- 'DelayLoadDLLs': 'file1;file2',
- 'DelaySign': 'true',
- 'Driver': 'NotSet',
- 'EmbedManagedResourceFile': 'file1;file2',
- 'EnableCOMDATFolding': 'false',
- 'EnableUAC': 'true',
- 'EntryPointSymbol': 'a string1',
- 'FixedBaseAddress': 'false',
- 'ForceFileOutput': 'Enabled',
- 'ForceSymbolReferences': 'file1;file2',
- 'FunctionOrder': 'a_file_name',
- 'GenerateDebugInformation': 'true',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': 'a string1',
- 'HeapReserveSize': 'a string1',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreSpecificDefaultLibraries': 'a_file_list',
- 'ImageHasSafeExceptionHandlers': 'true',
- 'ImportLibrary': 'a_file_name',
- 'KeyContainer': 'a_file_name',
- 'KeyFile': 'a_file_name',
- 'LargeAddressAware': 'false',
- 'LinkDLL': 'true',
- 'LinkErrorReporting': 'SendErrorReport',
- 'LinkStatus': 'true',
- 'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
- 'ManifestFile': 'a_file_name',
- 'MapExports': 'true',
- 'MapFileName': 'a_file_name',
- 'MergedIDLBaseFileName': 'a_file_name',
- 'MergeSections': 'a string1',
- 'MidlCommandFile': 'a_file_name',
- 'MinimumRequiredVersion': 'a string1',
- 'ModuleDefinitionFile': 'a_file_name',
- 'MSDOSStubFileName': 'a_file_name',
- 'NoEntryPoint': 'true',
- 'OptimizeReferences': 'false',
- 'OutputFile': 'a_file_name',
- 'PerUserRedirection': 'true',
- 'PreventDllBinding': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': 'a_file_name',
- 'ProgramDatabaseFile': 'a_file_name',
- 'RandomizedBaseAddress': 'false',
- 'RegisterOutput': 'true',
- 'SectionAlignment': '33',
- 'SetChecksum': 'true',
- 'ShowProgress': 'LinkVerboseREF',
- 'SpecifySectionAttributes': 'a string1',
- 'StackCommitSize': 'a string1',
- 'StackReserveSize': 'a string1',
- 'StripPrivateSymbols': 'a_file_name',
- 'SubSystem': 'Console',
- 'SupportNobindOfDelayLoadedDLL': 'true',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'true',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNET': 'true',
- 'TargetMachine': 'MachineX86',
- 'TerminalServerAware': 'false',
- 'TrackerLogDirectory': 'a_folder',
- 'TreatLinkerWarningAsErrors': 'true',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'TypeLibraryResourceID': '33',
- 'UACExecutionLevel': 'AsInvoker',
- 'UACUIAccess': 'true',
- 'Version': 'a string1'},
- 'ResourceCompile': {
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'AdditionalOptions': 'a string1',
- 'Culture': '0x236',
- 'IgnoreStandardIncludePath': 'true',
- 'NullTerminateStrings': 'true',
- 'PreprocessorDefinitions': 'string1;string2',
- 'ResourceOutputFileName': 'a string1',
- 'ShowProgress': 'true',
- 'SuppressStartupBanner': 'true',
- 'TrackerLogDirectory': 'a_folder',
- 'UndefinePreprocessorDefinitions': 'string1;string2'},
- 'Midl': {
- 'AdditionalIncludeDirectories': 'folder1;folder2',
- 'AdditionalOptions': 'a string1',
- 'ApplicationConfigurationMode': 'true',
- 'ClientStubFile': 'a_file_name',
- 'CPreprocessOptions': 'a string1',
- 'DefaultCharType': 'Signed',
- 'DllDataFileName': 'a_file_name',
- 'EnableErrorChecks': 'EnableCustom',
- 'ErrorCheckAllocations': 'true',
- 'ErrorCheckBounds': 'true',
- 'ErrorCheckEnumRange': 'true',
- 'ErrorCheckRefPointers': 'true',
- 'ErrorCheckStubData': 'true',
- 'GenerateClientFiles': 'Stub',
- 'GenerateServerFiles': 'None',
- 'GenerateStublessProxies': 'true',
- 'GenerateTypeLibrary': 'true',
- 'HeaderFileName': 'a_file_name',
- 'IgnoreStandardIncludePath': 'true',
- 'InterfaceIdentifierFileName': 'a_file_name',
- 'LocaleID': '33',
- 'MkTypLibCompatible': 'true',
- 'OutputDirectory': 'a string1',
- 'PreprocessorDefinitions': 'string1;string2',
- 'ProxyFileName': 'a_file_name',
- 'RedirectOutputAndErrors': 'a_file_name',
- 'ServerStubFile': 'a_file_name',
- 'StructMemberAlignment': 'NotSet',
- 'SuppressCompilerWarnings': 'true',
- 'SuppressStartupBanner': 'true',
- 'TargetEnvironment': 'Itanium',
- 'TrackerLogDirectory': 'a_folder',
- 'TypeLibFormat': 'NewFormat',
- 'TypeLibraryName': 'a_file_name',
- 'UndefinePreprocessorDefinitions': 'string1;string2',
- 'ValidateAllParameters': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '1'},
- 'Lib': {
- 'AdditionalDependencies': 'file1;file2',
- 'AdditionalLibraryDirectories': 'folder1;folder2',
- 'AdditionalOptions': 'a string1',
- 'DisplayLibrary': 'a string1',
- 'ErrorReporting': 'PromptImmediately',
- 'ExportNamedFunctions': 'string1;string2',
- 'ForceSymbolReferences': 'a string1',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreSpecificDefaultLibraries': 'file1;file2',
- 'LinkTimeCodeGeneration': 'true',
- 'MinimumRequiredVersion': 'a string1',
- 'ModuleDefinitionFile': 'a_file_name',
- 'Name': 'a_file_name',
- 'OutputFile': 'a_file_name',
- 'RemoveObjects': 'file1;file2',
- 'SubSystem': 'Console',
- 'SuppressStartupBanner': 'true',
- 'TargetMachine': 'MachineX86i',
- 'TrackerLogDirectory': 'a_folder',
- 'TreatLibWarningAsErrors': 'true',
- 'UseUnicodeResponseFiles': 'true',
- 'Verbose': 'true'},
- 'Manifest': {
- 'AdditionalManifestFiles': 'file1;file2',
- 'AdditionalOptions': 'a string1',
- 'AssemblyIdentity': 'a string1',
- 'ComponentFileName': 'a_file_name',
- 'EnableDPIAwareness': 'fal',
- 'GenerateCatalogFiles': 'truel',
- 'GenerateCategoryTags': 'true',
- 'InputResourceManifests': 'a string1',
- 'ManifestFromManagedAssembly': 'a_file_name',
- 'notgood3': 'bogus',
- 'OutputManifestFile': 'a_file_name',
- 'OutputResourceManifests': 'a string1',
- 'RegistrarScriptFile': 'a_file_name',
- 'ReplacementsFile': 'a_file_name',
- 'SuppressDependencyElement': 'true',
- 'SuppressStartupBanner': 'true',
- 'TrackerLogDirectory': 'a_folder',
- 'TypeLibraryFile': 'a_file_name',
- 'UpdateFileHashes': 'true',
- 'UpdateFileHashesSearchPath': 'a_file_name',
- 'VerboseOutput': 'true'},
- 'ProjectReference': {
- 'LinkLibraryDependencies': 'true',
- 'UseLibraryDependencyInputs': 'true'},
- 'ManifestResourceCompile': {
- 'ResourceOutputFileName': 'a_file_name'},
- '': {
- 'EmbedManifest': 'true',
- 'GenerateManifest': 'true',
- 'IgnoreImportLibrary': 'true',
- 'LinkIncremental': 'false'}},
- self.stderr)
- self._ExpectedWarnings([
- 'Warning: unrecognized setting ClCompile/Enableprefast',
- 'Warning: unrecognized setting ClCompile/ZZXYZ',
- 'Warning: unrecognized setting Manifest/notgood3',
- 'Warning: for Manifest/GenerateCatalogFiles, '
- "expected bool; got 'truel'",
- 'Warning: for Lib/TargetMachine, unrecognized enumerated value '
- 'MachineX86i',
- "Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'"])
-
- def testConvertToMSBuildSettings_empty(self):
- """Tests an empty conversion."""
- msvs_settings = {}
- expected_msbuild_settings = {}
- actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
- msvs_settings,
- self.stderr)
- self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
- self._ExpectedWarnings([])
-
- def testConvertToMSBuildSettings_minimal(self):
- """Tests a minimal conversion."""
- msvs_settings = {
- 'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': 'dir1',
- 'AdditionalOptions': '/foo',
- 'BasicRuntimeChecks': '0',
- },
- 'VCLinkerTool': {
- 'LinkTimeCodeGeneration': '1',
- 'ErrorReporting': '1',
- 'DataExecutionPrevention': '2',
- },
- }
- expected_msbuild_settings = {
- 'ClCompile': {
- 'AdditionalIncludeDirectories': 'dir1',
- 'AdditionalOptions': '/foo',
- 'BasicRuntimeChecks': 'Default',
- },
- 'Link': {
- 'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
- 'LinkErrorReporting': 'PromptImmediately',
- 'DataExecutionPrevention': 'true',
- },
- }
- actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
- msvs_settings,
- self.stderr)
- self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
- self._ExpectedWarnings([])
-
- def testConvertToMSBuildSettings_warnings(self):
- """Tests conversion that generates warnings."""
- msvs_settings = {
- 'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': '1',
- 'AdditionalOptions': '2',
- # These are incorrect values:
- 'BasicRuntimeChecks': '12',
- 'BrowseInformation': '21',
- 'UsePrecompiledHeader': '13',
- 'GeneratePreprocessedFile': '14'},
- 'VCLinkerTool': {
- # These are incorrect values:
- 'Driver': '10',
- 'LinkTimeCodeGeneration': '31',
- 'ErrorReporting': '21',
- 'FixedBaseAddress': '6'},
- 'VCResourceCompilerTool': {
- # Custom
- 'Culture': '1003'}}
- expected_msbuild_settings = {
- 'ClCompile': {
- 'AdditionalIncludeDirectories': '1',
- 'AdditionalOptions': '2'},
- 'Link': {},
- 'ResourceCompile': {
- # Custom
- 'Culture': '0x03eb'}}
- actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
- msvs_settings,
- self.stderr)
- self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
- self._ExpectedWarnings([
- 'Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to '
- 'MSBuild, index value (12) not in expected range [0, 4)',
- 'Warning: while converting VCCLCompilerTool/BrowseInformation to '
- 'MSBuild, index value (21) not in expected range [0, 3)',
- 'Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to '
- 'MSBuild, index value (13) not in expected range [0, 3)',
- 'Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to '
- 'MSBuild, value must be one of [0, 1, 2]; got 14',
-
- 'Warning: while converting VCLinkerTool/Driver to '
- 'MSBuild, index value (10) not in expected range [0, 4)',
- 'Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to '
- 'MSBuild, index value (31) not in expected range [0, 5)',
- 'Warning: while converting VCLinkerTool/ErrorReporting to '
- 'MSBuild, index value (21) not in expected range [0, 3)',
- 'Warning: while converting VCLinkerTool/FixedBaseAddress to '
- 'MSBuild, index value (6) not in expected range [0, 3)',
- ])
-
- def testConvertToMSBuildSettings_full_synthetic(self):
- """Tests conversion of all the MSBuild settings."""
- msvs_settings = {
- 'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'AdditionalUsingDirectories': 'folder1;folder2;folder3',
- 'AssemblerListingLocation': 'a_file_name',
- 'AssemblerOutput': '0',
- 'BasicRuntimeChecks': '1',
- 'BrowseInformation': '2',
- 'BrowseInformationFile': 'a_file_name',
- 'BufferSecurityCheck': 'true',
- 'CallingConvention': '0',
- 'CompileAs': '1',
- 'DebugInformationFormat': '4',
- 'DefaultCharIsUnsigned': 'true',
- 'Detect64BitPortabilityProblems': 'true',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'd1;d2;d3',
- 'EnableEnhancedInstructionSet': '0',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnableFunctionLevelLinking': 'true',
- 'EnableIntrinsicFunctions': 'true',
- 'EnablePREfast': 'true',
- 'ErrorReporting': '1',
- 'ExceptionHandling': '2',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': '0',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': '1',
- 'ForceConformanceInForLoopScope': 'true',
- 'ForcedIncludeFiles': 'file1;file2;file3',
- 'ForcedUsingFiles': 'file1;file2;file3',
- 'GeneratePreprocessedFile': '1',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': '2',
- 'KeepComments': 'true',
- 'MinimalRebuild': 'true',
- 'ObjectFile': 'a_file_name',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMP': 'true',
- 'Optimization': '3',
- 'PrecompiledHeaderFile': 'a_file_name',
- 'PrecompiledHeaderThrough': 'a_file_name',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'ProgramDataBaseFileName': 'a_file_name',
- 'RuntimeLibrary': '0',
- 'RuntimeTypeInfo': 'true',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '1',
- 'SuppressStartupBanner': 'true',
- 'TreatWChar_tAsBuiltInType': 'true',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3',
- 'UseFullPaths': 'true',
- 'UsePrecompiledHeader': '1',
- 'UseUnicodeResponseFiles': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '2',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': 'a_file_name'},
- 'VCLinkerTool': {
- 'AdditionalDependencies': 'file1;file2;file3',
- 'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
- 'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
- 'AdditionalManifestDependencies': 'file1;file2;file3',
- 'AdditionalOptions': 'a_string',
- 'AddModuleNamesToAssembly': 'file1;file2;file3',
- 'AllowIsolation': 'true',
- 'AssemblyDebug': '0',
- 'AssemblyLinkResource': 'file1;file2;file3',
- 'BaseAddress': 'a_string',
- 'CLRImageType': '1',
- 'CLRThreadAttribute': '2',
- 'CLRUnmanagedCodeCheck': 'true',
- 'DataExecutionPrevention': '0',
- 'DelayLoadDLLs': 'file1;file2;file3',
- 'DelaySign': 'true',
- 'Driver': '1',
- 'EmbedManagedResourceFile': 'file1;file2;file3',
- 'EnableCOMDATFolding': '0',
- 'EnableUAC': 'true',
- 'EntryPointSymbol': 'a_string',
- 'ErrorReporting': '0',
- 'FixedBaseAddress': '1',
- 'ForceSymbolReferences': 'file1;file2;file3',
- 'FunctionOrder': 'a_file_name',
- 'GenerateDebugInformation': 'true',
- 'GenerateManifest': 'true',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': 'a_string',
- 'HeapReserveSize': 'a_string',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreDefaultLibraryNames': 'file1;file2;file3',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreImportLibrary': 'true',
- 'ImportLibrary': 'a_file_name',
- 'KeyContainer': 'a_file_name',
- 'KeyFile': 'a_file_name',
- 'LargeAddressAware': '2',
- 'LinkIncremental': '1',
- 'LinkLibraryDependencies': 'true',
- 'LinkTimeCodeGeneration': '2',
- 'ManifestFile': 'a_file_name',
- 'MapExports': 'true',
- 'MapFileName': 'a_file_name',
- 'MergedIDLBaseFileName': 'a_file_name',
- 'MergeSections': 'a_string',
- 'MidlCommandFile': 'a_file_name',
- 'ModuleDefinitionFile': 'a_file_name',
- 'OptimizeForWindows98': '1',
- 'OptimizeReferences': '0',
- 'OutputFile': 'a_file_name',
- 'PerUserRedirection': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': 'a_file_name',
- 'ProgramDatabaseFile': 'a_file_name',
- 'RandomizedBaseAddress': '1',
- 'RegisterOutput': 'true',
- 'ResourceOnlyDLL': 'true',
- 'SetChecksum': 'true',
- 'ShowProgress': '0',
- 'StackCommitSize': 'a_string',
- 'StackReserveSize': 'a_string',
- 'StripPrivateSymbols': 'a_file_name',
- 'SubSystem': '2',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'true',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNet': 'true',
- 'TargetMachine': '3',
- 'TerminalServerAware': '2',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'TypeLibraryResourceID': '33',
- 'UACExecutionLevel': '1',
- 'UACUIAccess': 'true',
- 'UseLibraryDependencyInputs': 'false',
- 'UseUnicodeResponseFiles': 'true',
- 'Version': 'a_string'},
- 'VCResourceCompilerTool': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'Culture': '1003',
- 'IgnoreStandardIncludePath': 'true',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'ResourceOutputFileName': 'a_string',
- 'ShowProgress': 'true',
- 'SuppressStartupBanner': 'true',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
- 'VCMIDLTool': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'CPreprocessOptions': 'a_string',
- 'DefaultCharType': '0',
- 'DLLDataFileName': 'a_file_name',
- 'EnableErrorChecks': '2',
- 'ErrorCheckAllocations': 'true',
- 'ErrorCheckBounds': 'true',
- 'ErrorCheckEnumRange': 'true',
- 'ErrorCheckRefPointers': 'true',
- 'ErrorCheckStubData': 'true',
- 'GenerateStublessProxies': 'true',
- 'GenerateTypeLibrary': 'true',
- 'HeaderFileName': 'a_file_name',
- 'IgnoreStandardIncludePath': 'true',
- 'InterfaceIdentifierFileName': 'a_file_name',
- 'MkTypLibCompatible': 'true',
- 'OutputDirectory': 'a_string',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'ProxyFileName': 'a_file_name',
- 'RedirectOutputAndErrors': 'a_file_name',
- 'StructMemberAlignment': '3',
- 'SuppressStartupBanner': 'true',
- 'TargetEnvironment': '1',
- 'TypeLibraryName': 'a_file_name',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3',
- 'ValidateParameters': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '4'},
- 'VCLibrarianTool': {
- 'AdditionalDependencies': 'file1;file2;file3',
- 'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
- 'AdditionalLibraryDirectories_excluded': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'ExportNamedFunctions': 'd1;d2;d3',
- 'ForceSymbolReferences': 'a_string',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
- 'LinkLibraryDependencies': 'true',
- 'ModuleDefinitionFile': 'a_file_name',
- 'OutputFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'UseUnicodeResponseFiles': 'true'},
- 'VCManifestTool': {
- 'AdditionalManifestFiles': 'file1;file2;file3',
- 'AdditionalOptions': 'a_string',
- 'AssemblyIdentity': 'a_string',
- 'ComponentFileName': 'a_file_name',
- 'DependencyInformationFile': 'a_file_name',
- 'EmbedManifest': 'true',
- 'GenerateCatalogFiles': 'true',
- 'InputResourceManifests': 'a_string',
- 'ManifestResourceFile': 'my_name',
- 'OutputManifestFile': 'a_file_name',
- 'RegistrarScriptFile': 'a_file_name',
- 'ReplacementsFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'UpdateFileHashes': 'true',
- 'UpdateFileHashesSearchPath': 'a_file_name',
- 'UseFAT32Workaround': 'true',
- 'UseUnicodeResponseFiles': 'true',
- 'VerboseOutput': 'true'}}
- expected_msbuild_settings = {
- 'ClCompile': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string /J',
- 'AdditionalUsingDirectories': 'folder1;folder2;folder3',
- 'AssemblerListingLocation': 'a_file_name',
- 'AssemblerOutput': 'NoListing',
- 'BasicRuntimeChecks': 'StackFrameRuntimeCheck',
- 'BrowseInformation': 'true',
- 'BrowseInformationFile': 'a_file_name',
- 'BufferSecurityCheck': 'true',
- 'CallingConvention': 'Cdecl',
- 'CompileAs': 'CompileAsC',
- 'DebugInformationFormat': 'EditAndContinue',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'd1;d2;d3',
- 'EnableEnhancedInstructionSet': 'NotSet',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnablePREfast': 'true',
- 'ErrorReporting': 'Prompt',
- 'ExceptionHandling': 'Async',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': 'Neither',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': 'Strict',
- 'ForceConformanceInForLoopScope': 'true',
- 'ForcedIncludeFiles': 'file1;file2;file3',
- 'ForcedUsingFiles': 'file1;file2;file3',
- 'FunctionLevelLinking': 'true',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': 'AnySuitable',
- 'IntrinsicFunctions': 'true',
- 'MinimalRebuild': 'true',
- 'ObjectFileName': 'a_file_name',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMPSupport': 'true',
- 'Optimization': 'Full',
- 'PrecompiledHeader': 'Create',
- 'PrecompiledHeaderFile': 'a_file_name',
- 'PrecompiledHeaderOutputFile': 'a_file_name',
- 'PreprocessKeepComments': 'true',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'PreprocessSuppressLineNumbers': 'false',
- 'PreprocessToFile': 'true',
- 'ProgramDataBaseFileName': 'a_file_name',
- 'RuntimeLibrary': 'MultiThreaded',
- 'RuntimeTypeInfo': 'true',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '1Byte',
- 'SuppressStartupBanner': 'true',
- 'TreatWarningAsError': 'true',
- 'TreatWChar_tAsBuiltInType': 'true',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3',
- 'UseFullPaths': 'true',
- 'WarningLevel': 'Level2',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': 'a_file_name'},
- 'Link': {
- 'AdditionalDependencies': 'file1;file2;file3',
- 'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
- 'AdditionalManifestDependencies': 'file1;file2;file3',
- 'AdditionalOptions': 'a_string',
- 'AddModuleNamesToAssembly': 'file1;file2;file3',
- 'AllowIsolation': 'true',
- 'AssemblyDebug': '',
- 'AssemblyLinkResource': 'file1;file2;file3',
- 'BaseAddress': 'a_string',
- 'CLRImageType': 'ForceIJWImage',
- 'CLRThreadAttribute': 'STAThreadingAttribute',
- 'CLRUnmanagedCodeCheck': 'true',
- 'DataExecutionPrevention': '',
- 'DelayLoadDLLs': 'file1;file2;file3',
- 'DelaySign': 'true',
- 'Driver': 'Driver',
- 'EmbedManagedResourceFile': 'file1;file2;file3',
- 'EnableCOMDATFolding': '',
- 'EnableUAC': 'true',
- 'EntryPointSymbol': 'a_string',
- 'FixedBaseAddress': 'false',
- 'ForceSymbolReferences': 'file1;file2;file3',
- 'FunctionOrder': 'a_file_name',
- 'GenerateDebugInformation': 'true',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': 'a_string',
- 'HeapReserveSize': 'a_string',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
- 'ImportLibrary': 'a_file_name',
- 'KeyContainer': 'a_file_name',
- 'KeyFile': 'a_file_name',
- 'LargeAddressAware': 'true',
- 'LinkErrorReporting': 'NoErrorReport',
- 'LinkTimeCodeGeneration': 'PGInstrument',
- 'ManifestFile': 'a_file_name',
- 'MapExports': 'true',
- 'MapFileName': 'a_file_name',
- 'MergedIDLBaseFileName': 'a_file_name',
- 'MergeSections': 'a_string',
- 'MidlCommandFile': 'a_file_name',
- 'ModuleDefinitionFile': 'a_file_name',
- 'NoEntryPoint': 'true',
- 'OptimizeReferences': '',
- 'OutputFile': 'a_file_name',
- 'PerUserRedirection': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': 'a_file_name',
- 'ProgramDatabaseFile': 'a_file_name',
- 'RandomizedBaseAddress': 'false',
- 'RegisterOutput': 'true',
- 'SetChecksum': 'true',
- 'ShowProgress': 'NotSet',
- 'StackCommitSize': 'a_string',
- 'StackReserveSize': 'a_string',
- 'StripPrivateSymbols': 'a_file_name',
- 'SubSystem': 'Windows',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'true',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNET': 'true',
- 'TargetMachine': 'MachineARM',
- 'TerminalServerAware': 'true',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'TypeLibraryResourceID': '33',
- 'UACExecutionLevel': 'HighestAvailable',
- 'UACUIAccess': 'true',
- 'Version': 'a_string'},
- 'ResourceCompile': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'Culture': '0x03eb',
- 'IgnoreStandardIncludePath': 'true',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'ResourceOutputFileName': 'a_string',
- 'ShowProgress': 'true',
- 'SuppressStartupBanner': 'true',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3'},
- 'Midl': {
- 'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'CPreprocessOptions': 'a_string',
- 'DefaultCharType': 'Unsigned',
- 'DllDataFileName': 'a_file_name',
- 'EnableErrorChecks': 'All',
- 'ErrorCheckAllocations': 'true',
- 'ErrorCheckBounds': 'true',
- 'ErrorCheckEnumRange': 'true',
- 'ErrorCheckRefPointers': 'true',
- 'ErrorCheckStubData': 'true',
- 'GenerateStublessProxies': 'true',
- 'GenerateTypeLibrary': 'true',
- 'HeaderFileName': 'a_file_name',
- 'IgnoreStandardIncludePath': 'true',
- 'InterfaceIdentifierFileName': 'a_file_name',
- 'MkTypLibCompatible': 'true',
- 'OutputDirectory': 'a_string',
- 'PreprocessorDefinitions': 'd1;d2;d3',
- 'ProxyFileName': 'a_file_name',
- 'RedirectOutputAndErrors': 'a_file_name',
- 'StructMemberAlignment': '4',
- 'SuppressStartupBanner': 'true',
- 'TargetEnvironment': 'Win32',
- 'TypeLibraryName': 'a_file_name',
- 'UndefinePreprocessorDefinitions': 'd1;d2;d3',
- 'ValidateAllParameters': 'true',
- 'WarnAsError': 'true',
- 'WarningLevel': '4'},
- 'Lib': {
- 'AdditionalDependencies': 'file1;file2;file3',
- 'AdditionalLibraryDirectories': 'folder1;folder2;folder3',
- 'AdditionalOptions': 'a_string',
- 'ExportNamedFunctions': 'd1;d2;d3',
- 'ForceSymbolReferences': 'a_string',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreSpecificDefaultLibraries': 'file1;file2;file3',
- 'ModuleDefinitionFile': 'a_file_name',
- 'OutputFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'UseUnicodeResponseFiles': 'true'},
- 'Manifest': {
- 'AdditionalManifestFiles': 'file1;file2;file3',
- 'AdditionalOptions': 'a_string',
- 'AssemblyIdentity': 'a_string',
- 'ComponentFileName': 'a_file_name',
- 'GenerateCatalogFiles': 'true',
- 'InputResourceManifests': 'a_string',
- 'OutputManifestFile': 'a_file_name',
- 'RegistrarScriptFile': 'a_file_name',
- 'ReplacementsFile': 'a_file_name',
- 'SuppressStartupBanner': 'true',
- 'TypeLibraryFile': 'a_file_name',
- 'UpdateFileHashes': 'true',
- 'UpdateFileHashesSearchPath': 'a_file_name',
- 'VerboseOutput': 'true'},
- 'ManifestResourceCompile': {
- 'ResourceOutputFileName': 'my_name'},
- 'ProjectReference': {
- 'LinkLibraryDependencies': 'true',
- 'UseLibraryDependencyInputs': 'false'},
- '': {
- 'EmbedManifest': 'true',
- 'GenerateManifest': 'true',
- 'IgnoreImportLibrary': 'true',
- 'LinkIncremental': 'false'}}
- self.maxDiff = 9999 # on failure display a long diff
- actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
- msvs_settings,
- self.stderr)
- self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
- self._ExpectedWarnings([])
-
- def testConvertToMSBuildSettings_actual(self):
- """Tests the conversion of an actual project.
-
- A VS2008 project with most of the options defined was created through the
- VS2008 IDE. It was then converted to VS2010. The tool settings found in
- the .vcproj and .vcxproj files were converted to the two dictionaries
- msvs_settings and expected_msbuild_settings.
-
- Note that for many settings, the VS2010 converter adds macros like
- %(AdditionalIncludeDirectories) to make sure than inherited values are
- included. Since the Gyp projects we generate do not use inheritance,
- we removed these macros. They were:
- ClCompile:
- AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)'
- AdditionalOptions: ' %(AdditionalOptions)'
- AdditionalUsingDirectories: ';%(AdditionalUsingDirectories)'
- DisableSpecificWarnings: ';%(DisableSpecificWarnings)',
- ForcedIncludeFiles: ';%(ForcedIncludeFiles)',
- ForcedUsingFiles: ';%(ForcedUsingFiles)',
- PreprocessorDefinitions: ';%(PreprocessorDefinitions)',
- UndefinePreprocessorDefinitions:
- ';%(UndefinePreprocessorDefinitions)',
- Link:
- AdditionalDependencies: ';%(AdditionalDependencies)',
- AdditionalLibraryDirectories: ';%(AdditionalLibraryDirectories)',
- AdditionalManifestDependencies:
- ';%(AdditionalManifestDependencies)',
- AdditionalOptions: ' %(AdditionalOptions)',
- AddModuleNamesToAssembly: ';%(AddModuleNamesToAssembly)',
- AssemblyLinkResource: ';%(AssemblyLinkResource)',
- DelayLoadDLLs: ';%(DelayLoadDLLs)',
- EmbedManagedResourceFile: ';%(EmbedManagedResourceFile)',
- ForceSymbolReferences: ';%(ForceSymbolReferences)',
- IgnoreSpecificDefaultLibraries:
- ';%(IgnoreSpecificDefaultLibraries)',
- ResourceCompile:
- AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)',
- AdditionalOptions: ' %(AdditionalOptions)',
- PreprocessorDefinitions: ';%(PreprocessorDefinitions)',
- Manifest:
- AdditionalManifestFiles: ';%(AdditionalManifestFiles)',
- AdditionalOptions: ' %(AdditionalOptions)',
- InputResourceManifests: ';%(InputResourceManifests)',
- """
- msvs_settings = {
- 'VCCLCompilerTool': {
- 'AdditionalIncludeDirectories': 'dir1',
- 'AdditionalOptions': '/more',
- 'AdditionalUsingDirectories': 'test',
- 'AssemblerListingLocation': '$(IntDir)\\a',
- 'AssemblerOutput': '1',
- 'BasicRuntimeChecks': '3',
- 'BrowseInformation': '1',
- 'BrowseInformationFile': '$(IntDir)\\e',
- 'BufferSecurityCheck': 'false',
- 'CallingConvention': '1',
- 'CompileAs': '1',
- 'DebugInformationFormat': '4',
- 'DefaultCharIsUnsigned': 'true',
- 'Detect64BitPortabilityProblems': 'true',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'abc',
- 'EnableEnhancedInstructionSet': '1',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnableFunctionLevelLinking': 'true',
- 'EnableIntrinsicFunctions': 'true',
- 'EnablePREfast': 'true',
- 'ErrorReporting': '2',
- 'ExceptionHandling': '2',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': '2',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': '1',
- 'ForceConformanceInForLoopScope': 'false',
- 'ForcedIncludeFiles': 'def',
- 'ForcedUsingFiles': 'ge',
- 'GeneratePreprocessedFile': '2',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': '1',
- 'KeepComments': 'true',
- 'MinimalRebuild': 'true',
- 'ObjectFile': '$(IntDir)\\b',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMP': 'true',
- 'Optimization': '3',
- 'PrecompiledHeaderFile': '$(IntDir)\\$(TargetName).pche',
- 'PrecompiledHeaderThrough': 'StdAfx.hd',
- 'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
- 'ProgramDataBaseFileName': '$(IntDir)\\vc90b.pdb',
- 'RuntimeLibrary': '3',
- 'RuntimeTypeInfo': 'false',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '3',
- 'SuppressStartupBanner': 'false',
- 'TreatWChar_tAsBuiltInType': 'false',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'wer',
- 'UseFullPaths': 'true',
- 'UsePrecompiledHeader': '0',
- 'UseUnicodeResponseFiles': 'false',
- 'WarnAsError': 'true',
- 'WarningLevel': '3',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': '$(IntDir)\\c'},
- 'VCLinkerTool': {
- 'AdditionalDependencies': 'zx',
- 'AdditionalLibraryDirectories': 'asd',
- 'AdditionalManifestDependencies': 's2',
- 'AdditionalOptions': '/mor2',
- 'AddModuleNamesToAssembly': 'd1',
- 'AllowIsolation': 'false',
- 'AssemblyDebug': '1',
- 'AssemblyLinkResource': 'd5',
- 'BaseAddress': '23423',
- 'CLRImageType': '3',
- 'CLRThreadAttribute': '1',
- 'CLRUnmanagedCodeCheck': 'true',
- 'DataExecutionPrevention': '0',
- 'DelayLoadDLLs': 'd4',
- 'DelaySign': 'true',
- 'Driver': '2',
- 'EmbedManagedResourceFile': 'd2',
- 'EnableCOMDATFolding': '1',
- 'EnableUAC': 'false',
- 'EntryPointSymbol': 'f5',
- 'ErrorReporting': '2',
- 'FixedBaseAddress': '1',
- 'ForceSymbolReferences': 'd3',
- 'FunctionOrder': 'fssdfsd',
- 'GenerateDebugInformation': 'true',
- 'GenerateManifest': 'false',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': '13',
- 'HeapReserveSize': '12',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreDefaultLibraryNames': 'flob;flok',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreImportLibrary': 'true',
- 'ImportLibrary': 'f4',
- 'KeyContainer': 'f7',
- 'KeyFile': 'f6',
- 'LargeAddressAware': '2',
- 'LinkIncremental': '0',
- 'LinkLibraryDependencies': 'false',
- 'LinkTimeCodeGeneration': '1',
- 'ManifestFile':
- '$(IntDir)\\$(TargetFileName).2intermediate.manifest',
- 'MapExports': 'true',
- 'MapFileName': 'd5',
- 'MergedIDLBaseFileName': 'f2',
- 'MergeSections': 'f5',
- 'MidlCommandFile': 'f1',
- 'ModuleDefinitionFile': 'sdsd',
- 'OptimizeForWindows98': '2',
- 'OptimizeReferences': '2',
- 'OutputFile': '$(OutDir)\\$(ProjectName)2.exe',
- 'PerUserRedirection': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
- 'ProgramDatabaseFile': 'Flob.pdb',
- 'RandomizedBaseAddress': '1',
- 'RegisterOutput': 'true',
- 'ResourceOnlyDLL': 'true',
- 'SetChecksum': 'false',
- 'ShowProgress': '1',
- 'StackCommitSize': '15',
- 'StackReserveSize': '14',
- 'StripPrivateSymbols': 'd3',
- 'SubSystem': '1',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'false',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNet': 'true',
- 'TargetMachine': '1',
- 'TerminalServerAware': '1',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'f3',
- 'TypeLibraryResourceID': '12',
- 'UACExecutionLevel': '2',
- 'UACUIAccess': 'true',
- 'UseLibraryDependencyInputs': 'true',
- 'UseUnicodeResponseFiles': 'false',
- 'Version': '333'},
- 'VCResourceCompilerTool': {
- 'AdditionalIncludeDirectories': 'f3',
- 'AdditionalOptions': '/more3',
- 'Culture': '3084',
- 'IgnoreStandardIncludePath': 'true',
- 'PreprocessorDefinitions': '_UNICODE;UNICODE2',
- 'ResourceOutputFileName': '$(IntDir)/$(InputName)3.res',
- 'ShowProgress': 'true'},
- 'VCManifestTool': {
- 'AdditionalManifestFiles': 'sfsdfsd',
- 'AdditionalOptions': 'afdsdafsd',
- 'AssemblyIdentity': 'sddfdsadfsa',
- 'ComponentFileName': 'fsdfds',
- 'DependencyInformationFile': '$(IntDir)\\mt.depdfd',
- 'EmbedManifest': 'false',
- 'GenerateCatalogFiles': 'true',
- 'InputResourceManifests': 'asfsfdafs',
- 'ManifestResourceFile':
- '$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf',
- 'OutputManifestFile': '$(TargetPath).manifestdfs',
- 'RegistrarScriptFile': 'sdfsfd',
- 'ReplacementsFile': 'sdffsd',
- 'SuppressStartupBanner': 'false',
- 'TypeLibraryFile': 'sfsd',
- 'UpdateFileHashes': 'true',
- 'UpdateFileHashesSearchPath': 'sfsd',
- 'UseFAT32Workaround': 'true',
- 'UseUnicodeResponseFiles': 'false',
- 'VerboseOutput': 'true'}}
- expected_msbuild_settings = {
- 'ClCompile': {
- 'AdditionalIncludeDirectories': 'dir1',
- 'AdditionalOptions': '/more /J',
- 'AdditionalUsingDirectories': 'test',
- 'AssemblerListingLocation': '$(IntDir)a',
- 'AssemblerOutput': 'AssemblyCode',
- 'BasicRuntimeChecks': 'EnableFastChecks',
- 'BrowseInformation': 'true',
- 'BrowseInformationFile': '$(IntDir)e',
- 'BufferSecurityCheck': 'false',
- 'CallingConvention': 'FastCall',
- 'CompileAs': 'CompileAsC',
- 'DebugInformationFormat': 'EditAndContinue',
- 'DisableLanguageExtensions': 'true',
- 'DisableSpecificWarnings': 'abc',
- 'EnableEnhancedInstructionSet': 'StreamingSIMDExtensions',
- 'EnableFiberSafeOptimizations': 'true',
- 'EnablePREfast': 'true',
- 'ErrorReporting': 'Queue',
- 'ExceptionHandling': 'Async',
- 'ExpandAttributedSource': 'true',
- 'FavorSizeOrSpeed': 'Size',
- 'FloatingPointExceptions': 'true',
- 'FloatingPointModel': 'Strict',
- 'ForceConformanceInForLoopScope': 'false',
- 'ForcedIncludeFiles': 'def',
- 'ForcedUsingFiles': 'ge',
- 'FunctionLevelLinking': 'true',
- 'GenerateXMLDocumentationFiles': 'true',
- 'IgnoreStandardIncludePath': 'true',
- 'InlineFunctionExpansion': 'OnlyExplicitInline',
- 'IntrinsicFunctions': 'true',
- 'MinimalRebuild': 'true',
- 'ObjectFileName': '$(IntDir)b',
- 'OmitDefaultLibName': 'true',
- 'OmitFramePointers': 'true',
- 'OpenMPSupport': 'true',
- 'Optimization': 'Full',
- 'PrecompiledHeader': 'NotUsing', # Actual conversion gives ''
- 'PrecompiledHeaderFile': 'StdAfx.hd',
- 'PrecompiledHeaderOutputFile': '$(IntDir)$(TargetName).pche',
- 'PreprocessKeepComments': 'true',
- 'PreprocessorDefinitions': 'WIN32;_DEBUG;_CONSOLE',
- 'PreprocessSuppressLineNumbers': 'true',
- 'PreprocessToFile': 'true',
- 'ProgramDataBaseFileName': '$(IntDir)vc90b.pdb',
- 'RuntimeLibrary': 'MultiThreadedDebugDLL',
- 'RuntimeTypeInfo': 'false',
- 'ShowIncludes': 'true',
- 'SmallerTypeCheck': 'true',
- 'StringPooling': 'true',
- 'StructMemberAlignment': '4Bytes',
- 'SuppressStartupBanner': 'false',
- 'TreatWarningAsError': 'true',
- 'TreatWChar_tAsBuiltInType': 'false',
- 'UndefineAllPreprocessorDefinitions': 'true',
- 'UndefinePreprocessorDefinitions': 'wer',
- 'UseFullPaths': 'true',
- 'WarningLevel': 'Level3',
- 'WholeProgramOptimization': 'true',
- 'XMLDocumentationFileName': '$(IntDir)c'},
- 'Link': {
- 'AdditionalDependencies': 'zx',
- 'AdditionalLibraryDirectories': 'asd',
- 'AdditionalManifestDependencies': 's2',
- 'AdditionalOptions': '/mor2',
- 'AddModuleNamesToAssembly': 'd1',
- 'AllowIsolation': 'false',
- 'AssemblyDebug': 'true',
- 'AssemblyLinkResource': 'd5',
- 'BaseAddress': '23423',
- 'CLRImageType': 'ForceSafeILImage',
- 'CLRThreadAttribute': 'MTAThreadingAttribute',
- 'CLRUnmanagedCodeCheck': 'true',
- 'DataExecutionPrevention': '',
- 'DelayLoadDLLs': 'd4',
- 'DelaySign': 'true',
- 'Driver': 'UpOnly',
- 'EmbedManagedResourceFile': 'd2',
- 'EnableCOMDATFolding': 'false',
- 'EnableUAC': 'false',
- 'EntryPointSymbol': 'f5',
- 'FixedBaseAddress': 'false',
- 'ForceSymbolReferences': 'd3',
- 'FunctionOrder': 'fssdfsd',
- 'GenerateDebugInformation': 'true',
- 'GenerateMapFile': 'true',
- 'HeapCommitSize': '13',
- 'HeapReserveSize': '12',
- 'IgnoreAllDefaultLibraries': 'true',
- 'IgnoreEmbeddedIDL': 'true',
- 'IgnoreSpecificDefaultLibraries': 'flob;flok',
- 'ImportLibrary': 'f4',
- 'KeyContainer': 'f7',
- 'KeyFile': 'f6',
- 'LargeAddressAware': 'true',
- 'LinkErrorReporting': 'QueueForNextLogin',
- 'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
- 'ManifestFile': '$(IntDir)$(TargetFileName).2intermediate.manifest',
- 'MapExports': 'true',
- 'MapFileName': 'd5',
- 'MergedIDLBaseFileName': 'f2',
- 'MergeSections': 'f5',
- 'MidlCommandFile': 'f1',
- 'ModuleDefinitionFile': 'sdsd',
- 'NoEntryPoint': 'true',
- 'OptimizeReferences': 'true',
- 'OutputFile': '$(OutDir)$(ProjectName)2.exe',
- 'PerUserRedirection': 'true',
- 'Profile': 'true',
- 'ProfileGuidedDatabase': '$(TargetDir)$(TargetName).pgdd',
- 'ProgramDatabaseFile': 'Flob.pdb',
- 'RandomizedBaseAddress': 'false',
- 'RegisterOutput': 'true',
- 'SetChecksum': 'false',
- 'ShowProgress': 'LinkVerbose',
- 'StackCommitSize': '15',
- 'StackReserveSize': '14',
- 'StripPrivateSymbols': 'd3',
- 'SubSystem': 'Console',
- 'SupportUnloadOfDelayLoadedDLL': 'true',
- 'SuppressStartupBanner': 'false',
- 'SwapRunFromCD': 'true',
- 'SwapRunFromNET': 'true',
- 'TargetMachine': 'MachineX86',
- 'TerminalServerAware': 'false',
- 'TurnOffAssemblyGeneration': 'true',
- 'TypeLibraryFile': 'f3',
- 'TypeLibraryResourceID': '12',
- 'UACExecutionLevel': 'RequireAdministrator',
- 'UACUIAccess': 'true',
- 'Version': '333'},
- 'ResourceCompile': {
- 'AdditionalIncludeDirectories': 'f3',
- 'AdditionalOptions': '/more3',
- 'Culture': '0x0c0c',
- 'IgnoreStandardIncludePath': 'true',
- 'PreprocessorDefinitions': '_UNICODE;UNICODE2',
- 'ResourceOutputFileName': '$(IntDir)%(Filename)3.res',
- 'ShowProgress': 'true'},
- 'Manifest': {
- 'AdditionalManifestFiles': 'sfsdfsd',
- 'AdditionalOptions': 'afdsdafsd',
- 'AssemblyIdentity': 'sddfdsadfsa',
- 'ComponentFileName': 'fsdfds',
- 'GenerateCatalogFiles': 'true',
- 'InputResourceManifests': 'asfsfdafs',
- 'OutputManifestFile': '$(TargetPath).manifestdfs',
- 'RegistrarScriptFile': 'sdfsfd',
- 'ReplacementsFile': 'sdffsd',
- 'SuppressStartupBanner': 'false',
- 'TypeLibraryFile': 'sfsd',
- 'UpdateFileHashes': 'true',
- 'UpdateFileHashesSearchPath': 'sfsd',
- 'VerboseOutput': 'true'},
- 'ProjectReference': {
- 'LinkLibraryDependencies': 'false',
- 'UseLibraryDependencyInputs': 'true'},
- '': {
- 'EmbedManifest': 'false',
- 'GenerateManifest': 'false',
- 'IgnoreImportLibrary': 'true',
- 'LinkIncremental': ''
- },
- 'ManifestResourceCompile': {
- 'ResourceOutputFileName':
- '$(IntDir)$(TargetFileName).embed.manifest.resfdsf'}
- }
- self.maxDiff = 9999 # on failure display a long diff
- actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
- msvs_settings,
- self.stderr)
- self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
- self._ExpectedWarnings([])
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
deleted file mode 100644
index 74e529a17..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio project reader/writer."""
-
-import gyp.common
-import gyp.easy_xml as easy_xml
-
-
-class Writer(object):
- """Visual Studio XML tool file writer."""
-
- def __init__(self, tool_file_path, name):
- """Initializes the tool file.
-
- Args:
- tool_file_path: Path to the tool file.
- name: Name of the tool file.
- """
- self.tool_file_path = tool_file_path
- self.name = name
- self.rules_section = ['Rules']
-
- def AddCustomBuildRule(self, name, cmd, description,
- additional_dependencies,
- outputs, extensions):
- """Adds a rule to the tool file.
-
- Args:
- name: Name of the rule.
- description: Description of the rule.
- cmd: Command line of the rule.
- additional_dependencies: other files which may trigger the rule.
- outputs: outputs of the rule.
- extensions: extensions handled by the rule.
- """
- rule = ['CustomBuildRule',
- {'Name': name,
- 'ExecutionDescription': description,
- 'CommandLine': cmd,
- 'Outputs': ';'.join(outputs),
- 'FileExtensions': ';'.join(extensions),
- 'AdditionalDependencies':
- ';'.join(additional_dependencies)
- }]
- self.rules_section.append(rule)
-
- def WriteIfChanged(self):
- """Writes the tool file."""
- content = ['VisualStudioToolFile',
- {'Version': '8.00',
- 'Name': self.name
- },
- self.rules_section
- ]
- easy_xml.WriteXmlIfChanged(content, self.tool_file_path,
- encoding="Windows-1252")
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
deleted file mode 100644
index 2264d6401..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio user preferences file writer."""
-
-import os
-import re
-import socket # for gethostname
-
-import gyp.common
-import gyp.easy_xml as easy_xml
-
-
-#------------------------------------------------------------------------------
-
-def _FindCommandInPath(command):
- """If there are no slashes in the command given, this function
- searches the PATH env to find the given command, and converts it
- to an absolute path. We have to do this because MSVS is looking
- for an actual file to launch a debugger on, not just a command
- line. Note that this happens at GYP time, so anything needing to
- be built needs to have a full path."""
- if '/' in command or '\\' in command:
- # If the command already has path elements (either relative or
- # absolute), then assume it is constructed properly.
- return command
- else:
- # Search through the path list and find an existing file that
- # we can access.
- paths = os.environ.get('PATH','').split(os.pathsep)
- for path in paths:
- item = os.path.join(path, command)
- if os.path.isfile(item) and os.access(item, os.X_OK):
- return item
- return command
-
-def _QuoteWin32CommandLineArgs(args):
- new_args = []
- for arg in args:
- # Replace all double-quotes with double-double-quotes to escape
- # them for cmd shell, and then quote the whole thing if there
- # are any.
- if arg.find('"') != -1:
- arg = '""'.join(arg.split('"'))
- arg = '"%s"' % arg
-
- # Otherwise, if there are any spaces, quote the whole arg.
- elif re.search(r'[ \t\n]', arg):
- arg = '"%s"' % arg
- new_args.append(arg)
- return new_args
-
-class Writer(object):
- """Visual Studio XML user user file writer."""
-
- def __init__(self, user_file_path, version, name):
- """Initializes the user file.
-
- Args:
- user_file_path: Path to the user file.
- version: Version info.
- name: Name of the user file.
- """
- self.user_file_path = user_file_path
- self.version = version
- self.name = name
- self.configurations = {}
-
- def AddConfig(self, name):
- """Adds a configuration to the project.
-
- Args:
- name: Configuration name.
- """
- self.configurations[name] = ['Configuration', {'Name': name}]
-
- def AddDebugSettings(self, config_name, command, environment = {},
- working_directory=""):
- """Adds a DebugSettings node to the user file for a particular config.
-
- Args:
- command: command line to run. First element in the list is the
- executable. All elements of the command will be quoted if
- necessary.
- working_directory: other files which may trigger the rule. (optional)
- """
- command = _QuoteWin32CommandLineArgs(command)
-
- abs_command = _FindCommandInPath(command[0])
-
- if environment and isinstance(environment, dict):
- env_list = ['%s="%s"' % (key, val)
- for (key,val) in environment.items()]
- environment = ' '.join(env_list)
- else:
- environment = ''
-
- n_cmd = ['DebugSettings',
- {'Command': abs_command,
- 'WorkingDirectory': working_directory,
- 'CommandArguments': " ".join(command[1:]),
- 'RemoteMachine': socket.gethostname(),
- 'Environment': environment,
- 'EnvironmentMerge': 'true',
- # Currently these are all "dummy" values that we're just setting
- # in the default manner that MSVS does it. We could use some of
- # these to add additional capabilities, I suppose, but they might
- # not have parity with other platforms then.
- 'Attach': 'false',
- 'DebuggerType': '3', # 'auto' debugger
- 'Remote': '1',
- 'RemoteCommand': '',
- 'HttpUrl': '',
- 'PDBPath': '',
- 'SQLDebugging': '',
- 'DebuggerFlavor': '0',
- 'MPIRunCommand': '',
- 'MPIRunArguments': '',
- 'MPIRunWorkingDirectory': '',
- 'ApplicationCommand': '',
- 'ApplicationArguments': '',
- 'ShimCommand': '',
- 'MPIAcceptMode': '',
- 'MPIAcceptFilter': ''
- }]
-
- # Find the config, and add it if it doesn't exist.
- if config_name not in self.configurations:
- self.AddConfig(config_name)
-
- # Add the DebugSettings onto the appropriate config.
- self.configurations[config_name].append(n_cmd)
-
- def WriteIfChanged(self):
- """Writes the user file."""
- configs = ['Configurations']
- for config, spec in sorted(self.configurations.items()):
- configs.append(spec)
-
- content = ['VisualStudioUserFile',
- {'Version': self.version.ProjectVersion(),
- 'Name': self.name
- },
- configs]
- easy_xml.WriteXmlIfChanged(content, self.user_file_path,
- encoding="Windows-1252")
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
deleted file mode 100644
index c8187eb33..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
+++ /dev/null
@@ -1,270 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Utility functions shared amongst the Windows generators."""
-
-import copy
-import os
-
-
-# A dictionary mapping supported target types to extensions.
-TARGET_TYPE_EXT = {
- 'executable': 'exe',
- 'loadable_module': 'dll',
- 'shared_library': 'dll',
- 'static_library': 'lib',
-}
-
-
-def _GetLargePdbShimCcPath():
- """Returns the path of the large_pdb_shim.cc file."""
- this_dir = os.path.abspath(os.path.dirname(__file__))
- src_dir = os.path.abspath(os.path.join(this_dir, '..', '..'))
- win_data_dir = os.path.join(src_dir, 'data', 'win')
- large_pdb_shim_cc = os.path.join(win_data_dir, 'large-pdb-shim.cc')
- return large_pdb_shim_cc
-
-
-def _DeepCopySomeKeys(in_dict, keys):
- """Performs a partial deep-copy on |in_dict|, only copying the keys in |keys|.
-
- Arguments:
- in_dict: The dictionary to copy.
- keys: The keys to be copied. If a key is in this list and doesn't exist in
- |in_dict| this is not an error.
- Returns:
- The partially deep-copied dictionary.
- """
- d = {}
- for key in keys:
- if key not in in_dict:
- continue
- d[key] = copy.deepcopy(in_dict[key])
- return d
-
-
-def _SuffixName(name, suffix):
- """Add a suffix to the end of a target.
-
- Arguments:
- name: name of the target (foo#target)
- suffix: the suffix to be added
- Returns:
- Target name with suffix added (foo_suffix#target)
- """
- parts = name.rsplit('#', 1)
- parts[0] = '%s_%s' % (parts[0], suffix)
- return '#'.join(parts)
-
-
-def _ShardName(name, number):
- """Add a shard number to the end of a target.
-
- Arguments:
- name: name of the target (foo#target)
- number: shard number
- Returns:
- Target name with shard added (foo_1#target)
- """
- return _SuffixName(name, str(number))
-
-
-def ShardTargets(target_list, target_dicts):
- """Shard some targets apart to work around the linkers limits.
-
- Arguments:
- target_list: List of target pairs: 'base/base.gyp:base'.
- target_dicts: Dict of target properties keyed on target pair.
- Returns:
- Tuple of the new sharded versions of the inputs.
- """
- # Gather the targets to shard, and how many pieces.
- targets_to_shard = {}
- for t in target_dicts:
- shards = int(target_dicts[t].get('msvs_shard', 0))
- if shards:
- targets_to_shard[t] = shards
- # Shard target_list.
- new_target_list = []
- for t in target_list:
- if t in targets_to_shard:
- for i in range(targets_to_shard[t]):
- new_target_list.append(_ShardName(t, i))
- else:
- new_target_list.append(t)
- # Shard target_dict.
- new_target_dicts = {}
- for t in target_dicts:
- if t in targets_to_shard:
- for i in range(targets_to_shard[t]):
- name = _ShardName(t, i)
- new_target_dicts[name] = copy.copy(target_dicts[t])
- new_target_dicts[name]['target_name'] = _ShardName(
- new_target_dicts[name]['target_name'], i)
- sources = new_target_dicts[name].get('sources', [])
- new_sources = []
- for pos in range(i, len(sources), targets_to_shard[t]):
- new_sources.append(sources[pos])
- new_target_dicts[name]['sources'] = new_sources
- else:
- new_target_dicts[t] = target_dicts[t]
- # Shard dependencies.
- for t in new_target_dicts:
- for deptype in ('dependencies', 'dependencies_original'):
- dependencies = copy.copy(new_target_dicts[t].get(deptype, []))
- new_dependencies = []
- for d in dependencies:
- if d in targets_to_shard:
- for i in range(targets_to_shard[d]):
- new_dependencies.append(_ShardName(d, i))
- else:
- new_dependencies.append(d)
- new_target_dicts[t][deptype] = new_dependencies
-
- return (new_target_list, new_target_dicts)
-
-
-def _GetPdbPath(target_dict, config_name, vars):
- """Returns the path to the PDB file that will be generated by a given
- configuration.
-
- The lookup proceeds as follows:
- - Look for an explicit path in the VCLinkerTool configuration block.
- - Look for an 'msvs_large_pdb_path' variable.
- - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is
- specified.
- - Use '<(PRODUCT_DIR)/<(target_name).(exe|dll).pdb'.
-
- Arguments:
- target_dict: The target dictionary to be searched.
- config_name: The name of the configuration of interest.
- vars: A dictionary of common GYP variables with generator-specific values.
- Returns:
- The path of the corresponding PDB file.
- """
- config = target_dict['configurations'][config_name]
- msvs = config.setdefault('msvs_settings', {})
-
- linker = msvs.get('VCLinkerTool', {})
-
- pdb_path = linker.get('ProgramDatabaseFile')
- if pdb_path:
- return pdb_path
-
- variables = target_dict.get('variables', {})
- pdb_path = variables.get('msvs_large_pdb_path', None)
- if pdb_path:
- return pdb_path
-
-
- pdb_base = target_dict.get('product_name', target_dict['target_name'])
- pdb_base = '%s.%s.pdb' % (pdb_base, TARGET_TYPE_EXT[target_dict['type']])
- pdb_path = vars['PRODUCT_DIR'] + '/' + pdb_base
-
- return pdb_path
-
-
-def InsertLargePdbShims(target_list, target_dicts, vars):
- """Insert a shim target that forces the linker to use 4KB pagesize PDBs.
-
- This is a workaround for targets with PDBs greater than 1GB in size, the
- limit for the 1KB pagesize PDBs created by the linker by default.
-
- Arguments:
- target_list: List of target pairs: 'base/base.gyp:base'.
- target_dicts: Dict of target properties keyed on target pair.
- vars: A dictionary of common GYP variables with generator-specific values.
- Returns:
- Tuple of the shimmed version of the inputs.
- """
- # Determine which targets need shimming.
- targets_to_shim = []
- for t in target_dicts:
- target_dict = target_dicts[t]
-
- # We only want to shim targets that have msvs_large_pdb enabled.
- if not int(target_dict.get('msvs_large_pdb', 0)):
- continue
- # This is intended for executable, shared_library and loadable_module
- # targets where every configuration is set up to produce a PDB output.
- # If any of these conditions is not true then the shim logic will fail
- # below.
- targets_to_shim.append(t)
-
- large_pdb_shim_cc = _GetLargePdbShimCcPath()
-
- for t in targets_to_shim:
- target_dict = target_dicts[t]
- target_name = target_dict.get('target_name')
-
- base_dict = _DeepCopySomeKeys(target_dict,
- ['configurations', 'default_configuration', 'toolset'])
-
- # This is the dict for copying the source file (part of the GYP tree)
- # to the intermediate directory of the project. This is necessary because
- # we can't always build a relative path to the shim source file (on Windows
- # GYP and the project may be on different drives), and Ninja hates absolute
- # paths (it ends up generating the .obj and .obj.d alongside the source
- # file, polluting GYPs tree).
- copy_suffix = 'large_pdb_copy'
- copy_target_name = target_name + '_' + copy_suffix
- full_copy_target_name = _SuffixName(t, copy_suffix)
- shim_cc_basename = os.path.basename(large_pdb_shim_cc)
- shim_cc_dir = vars['SHARED_INTERMEDIATE_DIR'] + '/' + copy_target_name
- shim_cc_path = shim_cc_dir + '/' + shim_cc_basename
- copy_dict = copy.deepcopy(base_dict)
- copy_dict['target_name'] = copy_target_name
- copy_dict['type'] = 'none'
- copy_dict['sources'] = [ large_pdb_shim_cc ]
- copy_dict['copies'] = [{
- 'destination': shim_cc_dir,
- 'files': [ large_pdb_shim_cc ]
- }]
-
- # This is the dict for the PDB generating shim target. It depends on the
- # copy target.
- shim_suffix = 'large_pdb_shim'
- shim_target_name = target_name + '_' + shim_suffix
- full_shim_target_name = _SuffixName(t, shim_suffix)
- shim_dict = copy.deepcopy(base_dict)
- shim_dict['target_name'] = shim_target_name
- shim_dict['type'] = 'static_library'
- shim_dict['sources'] = [ shim_cc_path ]
- shim_dict['dependencies'] = [ full_copy_target_name ]
-
- # Set up the shim to output its PDB to the same location as the final linker
- # target.
- for config_name, config in shim_dict.get('configurations').items():
- pdb_path = _GetPdbPath(target_dict, config_name, vars)
-
- # A few keys that we don't want to propagate.
- for key in ['msvs_precompiled_header', 'msvs_precompiled_source', 'test']:
- config.pop(key, None)
-
- msvs = config.setdefault('msvs_settings', {})
-
- # Update the compiler directives in the shim target.
- compiler = msvs.setdefault('VCCLCompilerTool', {})
- compiler['DebugInformationFormat'] = '3'
- compiler['ProgramDataBaseFileName'] = pdb_path
-
- # Set the explicit PDB path in the appropriate configuration of the
- # original target.
- config = target_dict['configurations'][config_name]
- msvs = config.setdefault('msvs_settings', {})
- linker = msvs.setdefault('VCLinkerTool', {})
- linker['GenerateDebugInformation'] = 'true'
- linker['ProgramDatabaseFile'] = pdb_path
-
- # Add the new targets. They must go to the beginning of the list so that
- # the dependency generation works as expected in ninja.
- target_list.insert(0, full_copy_target_name)
- target_list.insert(0, full_shim_target_name)
- target_dicts[full_copy_target_name] = copy_dict
- target_dicts[full_shim_target_name] = shim_dict
-
- # Update the original target to depend on the shim target.
- target_dict.setdefault('dependencies', []).append(full_shim_target_name)
-
- return (target_list, target_dicts)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
deleted file mode 100644
index c7cf68d3a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
+++ /dev/null
@@ -1,455 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Handle version information related to Visual Stuio."""
-
-import errno
-import os
-import re
-import subprocess
-import sys
-import gyp
-import glob
-
-PY3 = bytes != str
-
-
-class VisualStudioVersion(object):
- """Information regarding a version of Visual Studio."""
-
- def __init__(self, short_name, description,
- solution_version, project_version, flat_sln, uses_vcxproj,
- path, sdk_based, default_toolset=None):
- self.short_name = short_name
- self.description = description
- self.solution_version = solution_version
- self.project_version = project_version
- self.flat_sln = flat_sln
- self.uses_vcxproj = uses_vcxproj
- self.path = path
- self.sdk_based = sdk_based
- self.default_toolset = default_toolset
-
- def ShortName(self):
- return self.short_name
-
- def Description(self):
- """Get the full description of the version."""
- return self.description
-
- def SolutionVersion(self):
- """Get the version number of the sln files."""
- return self.solution_version
-
- def ProjectVersion(self):
- """Get the version number of the vcproj or vcxproj files."""
- return self.project_version
-
- def FlatSolution(self):
- return self.flat_sln
-
- def UsesVcxproj(self):
- """Returns true if this version uses a vcxproj file."""
- return self.uses_vcxproj
-
- def ProjectExtension(self):
- """Returns the file extension for the project."""
- return self.uses_vcxproj and '.vcxproj' or '.vcproj'
-
- def Path(self):
- """Returns the path to Visual Studio installation."""
- return self.path
-
- def ToolPath(self, tool):
- """Returns the path to a given compiler tool. """
- return os.path.normpath(os.path.join(self.path, "VC/bin", tool))
-
- def DefaultToolset(self):
- """Returns the msbuild toolset version that will be used in the absence
- of a user override."""
- return self.default_toolset
-
- def SetupScript(self, target_arch):
- """Returns a command (with arguments) to be used to set up the
- environment."""
- # Check if we are running in the SDK command line environment and use
- # the setup script from the SDK if so. |target_arch| should be either
- # 'x86' or 'x64'.
- assert target_arch in ('x86', 'x64')
- sdk_dir = os.environ.get('WindowsSDKDir')
- if self.sdk_based and sdk_dir:
- return [os.path.normpath(os.path.join(sdk_dir, 'Bin/SetEnv.Cmd')),
- '/' + target_arch]
- else:
- # We don't use VC/vcvarsall.bat for x86 because vcvarsall calls
- # vcvars32, which it can only find if VS??COMNTOOLS is set, which it
- # isn't always.
- if target_arch == 'x86':
- if self.short_name >= '2013' and self.short_name[-1] != 'e' and (
- os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
- os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
- # VS2013 and later, non-Express have a x64-x86 cross that we want
- # to prefer.
- return [os.path.normpath(
- os.path.join(self.path, 'VC/vcvarsall.bat')), 'amd64_x86']
- # Otherwise, the standard x86 compiler.
- return [os.path.normpath(
- os.path.join(self.path, 'Common7/Tools/vsvars32.bat'))]
- else:
- assert target_arch == 'x64'
- arg = 'x86_amd64'
- # Use the 64-on-64 compiler if we're not using an express
- # edition and we're running on a 64bit OS.
- if self.short_name[-1] != 'e' and (
- os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
- os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
- arg = 'amd64'
- return [os.path.normpath(
- os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
-
-
-def _RegistryQueryBase(sysdir, key, value):
- """Use reg.exe to read a particular key.
-
- While ideally we might use the win32 module, we would like gyp to be
- python neutral, so for instance cygwin python lacks this module.
-
- Arguments:
- sysdir: The system subdirectory to attempt to launch reg.exe from.
- key: The registry key to read from.
- value: The particular value to read.
- Return:
- stdout from reg.exe, or None for failure.
- """
- # Skip if not on Windows or Python Win32 setup issue
- if sys.platform not in ('win32', 'cygwin'):
- return None
- # Setup params to pass to and attempt to launch reg.exe
- cmd = [os.path.join(os.environ.get('WINDIR', ''), sysdir, 'reg.exe'),
- 'query', key]
- if value:
- cmd.extend(['/v', value])
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- # Obtain the stdout from reg.exe, reading to the end so p.returncode is valid
- # Note that the error text may be in [1] in some cases
- text = p.communicate()[0]
- if PY3:
- text = text.decode('utf-8')
- # Check return code from reg.exe; officially 0==success and 1==error
- if p.returncode:
- return None
- return text
-
-
-def _RegistryQuery(key, value=None):
- r"""Use reg.exe to read a particular key through _RegistryQueryBase.
-
- First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
- that fails, it falls back to System32. Sysnative is available on Vista and
- up and available on Windows Server 2003 and XP through KB patch 942589. Note
- that Sysnative will always fail if using 64-bit python due to it being a
- virtual directory and System32 will work correctly in the first place.
-
- KB 942589 - http://support.microsoft.com/kb/942589/en-us.
-
- Arguments:
- key: The registry key.
- value: The particular registry value to read (optional).
- Return:
- stdout from reg.exe, or None for failure.
- """
- text = None
- try:
- text = _RegistryQueryBase('Sysnative', key, value)
- except OSError as e:
- if e.errno == errno.ENOENT:
- text = _RegistryQueryBase('System32', key, value)
- else:
- raise
- return text
-
-
-def _RegistryGetValueUsingWinReg(key, value):
- """Use the _winreg module to obtain the value of a registry key.
-
- Args:
- key: The registry key.
- value: The particular registry value to read.
- Return:
- contents of the registry key's value, or None on failure. Throws
- ImportError if _winreg is unavailable.
- """
- try:
- # Python 2
- from _winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
- except ImportError:
- # Python 3
- from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
-
- try:
- root, subkey = key.split('\\', 1)
- assert root == 'HKLM' # Only need HKLM for now.
- with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey:
- return QueryValueEx(hkey, value)[0]
- except WindowsError:
- return None
-
-
-def _RegistryGetValue(key, value):
- """Use _winreg or reg.exe to obtain the value of a registry key.
-
- Using _winreg is preferable because it solves an issue on some corporate
- environments where access to reg.exe is locked down. However, we still need
- to fallback to reg.exe for the case where the _winreg module is not available
- (for example in cygwin python).
-
- Args:
- key: The registry key.
- value: The particular registry value to read.
- Return:
- contents of the registry key's value, or None on failure.
- """
- try:
- return _RegistryGetValueUsingWinReg(key, value)
- except ImportError:
- pass
-
- # Fallback to reg.exe if we fail to import _winreg.
- text = _RegistryQuery(key, value)
- if not text:
- return None
- # Extract value.
- match = re.search(r'REG_\w+\s+([^\r]+)\r\n', text)
- if not match:
- return None
- return match.group(1)
-
-
-def _CreateVersion(name, path, sdk_based=False):
- """Sets up MSVS project generation.
-
- Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
- autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
- passed in that doesn't match a value in versions python will throw a error.
- """
- if path:
- path = os.path.normpath(path)
- versions = {
- '2015': VisualStudioVersion('2015',
- 'Visual Studio 2015',
- solution_version='12.00',
- project_version='14.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v140'),
- '2013': VisualStudioVersion('2013',
- 'Visual Studio 2013',
- solution_version='13.00',
- project_version='12.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v120'),
- '2013e': VisualStudioVersion('2013e',
- 'Visual Studio 2013',
- solution_version='13.00',
- project_version='12.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v120'),
- '2012': VisualStudioVersion('2012',
- 'Visual Studio 2012',
- solution_version='12.00',
- project_version='4.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2012e': VisualStudioVersion('2012e',
- 'Visual Studio 2012',
- solution_version='12.00',
- project_version='4.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2010': VisualStudioVersion('2010',
- 'Visual Studio 2010',
- solution_version='11.00',
- project_version='4.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based),
- '2010e': VisualStudioVersion('2010e',
- 'Visual C++ Express 2010',
- solution_version='11.00',
- project_version='4.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based),
- '2008': VisualStudioVersion('2008',
- 'Visual Studio 2008',
- solution_version='10.00',
- project_version='9.00',
- flat_sln=False,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2008e': VisualStudioVersion('2008e',
- 'Visual Studio 2008',
- solution_version='10.00',
- project_version='9.00',
- flat_sln=True,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2005': VisualStudioVersion('2005',
- 'Visual Studio 2005',
- solution_version='9.00',
- project_version='8.00',
- flat_sln=False,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2005e': VisualStudioVersion('2005e',
- 'Visual Studio 2005',
- solution_version='9.00',
- project_version='8.00',
- flat_sln=True,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- }
- return versions[str(name)]
-
-
-def _ConvertToCygpath(path):
- """Convert to cygwin path if we are using cygwin."""
- if sys.platform == 'cygwin':
- p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
- path = p.communicate()[0].strip()
- if PY3:
- path = path.decode('utf-8')
- return path
-
-
-def _DetectVisualStudioVersions(versions_to_check, force_express):
- """Collect the list of installed visual studio versions.
-
- Returns:
- A list of visual studio versions installed in descending order of
- usage preference.
- Base this on the registry and a quick check if devenv.exe exists.
- Only versions 8-10 are considered.
- Possibilities are:
- 2005(e) - Visual Studio 2005 (8)
- 2008(e) - Visual Studio 2008 (9)
- 2010(e) - Visual Studio 2010 (10)
- 2012(e) - Visual Studio 2012 (11)
- 2013(e) - Visual Studio 2013 (12)
- 2015 - Visual Studio 2015 (14)
- Where (e) is e for express editions of MSVS and blank otherwise.
- """
- version_to_year = {
- '8.0': '2005',
- '9.0': '2008',
- '10.0': '2010',
- '11.0': '2012',
- '12.0': '2013',
- '14.0': '2015',
- }
- versions = []
- for version in versions_to_check:
- # Old method of searching for which VS version is installed
- # We don't use the 2010-encouraged-way because we also want to get the
- # path to the binaries, which it doesn't offer.
- keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
- r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version,
- r'HKLM\Software\Microsoft\VCExpress\%s' % version,
- r'HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s' % version]
- for index in range(len(keys)):
- path = _RegistryGetValue(keys[index], 'InstallDir')
- if not path:
- continue
- path = _ConvertToCygpath(path)
- # Check for full.
- full_path = os.path.join(path, 'devenv.exe')
- express_path = os.path.join(path, '*express.exe')
- if not force_express and os.path.exists(full_path):
- # Add this one.
- versions.append(_CreateVersion(version_to_year[version],
- os.path.join(path, '..', '..')))
- # Check for express.
- elif glob.glob(express_path):
- # Add this one.
- versions.append(_CreateVersion(version_to_year[version] + 'e',
- os.path.join(path, '..', '..')))
-
- # The old method above does not work when only SDK is installed.
- keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
- r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7']
- for index in range(len(keys)):
- path = _RegistryGetValue(keys[index], version)
- if not path:
- continue
- path = _ConvertToCygpath(path)
- if version != '14.0': # There is no Express edition for 2015.
- versions.append(_CreateVersion(version_to_year[version] + 'e',
- os.path.join(path, '..'), sdk_based=True))
-
- return versions
-
-
-def SelectVisualStudioVersion(version='auto', allow_fallback=True):
- """Select which version of Visual Studio projects to generate.
-
- Arguments:
- version: Hook to allow caller to force a particular version (vs auto).
- Returns:
- An object representing a visual studio project format version.
- """
- # In auto mode, check environment variable for override.
- if version == 'auto':
- version = os.environ.get('GYP_MSVS_VERSION', 'auto')
- version_map = {
- 'auto': ('14.0', '12.0', '10.0', '9.0', '8.0', '11.0'),
- '2005': ('8.0',),
- '2005e': ('8.0',),
- '2008': ('9.0',),
- '2008e': ('9.0',),
- '2010': ('10.0',),
- '2010e': ('10.0',),
- '2012': ('11.0',),
- '2012e': ('11.0',),
- '2013': ('12.0',),
- '2013e': ('12.0',),
- '2015': ('14.0',),
- }
- override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
- if override_path:
- msvs_version = os.environ.get('GYP_MSVS_VERSION')
- if not msvs_version:
- raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be '
- 'set to a particular version (e.g. 2010e).')
- return _CreateVersion(msvs_version, override_path, sdk_based=True)
- version = str(version)
- versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
- if not versions:
- if not allow_fallback:
- raise ValueError('Could not locate Visual Studio installation.')
- if version == 'auto':
- # Default to 2005 if we couldn't find anything
- return _CreateVersion('2005', None)
- else:
- return _CreateVersion(version, None)
- return versions[0]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
deleted file mode 100755
index dee834013..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
+++ /dev/null
@@ -1,557 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from __future__ import print_function
-
-import copy
-import gyp.input
-import argparse
-import os.path
-import re
-import shlex
-import sys
-import traceback
-from gyp.common import GypError
-
-try:
- # Python 2
- string_types = basestring
-except NameError:
- # Python 3
- string_types = str
-
-# Default debug modes for GYP
-debug = {}
-
-# List of "official" debug modes, but you can use anything you like.
-DEBUG_GENERAL = 'general'
-DEBUG_VARIABLES = 'variables'
-DEBUG_INCLUDES = 'includes'
-
-
-def DebugOutput(mode, message, *args):
- if 'all' in gyp.debug or mode in gyp.debug:
- ctx = ('unknown', 0, 'unknown')
- try:
- f = traceback.extract_stack(limit=2)
- if f:
- ctx = f[0][:3]
- except:
- pass
- if args:
- message %= args
- print('%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
- ctx[1], ctx[2], message))
-
-def FindBuildFiles():
- extension = '.gyp'
- files = os.listdir(os.getcwd())
- build_files = []
- for file in files:
- if file.endswith(extension):
- build_files.append(file)
- return build_files
-
-
-def Load(build_files, format, default_variables={},
- includes=[], depth='.', params=None, check=False,
- circular_check=True, duplicate_basename_check=True):
- """
- Loads one or more specified build files.
- default_variables and includes will be copied before use.
- Returns the generator for the specified format and the
- data returned by loading the specified build files.
- """
- if params is None:
- params = {}
-
- if '-' in format:
- format, params['flavor'] = format.split('-', 1)
-
- default_variables = copy.copy(default_variables)
-
- # Default variables provided by this program and its modules should be
- # named WITH_CAPITAL_LETTERS to provide a distinct "best practice" namespace,
- # avoiding collisions with user and automatic variables.
- default_variables['GENERATOR'] = format
- default_variables['GENERATOR_FLAVOR'] = params.get('flavor', '')
-
- # Format can be a custom python file, or by default the name of a module
- # within gyp.generator.
- if format.endswith('.py'):
- generator_name = os.path.splitext(format)[0]
- path, generator_name = os.path.split(generator_name)
-
- # Make sure the path to the custom generator is in sys.path
- # Don't worry about removing it once we are done. Keeping the path
- # to each generator that is used in sys.path is likely harmless and
- # arguably a good idea.
- path = os.path.abspath(path)
- if path not in sys.path:
- sys.path.insert(0, path)
- else:
- generator_name = 'gyp.generator.' + format
-
- # These parameters are passed in order (as opposed to by key)
- # because ActivePython cannot handle key parameters to __import__.
- generator = __import__(generator_name, globals(), locals(), generator_name)
- for (key, val) in generator.generator_default_variables.items():
- default_variables.setdefault(key, val)
-
- # Give the generator the opportunity to set additional variables based on
- # the params it will receive in the output phase.
- if getattr(generator, 'CalculateVariables', None):
- generator.CalculateVariables(default_variables, params)
-
- # Give the generator the opportunity to set generator_input_info based on
- # the params it will receive in the output phase.
- if getattr(generator, 'CalculateGeneratorInputInfo', None):
- generator.CalculateGeneratorInputInfo(params)
-
- # Fetch the generator specific info that gets fed to input, we use getattr
- # so we can default things and the generators only have to provide what
- # they need.
- generator_input_info = {
- 'non_configuration_keys':
- getattr(generator, 'generator_additional_non_configuration_keys', []),
- 'path_sections':
- getattr(generator, 'generator_additional_path_sections', []),
- 'extra_sources_for_rules':
- getattr(generator, 'generator_extra_sources_for_rules', []),
- 'generator_supports_multiple_toolsets':
- getattr(generator, 'generator_supports_multiple_toolsets', False),
- 'generator_wants_static_library_dependencies_adjusted':
- getattr(generator,
- 'generator_wants_static_library_dependencies_adjusted', True),
- 'generator_wants_sorted_dependencies':
- getattr(generator, 'generator_wants_sorted_dependencies', False),
- 'generator_filelist_paths':
- getattr(generator, 'generator_filelist_paths', None),
- }
-
- # Process the input specific to this generator.
- result = gyp.input.Load(build_files, default_variables, includes[:],
- depth, generator_input_info, check, circular_check,
- duplicate_basename_check,
- params['parallel'], params['root_targets'])
- return [generator] + result
-
-def NameValueListToDict(name_value_list):
- """
- Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary
- of the pairs. If a string is simply NAME, then the value in the dictionary
- is set to True. If VALUE can be converted to an integer, it is.
- """
- result = { }
- for item in name_value_list:
- tokens = item.split('=', 1)
- if len(tokens) == 2:
- # If we can make it an int, use that, otherwise, use the string.
- try:
- token_value = int(tokens[1])
- except ValueError:
- token_value = tokens[1]
- # Set the variable to the supplied value.
- result[tokens[0]] = token_value
- else:
- # No value supplied, treat it as a boolean and set it.
- result[tokens[0]] = True
- return result
-
-def ShlexEnv(env_name):
- flags = os.environ.get(env_name, [])
- if flags:
- flags = shlex.split(flags)
- return flags
-
-def FormatOpt(opt, value):
- if opt.startswith('--'):
- return '%s=%s' % (opt, value)
- return opt + value
-
-def RegenerateAppendFlag(flag, values, predicate, env_name, options):
- """Regenerate a list of command line flags, for an option of action='append'.
-
- The |env_name|, if given, is checked in the environment and used to generate
- an initial list of options, then the options that were specified on the
- command line (given in |values|) are appended. This matches the handling of
- environment variables and command line flags where command line flags override
- the environment, while not requiring the environment to be set when the flags
- are used again.
- """
- flags = []
- if options.use_environment and env_name:
- for flag_value in ShlexEnv(env_name):
- value = FormatOpt(flag, predicate(flag_value))
- if value in flags:
- flags.remove(value)
- flags.append(value)
- if values:
- for flag_value in values:
- flags.append(FormatOpt(flag, predicate(flag_value)))
- return flags
-
-def RegenerateFlags(options):
- """Given a parsed options object, and taking the environment variables into
- account, returns a list of flags that should regenerate an equivalent options
- object (even in the absence of the environment variables.)
-
- Any path options will be normalized relative to depth.
-
- The format flag is not included, as it is assumed the calling generator will
- set that as appropriate.
- """
- def FixPath(path):
- path = gyp.common.FixIfRelativePath(path, options.depth)
- if not path:
- return os.path.curdir
- return path
-
- def Noop(value):
- return value
-
- # We always want to ignore the environment when regenerating, to avoid
- # duplicate or changed flags in the environment at the time of regeneration.
- flags = ['--ignore-environment']
- for name, metadata in options._regeneration_metadata.items():
- opt = metadata['opt']
- value = getattr(options, name)
- value_predicate = metadata['type'] == 'path' and FixPath or Noop
- action = metadata['action']
- env_name = metadata['env_name']
- if action == 'append':
- flags.extend(RegenerateAppendFlag(opt, value, value_predicate,
- env_name, options))
- elif action in ('store', None): # None is a synonym for 'store'.
- if value:
- flags.append(FormatOpt(opt, value_predicate(value)))
- elif options.use_environment and env_name and os.environ.get(env_name):
- flags.append(FormatOpt(opt, value_predicate(os.environ.get(env_name))))
- elif action in ('store_true', 'store_false'):
- if ((action == 'store_true' and value) or
- (action == 'store_false' and not value)):
- flags.append(opt)
- elif options.use_environment and env_name:
- print('Warning: environment regeneration unimplemented '
- 'for %s flag %r env_name %r' % (action, opt,
- env_name), file=sys.stderr)
- else:
- print('Warning: regeneration unimplemented for action %r '
- 'flag %r' % (action, opt), file=sys.stderr)
-
- return flags
-
-class RegeneratableOptionParser(argparse.ArgumentParser):
- def __init__(self, usage):
- self.__regeneratable_options = {}
- argparse.ArgumentParser.__init__(self, usage=usage)
-
- def add_argument(self, *args, **kw):
- """Add an option to the parser.
-
- This accepts the same arguments as ArgumentParser.add_argument, plus the
- following:
- regenerate: can be set to False to prevent this option from being included
- in regeneration.
- env_name: name of environment variable that additional values for this
- option come from.
- type: adds type='path', to tell the regenerator that the values of
- this option need to be made relative to options.depth
- """
- env_name = kw.pop('env_name', None)
- if 'dest' in kw and kw.pop('regenerate', True):
- dest = kw['dest']
-
- # The path type is needed for regenerating, for optparse we can just treat
- # it as a string.
- type = kw.get('type')
- if type == 'path':
- kw['type'] = str
-
- self.__regeneratable_options[dest] = {
- 'action': kw.get('action'),
- 'type': type,
- 'env_name': env_name,
- 'opt': args[0],
- }
-
- argparse.ArgumentParser.add_argument(self, *args, **kw)
-
- def parse_args(self, *args):
- values, args = argparse.ArgumentParser.parse_known_args(self, *args)
- values._regeneration_metadata = self.__regeneratable_options
- return values, args
-
-def gyp_main(args):
- my_name = os.path.basename(sys.argv[0])
- usage = 'usage: %(prog)s [options ...] [build_file ...]'
-
-
- parser = RegeneratableOptionParser(usage=usage.replace('%s', '%(prog)s'))
- parser.add_argument('--build', dest='configs', action='append',
- help='configuration for build after project generation')
- parser.add_argument('--check', dest='check', action='store_true',
- help='check format of gyp files')
- parser.add_argument('--config-dir', dest='config_dir', action='store',
- env_name='GYP_CONFIG_DIR', default=None,
- help='The location for configuration files like '
- 'include.gypi.')
- parser.add_argument('-d', '--debug', dest='debug', metavar='DEBUGMODE',
- action='append', default=[], help='turn on a debugging '
- 'mode for debugging GYP. Supported modes are "variables", '
- '"includes" and "general" or "all" for all of them.')
- parser.add_argument('-D', dest='defines', action='append', metavar='VAR=VAL',
- env_name='GYP_DEFINES',
- help='sets variable VAR to value VAL')
- parser.add_argument('--depth', dest='depth', metavar='PATH', type='path',
- help='set DEPTH gyp variable to a relative path to PATH')
- parser.add_argument('-f', '--format', dest='formats', action='append',
- env_name='GYP_GENERATORS', regenerate=False,
- help='output formats to generate')
- parser.add_argument('-G', dest='generator_flags', action='append', default=[],
- metavar='FLAG=VAL', env_name='GYP_GENERATOR_FLAGS',
- help='sets generator flag FLAG to VAL')
- parser.add_argument('--generator-output', dest='generator_output',
- action='store', default=None, metavar='DIR', type='path',
- env_name='GYP_GENERATOR_OUTPUT',
- help='puts generated build files under DIR')
- parser.add_argument('--ignore-environment', dest='use_environment',
- action='store_false', default=True, regenerate=False,
- help='do not read options from environment variables')
- parser.add_argument('-I', '--include', dest='includes', action='append',
- metavar='INCLUDE', type='path',
- help='files to include in all loaded .gyp files')
- # --no-circular-check disables the check for circular relationships between
- # .gyp files. These relationships should not exist, but they've only been
- # observed to be harmful with the Xcode generator. Chromium's .gyp files
- # currently have some circular relationships on non-Mac platforms, so this
- # option allows the strict behavior to be used on Macs and the lenient
- # behavior to be used elsewhere.
- # TODO(mark): Remove this option when http://crbug.com/35878 is fixed.
- parser.add_argument('--no-circular-check', dest='circular_check',
- action='store_false', default=True, regenerate=False,
- help="don't check for circular relationships between files")
- # --no-duplicate-basename-check disables the check for duplicate basenames
- # in a static_library/shared_library project. Visual C++ 2008 generator
- # doesn't support this configuration. Libtool on Mac also generates warnings
- # when duplicate basenames are passed into Make generator on Mac.
- # TODO(yukawa): Remove this option when these legacy generators are
- # deprecated.
- parser.add_argument('--no-duplicate-basename-check',
- dest='duplicate_basename_check', action='store_false',
- default=True, regenerate=False,
- help="don't check for duplicate basenames")
- parser.add_argument('--no-parallel', action='store_true', default=False,
- help='Disable multiprocessing')
- parser.add_argument('-S', '--suffix', dest='suffix', default='',
- help='suffix to add to generated files')
- parser.add_argument('--toplevel-dir', dest='toplevel_dir', action='store',
- default=None, metavar='DIR', type='path',
- help='directory to use as the root of the source tree')
- parser.add_argument('-R', '--root-target', dest='root_targets',
- action='append', metavar='TARGET',
- help='include only TARGET and its deep dependencies')
-
- options, build_files_arg = parser.parse_args(args)
- build_files = build_files_arg
-
- # Set up the configuration directory (defaults to ~/.gyp)
- if not options.config_dir:
- home = None
- home_dot_gyp = None
- if options.use_environment:
- home_dot_gyp = os.environ.get('GYP_CONFIG_DIR', None)
- if home_dot_gyp:
- home_dot_gyp = os.path.expanduser(home_dot_gyp)
-
- if not home_dot_gyp:
- home_vars = ['HOME']
- if sys.platform in ('cygwin', 'win32'):
- home_vars.append('USERPROFILE')
- for home_var in home_vars:
- home = os.getenv(home_var)
- if home != None:
- home_dot_gyp = os.path.join(home, '.gyp')
- if not os.path.exists(home_dot_gyp):
- home_dot_gyp = None
- else:
- break
- else:
- home_dot_gyp = os.path.expanduser(options.config_dir)
-
- if home_dot_gyp and not os.path.exists(home_dot_gyp):
- home_dot_gyp = None
-
- if not options.formats:
- # If no format was given on the command line, then check the env variable.
- generate_formats = []
- if options.use_environment:
- generate_formats = os.environ.get('GYP_GENERATORS', [])
- if generate_formats:
- generate_formats = re.split(r'[\s,]', generate_formats)
- if generate_formats:
- options.formats = generate_formats
- else:
- # Nothing in the variable, default based on platform.
- if sys.platform == 'darwin':
- options.formats = ['xcode']
- elif sys.platform in ('win32', 'cygwin'):
- options.formats = ['msvs']
- else:
- options.formats = ['make']
-
- if not options.generator_output and options.use_environment:
- g_o = os.environ.get('GYP_GENERATOR_OUTPUT')
- if g_o:
- options.generator_output = g_o
-
- options.parallel = not options.no_parallel
-
- for mode in options.debug:
- gyp.debug[mode] = 1
-
- # Do an extra check to avoid work when we're not debugging.
- if DEBUG_GENERAL in gyp.debug:
- DebugOutput(DEBUG_GENERAL, 'running with these options:')
- for option, value in sorted(options.__dict__.items()):
- if option[0] == '_':
- continue
- if isinstance(value, string_types):
- DebugOutput(DEBUG_GENERAL, " %s: '%s'", option, value)
- else:
- DebugOutput(DEBUG_GENERAL, " %s: %s", option, value)
-
- if not build_files:
- build_files = FindBuildFiles()
- if not build_files:
- raise GypError((usage + '\n\n%s: error: no build_file') %
- (my_name, my_name))
-
- # TODO(mark): Chromium-specific hack!
- # For Chromium, the gyp "depth" variable should always be a relative path
- # to Chromium's top-level "src" directory. If no depth variable was set
- # on the command line, try to find a "src" directory by looking at the
- # absolute path to each build file's directory. The first "src" component
- # found will be treated as though it were the path used for --depth.
- if not options.depth:
- for build_file in build_files:
- build_file_dir = os.path.abspath(os.path.dirname(build_file))
- build_file_dir_components = build_file_dir.split(os.path.sep)
- components_len = len(build_file_dir_components)
- for index in range(components_len - 1, -1, -1):
- if build_file_dir_components[index] == 'src':
- options.depth = os.path.sep.join(build_file_dir_components)
- break
- del build_file_dir_components[index]
-
- # If the inner loop found something, break without advancing to another
- # build file.
- if options.depth:
- break
-
- if not options.depth:
- raise GypError('Could not automatically locate src directory. This is'
- 'a temporary Chromium feature that will be removed. Use'
- '--depth as a workaround.')
-
- # If toplevel-dir is not set, we assume that depth is the root of our source
- # tree.
- if not options.toplevel_dir:
- options.toplevel_dir = options.depth
-
- # -D on the command line sets variable defaults - D isn't just for define,
- # it's for default. Perhaps there should be a way to force (-F?) a
- # variable's value so that it can't be overridden by anything else.
- cmdline_default_variables = {}
- defines = []
- if options.use_environment:
- defines += ShlexEnv('GYP_DEFINES')
- if options.defines:
- defines += options.defines
- cmdline_default_variables = NameValueListToDict(defines)
- if DEBUG_GENERAL in gyp.debug:
- DebugOutput(DEBUG_GENERAL,
- "cmdline_default_variables: %s", cmdline_default_variables)
-
- # Set up includes.
- includes = []
-
- # If ~/.gyp/include.gypi exists, it'll be forcibly included into every
- # .gyp file that's loaded, before anything else is included.
- if home_dot_gyp != None:
- default_include = os.path.join(home_dot_gyp, 'include.gypi')
- if os.path.exists(default_include):
- print('Using overrides found in ' + default_include)
- includes.append(default_include)
-
- # Command-line --include files come after the default include.
- if options.includes:
- includes.extend(options.includes)
-
- # Generator flags should be prefixed with the target generator since they
- # are global across all generator runs.
- gen_flags = []
- if options.use_environment:
- gen_flags += ShlexEnv('GYP_GENERATOR_FLAGS')
- if options.generator_flags:
- gen_flags += options.generator_flags
- generator_flags = NameValueListToDict(gen_flags)
- if DEBUG_GENERAL in gyp.debug.keys():
- DebugOutput(DEBUG_GENERAL, "generator_flags: %s", generator_flags)
-
- # Generate all requested formats (use a set in case we got one format request
- # twice)
- for format in set(options.formats):
- params = {'options': options,
- 'build_files': build_files,
- 'generator_flags': generator_flags,
- 'cwd': os.getcwd(),
- 'build_files_arg': build_files_arg,
- 'gyp_binary': sys.argv[0],
- 'home_dot_gyp': home_dot_gyp,
- 'parallel': options.parallel,
- 'root_targets': options.root_targets,
- 'target_arch': cmdline_default_variables.get('target_arch', '')}
-
- # Start with the default variables from the command line.
- [generator, flat_list, targets, data] = Load(
- build_files, format, cmdline_default_variables, includes, options.depth,
- params, options.check, options.circular_check,
- options.duplicate_basename_check)
-
- # TODO(mark): Pass |data| for now because the generator needs a list of
- # build files that came in. In the future, maybe it should just accept
- # a list, and not the whole data dict.
- # NOTE: flat_list is the flattened dependency graph specifying the order
- # that targets may be built. Build systems that operate serially or that
- # need to have dependencies defined before dependents reference them should
- # generate targets in the order specified in flat_list.
- generator.GenerateOutput(flat_list, targets, data, params)
-
- if options.configs:
- valid_configs = targets[flat_list[0]]['configurations'].keys()
- for conf in options.configs:
- if conf not in valid_configs:
- raise GypError('Invalid config specified via --build: %s' % conf)
- generator.PerformBuild(data, options.configs, params)
-
- # Done
- return 0
-
-
-def main(args):
- try:
- return gyp_main(args)
- except GypError as e:
- sys.stderr.write("gyp: %s\n" % e)
- return 1
-
-# NOTE: setuptools generated console_scripts calls function with no arguments
-def script_main():
- return main(sys.argv[1:])
-
-if __name__ == '__main__':
- sys.exit(script_main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common.py
deleted file mode 100644
index d866e81d4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common.py
+++ /dev/null
@@ -1,638 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import errno
-import filecmp
-import os.path
-import re
-import tempfile
-import sys
-import subprocess
-
-try:
- from collections.abc import MutableSet
-except ImportError:
- from collections import MutableSet
-
-PY3 = bytes != str
-
-
-# A minimal memoizing decorator. It'll blow up if the args aren't immutable,
-# among other "problems".
-class memoize(object):
- def __init__(self, func):
- self.func = func
- self.cache = {}
- def __call__(self, *args):
- try:
- return self.cache[args]
- except KeyError:
- result = self.func(*args)
- self.cache[args] = result
- return result
-
-
-class GypError(Exception):
- """Error class representing an error, which is to be presented
- to the user. The main entry point will catch and display this.
- """
- pass
-
-
-def ExceptionAppend(e, msg):
- """Append a message to the given exception's message."""
- if not e.args:
- e.args = (msg,)
- elif len(e.args) == 1:
- e.args = (str(e.args[0]) + ' ' + msg,)
- else:
- e.args = (str(e.args[0]) + ' ' + msg,) + e.args[1:]
-
-
-def FindQualifiedTargets(target, qualified_list):
- """
- Given a list of qualified targets, return the qualified targets for the
- specified |target|.
- """
- return [t for t in qualified_list if ParseQualifiedTarget(t)[1] == target]
-
-
-def ParseQualifiedTarget(target):
- # Splits a qualified target into a build file, target name and toolset.
-
- # NOTE: rsplit is used to disambiguate the Windows drive letter separator.
- target_split = target.rsplit(':', 1)
- if len(target_split) == 2:
- [build_file, target] = target_split
- else:
- build_file = None
-
- target_split = target.rsplit('#', 1)
- if len(target_split) == 2:
- [target, toolset] = target_split
- else:
- toolset = None
-
- return [build_file, target, toolset]
-
-
-def ResolveTarget(build_file, target, toolset):
- # This function resolves a target into a canonical form:
- # - a fully defined build file, either absolute or relative to the current
- # directory
- # - a target name
- # - a toolset
- #
- # build_file is the file relative to which 'target' is defined.
- # target is the qualified target.
- # toolset is the default toolset for that target.
- [parsed_build_file, target, parsed_toolset] = ParseQualifiedTarget(target)
-
- if parsed_build_file:
- if build_file:
- # If a relative path, parsed_build_file is relative to the directory
- # containing build_file. If build_file is not in the current directory,
- # parsed_build_file is not a usable path as-is. Resolve it by
- # interpreting it as relative to build_file. If parsed_build_file is
- # absolute, it is usable as a path regardless of the current directory,
- # and os.path.join will return it as-is.
- build_file = os.path.normpath(os.path.join(os.path.dirname(build_file),
- parsed_build_file))
- # Further (to handle cases like ../cwd), make it relative to cwd)
- if not os.path.isabs(build_file):
- build_file = RelativePath(build_file, '.')
- else:
- build_file = parsed_build_file
-
- if parsed_toolset:
- toolset = parsed_toolset
-
- return [build_file, target, toolset]
-
-
-def BuildFile(fully_qualified_target):
- # Extracts the build file from the fully qualified target.
- return ParseQualifiedTarget(fully_qualified_target)[0]
-
-
-def GetEnvironFallback(var_list, default):
- """Look up a key in the environment, with fallback to secondary keys
- and finally falling back to a default value."""
- for var in var_list:
- if var in os.environ:
- return os.environ[var]
- return default
-
-
-def QualifiedTarget(build_file, target, toolset):
- # "Qualified" means the file that a target was defined in and the target
- # name, separated by a colon, suffixed by a # and the toolset name:
- # /path/to/file.gyp:target_name#toolset
- fully_qualified = build_file + ':' + target
- if toolset:
- fully_qualified = fully_qualified + '#' + toolset
- return fully_qualified
-
-
-@memoize
-def RelativePath(path, relative_to, follow_path_symlink=True):
- # Assuming both |path| and |relative_to| are relative to the current
- # directory, returns a relative path that identifies path relative to
- # relative_to.
- # If |follow_symlink_path| is true (default) and |path| is a symlink, then
- # this method returns a path to the real file represented by |path|. If it is
- # false, this method returns a path to the symlink. If |path| is not a
- # symlink, this option has no effect.
-
- # Convert to normalized (and therefore absolute paths).
- if follow_path_symlink:
- path = os.path.realpath(path)
- else:
- path = os.path.abspath(path)
- relative_to = os.path.realpath(relative_to)
-
- # On Windows, we can't create a relative path to a different drive, so just
- # use the absolute path.
- if sys.platform == 'win32':
- if (os.path.splitdrive(path)[0].lower() !=
- os.path.splitdrive(relative_to)[0].lower()):
- return path
-
- # Split the paths into components.
- path_split = path.split(os.path.sep)
- relative_to_split = relative_to.split(os.path.sep)
-
- # Determine how much of the prefix the two paths share.
- prefix_len = len(os.path.commonprefix([path_split, relative_to_split]))
-
- # Put enough ".." components to back up out of relative_to to the common
- # prefix, and then append the part of path_split after the common prefix.
- relative_split = [os.path.pardir] * (len(relative_to_split) - prefix_len) + \
- path_split[prefix_len:]
-
- if len(relative_split) == 0:
- # The paths were the same.
- return ''
-
- # Turn it back into a string and we're done.
- return os.path.join(*relative_split)
-
-
-@memoize
-def InvertRelativePath(path, toplevel_dir=None):
- """Given a path like foo/bar that is relative to toplevel_dir, return
- the inverse relative path back to the toplevel_dir.
-
- E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
- should always produce the empty string, unless the path contains symlinks.
- """
- if not path:
- return path
- toplevel_dir = '.' if toplevel_dir is None else toplevel_dir
- return RelativePath(toplevel_dir, os.path.join(toplevel_dir, path))
-
-
-def FixIfRelativePath(path, relative_to):
- # Like RelativePath but returns |path| unchanged if it is absolute.
- if os.path.isabs(path):
- return path
- return RelativePath(path, relative_to)
-
-
-def UnrelativePath(path, relative_to):
- # Assuming that |relative_to| is relative to the current directory, and |path|
- # is a path relative to the dirname of |relative_to|, returns a path that
- # identifies |path| relative to the current directory.
- rel_dir = os.path.dirname(relative_to)
- return os.path.normpath(os.path.join(rel_dir, path))
-
-
-# re objects used by EncodePOSIXShellArgument. See IEEE 1003.1 XCU.2.2 at
-# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02
-# and the documentation for various shells.
-
-# _quote is a pattern that should match any argument that needs to be quoted
-# with double-quotes by EncodePOSIXShellArgument. It matches the following
-# characters appearing anywhere in an argument:
-# \t, \n, space parameter separators
-# # comments
-# $ expansions (quoted to always expand within one argument)
-# % called out by IEEE 1003.1 XCU.2.2
-# & job control
-# ' quoting
-# (, ) subshell execution
-# *, ?, [ pathname expansion
-# ; command delimiter
-# <, >, | redirection
-# = assignment
-# {, } brace expansion (bash)
-# ~ tilde expansion
-# It also matches the empty string, because "" (or '') is the only way to
-# represent an empty string literal argument to a POSIX shell.
-#
-# This does not match the characters in _escape, because those need to be
-# backslash-escaped regardless of whether they appear in a double-quoted
-# string.
-_quote = re.compile('[\t\n #$%&\'()*;<=>?[{|}~]|^$')
-
-# _escape is a pattern that should match any character that needs to be
-# escaped with a backslash, whether or not the argument matched the _quote
-# pattern. _escape is used with re.sub to backslash anything in _escape's
-# first match group, hence the (parentheses) in the regular expression.
-#
-# _escape matches the following characters appearing anywhere in an argument:
-# " to prevent POSIX shells from interpreting this character for quoting
-# \ to prevent POSIX shells from interpreting this character for escaping
-# ` to prevent POSIX shells from interpreting this character for command
-# substitution
-# Missing from this list is $, because the desired behavior of
-# EncodePOSIXShellArgument is to permit parameter (variable) expansion.
-#
-# Also missing from this list is !, which bash will interpret as the history
-# expansion character when history is enabled. bash does not enable history
-# by default in non-interactive shells, so this is not thought to be a problem.
-# ! was omitted from this list because bash interprets "\!" as a literal string
-# including the backslash character (avoiding history expansion but retaining
-# the backslash), which would not be correct for argument encoding. Handling
-# this case properly would also be problematic because bash allows the history
-# character to be changed with the histchars shell variable. Fortunately,
-# as history is not enabled in non-interactive shells and
-# EncodePOSIXShellArgument is only expected to encode for non-interactive
-# shells, there is no room for error here by ignoring !.
-_escape = re.compile(r'(["\\`])')
-
-def EncodePOSIXShellArgument(argument):
- """Encodes |argument| suitably for consumption by POSIX shells.
-
- argument may be quoted and escaped as necessary to ensure that POSIX shells
- treat the returned value as a literal representing the argument passed to
- this function. Parameter (variable) expansions beginning with $ are allowed
- to remain intact without escaping the $, to allow the argument to contain
- references to variables to be expanded by the shell.
- """
-
- if not isinstance(argument, str):
- argument = str(argument)
-
- if _quote.search(argument):
- quote = '"'
- else:
- quote = ''
-
- encoded = quote + re.sub(_escape, r'\\\1', argument) + quote
-
- return encoded
-
-
-def EncodePOSIXShellList(list):
- """Encodes |list| suitably for consumption by POSIX shells.
-
- Returns EncodePOSIXShellArgument for each item in list, and joins them
- together using the space character as an argument separator.
- """
-
- encoded_arguments = []
- for argument in list:
- encoded_arguments.append(EncodePOSIXShellArgument(argument))
- return ' '.join(encoded_arguments)
-
-
-def DeepDependencyTargets(target_dicts, roots):
- """Returns the recursive list of target dependencies."""
- dependencies = set()
- pending = set(roots)
- while pending:
- # Pluck out one.
- r = pending.pop()
- # Skip if visited already.
- if r in dependencies:
- continue
- # Add it.
- dependencies.add(r)
- # Add its children.
- spec = target_dicts[r]
- pending.update(set(spec.get('dependencies', [])))
- pending.update(set(spec.get('dependencies_original', [])))
- return list(dependencies - set(roots))
-
-
-def BuildFileTargets(target_list, build_file):
- """From a target_list, returns the subset from the specified build_file.
- """
- return [p for p in target_list if BuildFile(p) == build_file]
-
-
-def AllTargets(target_list, target_dicts, build_file):
- """Returns all targets (direct and dependencies) for the specified build_file.
- """
- bftargets = BuildFileTargets(target_list, build_file)
- deptargets = DeepDependencyTargets(target_dicts, bftargets)
- return bftargets + deptargets
-
-
-def WriteOnDiff(filename):
- """Write to a file only if the new contents differ.
-
- Arguments:
- filename: name of the file to potentially write to.
- Returns:
- A file like object which will write to temporary file and only overwrite
- the target if it differs (on close).
- """
-
- class Writer(object):
- """Wrapper around file which only covers the target if it differs."""
- def __init__(self):
- # On Cygwin remove the "dir" argument because `C:` prefixed paths are treated as relative,
- # consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
- # obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
- # See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
- base_temp_dir = "" if IsCygwin() else os.path.dirname(filename)
- # Pick temporary file.
- tmp_fd, self.tmp_path = tempfile.mkstemp(
- suffix='.tmp',
- prefix=os.path.split(filename)[1] + '.gyp.',
- dir=base_temp_dir)
- try:
- self.tmp_file = os.fdopen(tmp_fd, 'wb')
- except Exception:
- # Don't leave turds behind.
- os.unlink(self.tmp_path)
- raise
-
- def __getattr__(self, attrname):
- # Delegate everything else to self.tmp_file
- return getattr(self.tmp_file, attrname)
-
- def close(self):
- try:
- # Close tmp file.
- self.tmp_file.close()
- # Determine if different.
- same = False
- try:
- same = filecmp.cmp(self.tmp_path, filename, False)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
- if same:
- # The new file is identical to the old one, just get rid of the new
- # one.
- os.unlink(self.tmp_path)
- else:
- # The new file is different from the old one, or there is no old one.
- # Rename the new file to the permanent name.
- #
- # tempfile.mkstemp uses an overly restrictive mode, resulting in a
- # file that can only be read by the owner, regardless of the umask.
- # There's no reason to not respect the umask here, which means that
- # an extra hoop is required to fetch it and reset the new file's mode.
- #
- # No way to get the umask without setting a new one? Set a safe one
- # and then set it back to the old value.
- umask = os.umask(0o77)
- os.umask(umask)
- os.chmod(self.tmp_path, 0o666 & ~umask)
- if sys.platform == 'win32' and os.path.exists(filename):
- # NOTE: on windows (but not cygwin) rename will not replace an
- # existing file, so it must be preceded with a remove. Sadly there
- # is no way to make the switch atomic.
- os.remove(filename)
- os.rename(self.tmp_path, filename)
- except Exception:
- # Don't leave turds behind.
- os.unlink(self.tmp_path)
- raise
-
- def write(self, s):
- self.tmp_file.write(s.encode('utf-8'))
-
- return Writer()
-
-
-def EnsureDirExists(path):
- """Make sure the directory for |path| exists."""
- try:
- os.makedirs(os.path.dirname(path))
- except OSError:
- pass
-
-
-def GetFlavor(params):
- """Returns |params.flavor| if it's set, the system's default flavor else."""
- flavors = {
- 'cygwin': 'win',
- 'win32': 'win',
- 'darwin': 'mac',
- }
-
- if 'flavor' in params:
- return params['flavor']
- if sys.platform in flavors:
- return flavors[sys.platform]
- if sys.platform.startswith('sunos'):
- return 'solaris'
- if sys.platform.startswith('freebsd'):
- return 'freebsd'
- if sys.platform.startswith('openbsd'):
- return 'openbsd'
- if sys.platform.startswith('netbsd'):
- return 'netbsd'
- if sys.platform.startswith('aix'):
- return 'aix'
- if sys.platform.startswith('zos'):
- return 'zos'
- if sys.platform.startswith('os390'):
- return 'zos'
-
- return 'linux'
-
-
-def CopyTool(flavor, out_path):
- """Finds (flock|mac|win)_tool.gyp in the gyp directory and copies it
- to |out_path|."""
- # aix and solaris just need flock emulation. mac and win use more complicated
- # support scripts.
- prefix = {
- 'aix': 'flock',
- 'solaris': 'flock',
- 'mac': 'mac',
- 'win': 'win'
- }.get(flavor, None)
- if not prefix:
- return
-
- # Slurp input file.
- source_path = os.path.join(
- os.path.dirname(os.path.abspath(__file__)), '%s_tool.py' % prefix)
- with open(source_path) as source_file:
- source = source_file.readlines()
-
- # Add header and write it out.
- tool_path = os.path.join(out_path, 'gyp-%s-tool' % prefix)
- with open(tool_path, 'w') as tool_file:
- tool_file.write(
- ''.join([source[0], '# Generated by gyp. Do not edit.\n'] + source[1:]))
-
- # Make file executable.
- os.chmod(tool_path, 0o755)
-
-
-# From Alex Martelli,
-# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560
-# ASPN: Python Cookbook: Remove duplicates from a sequence
-# First comment, dated 2001/10/13.
-# (Also in the printed Python Cookbook.)
-
-def uniquer(seq, idfun=None):
- if idfun is None:
- idfun = lambda x: x
- seen = {}
- result = []
- for item in seq:
- marker = idfun(item)
- if marker in seen: continue
- seen[marker] = 1
- result.append(item)
- return result
-
-
-# Based on http://code.activestate.com/recipes/576694/.
-class OrderedSet(MutableSet):
- def __init__(self, iterable=None):
- self.end = end = []
- end += [None, end, end] # sentinel node for doubly linked list
- self.map = {} # key --> [key, prev, next]
- if iterable is not None:
- self |= iterable
-
- def __len__(self):
- return len(self.map)
-
- def __contains__(self, key):
- return key in self.map
-
- def add(self, key):
- if key not in self.map:
- end = self.end
- curr = end[1]
- curr[2] = end[1] = self.map[key] = [key, curr, end]
-
- def discard(self, key):
- if key in self.map:
- key, prev_item, next_item = self.map.pop(key)
- prev_item[2] = next_item
- next_item[1] = prev_item
-
- def __iter__(self):
- end = self.end
- curr = end[2]
- while curr is not end:
- yield curr[0]
- curr = curr[2]
-
- def __reversed__(self):
- end = self.end
- curr = end[1]
- while curr is not end:
- yield curr[0]
- curr = curr[1]
-
- # The second argument is an addition that causes a pylint warning.
- def pop(self, last=True): # pylint: disable=W0221
- if not self:
- raise KeyError('set is empty')
- key = self.end[1][0] if last else self.end[2][0]
- self.discard(key)
- return key
-
- def __repr__(self):
- if not self:
- return '%s()' % (self.__class__.__name__,)
- return '%s(%r)' % (self.__class__.__name__, list(self))
-
- def __eq__(self, other):
- if isinstance(other, OrderedSet):
- return len(self) == len(other) and list(self) == list(other)
- return set(self) == set(other)
-
- # Extensions to the recipe.
- def update(self, iterable):
- for i in iterable:
- if i not in self:
- self.add(i)
-
-
-class CycleError(Exception):
- """An exception raised when an unexpected cycle is detected."""
- def __init__(self, nodes):
- self.nodes = nodes
- def __str__(self):
- return 'CycleError: cycle involving: ' + str(self.nodes)
-
-
-def TopologicallySorted(graph, get_edges):
- r"""Topologically sort based on a user provided edge definition.
-
- Args:
- graph: A list of node names.
- get_edges: A function mapping from node name to a hashable collection
- of node names which this node has outgoing edges to.
- Returns:
- A list containing all of the node in graph in topological order.
- It is assumed that calling get_edges once for each node and caching is
- cheaper than repeatedly calling get_edges.
- Raises:
- CycleError in the event of a cycle.
- Example:
- graph = {'a': '$(b) $(c)', 'b': 'hi', 'c': '$(b)'}
- def GetEdges(node):
- return re.findall(r'\$\(([^))]\)', graph[node])
- print TopologicallySorted(graph.keys(), GetEdges)
- ==>
- ['a', 'c', b']
- """
- get_edges = memoize(get_edges)
- visited = set()
- visiting = set()
- ordered_nodes = []
- def Visit(node):
- if node in visiting:
- raise CycleError(visiting)
- if node in visited:
- return
- visited.add(node)
- visiting.add(node)
- for neighbor in get_edges(node):
- Visit(neighbor)
- visiting.remove(node)
- ordered_nodes.insert(0, node)
- for node in sorted(graph):
- Visit(node)
- return ordered_nodes
-
-def CrossCompileRequested():
- # TODO: figure out how to not build extra host objects in the
- # non-cross-compile case when this is enabled, and enable unconditionally.
- return (os.environ.get('GYP_CROSSCOMPILE') or
- os.environ.get('AR_host') or
- os.environ.get('CC_host') or
- os.environ.get('CXX_host') or
- os.environ.get('AR_target') or
- os.environ.get('CC_target') or
- os.environ.get('CXX_target'))
-
-def IsCygwin():
- try:
- out = subprocess.Popen("uname",
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- stdout, stderr = out.communicate()
- if PY3:
- stdout = stdout.decode("utf-8")
- return "CYGWIN" in str(stdout)
- except Exception:
- return False
-
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
deleted file mode 100755
index b75bbb841..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for the common.py file."""
-
-import gyp.common
-import unittest
-import sys
-
-
-class TestTopologicallySorted(unittest.TestCase):
- def test_Valid(self):
- """Test that sorting works on a valid graph with one possible order."""
- graph = {
- 'a': ['b', 'c'],
- 'b': [],
- 'c': ['d'],
- 'd': ['b'],
- }
- def GetEdge(node):
- return tuple(graph[node])
- self.assertEqual(
- gyp.common.TopologicallySorted(graph.keys(), GetEdge),
- ['a', 'c', 'd', 'b'])
-
- def test_Cycle(self):
- """Test that an exception is thrown on a cyclic graph."""
- graph = {
- 'a': ['b'],
- 'b': ['c'],
- 'c': ['d'],
- 'd': ['a'],
- }
- def GetEdge(node):
- return tuple(graph[node])
- self.assertRaises(
- gyp.common.CycleError, gyp.common.TopologicallySorted,
- graph.keys(), GetEdge)
-
-
-class TestGetFlavor(unittest.TestCase):
- """Test that gyp.common.GetFlavor works as intended"""
- original_platform = ''
-
- def setUp(self):
- self.original_platform = sys.platform
-
- def tearDown(self):
- sys.platform = self.original_platform
-
- def assertFlavor(self, expected, argument, param):
- sys.platform = argument
- self.assertEqual(expected, gyp.common.GetFlavor(param))
-
- def test_platform_default(self):
- self.assertFlavor('freebsd', 'freebsd9' , {})
- self.assertFlavor('freebsd', 'freebsd10', {})
- self.assertFlavor('openbsd', 'openbsd5' , {})
- self.assertFlavor('solaris', 'sunos5' , {})
- self.assertFlavor('solaris', 'sunos' , {})
- self.assertFlavor('linux' , 'linux2' , {})
- self.assertFlavor('linux' , 'linux3' , {})
-
- def test_param(self):
- self.assertFlavor('foobar', 'linux2' , {'flavor': 'foobar'})
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
deleted file mode 100644
index 1ddd90917..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import re
-import os
-import locale
-from functools import reduce
-
-
-def XmlToString(content, encoding='utf-8', pretty=False):
- """ Writes the XML content to disk, touching the file only if it has changed.
-
- Visual Studio files have a lot of pre-defined structures. This function makes
- it easy to represent these structures as Python data structures, instead of
- having to create a lot of function calls.
-
- Each XML element of the content is represented as a list composed of:
- 1. The name of the element, a string,
- 2. The attributes of the element, a dictionary (optional), and
- 3+. The content of the element, if any. Strings are simple text nodes and
- lists are child elements.
-
- Example 1:
- <test/>
- becomes
- ['test']
-
- Example 2:
- <myelement a='value1' b='value2'>
- <childtype>This is</childtype>
- <childtype>it!</childtype>
- </myelement>
-
- becomes
- ['myelement', {'a':'value1', 'b':'value2'},
- ['childtype', 'This is'],
- ['childtype', 'it!'],
- ]
-
- Args:
- content: The structured content to be converted.
- encoding: The encoding to report on the first XML line.
- pretty: True if we want pretty printing with indents and new lines.
-
- Returns:
- The XML content as a string.
- """
- # We create a huge list of all the elements of the file.
- xml_parts = ['<?xml version="1.0" encoding="%s"?>' % encoding]
- if pretty:
- xml_parts.append('\n')
- _ConstructContentList(xml_parts, content, pretty)
-
- # Convert it to a string
- return ''.join(xml_parts)
-
-
-def _ConstructContentList(xml_parts, specification, pretty, level=0):
- """ Appends the XML parts corresponding to the specification.
-
- Args:
- xml_parts: A list of XML parts to be appended to.
- specification: The specification of the element. See EasyXml docs.
- pretty: True if we want pretty printing with indents and new lines.
- level: Indentation level.
- """
- # The first item in a specification is the name of the element.
- if pretty:
- indentation = ' ' * level
- new_line = '\n'
- else:
- indentation = ''
- new_line = ''
- name = specification[0]
- if not isinstance(name, str):
- raise Exception('The first item of an EasyXml specification should be '
- 'a string. Specification was ' + str(specification))
- xml_parts.append(indentation + '<' + name)
-
- # Optionally in second position is a dictionary of the attributes.
- rest = specification[1:]
- if rest and isinstance(rest[0], dict):
- for at, val in sorted(rest[0].items()):
- xml_parts.append(' %s="%s"' % (at, _XmlEscape(val, attr=True)))
- rest = rest[1:]
- if rest:
- xml_parts.append('>')
- all_strings = reduce(lambda x, y: x and isinstance(y, str), rest, True)
- multi_line = not all_strings
- if multi_line and new_line:
- xml_parts.append(new_line)
- for child_spec in rest:
- # If it's a string, append a text node.
- # Otherwise recurse over that child definition
- if isinstance(child_spec, str):
- xml_parts.append(_XmlEscape(child_spec))
- else:
- _ConstructContentList(xml_parts, child_spec, pretty, level + 1)
- if multi_line and indentation:
- xml_parts.append(indentation)
- xml_parts.append('</%s>%s' % (name, new_line))
- else:
- xml_parts.append('/>%s' % new_line)
-
-
-def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
- win32=False):
- """ Writes the XML content to disk, touching the file only if it has changed.
-
- Args:
- content: The structured content to be written.
- path: Location of the file.
- encoding: The encoding to report on the first line of the XML file.
- pretty: True if we want pretty printing with indents and new lines.
- """
- xml_string = XmlToString(content, encoding, pretty)
- if win32 and os.linesep != '\r\n':
- xml_string = xml_string.replace('\n', '\r\n')
-
- default_encoding = locale.getdefaultlocale()[1]
- if default_encoding.upper() != encoding.upper():
- xml_string = xml_string.encode(encoding)
-
- # Get the old content
- try:
- f = open(path, 'r')
- existing = f.read()
- f.close()
- except:
- existing = None
-
- # It has changed, write it
- if existing != xml_string:
- f = open(path, 'wb')
- f.write(xml_string)
- f.close()
-
-
-_xml_escape_map = {
- '"': '&quot;',
- "'": '&apos;',
- '<': '&lt;',
- '>': '&gt;',
- '&': '&amp;',
- '\n': '&#xA;',
- '\r': '&#xD;',
-}
-
-
-_xml_escape_re = re.compile(
- "(%s)" % "|".join(map(re.escape, _xml_escape_map.keys())))
-
-
-def _XmlEscape(value, attr=False):
- """ Escape a string for inclusion in XML."""
- def replace(match):
- m = match.string[match.start() : match.end()]
- # don't replace single quotes in attrs
- if attr and m == "'":
- return m
- return _xml_escape_map[m]
- return _xml_escape_re.sub(replace, value)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
deleted file mode 100755
index 2a80b8a45..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Unit tests for the easy_xml.py file. """
-
-import gyp.easy_xml as easy_xml
-import unittest
-try:
- from cStringIO import StringIO
-except ImportError:
- from io import StringIO
-
-
-class TestSequenceFunctions(unittest.TestCase):
-
- def setUp(self):
- self.stderr = StringIO()
-
- def test_EasyXml_simple(self):
- self.assertEqual(
- easy_xml.XmlToString(['test']),
- '<?xml version="1.0" encoding="utf-8"?><test/>')
-
- self.assertEqual(
- easy_xml.XmlToString(['test'], encoding='Windows-1252'),
- '<?xml version="1.0" encoding="Windows-1252"?><test/>')
-
- def test_EasyXml_simple_with_attributes(self):
- self.assertEqual(
- easy_xml.XmlToString(['test2', {'a': 'value1', 'b': 'value2'}]),
- '<?xml version="1.0" encoding="utf-8"?><test2 a="value1" b="value2"/>')
-
- def test_EasyXml_escaping(self):
- original = '<test>\'"\r&\nfoo'
- converted = '&lt;test&gt;\'&quot;&#xD;&amp;&#xA;foo'
- converted_apos = converted.replace("'", '&apos;')
- self.assertEqual(
- easy_xml.XmlToString(['test3', {'a': original}, original]),
- '<?xml version="1.0" encoding="utf-8"?><test3 a="%s">%s</test3>' %
- (converted, converted_apos))
-
- def test_EasyXml_pretty(self):
- self.assertEqual(
- easy_xml.XmlToString(
- ['test3',
- ['GrandParent',
- ['Parent1',
- ['Child']
- ],
- ['Parent2']
- ]
- ],
- pretty=True),
- '<?xml version="1.0" encoding="utf-8"?>\n'
- '<test3>\n'
- ' <GrandParent>\n'
- ' <Parent1>\n'
- ' <Child/>\n'
- ' </Parent1>\n'
- ' <Parent2/>\n'
- ' </GrandParent>\n'
- '</test3>\n')
-
-
- def test_EasyXml_complex(self):
- # We want to create:
- target = (
- '<?xml version="1.0" encoding="utf-8"?>'
- '<Project>'
- '<PropertyGroup Label="Globals">'
- '<ProjectGuid>{D2250C20-3A94-4FB9-AF73-11BC5B73884B}</ProjectGuid>'
- '<Keyword>Win32Proj</Keyword>'
- '<RootNamespace>automated_ui_tests</RootNamespace>'
- '</PropertyGroup>'
- '<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props"/>'
- '<PropertyGroup '
- 'Condition="\'$(Configuration)|$(Platform)\'=='
- '\'Debug|Win32\'" Label="Configuration">'
- '<ConfigurationType>Application</ConfigurationType>'
- '<CharacterSet>Unicode</CharacterSet>'
- '</PropertyGroup>'
- '</Project>')
-
- xml = easy_xml.XmlToString(
- ['Project',
- ['PropertyGroup', {'Label': 'Globals'},
- ['ProjectGuid', '{D2250C20-3A94-4FB9-AF73-11BC5B73884B}'],
- ['Keyword', 'Win32Proj'],
- ['RootNamespace', 'automated_ui_tests']
- ],
- ['Import', {'Project': '$(VCTargetsPath)\\Microsoft.Cpp.props'}],
- ['PropertyGroup',
- {'Condition': "'$(Configuration)|$(Platform)'=='Debug|Win32'",
- 'Label': 'Configuration'},
- ['ConfigurationType', 'Application'],
- ['CharacterSet', 'Unicode']
- ]
- ])
- self.assertEqual(xml, target)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
deleted file mode 100755
index 81fb79d13..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""These functions are executed via gyp-flock-tool when using the Makefile
-generator. Used on systems that don't have a built-in flock."""
-
-import fcntl
-import os
-import struct
-import subprocess
-import sys
-
-
-def main(args):
- executor = FlockTool()
- executor.Dispatch(args)
-
-
-class FlockTool(object):
- """This class emulates the 'flock' command."""
- def Dispatch(self, args):
- """Dispatches a string command to a method."""
- if len(args) < 1:
- raise Exception("Not enough arguments")
-
- method = "Exec%s" % self._CommandifyName(args[0])
- getattr(self, method)(*args[1:])
-
- def _CommandifyName(self, name_string):
- """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
- return name_string.title().replace('-', '')
-
- def ExecFlock(self, lockfile, *cmd_list):
- """Emulates the most basic behavior of Linux's flock(1)."""
- # Rely on exception handling to report errors.
- # Note that the stock python on SunOS has a bug
- # where fcntl.flock(fd, LOCK_EX) always fails
- # with EBADF, that's why we use this F_SETLK
- # hack instead.
- fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
- if sys.platform.startswith('aix'):
- # Python on AIX is compiled with LARGEFILE support, which changes the
- # struct size.
- op = struct.pack('hhIllqq', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
- else:
- op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
- fcntl.fcntl(fd, fcntl.F_SETLK, op)
- return subprocess.call(cmd_list)
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
+++ /dev/null
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
deleted file mode 100644
index 59d73dbed..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
+++ /dev/null
@@ -1,743 +0,0 @@
-# Copyright (c) 2014 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This script is intended for use as a GYP_GENERATOR. It takes as input (by way of
-the generator flag config_path) the path of a json file that dictates the files
-and targets to search for. The following keys are supported:
-files: list of paths (relative) of the files to search for.
-test_targets: unqualified target names to search for. Any target in this list
-that depends upon a file in |files| is output regardless of the type of target
-or chain of dependencies.
-additional_compile_targets: Unqualified targets to search for in addition to
-test_targets. Targets in the combined list that depend upon a file in |files|
-are not necessarily output. For example, if the target is of type none then the
-target is not output (but one of the descendants of the target will be).
-
-The following is output:
-error: only supplied if there is an error.
-compile_targets: minimal set of targets that directly or indirectly (for
- targets of type none) depend on the files in |files| and is one of the
- supplied targets or a target that one of the supplied targets depends on.
- The expectation is this set of targets is passed into a build step. This list
- always contains the output of test_targets as well.
-test_targets: set of targets from the supplied |test_targets| that either
- directly or indirectly depend upon a file in |files|. This list if useful
- if additional processing needs to be done for certain targets after the
- build, such as running tests.
-status: outputs one of three values: none of the supplied files were found,
- one of the include files changed so that it should be assumed everything
- changed (in this case test_targets and compile_targets are not output) or at
- least one file was found.
-invalid_targets: list of supplied targets that were not found.
-
-Example:
-Consider a graph like the following:
- A D
- / \
-B C
-A depends upon both B and C, A is of type none and B and C are executables.
-D is an executable, has no dependencies and nothing depends on it.
-If |additional_compile_targets| = ["A"], |test_targets| = ["B", "C"] and
-files = ["b.cc", "d.cc"] (B depends upon b.cc and D depends upon d.cc), then
-the following is output:
-|compile_targets| = ["B"] B must built as it depends upon the changed file b.cc
-and the supplied target A depends upon it. A is not output as a build_target
-as it is of type none with no rules and actions.
-|test_targets| = ["B"] B directly depends upon the change file b.cc.
-
-Even though the file d.cc, which D depends upon, has changed D is not output
-as it was not supplied by way of |additional_compile_targets| or |test_targets|.
-
-If the generator flag analyzer_output_path is specified, output is written
-there. Otherwise output is written to stdout.
-
-In Gyp the "all" target is shorthand for the root targets in the files passed
-to gyp. For example, if file "a.gyp" contains targets "a1" and
-"a2", and file "b.gyp" contains targets "b1" and "b2" and "a2" has a dependency
-on "b2" and gyp is supplied "a.gyp" then "all" consists of "a1" and "a2".
-Notice that "b1" and "b2" are not in the "all" target as "b.gyp" was not
-directly supplied to gyp. OTOH if both "a.gyp" and "b.gyp" are supplied to gyp
-then the "all" target includes "b1" and "b2".
-"""
-
-from __future__ import print_function
-
-import gyp.common
-import gyp.ninja_syntax as ninja_syntax
-import json
-import os
-import posixpath
-import sys
-
-debug = False
-
-found_dependency_string = 'Found dependency'
-no_dependency_string = 'No dependencies'
-# Status when it should be assumed that everything has changed.
-all_changed_string = 'Found dependency (all)'
-
-# MatchStatus is used indicate if and how a target depends upon the supplied
-# sources.
-# The target's sources contain one of the supplied paths.
-MATCH_STATUS_MATCHES = 1
-# The target has a dependency on another target that contains one of the
-# supplied paths.
-MATCH_STATUS_MATCHES_BY_DEPENDENCY = 2
-# The target's sources weren't in the supplied paths and none of the target's
-# dependencies depend upon a target that matched.
-MATCH_STATUS_DOESNT_MATCH = 3
-# The target doesn't contain the source, but the dependent targets have not yet
-# been visited to determine a more specific status yet.
-MATCH_STATUS_TBD = 4
-
-generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested()
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_default_variables = {
-}
-for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR',
- 'LIB_DIR', 'SHARED_LIB_DIR']:
- generator_default_variables[dirname] = '!!!'
-
-for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
- 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
- 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
- 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
- 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
- 'CONFIGURATION_NAME']:
- generator_default_variables[unused] = ''
-
-
-def _ToGypPath(path):
- """Converts a path to the format used by gyp."""
- if os.sep == '\\' and os.altsep == '/':
- return path.replace('\\', '/')
- return path
-
-
-def _ResolveParent(path, base_path_components):
- """Resolves |path|, which starts with at least one '../'. Returns an empty
- string if the path shouldn't be considered. See _AddSources() for a
- description of |base_path_components|."""
- depth = 0
- while path.startswith('../'):
- depth += 1
- path = path[3:]
- # Relative includes may go outside the source tree. For example, an action may
- # have inputs in /usr/include, which are not in the source tree.
- if depth > len(base_path_components):
- return ''
- if depth == len(base_path_components):
- return path
- return '/'.join(base_path_components[0:len(base_path_components) - depth]) + \
- '/' + path
-
-
-def _AddSources(sources, base_path, base_path_components, result):
- """Extracts valid sources from |sources| and adds them to |result|. Each
- source file is relative to |base_path|, but may contain '..'. To make
- resolving '..' easier |base_path_components| contains each of the
- directories in |base_path|. Additionally each source may contain variables.
- Such sources are ignored as it is assumed dependencies on them are expressed
- and tracked in some other means."""
- # NOTE: gyp paths are always posix style.
- for source in sources:
- if not len(source) or source.startswith('!!!') or source.startswith('$'):
- continue
- # variable expansion may lead to //.
- org_source = source
- source = source[0] + source[1:].replace('//', '/')
- if source.startswith('../'):
- source = _ResolveParent(source, base_path_components)
- if len(source):
- result.append(source)
- continue
- result.append(base_path + source)
- if debug:
- print('AddSource', org_source, result[len(result) - 1])
-
-
-def _ExtractSourcesFromAction(action, base_path, base_path_components,
- results):
- if 'inputs' in action:
- _AddSources(action['inputs'], base_path, base_path_components, results)
-
-
-def _ToLocalPath(toplevel_dir, path):
- """Converts |path| to a path relative to |toplevel_dir|."""
- if path == toplevel_dir:
- return ''
- if path.startswith(toplevel_dir + '/'):
- return path[len(toplevel_dir) + len('/'):]
- return path
-
-
-def _ExtractSources(target, target_dict, toplevel_dir):
- # |target| is either absolute or relative and in the format of the OS. Gyp
- # source paths are always posix. Convert |target| to a posix path relative to
- # |toplevel_dir_|. This is done to make it easy to build source paths.
- base_path = posixpath.dirname(_ToLocalPath(toplevel_dir, _ToGypPath(target)))
- base_path_components = base_path.split('/')
-
- # Add a trailing '/' so that _AddSources() can easily build paths.
- if len(base_path):
- base_path += '/'
-
- if debug:
- print('ExtractSources', target, base_path)
-
- results = []
- if 'sources' in target_dict:
- _AddSources(target_dict['sources'], base_path, base_path_components,
- results)
- # Include the inputs from any actions. Any changes to these affect the
- # resulting output.
- if 'actions' in target_dict:
- for action in target_dict['actions']:
- _ExtractSourcesFromAction(action, base_path, base_path_components,
- results)
- if 'rules' in target_dict:
- for rule in target_dict['rules']:
- _ExtractSourcesFromAction(rule, base_path, base_path_components, results)
-
- return results
-
-
-class Target(object):
- """Holds information about a particular target:
- deps: set of Targets this Target depends upon. This is not recursive, only the
- direct dependent Targets.
- match_status: one of the MatchStatus values.
- back_deps: set of Targets that have a dependency on this Target.
- visited: used during iteration to indicate whether we've visited this target.
- This is used for two iterations, once in building the set of Targets and
- again in _GetBuildTargets().
- name: fully qualified name of the target.
- requires_build: True if the target type is such that it needs to be built.
- See _DoesTargetTypeRequireBuild for details.
- added_to_compile_targets: used when determining if the target was added to the
- set of targets that needs to be built.
- in_roots: true if this target is a descendant of one of the root nodes.
- is_executable: true if the type of target is executable.
- is_static_library: true if the type of target is static_library.
- is_or_has_linked_ancestor: true if the target does a link (eg executable), or
- if there is a target in back_deps that does a link."""
- def __init__(self, name):
- self.deps = set()
- self.match_status = MATCH_STATUS_TBD
- self.back_deps = set()
- self.name = name
- # TODO(sky): I don't like hanging this off Target. This state is specific
- # to certain functions and should be isolated there.
- self.visited = False
- self.requires_build = False
- self.added_to_compile_targets = False
- self.in_roots = False
- self.is_executable = False
- self.is_static_library = False
- self.is_or_has_linked_ancestor = False
-
-
-class Config(object):
- """Details what we're looking for
- files: set of files to search for
- targets: see file description for details."""
- def __init__(self):
- self.files = []
- self.targets = set()
- self.additional_compile_target_names = set()
- self.test_target_names = set()
-
- def Init(self, params):
- """Initializes Config. This is a separate method as it raises an exception
- if there is a parse error."""
- generator_flags = params.get('generator_flags', {})
- config_path = generator_flags.get('config_path', None)
- if not config_path:
- return
- try:
- f = open(config_path, 'r')
- config = json.load(f)
- f.close()
- except IOError:
- raise Exception('Unable to open file ' + config_path)
- except ValueError as e:
- raise Exception('Unable to parse config file ' + config_path + str(e))
- if not isinstance(config, dict):
- raise Exception('config_path must be a JSON file containing a dictionary')
- self.files = config.get('files', [])
- self.additional_compile_target_names = set(
- config.get('additional_compile_targets', []))
- self.test_target_names = set(config.get('test_targets', []))
-
-
-def _WasBuildFileModified(build_file, data, files, toplevel_dir):
- """Returns true if the build file |build_file| is either in |files| or
- one of the files included by |build_file| is in |files|. |toplevel_dir| is
- the root of the source tree."""
- if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files:
- if debug:
- print('gyp file modified', build_file)
- return True
-
- # First element of included_files is the file itself.
- if len(data[build_file]['included_files']) <= 1:
- return False
-
- for include_file in data[build_file]['included_files'][1:]:
- # |included_files| are relative to the directory of the |build_file|.
- rel_include_file = \
- _ToGypPath(gyp.common.UnrelativePath(include_file, build_file))
- if _ToLocalPath(toplevel_dir, rel_include_file) in files:
- if debug:
- print('included gyp file modified, gyp_file=', build_file,
- 'included file=', rel_include_file)
- return True
- return False
-
-
-def _GetOrCreateTargetByName(targets, target_name):
- """Creates or returns the Target at targets[target_name]. If there is no
- Target for |target_name| one is created. Returns a tuple of whether a new
- Target was created and the Target."""
- if target_name in targets:
- return False, targets[target_name]
- target = Target(target_name)
- targets[target_name] = target
- return True, target
-
-
-def _DoesTargetTypeRequireBuild(target_dict):
- """Returns true if the target type is such that it needs to be built."""
- # If a 'none' target has rules or actions we assume it requires a build.
- return bool(target_dict['type'] != 'none' or
- target_dict.get('actions') or target_dict.get('rules'))
-
-
-def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files,
- build_files):
- """Returns a tuple of the following:
- . A dictionary mapping from fully qualified name to Target.
- . A list of the targets that have a source file in |files|.
- . Targets that constitute the 'all' target. See description at top of file
- for details on the 'all' target.
- This sets the |match_status| of the targets that contain any of the source
- files in |files| to MATCH_STATUS_MATCHES.
- |toplevel_dir| is the root of the source tree."""
- # Maps from target name to Target.
- name_to_target = {}
-
- # Targets that matched.
- matching_targets = []
-
- # Queue of targets to visit.
- targets_to_visit = target_list[:]
-
- # Maps from build file to a boolean indicating whether the build file is in
- # |files|.
- build_file_in_files = {}
-
- # Root targets across all files.
- roots = set()
-
- # Set of Targets in |build_files|.
- build_file_targets = set()
-
- while len(targets_to_visit) > 0:
- target_name = targets_to_visit.pop()
- created_target, target = _GetOrCreateTargetByName(name_to_target,
- target_name)
- if created_target:
- roots.add(target)
- elif target.visited:
- continue
-
- target.visited = True
- target.requires_build = _DoesTargetTypeRequireBuild(
- target_dicts[target_name])
- target_type = target_dicts[target_name]['type']
- target.is_executable = target_type == 'executable'
- target.is_static_library = target_type == 'static_library'
- target.is_or_has_linked_ancestor = (target_type == 'executable' or
- target_type == 'shared_library')
-
- build_file = gyp.common.ParseQualifiedTarget(target_name)[0]
- if not build_file in build_file_in_files:
- build_file_in_files[build_file] = \
- _WasBuildFileModified(build_file, data, files, toplevel_dir)
-
- if build_file in build_files:
- build_file_targets.add(target)
-
- # If a build file (or any of its included files) is modified we assume all
- # targets in the file are modified.
- if build_file_in_files[build_file]:
- print('matching target from modified build file', target_name)
- target.match_status = MATCH_STATUS_MATCHES
- matching_targets.append(target)
- else:
- sources = _ExtractSources(target_name, target_dicts[target_name],
- toplevel_dir)
- for source in sources:
- if _ToGypPath(os.path.normpath(source)) in files:
- print('target', target_name, 'matches', source)
- target.match_status = MATCH_STATUS_MATCHES
- matching_targets.append(target)
- break
-
- # Add dependencies to visit as well as updating back pointers for deps.
- for dep in target_dicts[target_name].get('dependencies', []):
- targets_to_visit.append(dep)
-
- created_dep_target, dep_target = _GetOrCreateTargetByName(name_to_target,
- dep)
- if not created_dep_target:
- roots.discard(dep_target)
-
- target.deps.add(dep_target)
- dep_target.back_deps.add(target)
-
- return name_to_target, matching_targets, roots & build_file_targets
-
-
-def _GetUnqualifiedToTargetMapping(all_targets, to_find):
- """Returns a tuple of the following:
- . mapping (dictionary) from unqualified name to Target for all the
- Targets in |to_find|.
- . any target names not found. If this is empty all targets were found."""
- result = {}
- if not to_find:
- return {}, []
- to_find = set(to_find)
- for target_name in all_targets.keys():
- extracted = gyp.common.ParseQualifiedTarget(target_name)
- if len(extracted) > 1 and extracted[1] in to_find:
- to_find.remove(extracted[1])
- result[extracted[1]] = all_targets[target_name]
- if not to_find:
- return result, []
- return result, [x for x in to_find]
-
-
-def _DoesTargetDependOnMatchingTargets(target):
- """Returns true if |target| or any of its dependencies is one of the
- targets containing the files supplied as input to analyzer. This updates
- |matches| of the Targets as it recurses.
- target: the Target to look for."""
- if target.match_status == MATCH_STATUS_DOESNT_MATCH:
- return False
- if target.match_status == MATCH_STATUS_MATCHES or \
- target.match_status == MATCH_STATUS_MATCHES_BY_DEPENDENCY:
- return True
- for dep in target.deps:
- if _DoesTargetDependOnMatchingTargets(dep):
- target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY
- print('\t', target.name, 'matches by dep', dep.name)
- return True
- target.match_status = MATCH_STATUS_DOESNT_MATCH
- return False
-
-
-def _GetTargetsDependingOnMatchingTargets(possible_targets):
- """Returns the list of Targets in |possible_targets| that depend (either
- directly on indirectly) on at least one of the targets containing the files
- supplied as input to analyzer.
- possible_targets: targets to search from."""
- found = []
- print('Targets that matched by dependency:')
- for target in possible_targets:
- if _DoesTargetDependOnMatchingTargets(target):
- found.append(target)
- return found
-
-
-def _AddCompileTargets(target, roots, add_if_no_ancestor, result):
- """Recurses through all targets that depend on |target|, adding all targets
- that need to be built (and are in |roots|) to |result|.
- roots: set of root targets.
- add_if_no_ancestor: If true and there are no ancestors of |target| then add
- |target| to |result|. |target| must still be in |roots|.
- result: targets that need to be built are added here."""
- if target.visited:
- return
-
- target.visited = True
- target.in_roots = target in roots
-
- for back_dep_target in target.back_deps:
- _AddCompileTargets(back_dep_target, roots, False, result)
- target.added_to_compile_targets |= back_dep_target.added_to_compile_targets
- target.in_roots |= back_dep_target.in_roots
- target.is_or_has_linked_ancestor |= (
- back_dep_target.is_or_has_linked_ancestor)
-
- # Always add 'executable' targets. Even though they may be built by other
- # targets that depend upon them it makes detection of what is going to be
- # built easier.
- # And always add static_libraries that have no dependencies on them from
- # linkables. This is necessary as the other dependencies on them may be
- # static libraries themselves, which are not compile time dependencies.
- if target.in_roots and \
- (target.is_executable or
- (not target.added_to_compile_targets and
- (add_if_no_ancestor or target.requires_build)) or
- (target.is_static_library and add_if_no_ancestor and
- not target.is_or_has_linked_ancestor)):
- print('\t\tadding to compile targets', target.name, 'executable',
- target.is_executable, 'added_to_compile_targets',
- target.added_to_compile_targets, 'add_if_no_ancestor',
- add_if_no_ancestor, 'requires_build', target.requires_build,
- 'is_static_library', target.is_static_library,
- 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor)
- result.add(target)
- target.added_to_compile_targets = True
-
-
-def _GetCompileTargets(matching_targets, supplied_targets):
- """Returns the set of Targets that require a build.
- matching_targets: targets that changed and need to be built.
- supplied_targets: set of targets supplied to analyzer to search from."""
- result = set()
- for target in matching_targets:
- print('finding compile targets for match', target.name)
- _AddCompileTargets(target, supplied_targets, True, result)
- return result
-
-
-def _WriteOutput(params, **values):
- """Writes the output, either to stdout or a file is specified."""
- if 'error' in values:
- print('Error:', values['error'])
- if 'status' in values:
- print(values['status'])
- if 'targets' in values:
- values['targets'].sort()
- print('Supplied targets that depend on changed files:')
- for target in values['targets']:
- print('\t', target)
- if 'invalid_targets' in values:
- values['invalid_targets'].sort()
- print('The following targets were not found:')
- for target in values['invalid_targets']:
- print('\t', target)
- if 'build_targets' in values:
- values['build_targets'].sort()
- print('Targets that require a build:')
- for target in values['build_targets']:
- print('\t', target)
- if 'compile_targets' in values:
- values['compile_targets'].sort()
- print('Targets that need to be built:')
- for target in values['compile_targets']:
- print('\t', target)
- if 'test_targets' in values:
- values['test_targets'].sort()
- print('Test targets:')
- for target in values['test_targets']:
- print('\t', target)
-
- output_path = params.get('generator_flags', {}).get(
- 'analyzer_output_path', None)
- if not output_path:
- print(json.dumps(values))
- return
- try:
- f = open(output_path, 'w')
- f.write(json.dumps(values) + '\n')
- f.close()
- except IOError as e:
- print('Error writing to output file', output_path, str(e))
-
-
-def _WasGypIncludeFileModified(params, files):
- """Returns true if one of the files in |files| is in the set of included
- files."""
- if params['options'].includes:
- for include in params['options'].includes:
- if _ToGypPath(os.path.normpath(include)) in files:
- print('Include file modified, assuming all changed', include)
- return True
- return False
-
-
-def _NamesNotIn(names, mapping):
- """Returns a list of the values in |names| that are not in |mapping|."""
- return [name for name in names if name not in mapping]
-
-
-def _LookupTargets(names, mapping):
- """Returns a list of the mapping[name] for each value in |names| that is in
- |mapping|."""
- return [mapping[name] for name in names if name in mapping]
-
-
-def CalculateVariables(default_variables, params):
- """Calculate additional variables for use in the build (called by gyp)."""
- flavor = gyp.common.GetFlavor(params)
- if flavor == 'mac':
- default_variables.setdefault('OS', 'mac')
- elif flavor == 'win':
- default_variables.setdefault('OS', 'win')
- # Copy additional generator configuration data from VS, which is shared
- # by the Windows Ninja generator.
- import gyp.generator.msvs as msvs_generator
- generator_additional_non_configuration_keys = getattr(msvs_generator,
- 'generator_additional_non_configuration_keys', [])
- generator_additional_path_sections = getattr(msvs_generator,
- 'generator_additional_path_sections', [])
-
- gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
- else:
- operating_system = flavor
- if flavor == 'android':
- operating_system = 'linux' # Keep this legacy behavior for now.
- default_variables.setdefault('OS', operating_system)
-
-
-class TargetCalculator(object):
- """Calculates the matching test_targets and matching compile_targets."""
- def __init__(self, files, additional_compile_target_names, test_target_names,
- data, target_list, target_dicts, toplevel_dir, build_files):
- self._additional_compile_target_names = set(additional_compile_target_names)
- self._test_target_names = set(test_target_names)
- self._name_to_target, self._changed_targets, self._root_targets = (
- _GenerateTargets(data, target_list, target_dicts, toplevel_dir,
- frozenset(files), build_files))
- self._unqualified_mapping, self.invalid_targets = (
- _GetUnqualifiedToTargetMapping(self._name_to_target,
- self._supplied_target_names_no_all()))
-
- def _supplied_target_names(self):
- return self._additional_compile_target_names | self._test_target_names
-
- def _supplied_target_names_no_all(self):
- """Returns the supplied test targets without 'all'."""
- result = self._supplied_target_names()
- result.discard('all')
- return result
-
- def is_build_impacted(self):
- """Returns true if the supplied files impact the build at all."""
- return self._changed_targets
-
- def find_matching_test_target_names(self):
- """Returns the set of output test targets."""
- assert self.is_build_impacted()
- # Find the test targets first. 'all' is special cased to mean all the
- # root targets. To deal with all the supplied |test_targets| are expanded
- # to include the root targets during lookup. If any of the root targets
- # match, we remove it and replace it with 'all'.
- test_target_names_no_all = set(self._test_target_names)
- test_target_names_no_all.discard('all')
- test_targets_no_all = _LookupTargets(test_target_names_no_all,
- self._unqualified_mapping)
- test_target_names_contains_all = 'all' in self._test_target_names
- if test_target_names_contains_all:
- test_targets = [x for x in (set(test_targets_no_all) |
- set(self._root_targets))]
- else:
- test_targets = [x for x in test_targets_no_all]
- print('supplied test_targets')
- for target_name in self._test_target_names:
- print('\t', target_name)
- print('found test_targets')
- for target in test_targets:
- print('\t', target.name)
- print('searching for matching test targets')
- matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets)
- matching_test_targets_contains_all = (test_target_names_contains_all and
- set(matching_test_targets) &
- set(self._root_targets))
- if matching_test_targets_contains_all:
- # Remove any of the targets for all that were not explicitly supplied,
- # 'all' is subsequentely added to the matching names below.
- matching_test_targets = [x for x in (set(matching_test_targets) &
- set(test_targets_no_all))]
- print('matched test_targets')
- for target in matching_test_targets:
- print('\t', target.name)
- matching_target_names = [gyp.common.ParseQualifiedTarget(target.name)[1]
- for target in matching_test_targets]
- if matching_test_targets_contains_all:
- matching_target_names.append('all')
- print('\tall')
- return matching_target_names
-
- def find_matching_compile_target_names(self):
- """Returns the set of output compile targets."""
- assert self.is_build_impacted()
- # Compile targets are found by searching up from changed targets.
- # Reset the visited status for _GetBuildTargets.
- for target in self._name_to_target.values():
- target.visited = False
-
- supplied_targets = _LookupTargets(self._supplied_target_names_no_all(),
- self._unqualified_mapping)
- if 'all' in self._supplied_target_names():
- supplied_targets = [x for x in (set(supplied_targets) |
- set(self._root_targets))]
- print('Supplied test_targets & compile_targets')
- for target in supplied_targets:
- print('\t', target.name)
- print('Finding compile targets')
- compile_targets = _GetCompileTargets(self._changed_targets,
- supplied_targets)
- return [gyp.common.ParseQualifiedTarget(target.name)[1]
- for target in compile_targets]
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- """Called by gyp as the final stage. Outputs results."""
- config = Config()
- try:
- config.Init(params)
-
- if not config.files:
- raise Exception('Must specify files to analyze via config_path generator '
- 'flag')
-
- toplevel_dir = _ToGypPath(os.path.abspath(params['options'].toplevel_dir))
- if debug:
- print('toplevel_dir', toplevel_dir)
-
- if _WasGypIncludeFileModified(params, config.files):
- result_dict = { 'status': all_changed_string,
- 'test_targets': list(config.test_target_names),
- 'compile_targets': list(
- config.additional_compile_target_names |
- config.test_target_names) }
- _WriteOutput(params, **result_dict)
- return
-
- calculator = TargetCalculator(config.files,
- config.additional_compile_target_names,
- config.test_target_names, data,
- target_list, target_dicts, toplevel_dir,
- params['build_files'])
- if not calculator.is_build_impacted():
- result_dict = { 'status': no_dependency_string,
- 'test_targets': [],
- 'compile_targets': [] }
- if calculator.invalid_targets:
- result_dict['invalid_targets'] = calculator.invalid_targets
- _WriteOutput(params, **result_dict)
- return
-
- test_target_names = calculator.find_matching_test_target_names()
- compile_target_names = calculator.find_matching_compile_target_names()
- found_at_least_one_target = compile_target_names or test_target_names
- result_dict = { 'test_targets': test_target_names,
- 'status': found_dependency_string if
- found_at_least_one_target else no_dependency_string,
- 'compile_targets': list(
- set(compile_target_names) |
- set(test_target_names)) }
- if calculator.invalid_targets:
- result_dict['invalid_targets'] = calculator.invalid_targets
- _WriteOutput(params, **result_dict)
-
- except Exception as e:
- _WriteOutput(params, error=str(e))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
deleted file mode 100644
index cecb28c36..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
+++ /dev/null
@@ -1,1097 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Notes:
-#
-# This generates makefiles suitable for inclusion into the Android build system
-# via an Android.mk file. It is based on make.py, the standard makefile
-# generator.
-#
-# The code below generates a separate .mk file for each target, but
-# all are sourced by the top-level GypAndroid.mk. This means that all
-# variables in .mk-files clobber one another, and furthermore that any
-# variables set potentially clash with other Android build system variables.
-# Try to avoid setting global variables where possible.
-
-from __future__ import print_function
-
-import gyp
-import gyp.common
-import gyp.generator.make as make # Reuse global functions from make backend.
-import os
-import re
-import subprocess
-
-generator_default_variables = {
- 'OS': 'android',
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'STATIC_LIB_PREFIX': 'lib',
- 'SHARED_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
- 'SHARED_LIB_SUFFIX': '.so',
- 'INTERMEDIATE_DIR': '$(gyp_intermediate_dir)',
- 'SHARED_INTERMEDIATE_DIR': '$(gyp_shared_intermediate_dir)',
- 'PRODUCT_DIR': '$(gyp_shared_intermediate_dir)',
- 'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)',
- 'LIB_DIR': '$(obj).$(TOOLSET)',
- 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python.
- 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s', # This gets expanded by Python.
- 'RULE_INPUT_PATH': '$(RULE_SOURCES)',
- 'RULE_INPUT_EXT': '$(suffix $<)',
- 'RULE_INPUT_NAME': '$(notdir $<)',
- 'CONFIGURATION_NAME': '$(GYP_CONFIGURATION)',
-}
-
-# Make supports multiple toolsets
-generator_supports_multiple_toolsets = True
-
-
-# Generator-specific gyp specs.
-generator_additional_non_configuration_keys = [
- # Boolean to declare that this target does not want its name mangled.
- 'android_unmangled_name',
- # Map of android build system variables to set.
- 'aosp_build_settings',
-]
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-
-
-ALL_MODULES_FOOTER = """\
-# "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from
-# all the included sub-makefiles. This is just here to clarify.
-gyp_all_modules:
-"""
-
-header = """\
-# This file is generated by gyp; do not edit.
-
-"""
-
-# Map gyp target types to Android module classes.
-MODULE_CLASSES = {
- 'static_library': 'STATIC_LIBRARIES',
- 'shared_library': 'SHARED_LIBRARIES',
- 'executable': 'EXECUTABLES',
-}
-
-
-def IsCPPExtension(ext):
- return make.COMPILABLE_EXTENSIONS.get(ext) == 'cxx'
-
-
-def Sourceify(path):
- """Convert a path to its source directory form. The Android backend does not
- support options.generator_output, so this function is a noop."""
- return path
-
-
-# Map from qualified target to path to output.
-# For Android, the target of these maps is a tuple ('static', 'modulename'),
-# ('dynamic', 'modulename'), or ('path', 'some/path') instead of a string,
-# since we link by module.
-target_outputs = {}
-# Map from qualified target to any linkable output. A subset
-# of target_outputs. E.g. when mybinary depends on liba, we want to
-# include liba in the linker line; when otherbinary depends on
-# mybinary, we just want to build mybinary first.
-target_link_deps = {}
-
-
-class AndroidMkWriter(object):
- """AndroidMkWriter packages up the writing of one target-specific Android.mk.
-
- Its only real entry point is Write(), and is mostly used for namespacing.
- """
-
- def __init__(self, android_top_dir):
- self.android_top_dir = android_top_dir
-
- def Write(self, qualified_target, relative_target, base_path, output_filename,
- spec, configs, part_of_all, write_alias_target, sdk_version):
- """The main entry point: writes a .mk file for a single target.
-
- Arguments:
- qualified_target: target we're generating
- relative_target: qualified target name relative to the root
- base_path: path relative to source root we're building in, used to resolve
- target-relative paths
- output_filename: output .mk file name to write
- spec, configs: gyp info
- part_of_all: flag indicating this target is part of 'all'
- write_alias_target: flag indicating whether to create short aliases for
- this target
- sdk_version: what to emit for LOCAL_SDK_VERSION in output
- """
- gyp.common.EnsureDirExists(output_filename)
-
- self.fp = open(output_filename, 'w')
-
- self.fp.write(header)
-
- self.qualified_target = qualified_target
- self.relative_target = relative_target
- self.path = base_path
- self.target = spec['target_name']
- self.type = spec['type']
- self.toolset = spec['toolset']
-
- deps, link_deps = self.ComputeDeps(spec)
-
- # Some of the generation below can add extra output, sources, or
- # link dependencies. All of the out params of the functions that
- # follow use names like extra_foo.
- extra_outputs = []
- extra_sources = []
-
- self.android_class = MODULE_CLASSES.get(self.type, 'GYP')
- self.android_module = self.ComputeAndroidModule(spec)
- (self.android_stem, self.android_suffix) = self.ComputeOutputParts(spec)
- self.output = self.output_binary = self.ComputeOutput(spec)
-
- # Standard header.
- self.WriteLn('include $(CLEAR_VARS)\n')
-
- # Module class and name.
- self.WriteLn('LOCAL_MODULE_CLASS := ' + self.android_class)
- self.WriteLn('LOCAL_MODULE := ' + self.android_module)
- # Only emit LOCAL_MODULE_STEM if it's different to LOCAL_MODULE.
- # The library module classes fail if the stem is set. ComputeOutputParts
- # makes sure that stem == modulename in these cases.
- if self.android_stem != self.android_module:
- self.WriteLn('LOCAL_MODULE_STEM := ' + self.android_stem)
- self.WriteLn('LOCAL_MODULE_SUFFIX := ' + self.android_suffix)
- if self.toolset == 'host':
- self.WriteLn('LOCAL_IS_HOST_MODULE := true')
- self.WriteLn('LOCAL_MULTILIB := $(GYP_HOST_MULTILIB)')
- elif sdk_version > 0:
- self.WriteLn('LOCAL_MODULE_TARGET_ARCH := '
- '$(TARGET_$(GYP_VAR_PREFIX)ARCH)')
- self.WriteLn('LOCAL_SDK_VERSION := %s' % sdk_version)
-
- # Grab output directories; needed for Actions and Rules.
- if self.toolset == 'host':
- self.WriteLn('gyp_intermediate_dir := '
- '$(call local-intermediates-dir,,$(GYP_HOST_VAR_PREFIX))')
- else:
- self.WriteLn('gyp_intermediate_dir := '
- '$(call local-intermediates-dir,,$(GYP_VAR_PREFIX))')
- self.WriteLn('gyp_shared_intermediate_dir := '
- '$(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))')
- self.WriteLn()
-
- # List files this target depends on so that actions/rules/copies/sources
- # can depend on the list.
- # TODO: doesn't pull in things through transitive link deps; needed?
- target_dependencies = [x[1] for x in deps if x[0] == 'path']
- self.WriteLn('# Make sure our deps are built first.')
- self.WriteList(target_dependencies, 'GYP_TARGET_DEPENDENCIES',
- local_pathify=True)
-
- # Actions must come first, since they can generate more OBJs for use below.
- if 'actions' in spec:
- self.WriteActions(spec['actions'], extra_sources, extra_outputs)
-
- # Rules must be early like actions.
- if 'rules' in spec:
- self.WriteRules(spec['rules'], extra_sources, extra_outputs)
-
- if 'copies' in spec:
- self.WriteCopies(spec['copies'], extra_outputs)
-
- # GYP generated outputs.
- self.WriteList(extra_outputs, 'GYP_GENERATED_OUTPUTS', local_pathify=True)
-
- # Set LOCAL_ADDITIONAL_DEPENDENCIES so that Android's build rules depend
- # on both our dependency targets and our generated files.
- self.WriteLn('# Make sure our deps and generated files are built first.')
- self.WriteLn('LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) '
- '$(GYP_GENERATED_OUTPUTS)')
- self.WriteLn()
-
- # Sources.
- if spec.get('sources', []) or extra_sources:
- self.WriteSources(spec, configs, extra_sources)
-
- self.WriteTarget(spec, configs, deps, link_deps, part_of_all,
- write_alias_target)
-
- # Update global list of target outputs, used in dependency tracking.
- target_outputs[qualified_target] = ('path', self.output_binary)
-
- # Update global list of link dependencies.
- if self.type == 'static_library':
- target_link_deps[qualified_target] = ('static', self.android_module)
- elif self.type == 'shared_library':
- target_link_deps[qualified_target] = ('shared', self.android_module)
-
- self.fp.close()
- return self.android_module
-
-
- def WriteActions(self, actions, extra_sources, extra_outputs):
- """Write Makefile code for any 'actions' from the gyp input.
-
- extra_sources: a list that will be filled in with newly generated source
- files, if any
- extra_outputs: a list that will be filled in with any outputs of these
- actions (used to make other pieces dependent on these
- actions)
- """
- for action in actions:
- name = make.StringToMakefileVariable('%s_%s' % (self.relative_target,
- action['action_name']))
- self.WriteLn('### Rules for action "%s":' % action['action_name'])
- inputs = action['inputs']
- outputs = action['outputs']
-
- # Build up a list of outputs.
- # Collect the output dirs we'll need.
- dirs = set()
- for out in outputs:
- if not out.startswith('$'):
- print('WARNING: Action for target "%s" writes output to local path '
- '"%s".' % (self.target, out))
- dir = os.path.split(out)[0]
- if dir:
- dirs.add(dir)
- if int(action.get('process_outputs_as_sources', False)):
- extra_sources += outputs
-
- # Prepare the actual command.
- command = gyp.common.EncodePOSIXShellList(action['action'])
- if 'message' in action:
- quiet_cmd = 'Gyp action: %s ($@)' % action['message']
- else:
- quiet_cmd = 'Gyp action: %s ($@)' % name
- if len(dirs) > 0:
- command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command
-
- cd_action = 'cd $(gyp_local_path)/%s; ' % self.path
- command = cd_action + command
-
- # The makefile rules are all relative to the top dir, but the gyp actions
- # are defined relative to their containing dir. This replaces the gyp_*
- # variables for the action rule with an absolute version so that the
- # output goes in the right place.
- # Only write the gyp_* rules for the "primary" output (:1);
- # it's superfluous for the "extra outputs", and this avoids accidentally
- # writing duplicate dummy rules for those outputs.
- main_output = make.QuoteSpaces(self.LocalPathify(outputs[0]))
- self.WriteLn('%s: gyp_local_path := $(LOCAL_PATH)' % main_output)
- self.WriteLn('%s: gyp_var_prefix := $(GYP_VAR_PREFIX)' % main_output)
- self.WriteLn('%s: gyp_intermediate_dir := '
- '$(abspath $(gyp_intermediate_dir))' % main_output)
- self.WriteLn('%s: gyp_shared_intermediate_dir := '
- '$(abspath $(gyp_shared_intermediate_dir))' % main_output)
-
- # Android's envsetup.sh adds a number of directories to the path including
- # the built host binary directory. This causes actions/rules invoked by
- # gyp to sometimes use these instead of system versions, e.g. bison.
- # The built host binaries may not be suitable, and can cause errors.
- # So, we remove them from the PATH using the ANDROID_BUILD_PATHS variable
- # set by envsetup.
- self.WriteLn('%s: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))'
- % main_output)
-
- # Don't allow spaces in input/output filenames, but make an exception for
- # filenames which start with '$(' since it's okay for there to be spaces
- # inside of make function/macro invocations.
- for input in inputs:
- if not input.startswith('$(') and ' ' in input:
- raise gyp.common.GypError(
- 'Action input filename "%s" in target %s contains a space' %
- (input, self.target))
- for output in outputs:
- if not output.startswith('$(') and ' ' in output:
- raise gyp.common.GypError(
- 'Action output filename "%s" in target %s contains a space' %
- (output, self.target))
-
- self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES)' %
- (main_output, ' '.join(map(self.LocalPathify, inputs))))
- self.WriteLn('\t@echo "%s"' % quiet_cmd)
- self.WriteLn('\t$(hide)%s\n' % command)
- for output in outputs[1:]:
- # Make each output depend on the main output, with an empty command
- # to force make to notice that the mtime has changed.
- self.WriteLn('%s: %s ;' % (self.LocalPathify(output), main_output))
-
- extra_outputs += outputs
- self.WriteLn()
-
- self.WriteLn()
-
-
- def WriteRules(self, rules, extra_sources, extra_outputs):
- """Write Makefile code for any 'rules' from the gyp input.
-
- extra_sources: a list that will be filled in with newly generated source
- files, if any
- extra_outputs: a list that will be filled in with any outputs of these
- rules (used to make other pieces dependent on these rules)
- """
- if len(rules) == 0:
- return
-
- for rule in rules:
- if len(rule.get('rule_sources', [])) == 0:
- continue
- name = make.StringToMakefileVariable('%s_%s' % (self.relative_target,
- rule['rule_name']))
- self.WriteLn('\n### Generated for rule "%s":' % name)
- self.WriteLn('# "%s":' % rule)
-
- inputs = rule.get('inputs')
- for rule_source in rule.get('rule_sources', []):
- (rule_source_dirname, rule_source_basename) = os.path.split(rule_source)
- (rule_source_root, rule_source_ext) = \
- os.path.splitext(rule_source_basename)
-
- outputs = [self.ExpandInputRoot(out, rule_source_root,
- rule_source_dirname)
- for out in rule['outputs']]
-
- dirs = set()
- for out in outputs:
- if not out.startswith('$'):
- print('WARNING: Rule for target %s writes output to local path %s'
- % (self.target, out))
- dir = os.path.dirname(out)
- if dir:
- dirs.add(dir)
- extra_outputs += outputs
- if int(rule.get('process_outputs_as_sources', False)):
- extra_sources.extend(outputs)
-
- components = []
- for component in rule['action']:
- component = self.ExpandInputRoot(component, rule_source_root,
- rule_source_dirname)
- if '$(RULE_SOURCES)' in component:
- component = component.replace('$(RULE_SOURCES)',
- rule_source)
- components.append(component)
-
- command = gyp.common.EncodePOSIXShellList(components)
- cd_action = 'cd $(gyp_local_path)/%s; ' % self.path
- command = cd_action + command
- if dirs:
- command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command
-
- # We set up a rule to build the first output, and then set up
- # a rule for each additional output to depend on the first.
- outputs = map(self.LocalPathify, outputs)
- main_output = outputs[0]
- self.WriteLn('%s: gyp_local_path := $(LOCAL_PATH)' % main_output)
- self.WriteLn('%s: gyp_var_prefix := $(GYP_VAR_PREFIX)' % main_output)
- self.WriteLn('%s: gyp_intermediate_dir := '
- '$(abspath $(gyp_intermediate_dir))' % main_output)
- self.WriteLn('%s: gyp_shared_intermediate_dir := '
- '$(abspath $(gyp_shared_intermediate_dir))' % main_output)
-
- # See explanation in WriteActions.
- self.WriteLn('%s: export PATH := '
- '$(subst $(ANDROID_BUILD_PATHS),,$(PATH))' % main_output)
-
- main_output_deps = self.LocalPathify(rule_source)
- if inputs:
- main_output_deps += ' '
- main_output_deps += ' '.join([self.LocalPathify(f) for f in inputs])
-
- self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES)' %
- (main_output, main_output_deps))
- self.WriteLn('\t%s\n' % command)
- for output in outputs[1:]:
- # Make each output depend on the main output, with an empty command
- # to force make to notice that the mtime has changed.
- self.WriteLn('%s: %s ;' % (output, main_output))
- self.WriteLn()
-
- self.WriteLn()
-
-
- def WriteCopies(self, copies, extra_outputs):
- """Write Makefile code for any 'copies' from the gyp input.
-
- extra_outputs: a list that will be filled in with any outputs of this action
- (used to make other pieces dependent on this action)
- """
- self.WriteLn('### Generated for copy rule.')
-
- variable = make.StringToMakefileVariable(self.relative_target + '_copies')
- outputs = []
- for copy in copies:
- for path in copy['files']:
- # The Android build system does not allow generation of files into the
- # source tree. The destination should start with a variable, which will
- # typically be $(gyp_intermediate_dir) or
- # $(gyp_shared_intermediate_dir). Note that we can't use an assertion
- # because some of the gyp tests depend on this.
- if not copy['destination'].startswith('$'):
- print('WARNING: Copy rule for target %s writes output to '
- 'local path %s' % (self.target, copy['destination']))
-
- # LocalPathify() calls normpath, stripping trailing slashes.
- path = Sourceify(self.LocalPathify(path))
- filename = os.path.split(path)[1]
- output = Sourceify(self.LocalPathify(os.path.join(copy['destination'],
- filename)))
-
- self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES) | $(ACP)' %
- (output, path))
- self.WriteLn('\t@echo Copying: $@')
- self.WriteLn('\t$(hide) mkdir -p $(dir $@)')
- self.WriteLn('\t$(hide) $(ACP) -rpf $< $@')
- self.WriteLn()
- outputs.append(output)
- self.WriteLn('%s = %s' % (variable,
- ' '.join(map(make.QuoteSpaces, outputs))))
- extra_outputs.append('$(%s)' % variable)
- self.WriteLn()
-
-
- def WriteSourceFlags(self, spec, configs):
- """Write out the flags and include paths used to compile source files for
- the current target.
-
- Args:
- spec, configs: input from gyp.
- """
- for configname, config in sorted(configs.items()):
- extracted_includes = []
-
- self.WriteLn('\n# Flags passed to both C and C++ files.')
- cflags, includes_from_cflags = self.ExtractIncludesFromCFlags(
- config.get('cflags', []) + config.get('cflags_c', []))
- extracted_includes.extend(includes_from_cflags)
- self.WriteList(cflags, 'MY_CFLAGS_%s' % configname)
-
- self.WriteList(config.get('defines'), 'MY_DEFS_%s' % configname,
- prefix='-D', quoter=make.EscapeCppDefine)
-
- self.WriteLn('\n# Include paths placed before CFLAGS/CPPFLAGS')
- includes = list(config.get('include_dirs', []))
- includes.extend(extracted_includes)
- includes = map(Sourceify, map(self.LocalPathify, includes))
- includes = self.NormalizeIncludePaths(includes)
- self.WriteList(includes, 'LOCAL_C_INCLUDES_%s' % configname)
-
- self.WriteLn('\n# Flags passed to only C++ (and not C) files.')
- self.WriteList(config.get('cflags_cc'), 'LOCAL_CPPFLAGS_%s' % configname)
-
- self.WriteLn('\nLOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) '
- '$(MY_DEFS_$(GYP_CONFIGURATION))')
- # Undefine ANDROID for host modules
- # TODO: the source code should not use macro ANDROID to tell if it's host
- # or target module.
- if self.toolset == 'host':
- self.WriteLn('# Undefine ANDROID for host modules')
- self.WriteLn('LOCAL_CFLAGS += -UANDROID')
- self.WriteLn('LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) '
- '$(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))')
- self.WriteLn('LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))')
- # Android uses separate flags for assembly file invocations, but gyp expects
- # the same CFLAGS to be applied:
- self.WriteLn('LOCAL_ASFLAGS := $(LOCAL_CFLAGS)')
-
-
- def WriteSources(self, spec, configs, extra_sources):
- """Write Makefile code for any 'sources' from the gyp input.
- These are source files necessary to build the current target.
- We need to handle shared_intermediate directory source files as
- a special case by copying them to the intermediate directory and
- treating them as a genereated sources. Otherwise the Android build
- rules won't pick them up.
-
- Args:
- spec, configs: input from gyp.
- extra_sources: Sources generated from Actions or Rules.
- """
- sources = filter(make.Compilable, spec.get('sources', []))
- generated_not_sources = [x for x in extra_sources if not make.Compilable(x)]
- extra_sources = filter(make.Compilable, extra_sources)
-
- # Determine and output the C++ extension used by these sources.
- # We simply find the first C++ file and use that extension.
- all_sources = sources + extra_sources
- local_cpp_extension = '.cpp'
- for source in all_sources:
- (root, ext) = os.path.splitext(source)
- if IsCPPExtension(ext):
- local_cpp_extension = ext
- break
- if local_cpp_extension != '.cpp':
- self.WriteLn('LOCAL_CPP_EXTENSION := %s' % local_cpp_extension)
-
- # We need to move any non-generated sources that are coming from the
- # shared intermediate directory out of LOCAL_SRC_FILES and put them
- # into LOCAL_GENERATED_SOURCES. We also need to move over any C++ files
- # that don't match our local_cpp_extension, since Android will only
- # generate Makefile rules for a single LOCAL_CPP_EXTENSION.
- local_files = []
- for source in sources:
- (root, ext) = os.path.splitext(source)
- if '$(gyp_shared_intermediate_dir)' in source:
- extra_sources.append(source)
- elif '$(gyp_intermediate_dir)' in source:
- extra_sources.append(source)
- elif IsCPPExtension(ext) and ext != local_cpp_extension:
- extra_sources.append(source)
- else:
- local_files.append(os.path.normpath(os.path.join(self.path, source)))
-
- # For any generated source, if it is coming from the shared intermediate
- # directory then we add a Make rule to copy them to the local intermediate
- # directory first. This is because the Android LOCAL_GENERATED_SOURCES
- # must be in the local module intermediate directory for the compile rules
- # to work properly. If the file has the wrong C++ extension, then we add
- # a rule to copy that to intermediates and use the new version.
- final_generated_sources = []
- # If a source file gets copied, we still need to add the original source
- # directory as header search path, for GCC searches headers in the
- # directory that contains the source file by default.
- origin_src_dirs = []
- for source in extra_sources:
- local_file = source
- if not '$(gyp_intermediate_dir)/' in local_file:
- basename = os.path.basename(local_file)
- local_file = '$(gyp_intermediate_dir)/' + basename
- (root, ext) = os.path.splitext(local_file)
- if IsCPPExtension(ext) and ext != local_cpp_extension:
- local_file = root + local_cpp_extension
- if local_file != source:
- self.WriteLn('%s: %s' % (local_file, self.LocalPathify(source)))
- self.WriteLn('\tmkdir -p $(@D); cp $< $@')
- origin_src_dirs.append(os.path.dirname(source))
- final_generated_sources.append(local_file)
-
- # We add back in all of the non-compilable stuff to make sure that the
- # make rules have dependencies on them.
- final_generated_sources.extend(generated_not_sources)
- self.WriteList(final_generated_sources, 'LOCAL_GENERATED_SOURCES')
-
- origin_src_dirs = gyp.common.uniquer(origin_src_dirs)
- origin_src_dirs = map(Sourceify, map(self.LocalPathify, origin_src_dirs))
- self.WriteList(origin_src_dirs, 'GYP_COPIED_SOURCE_ORIGIN_DIRS')
-
- self.WriteList(local_files, 'LOCAL_SRC_FILES')
-
- # Write out the flags used to compile the source; this must be done last
- # so that GYP_COPIED_SOURCE_ORIGIN_DIRS can be used as an include path.
- self.WriteSourceFlags(spec, configs)
-
-
- def ComputeAndroidModule(self, spec):
- """Return the Android module name used for a gyp spec.
-
- We use the complete qualified target name to avoid collisions between
- duplicate targets in different directories. We also add a suffix to
- distinguish gyp-generated module names.
- """
-
- if int(spec.get('android_unmangled_name', 0)):
- assert self.type != 'shared_library' or self.target.startswith('lib')
- return self.target
-
- if self.type == 'shared_library':
- # For reasons of convention, the Android build system requires that all
- # shared library modules are named 'libfoo' when generating -l flags.
- prefix = 'lib_'
- else:
- prefix = ''
-
- if spec['toolset'] == 'host':
- suffix = '_$(TARGET_$(GYP_VAR_PREFIX)ARCH)_host_gyp'
- else:
- suffix = '_gyp'
-
- if self.path:
- middle = make.StringToMakefileVariable('%s_%s' % (self.path, self.target))
- else:
- middle = make.StringToMakefileVariable(self.target)
-
- return ''.join([prefix, middle, suffix])
-
-
- def ComputeOutputParts(self, spec):
- """Return the 'output basename' of a gyp spec, split into filename + ext.
-
- Android libraries must be named the same thing as their module name,
- otherwise the linker can't find them, so product_name and so on must be
- ignored if we are building a library, and the "lib" prepending is
- not done for Android.
- """
- assert self.type != 'loadable_module' # TODO: not supported?
-
- target = spec['target_name']
- target_prefix = ''
- target_ext = ''
- if self.type == 'static_library':
- target = self.ComputeAndroidModule(spec)
- target_ext = '.a'
- elif self.type == 'shared_library':
- target = self.ComputeAndroidModule(spec)
- target_ext = '.so'
- elif self.type == 'none':
- target_ext = '.stamp'
- elif self.type != 'executable':
- print("ERROR: What output file should be generated?",
- "type", self.type, "target", target)
-
- if self.type != 'static_library' and self.type != 'shared_library':
- target_prefix = spec.get('product_prefix', target_prefix)
- target = spec.get('product_name', target)
- product_ext = spec.get('product_extension')
- if product_ext:
- target_ext = '.' + product_ext
-
- target_stem = target_prefix + target
- return (target_stem, target_ext)
-
-
- def ComputeOutputBasename(self, spec):
- """Return the 'output basename' of a gyp spec.
-
- E.g., the loadable module 'foobar' in directory 'baz' will produce
- 'libfoobar.so'
- """
- return ''.join(self.ComputeOutputParts(spec))
-
-
- def ComputeOutput(self, spec):
- """Return the 'output' (full output path) of a gyp spec.
-
- E.g., the loadable module 'foobar' in directory 'baz' will produce
- '$(obj)/baz/libfoobar.so'
- """
- if self.type == 'executable':
- # We install host executables into shared_intermediate_dir so they can be
- # run by gyp rules that refer to PRODUCT_DIR.
- path = '$(gyp_shared_intermediate_dir)'
- elif self.type == 'shared_library':
- if self.toolset == 'host':
- path = '$($(GYP_HOST_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES)'
- else:
- path = '$($(GYP_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)'
- else:
- # Other targets just get built into their intermediate dir.
- if self.toolset == 'host':
- path = ('$(call intermediates-dir-for,%s,%s,true,,'
- '$(GYP_HOST_VAR_PREFIX))' % (self.android_class,
- self.android_module))
- else:
- path = ('$(call intermediates-dir-for,%s,%s,,,$(GYP_VAR_PREFIX))'
- % (self.android_class, self.android_module))
-
- assert spec.get('product_dir') is None # TODO: not supported?
- return os.path.join(path, self.ComputeOutputBasename(spec))
-
- def NormalizeIncludePaths(self, include_paths):
- """ Normalize include_paths.
- Convert absolute paths to relative to the Android top directory.
-
- Args:
- include_paths: A list of unprocessed include paths.
- Returns:
- A list of normalized include paths.
- """
- normalized = []
- for path in include_paths:
- if path[0] == '/':
- path = gyp.common.RelativePath(path, self.android_top_dir)
- normalized.append(path)
- return normalized
-
- def ExtractIncludesFromCFlags(self, cflags):
- """Extract includes "-I..." out from cflags
-
- Args:
- cflags: A list of compiler flags, which may be mixed with "-I.."
- Returns:
- A tuple of lists: (clean_clfags, include_paths). "-I.." is trimmed.
- """
- clean_cflags = []
- include_paths = []
- for flag in cflags:
- if flag.startswith('-I'):
- include_paths.append(flag[2:])
- else:
- clean_cflags.append(flag)
-
- return (clean_cflags, include_paths)
-
- def FilterLibraries(self, libraries):
- """Filter the 'libraries' key to separate things that shouldn't be ldflags.
-
- Library entries that look like filenames should be converted to android
- module names instead of being passed to the linker as flags.
-
- Args:
- libraries: the value of spec.get('libraries')
- Returns:
- A tuple (static_lib_modules, dynamic_lib_modules, ldflags)
- """
- static_lib_modules = []
- dynamic_lib_modules = []
- ldflags = []
- for libs in libraries:
- # Libs can have multiple words.
- for lib in libs.split():
- # Filter the system libraries, which are added by default by the Android
- # build system.
- if (lib == '-lc' or lib == '-lstdc++' or lib == '-lm' or
- lib.endswith('libgcc.a')):
- continue
- match = re.search(r'([^/]+)\.a$', lib)
- if match:
- static_lib_modules.append(match.group(1))
- continue
- match = re.search(r'([^/]+)\.so$', lib)
- if match:
- dynamic_lib_modules.append(match.group(1))
- continue
- if lib.startswith('-l'):
- ldflags.append(lib)
- return (static_lib_modules, dynamic_lib_modules, ldflags)
-
-
- def ComputeDeps(self, spec):
- """Compute the dependencies of a gyp spec.
-
- Returns a tuple (deps, link_deps), where each is a list of
- filenames that will need to be put in front of make for either
- building (deps) or linking (link_deps).
- """
- deps = []
- link_deps = []
- if 'dependencies' in spec:
- deps.extend([target_outputs[dep] for dep in spec['dependencies']
- if target_outputs[dep]])
- for dep in spec['dependencies']:
- if dep in target_link_deps:
- link_deps.append(target_link_deps[dep])
- deps.extend(link_deps)
- return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps))
-
-
- def WriteTargetFlags(self, spec, configs, link_deps):
- """Write Makefile code to specify the link flags and library dependencies.
-
- spec, configs: input from gyp.
- link_deps: link dependency list; see ComputeDeps()
- """
- # Libraries (i.e. -lfoo)
- # These must be included even for static libraries as some of them provide
- # implicit include paths through the build system.
- libraries = gyp.common.uniquer(spec.get('libraries', []))
- static_libs, dynamic_libs, ldflags_libs = self.FilterLibraries(libraries)
-
- if self.type != 'static_library':
- for configname, config in sorted(configs.items()):
- ldflags = list(config.get('ldflags', []))
- self.WriteLn('')
- self.WriteList(ldflags, 'LOCAL_LDFLAGS_%s' % configname)
- self.WriteList(ldflags_libs, 'LOCAL_GYP_LIBS')
- self.WriteLn('LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) '
- '$(LOCAL_GYP_LIBS)')
-
- # Link dependencies (i.e. other gyp targets this target depends on)
- # These need not be included for static libraries as within the gyp build
- # we do not use the implicit include path mechanism.
- if self.type != 'static_library':
- static_link_deps = [x[1] for x in link_deps if x[0] == 'static']
- shared_link_deps = [x[1] for x in link_deps if x[0] == 'shared']
- else:
- static_link_deps = []
- shared_link_deps = []
-
- # Only write the lists if they are non-empty.
- if static_libs or static_link_deps:
- self.WriteLn('')
- self.WriteList(static_libs + static_link_deps,
- 'LOCAL_STATIC_LIBRARIES')
- self.WriteLn('# Enable grouping to fix circular references')
- self.WriteLn('LOCAL_GROUP_STATIC_LIBRARIES := true')
- if dynamic_libs or shared_link_deps:
- self.WriteLn('')
- self.WriteList(dynamic_libs + shared_link_deps,
- 'LOCAL_SHARED_LIBRARIES')
-
-
- def WriteTarget(self, spec, configs, deps, link_deps, part_of_all,
- write_alias_target):
- """Write Makefile code to produce the final target of the gyp spec.
-
- spec, configs: input from gyp.
- deps, link_deps: dependency lists; see ComputeDeps()
- part_of_all: flag indicating this target is part of 'all'
- write_alias_target: flag indicating whether to create short aliases for this
- target
- """
- self.WriteLn('### Rules for final target.')
-
- if self.type != 'none':
- self.WriteTargetFlags(spec, configs, link_deps)
-
- settings = spec.get('aosp_build_settings', {})
- if settings:
- self.WriteLn('### Set directly by aosp_build_settings.')
- for k, v in settings.items():
- if isinstance(v, list):
- self.WriteList(v, k)
- else:
- self.WriteLn('%s := %s' % (k, make.QuoteIfNecessary(v)))
- self.WriteLn('')
-
- # Add to the set of targets which represent the gyp 'all' target. We use the
- # name 'gyp_all_modules' as the Android build system doesn't allow the use
- # of the Make target 'all' and because 'all_modules' is the equivalent of
- # the Make target 'all' on Android.
- if part_of_all and write_alias_target:
- self.WriteLn('# Add target alias to "gyp_all_modules" target.')
- self.WriteLn('.PHONY: gyp_all_modules')
- self.WriteLn('gyp_all_modules: %s' % self.android_module)
- self.WriteLn('')
-
- # Add an alias from the gyp target name to the Android module name. This
- # simplifies manual builds of the target, and is required by the test
- # framework.
- if self.target != self.android_module and write_alias_target:
- self.WriteLn('# Alias gyp target name.')
- self.WriteLn('.PHONY: %s' % self.target)
- self.WriteLn('%s: %s' % (self.target, self.android_module))
- self.WriteLn('')
-
- # Add the command to trigger build of the target type depending
- # on the toolset. Ex: BUILD_STATIC_LIBRARY vs. BUILD_HOST_STATIC_LIBRARY
- # NOTE: This has to come last!
- modifier = ''
- if self.toolset == 'host':
- modifier = 'HOST_'
- if self.type == 'static_library':
- self.WriteLn('include $(BUILD_%sSTATIC_LIBRARY)' % modifier)
- elif self.type == 'shared_library':
- self.WriteLn('LOCAL_PRELINK_MODULE := false')
- self.WriteLn('include $(BUILD_%sSHARED_LIBRARY)' % modifier)
- elif self.type == 'executable':
- self.WriteLn('LOCAL_CXX_STL := libc++_static')
- # Executables are for build and test purposes only, so they're installed
- # to a directory that doesn't get included in the system image.
- self.WriteLn('LOCAL_MODULE_PATH := $(gyp_shared_intermediate_dir)')
- self.WriteLn('include $(BUILD_%sEXECUTABLE)' % modifier)
- else:
- self.WriteLn('LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp')
- self.WriteLn('LOCAL_UNINSTALLABLE_MODULE := true')
- if self.toolset == 'target':
- self.WriteLn('LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)')
- else:
- self.WriteLn('LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_HOST_VAR_PREFIX)')
- self.WriteLn()
- self.WriteLn('include $(BUILD_SYSTEM)/base_rules.mk')
- self.WriteLn()
- self.WriteLn('$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)')
- self.WriteLn('\t$(hide) echo "Gyp timestamp: $@"')
- self.WriteLn('\t$(hide) mkdir -p $(dir $@)')
- self.WriteLn('\t$(hide) touch $@')
- self.WriteLn()
- self.WriteLn('LOCAL_2ND_ARCH_VAR_PREFIX :=')
-
-
- def WriteList(self, value_list, variable=None, prefix='',
- quoter=make.QuoteIfNecessary, local_pathify=False):
- """Write a variable definition that is a list of values.
-
- E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out
- foo = blaha blahb
- but in a pretty-printed style.
- """
- values = ''
- if value_list:
- value_list = [quoter(prefix + l) for l in value_list]
- if local_pathify:
- value_list = [self.LocalPathify(l) for l in value_list]
- values = ' \\\n\t' + ' \\\n\t'.join(value_list)
- self.fp.write('%s :=%s\n\n' % (variable, values))
-
-
- def WriteLn(self, text=''):
- self.fp.write(text + '\n')
-
-
- def LocalPathify(self, path):
- """Convert a subdirectory-relative path into a normalized path which starts
- with the make variable $(LOCAL_PATH) (i.e. the top of the project tree).
- Absolute paths, or paths that contain variables, are just normalized."""
- if '$(' in path or os.path.isabs(path):
- # path is not a file in the project tree in this case, but calling
- # normpath is still important for trimming trailing slashes.
- return os.path.normpath(path)
- local_path = os.path.join('$(LOCAL_PATH)', self.path, path)
- local_path = os.path.normpath(local_path)
- # Check that normalizing the path didn't ../ itself out of $(LOCAL_PATH)
- # - i.e. that the resulting path is still inside the project tree. The
- # path may legitimately have ended up containing just $(LOCAL_PATH), though,
- # so we don't look for a slash.
- assert local_path.startswith('$(LOCAL_PATH)'), (
- 'Path %s attempts to escape from gyp path %s !)' % (path, self.path))
- return local_path
-
-
- def ExpandInputRoot(self, template, expansion, dirname):
- if '%(INPUT_ROOT)s' not in template and '%(INPUT_DIRNAME)s' not in template:
- return template
- path = template % {
- 'INPUT_ROOT': expansion,
- 'INPUT_DIRNAME': dirname,
- }
- return os.path.normpath(path)
-
-
-def PerformBuild(data, configurations, params):
- # The android backend only supports the default configuration.
- options = params['options']
- makefile = os.path.abspath(os.path.join(options.toplevel_dir,
- 'GypAndroid.mk'))
- env = dict(os.environ)
- env['ONE_SHOT_MAKEFILE'] = makefile
- arguments = ['make', '-C', os.environ['ANDROID_BUILD_TOP'], 'gyp_all_modules']
- print('Building: %s' % arguments)
- subprocess.check_call(arguments, env=env)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- options = params['options']
- generator_flags = params.get('generator_flags', {})
- builddir_name = generator_flags.get('output_dir', 'out')
- limit_to_target_all = generator_flags.get('limit_to_target_all', False)
- write_alias_targets = generator_flags.get('write_alias_targets', True)
- sdk_version = generator_flags.get('aosp_sdk_version', 0)
- android_top_dir = os.environ.get('ANDROID_BUILD_TOP')
- assert android_top_dir, '$ANDROID_BUILD_TOP not set; you need to run lunch.'
-
- def CalculateMakefilePath(build_file, base_name):
- """Determine where to write a Makefile for a given gyp file."""
- # Paths in gyp files are relative to the .gyp file, but we want
- # paths relative to the source root for the master makefile. Grab
- # the path of the .gyp file as the base to relativize against.
- # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp".
- base_path = gyp.common.RelativePath(os.path.dirname(build_file),
- options.depth)
- # We write the file in the base_path directory.
- output_file = os.path.join(options.depth, base_path, base_name)
- assert not options.generator_output, (
- 'The Android backend does not support options.generator_output.')
- base_path = gyp.common.RelativePath(os.path.dirname(build_file),
- options.toplevel_dir)
- return base_path, output_file
-
- # TODO: search for the first non-'Default' target. This can go
- # away when we add verification that all targets have the
- # necessary configurations.
- default_configuration = None
- toolsets = set([target_dicts[target]['toolset'] for target in target_list])
- for target in target_list:
- spec = target_dicts[target]
- if spec['default_configuration'] != 'Default':
- default_configuration = spec['default_configuration']
- break
- if not default_configuration:
- default_configuration = 'Default'
-
- srcdir = '.'
- makefile_name = 'GypAndroid' + options.suffix + '.mk'
- makefile_path = os.path.join(options.toplevel_dir, makefile_name)
- assert not options.generator_output, (
- 'The Android backend does not support options.generator_output.')
- gyp.common.EnsureDirExists(makefile_path)
- root_makefile = open(makefile_path, 'w')
-
- root_makefile.write(header)
-
- # We set LOCAL_PATH just once, here, to the top of the project tree. This
- # allows all the other paths we use to be relative to the Android.mk file,
- # as the Android build system expects.
- root_makefile.write('\nLOCAL_PATH := $(call my-dir)\n')
-
- # Find the list of targets that derive from the gyp file(s) being built.
- needed_targets = set()
- for build_file in params['build_files']:
- for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
- needed_targets.add(target)
-
- build_files = set()
- include_list = set()
- android_modules = {}
- for qualified_target in target_list:
- build_file, target, toolset = gyp.common.ParseQualifiedTarget(
- qualified_target)
- relative_build_file = gyp.common.RelativePath(build_file,
- options.toplevel_dir)
- build_files.add(relative_build_file)
- included_files = data[build_file]['included_files']
- for included_file in included_files:
- # The included_files entries are relative to the dir of the build file
- # that included them, so we have to undo that and then make them relative
- # to the root dir.
- relative_include_file = gyp.common.RelativePath(
- gyp.common.UnrelativePath(included_file, build_file),
- options.toplevel_dir)
- abs_include_file = os.path.abspath(relative_include_file)
- # If the include file is from the ~/.gyp dir, we should use absolute path
- # so that relocating the src dir doesn't break the path.
- if (params['home_dot_gyp'] and
- abs_include_file.startswith(params['home_dot_gyp'])):
- build_files.add(abs_include_file)
- else:
- build_files.add(relative_include_file)
-
- base_path, output_file = CalculateMakefilePath(build_file,
- target + '.' + toolset + options.suffix + '.mk')
-
- spec = target_dicts[qualified_target]
- configs = spec['configurations']
-
- part_of_all = qualified_target in needed_targets
- if limit_to_target_all and not part_of_all:
- continue
-
- relative_target = gyp.common.QualifiedTarget(relative_build_file, target,
- toolset)
- writer = AndroidMkWriter(android_top_dir)
- android_module = writer.Write(qualified_target, relative_target, base_path,
- output_file, spec, configs,
- part_of_all=part_of_all,
- write_alias_target=write_alias_targets,
- sdk_version=sdk_version)
- if android_module in android_modules:
- print('ERROR: Android module names must be unique. The following '
- 'targets both generate Android module name %s.\n %s\n %s' %
- (android_module, android_modules[android_module],
- qualified_target))
- return
- android_modules[android_module] = qualified_target
-
- # Our root_makefile lives at the source root. Compute the relative path
- # from there to the output_file for including.
- mkfile_rel_path = gyp.common.RelativePath(output_file,
- os.path.dirname(makefile_path))
- include_list.add(mkfile_rel_path)
-
- root_makefile.write('GYP_CONFIGURATION ?= %s\n' % default_configuration)
- root_makefile.write('GYP_VAR_PREFIX ?=\n')
- root_makefile.write('GYP_HOST_VAR_PREFIX ?=\n')
- root_makefile.write('GYP_HOST_MULTILIB ?= first\n')
-
- # Write out the sorted list of includes.
- root_makefile.write('\n')
- for include_file in sorted(include_list):
- root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n')
- root_makefile.write('\n')
-
- if write_alias_targets:
- root_makefile.write(ALL_MODULES_FOOTER)
-
- root_makefile.close()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
deleted file mode 100644
index 5601a6657..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
+++ /dev/null
@@ -1,1226 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""cmake output module
-
-This module is under development and should be considered experimental.
-
-This module produces cmake (2.8.8+) input as its output. One CMakeLists.txt is
-created for each configuration.
-
-This module's original purpose was to support editing in IDEs like KDevelop
-which use CMake for project management. It is also possible to use CMake to
-generate projects for other IDEs such as eclipse cdt and code::blocks. QtCreator
-will convert the CMakeLists.txt to a code::blocks cbp for the editor to read,
-but build using CMake. As a result QtCreator editor is unaware of compiler
-defines. The generated CMakeLists.txt can also be used to build on Linux. There
-is currently no support for building on platforms other than Linux.
-
-The generated CMakeLists.txt should properly compile all projects. However,
-there is a mismatch between gyp and cmake with regard to linking. All attempts
-are made to work around this, but CMake sometimes sees -Wl,--start-group as a
-library and incorrectly repeats it. As a result the output of this generator
-should not be relied on for building.
-
-When using with kdevelop, use version 4.4+. Previous versions of kdevelop will
-not be able to find the header file directories described in the generated
-CMakeLists.txt file.
-"""
-
-from __future__ import print_function
-
-import multiprocessing
-import os
-import signal
-import string
-import subprocess
-import gyp.common
-
-generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'STATIC_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
- 'SHARED_LIB_PREFIX': 'lib',
- 'SHARED_LIB_SUFFIX': '.so',
- 'SHARED_LIB_DIR': '${builddir}/lib.${TOOLSET}',
- 'LIB_DIR': '${obj}.${TOOLSET}',
- 'INTERMEDIATE_DIR': '${obj}.${TOOLSET}/${TARGET}/geni',
- 'SHARED_INTERMEDIATE_DIR': '${obj}/gen',
- 'PRODUCT_DIR': '${builddir}',
- 'RULE_INPUT_PATH': '${RULE_INPUT_PATH}',
- 'RULE_INPUT_DIRNAME': '${RULE_INPUT_DIRNAME}',
- 'RULE_INPUT_NAME': '${RULE_INPUT_NAME}',
- 'RULE_INPUT_ROOT': '${RULE_INPUT_ROOT}',
- 'RULE_INPUT_EXT': '${RULE_INPUT_EXT}',
- 'CONFIGURATION_NAME': '${configuration}',
-}
-
-FULL_PATH_VARS = ('${CMAKE_CURRENT_LIST_DIR}', '${builddir}', '${obj}')
-
-generator_supports_multiple_toolsets = True
-generator_wants_static_library_dependencies_adjusted = True
-
-COMPILABLE_EXTENSIONS = {
- '.c': 'cc',
- '.cc': 'cxx',
- '.cpp': 'cxx',
- '.cxx': 'cxx',
- '.s': 's', # cc
- '.S': 's', # cc
-}
-
-
-def RemovePrefix(a, prefix):
- """Returns 'a' without 'prefix' if it starts with 'prefix'."""
- return a[len(prefix):] if a.startswith(prefix) else a
-
-
-def CalculateVariables(default_variables, params):
- """Calculate additional variables for use in the build (called by gyp)."""
- default_variables.setdefault('OS', gyp.common.GetFlavor(params))
-
-
-def Compilable(filename):
- """Return true if the file is compilable (should be in OBJS)."""
- return any(filename.endswith(e) for e in COMPILABLE_EXTENSIONS)
-
-
-def Linkable(filename):
- """Return true if the file is linkable (should be on the link line)."""
- return filename.endswith('.o')
-
-
-def NormjoinPathForceCMakeSource(base_path, rel_path):
- """Resolves rel_path against base_path and returns the result.
-
- If rel_path is an absolute path it is returned unchanged.
- Otherwise it is resolved against base_path and normalized.
- If the result is a relative path, it is forced to be relative to the
- CMakeLists.txt.
- """
- if os.path.isabs(rel_path):
- return rel_path
- if any([rel_path.startswith(var) for var in FULL_PATH_VARS]):
- return rel_path
- # TODO: do we need to check base_path for absolute variables as well?
- return os.path.join('${CMAKE_CURRENT_LIST_DIR}',
- os.path.normpath(os.path.join(base_path, rel_path)))
-
-
-def NormjoinPath(base_path, rel_path):
- """Resolves rel_path against base_path and returns the result.
- TODO: what is this really used for?
- If rel_path begins with '$' it is returned unchanged.
- Otherwise it is resolved against base_path if relative, then normalized.
- """
- if rel_path.startswith('$') and not rel_path.startswith('${configuration}'):
- return rel_path
- return os.path.normpath(os.path.join(base_path, rel_path))
-
-
-def CMakeStringEscape(a):
- """Escapes the string 'a' for use inside a CMake string.
-
- This means escaping
- '\' otherwise it may be seen as modifying the next character
- '"' otherwise it will end the string
- ';' otherwise the string becomes a list
-
- The following do not need to be escaped
- '#' when the lexer is in string state, this does not start a comment
-
- The following are yet unknown
- '$' generator variables (like ${obj}) must not be escaped,
- but text $ should be escaped
- what is wanted is to know which $ come from generator variables
- """
- return a.replace('\\', '\\\\').replace(';', '\\;').replace('"', '\\"')
-
-
-def SetFileProperty(output, source_name, property_name, values, sep):
- """Given a set of source file, sets the given property on them."""
- output.write('set_source_files_properties(')
- output.write(source_name)
- output.write(' PROPERTIES ')
- output.write(property_name)
- output.write(' "')
- for value in values:
- output.write(CMakeStringEscape(value))
- output.write(sep)
- output.write('")\n')
-
-
-def SetFilesProperty(output, variable, property_name, values, sep):
- """Given a set of source files, sets the given property on them."""
- output.write('set_source_files_properties(')
- WriteVariable(output, variable)
- output.write(' PROPERTIES ')
- output.write(property_name)
- output.write(' "')
- for value in values:
- output.write(CMakeStringEscape(value))
- output.write(sep)
- output.write('")\n')
-
-
-def SetTargetProperty(output, target_name, property_name, values, sep=''):
- """Given a target, sets the given property."""
- output.write('set_target_properties(')
- output.write(target_name)
- output.write(' PROPERTIES ')
- output.write(property_name)
- output.write(' "')
- for value in values:
- output.write(CMakeStringEscape(value))
- output.write(sep)
- output.write('")\n')
-
-
-def SetVariable(output, variable_name, value):
- """Sets a CMake variable."""
- output.write('set(')
- output.write(variable_name)
- output.write(' "')
- output.write(CMakeStringEscape(value))
- output.write('")\n')
-
-
-def SetVariableList(output, variable_name, values):
- """Sets a CMake variable to a list."""
- if not values:
- return SetVariable(output, variable_name, "")
- if len(values) == 1:
- return SetVariable(output, variable_name, values[0])
- output.write('list(APPEND ')
- output.write(variable_name)
- output.write('\n "')
- output.write('"\n "'.join([CMakeStringEscape(value) for value in values]))
- output.write('")\n')
-
-
-def UnsetVariable(output, variable_name):
- """Unsets a CMake variable."""
- output.write('unset(')
- output.write(variable_name)
- output.write(')\n')
-
-
-def WriteVariable(output, variable_name, prepend=None):
- if prepend:
- output.write(prepend)
- output.write('${')
- output.write(variable_name)
- output.write('}')
-
-
-class CMakeTargetType(object):
- def __init__(self, command, modifier, property_modifier):
- self.command = command
- self.modifier = modifier
- self.property_modifier = property_modifier
-
-
-cmake_target_type_from_gyp_target_type = {
- 'executable': CMakeTargetType('add_executable', None, 'RUNTIME'),
- 'static_library': CMakeTargetType('add_library', 'STATIC', 'ARCHIVE'),
- 'shared_library': CMakeTargetType('add_library', 'SHARED', 'LIBRARY'),
- 'loadable_module': CMakeTargetType('add_library', 'MODULE', 'LIBRARY'),
- 'none': CMakeTargetType('add_custom_target', 'SOURCES', None),
-}
-
-
-def StringToCMakeTargetName(a):
- """Converts the given string 'a' to a valid CMake target name.
-
- All invalid characters are replaced by '_'.
- Invalid for cmake: ' ', '/', '(', ')', '"'
- Invalid for make: ':'
- Invalid for unknown reasons but cause failures: '.'
- """
- try:
- return a.translate(str.maketrans(' /():."', '_______'))
- except AttributeError:
- return a.translate(string.maketrans(' /():."', '_______'))
-
-
-def WriteActions(target_name, actions, extra_sources, extra_deps,
- path_to_gyp, output):
- """Write CMake for the 'actions' in the target.
-
- Args:
- target_name: the name of the CMake target being generated.
- actions: the Gyp 'actions' dict for this target.
- extra_sources: [(<cmake_src>, <src>)] to append with generated source files.
- extra_deps: [<cmake_taget>] to append with generated targets.
- path_to_gyp: relative path from CMakeLists.txt being generated to
- the Gyp file in which the target being generated is defined.
- """
- for action in actions:
- action_name = StringToCMakeTargetName(action['action_name'])
- action_target_name = '%s__%s' % (target_name, action_name)
-
- inputs = action['inputs']
- inputs_name = action_target_name + '__input'
- SetVariableList(output, inputs_name,
- [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs])
-
- outputs = action['outputs']
- cmake_outputs = [NormjoinPathForceCMakeSource(path_to_gyp, out)
- for out in outputs]
- outputs_name = action_target_name + '__output'
- SetVariableList(output, outputs_name, cmake_outputs)
-
- # Build up a list of outputs.
- # Collect the output dirs we'll need.
- dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
-
- if int(action.get('process_outputs_as_sources', False)):
- extra_sources.extend(zip(cmake_outputs, outputs))
-
- # add_custom_command
- output.write('add_custom_command(OUTPUT ')
- WriteVariable(output, outputs_name)
- output.write('\n')
-
- if len(dirs) > 0:
- for directory in dirs:
- output.write(' COMMAND ${CMAKE_COMMAND} -E make_directory ')
- output.write(directory)
- output.write('\n')
-
- output.write(' COMMAND ')
- output.write(gyp.common.EncodePOSIXShellList(action['action']))
- output.write('\n')
-
- output.write(' DEPENDS ')
- WriteVariable(output, inputs_name)
- output.write('\n')
-
- output.write(' WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/')
- output.write(path_to_gyp)
- output.write('\n')
-
- output.write(' COMMENT ')
- if 'message' in action:
- output.write(action['message'])
- else:
- output.write(action_target_name)
- output.write('\n')
-
- output.write(' VERBATIM\n')
- output.write(')\n')
-
- # add_custom_target
- output.write('add_custom_target(')
- output.write(action_target_name)
- output.write('\n DEPENDS ')
- WriteVariable(output, outputs_name)
- output.write('\n SOURCES ')
- WriteVariable(output, inputs_name)
- output.write('\n)\n')
-
- extra_deps.append(action_target_name)
-
-
-def NormjoinRulePathForceCMakeSource(base_path, rel_path, rule_source):
- if rel_path.startswith(("${RULE_INPUT_PATH}","${RULE_INPUT_DIRNAME}")):
- if any([rule_source.startswith(var) for var in FULL_PATH_VARS]):
- return rel_path
- return NormjoinPathForceCMakeSource(base_path, rel_path)
-
-
-def WriteRules(target_name, rules, extra_sources, extra_deps,
- path_to_gyp, output):
- """Write CMake for the 'rules' in the target.
-
- Args:
- target_name: the name of the CMake target being generated.
- actions: the Gyp 'actions' dict for this target.
- extra_sources: [(<cmake_src>, <src>)] to append with generated source files.
- extra_deps: [<cmake_taget>] to append with generated targets.
- path_to_gyp: relative path from CMakeLists.txt being generated to
- the Gyp file in which the target being generated is defined.
- """
- for rule in rules:
- rule_name = StringToCMakeTargetName(target_name + '__' + rule['rule_name'])
-
- inputs = rule.get('inputs', [])
- inputs_name = rule_name + '__input'
- SetVariableList(output, inputs_name,
- [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs])
- outputs = rule['outputs']
- var_outputs = []
-
- for count, rule_source in enumerate(rule.get('rule_sources', [])):
- action_name = rule_name + '_' + str(count)
-
- rule_source_dirname, rule_source_basename = os.path.split(rule_source)
- rule_source_root, rule_source_ext = os.path.splitext(rule_source_basename)
-
- SetVariable(output, 'RULE_INPUT_PATH', rule_source)
- SetVariable(output, 'RULE_INPUT_DIRNAME', rule_source_dirname)
- SetVariable(output, 'RULE_INPUT_NAME', rule_source_basename)
- SetVariable(output, 'RULE_INPUT_ROOT', rule_source_root)
- SetVariable(output, 'RULE_INPUT_EXT', rule_source_ext)
-
- # Build up a list of outputs.
- # Collect the output dirs we'll need.
- dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
-
- # Create variables for the output, as 'local' variable will be unset.
- these_outputs = []
- for output_index, out in enumerate(outputs):
- output_name = action_name + '_' + str(output_index)
- SetVariable(output, output_name,
- NormjoinRulePathForceCMakeSource(path_to_gyp, out,
- rule_source))
- if int(rule.get('process_outputs_as_sources', False)):
- extra_sources.append(('${' + output_name + '}', out))
- these_outputs.append('${' + output_name + '}')
- var_outputs.append('${' + output_name + '}')
-
- # add_custom_command
- output.write('add_custom_command(OUTPUT\n')
- for out in these_outputs:
- output.write(' ')
- output.write(out)
- output.write('\n')
-
- for directory in dirs:
- output.write(' COMMAND ${CMAKE_COMMAND} -E make_directory ')
- output.write(directory)
- output.write('\n')
-
- output.write(' COMMAND ')
- output.write(gyp.common.EncodePOSIXShellList(rule['action']))
- output.write('\n')
-
- output.write(' DEPENDS ')
- WriteVariable(output, inputs_name)
- output.write(' ')
- output.write(NormjoinPath(path_to_gyp, rule_source))
- output.write('\n')
-
- # CMAKE_CURRENT_LIST_DIR is where the CMakeLists.txt lives.
- # The cwd is the current build directory.
- output.write(' WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/')
- output.write(path_to_gyp)
- output.write('\n')
-
- output.write(' COMMENT ')
- if 'message' in rule:
- output.write(rule['message'])
- else:
- output.write(action_name)
- output.write('\n')
-
- output.write(' VERBATIM\n')
- output.write(')\n')
-
- UnsetVariable(output, 'RULE_INPUT_PATH')
- UnsetVariable(output, 'RULE_INPUT_DIRNAME')
- UnsetVariable(output, 'RULE_INPUT_NAME')
- UnsetVariable(output, 'RULE_INPUT_ROOT')
- UnsetVariable(output, 'RULE_INPUT_EXT')
-
- # add_custom_target
- output.write('add_custom_target(')
- output.write(rule_name)
- output.write(' DEPENDS\n')
- for out in var_outputs:
- output.write(' ')
- output.write(out)
- output.write('\n')
- output.write('SOURCES ')
- WriteVariable(output, inputs_name)
- output.write('\n')
- for rule_source in rule.get('rule_sources', []):
- output.write(' ')
- output.write(NormjoinPath(path_to_gyp, rule_source))
- output.write('\n')
- output.write(')\n')
-
- extra_deps.append(rule_name)
-
-
-def WriteCopies(target_name, copies, extra_deps, path_to_gyp, output):
- """Write CMake for the 'copies' in the target.
-
- Args:
- target_name: the name of the CMake target being generated.
- actions: the Gyp 'actions' dict for this target.
- extra_deps: [<cmake_taget>] to append with generated targets.
- path_to_gyp: relative path from CMakeLists.txt being generated to
- the Gyp file in which the target being generated is defined.
- """
- copy_name = target_name + '__copies'
-
- # CMake gets upset with custom targets with OUTPUT which specify no output.
- have_copies = any(copy['files'] for copy in copies)
- if not have_copies:
- output.write('add_custom_target(')
- output.write(copy_name)
- output.write(')\n')
- extra_deps.append(copy_name)
- return
-
- class Copy(object):
- def __init__(self, ext, command):
- self.cmake_inputs = []
- self.cmake_outputs = []
- self.gyp_inputs = []
- self.gyp_outputs = []
- self.ext = ext
- self.inputs_name = None
- self.outputs_name = None
- self.command = command
-
- file_copy = Copy('', 'copy')
- dir_copy = Copy('_dirs', 'copy_directory')
-
- for copy in copies:
- files = copy['files']
- destination = copy['destination']
- for src in files:
- path = os.path.normpath(src)
- basename = os.path.split(path)[1]
- dst = os.path.join(destination, basename)
-
- copy = file_copy if os.path.basename(src) else dir_copy
-
- copy.cmake_inputs.append(NormjoinPathForceCMakeSource(path_to_gyp, src))
- copy.cmake_outputs.append(NormjoinPathForceCMakeSource(path_to_gyp, dst))
- copy.gyp_inputs.append(src)
- copy.gyp_outputs.append(dst)
-
- for copy in (file_copy, dir_copy):
- if copy.cmake_inputs:
- copy.inputs_name = copy_name + '__input' + copy.ext
- SetVariableList(output, copy.inputs_name, copy.cmake_inputs)
-
- copy.outputs_name = copy_name + '__output' + copy.ext
- SetVariableList(output, copy.outputs_name, copy.cmake_outputs)
-
- # add_custom_command
- output.write('add_custom_command(\n')
-
- output.write('OUTPUT')
- for copy in (file_copy, dir_copy):
- if copy.outputs_name:
- WriteVariable(output, copy.outputs_name, ' ')
- output.write('\n')
-
- for copy in (file_copy, dir_copy):
- for src, dst in zip(copy.gyp_inputs, copy.gyp_outputs):
- # 'cmake -E copy src dst' will create the 'dst' directory if needed.
- output.write('COMMAND ${CMAKE_COMMAND} -E %s ' % copy.command)
- output.write(src)
- output.write(' ')
- output.write(dst)
- output.write("\n")
-
- output.write('DEPENDS')
- for copy in (file_copy, dir_copy):
- if copy.inputs_name:
- WriteVariable(output, copy.inputs_name, ' ')
- output.write('\n')
-
- output.write('WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/')
- output.write(path_to_gyp)
- output.write('\n')
-
- output.write('COMMENT Copying for ')
- output.write(target_name)
- output.write('\n')
-
- output.write('VERBATIM\n')
- output.write(')\n')
-
- # add_custom_target
- output.write('add_custom_target(')
- output.write(copy_name)
- output.write('\n DEPENDS')
- for copy in (file_copy, dir_copy):
- if copy.outputs_name:
- WriteVariable(output, copy.outputs_name, ' ')
- output.write('\n SOURCES')
- if file_copy.inputs_name:
- WriteVariable(output, file_copy.inputs_name, ' ')
- output.write('\n)\n')
-
- extra_deps.append(copy_name)
-
-
-def CreateCMakeTargetBaseName(qualified_target):
- """This is the name we would like the target to have."""
- _, gyp_target_name, gyp_target_toolset = (
- gyp.common.ParseQualifiedTarget(qualified_target))
- cmake_target_base_name = gyp_target_name
- if gyp_target_toolset and gyp_target_toolset != 'target':
- cmake_target_base_name += '_' + gyp_target_toolset
- return StringToCMakeTargetName(cmake_target_base_name)
-
-
-def CreateCMakeTargetFullName(qualified_target):
- """An unambiguous name for the target."""
- gyp_file, gyp_target_name, gyp_target_toolset = (
- gyp.common.ParseQualifiedTarget(qualified_target))
- cmake_target_full_name = gyp_file + ':' + gyp_target_name
- if gyp_target_toolset and gyp_target_toolset != 'target':
- cmake_target_full_name += '_' + gyp_target_toolset
- return StringToCMakeTargetName(cmake_target_full_name)
-
-
-class CMakeNamer(object):
- """Converts Gyp target names into CMake target names.
-
- CMake requires that target names be globally unique. One way to ensure
- this is to fully qualify the names of the targets. Unfortunately, this
- ends up with all targets looking like "chrome_chrome_gyp_chrome" instead
- of just "chrome". If this generator were only interested in building, it
- would be possible to fully qualify all target names, then create
- unqualified target names which depend on all qualified targets which
- should have had that name. This is more or less what the 'make' generator
- does with aliases. However, one goal of this generator is to create CMake
- files for use with IDEs, and fully qualified names are not as user
- friendly.
-
- Since target name collision is rare, we do the above only when required.
-
- Toolset variants are always qualified from the base, as this is required for
- building. However, it also makes sense for an IDE, as it is possible for
- defines to be different.
- """
- def __init__(self, target_list):
- self.cmake_target_base_names_conficting = set()
-
- cmake_target_base_names_seen = set()
- for qualified_target in target_list:
- cmake_target_base_name = CreateCMakeTargetBaseName(qualified_target)
-
- if cmake_target_base_name not in cmake_target_base_names_seen:
- cmake_target_base_names_seen.add(cmake_target_base_name)
- else:
- self.cmake_target_base_names_conficting.add(cmake_target_base_name)
-
- def CreateCMakeTargetName(self, qualified_target):
- base_name = CreateCMakeTargetBaseName(qualified_target)
- if base_name in self.cmake_target_base_names_conficting:
- return CreateCMakeTargetFullName(qualified_target)
- return base_name
-
-
-def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
- options, generator_flags, all_qualified_targets, output):
-
- # The make generator does this always.
- # TODO: It would be nice to be able to tell CMake all dependencies.
- circular_libs = generator_flags.get('circular', True)
-
- if not generator_flags.get('standalone', False):
- output.write('\n#')
- output.write(qualified_target)
- output.write('\n')
-
- gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target)
- rel_gyp_file = gyp.common.RelativePath(gyp_file, options.toplevel_dir)
- rel_gyp_dir = os.path.dirname(rel_gyp_file)
-
- # Relative path from build dir to top dir.
- build_to_top = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir)
- # Relative path from build dir to gyp dir.
- build_to_gyp = os.path.join(build_to_top, rel_gyp_dir)
-
- path_from_cmakelists_to_gyp = build_to_gyp
-
- spec = target_dicts.get(qualified_target, {})
- config = spec.get('configurations', {}).get(config_to_use, {})
-
- target_name = spec.get('target_name', '<missing target name>')
- target_type = spec.get('type', '<missing target type>')
- target_toolset = spec.get('toolset')
-
- cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type)
- if cmake_target_type is None:
- print('Target %s has unknown target type %s, skipping.' %
- ( target_name, target_type ))
- return
-
- SetVariable(output, 'TARGET', target_name)
- SetVariable(output, 'TOOLSET', target_toolset)
-
- cmake_target_name = namer.CreateCMakeTargetName(qualified_target)
-
- extra_sources = []
- extra_deps = []
-
- # Actions must come first, since they can generate more OBJs for use below.
- if 'actions' in spec:
- WriteActions(cmake_target_name, spec['actions'], extra_sources, extra_deps,
- path_from_cmakelists_to_gyp, output)
-
- # Rules must be early like actions.
- if 'rules' in spec:
- WriteRules(cmake_target_name, spec['rules'], extra_sources, extra_deps,
- path_from_cmakelists_to_gyp, output)
-
- # Copies
- if 'copies' in spec:
- WriteCopies(cmake_target_name, spec['copies'], extra_deps,
- path_from_cmakelists_to_gyp, output)
-
- # Target and sources
- srcs = spec.get('sources', [])
-
- # Gyp separates the sheep from the goats based on file extensions.
- # A full separation is done here because of flag handing (see below).
- s_sources = []
- c_sources = []
- cxx_sources = []
- linkable_sources = []
- other_sources = []
- for src in srcs:
- _, ext = os.path.splitext(src)
- src_type = COMPILABLE_EXTENSIONS.get(ext, None)
- src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src)
-
- if src_type == 's':
- s_sources.append(src_norm_path)
- elif src_type == 'cc':
- c_sources.append(src_norm_path)
- elif src_type == 'cxx':
- cxx_sources.append(src_norm_path)
- elif Linkable(ext):
- linkable_sources.append(src_norm_path)
- else:
- other_sources.append(src_norm_path)
-
- for extra_source in extra_sources:
- src, real_source = extra_source
- _, ext = os.path.splitext(real_source)
- src_type = COMPILABLE_EXTENSIONS.get(ext, None)
-
- if src_type == 's':
- s_sources.append(src)
- elif src_type == 'cc':
- c_sources.append(src)
- elif src_type == 'cxx':
- cxx_sources.append(src)
- elif Linkable(ext):
- linkable_sources.append(src)
- else:
- other_sources.append(src)
-
- s_sources_name = None
- if s_sources:
- s_sources_name = cmake_target_name + '__asm_srcs'
- SetVariableList(output, s_sources_name, s_sources)
-
- c_sources_name = None
- if c_sources:
- c_sources_name = cmake_target_name + '__c_srcs'
- SetVariableList(output, c_sources_name, c_sources)
-
- cxx_sources_name = None
- if cxx_sources:
- cxx_sources_name = cmake_target_name + '__cxx_srcs'
- SetVariableList(output, cxx_sources_name, cxx_sources)
-
- linkable_sources_name = None
- if linkable_sources:
- linkable_sources_name = cmake_target_name + '__linkable_srcs'
- SetVariableList(output, linkable_sources_name, linkable_sources)
-
- other_sources_name = None
- if other_sources:
- other_sources_name = cmake_target_name + '__other_srcs'
- SetVariableList(output, other_sources_name, other_sources)
-
- # CMake gets upset when executable targets provide no sources.
- # http://www.cmake.org/pipermail/cmake/2010-July/038461.html
- dummy_sources_name = None
- has_sources = (s_sources_name or
- c_sources_name or
- cxx_sources_name or
- linkable_sources_name or
- other_sources_name)
- if target_type == 'executable' and not has_sources:
- dummy_sources_name = cmake_target_name + '__dummy_srcs'
- SetVariable(output, dummy_sources_name,
- "${obj}.${TOOLSET}/${TARGET}/genc/dummy.c")
- output.write('if(NOT EXISTS "')
- WriteVariable(output, dummy_sources_name)
- output.write('")\n')
- output.write(' file(WRITE "')
- WriteVariable(output, dummy_sources_name)
- output.write('" "")\n')
- output.write("endif()\n")
-
-
- # CMake is opposed to setting linker directories and considers the practice
- # of setting linker directories dangerous. Instead, it favors the use of
- # find_library and passing absolute paths to target_link_libraries.
- # However, CMake does provide the command link_directories, which adds
- # link directories to targets defined after it is called.
- # As a result, link_directories must come before the target definition.
- # CMake unfortunately has no means of removing entries from LINK_DIRECTORIES.
- library_dirs = config.get('library_dirs')
- if library_dirs is not None:
- output.write('link_directories(')
- for library_dir in library_dirs:
- output.write(' ')
- output.write(NormjoinPath(path_from_cmakelists_to_gyp, library_dir))
- output.write('\n')
- output.write(')\n')
-
- output.write(cmake_target_type.command)
- output.write('(')
- output.write(cmake_target_name)
-
- if cmake_target_type.modifier is not None:
- output.write(' ')
- output.write(cmake_target_type.modifier)
-
- if s_sources_name:
- WriteVariable(output, s_sources_name, ' ')
- if c_sources_name:
- WriteVariable(output, c_sources_name, ' ')
- if cxx_sources_name:
- WriteVariable(output, cxx_sources_name, ' ')
- if linkable_sources_name:
- WriteVariable(output, linkable_sources_name, ' ')
- if other_sources_name:
- WriteVariable(output, other_sources_name, ' ')
- if dummy_sources_name:
- WriteVariable(output, dummy_sources_name, ' ')
-
- output.write(')\n')
-
- # Let CMake know if the 'all' target should depend on this target.
- exclude_from_all = ('TRUE' if qualified_target not in all_qualified_targets
- else 'FALSE')
- SetTargetProperty(output, cmake_target_name,
- 'EXCLUDE_FROM_ALL', exclude_from_all)
- for extra_target_name in extra_deps:
- SetTargetProperty(output, extra_target_name,
- 'EXCLUDE_FROM_ALL', exclude_from_all)
-
- # Output name and location.
- if target_type != 'none':
- # Link as 'C' if there are no other files
- if not c_sources and not cxx_sources:
- SetTargetProperty(output, cmake_target_name, 'LINKER_LANGUAGE', ['C'])
-
- # Mark uncompiled sources as uncompiled.
- if other_sources_name:
- output.write('set_source_files_properties(')
- WriteVariable(output, other_sources_name, '')
- output.write(' PROPERTIES HEADER_FILE_ONLY "TRUE")\n')
-
- # Mark object sources as linkable.
- if linkable_sources_name:
- output.write('set_source_files_properties(')
- WriteVariable(output, other_sources_name, '')
- output.write(' PROPERTIES EXTERNAL_OBJECT "TRUE")\n')
-
- # Output directory
- target_output_directory = spec.get('product_dir')
- if target_output_directory is None:
- if target_type in ('executable', 'loadable_module'):
- target_output_directory = generator_default_variables['PRODUCT_DIR']
- elif target_type == 'shared_library':
- target_output_directory = '${builddir}/lib.${TOOLSET}'
- elif spec.get('standalone_static_library', False):
- target_output_directory = generator_default_variables['PRODUCT_DIR']
- else:
- base_path = gyp.common.RelativePath(os.path.dirname(gyp_file),
- options.toplevel_dir)
- target_output_directory = '${obj}.${TOOLSET}'
- target_output_directory = (
- os.path.join(target_output_directory, base_path))
-
- cmake_target_output_directory = NormjoinPathForceCMakeSource(
- path_from_cmakelists_to_gyp,
- target_output_directory)
- SetTargetProperty(output,
- cmake_target_name,
- cmake_target_type.property_modifier + '_OUTPUT_DIRECTORY',
- cmake_target_output_directory)
-
- # Output name
- default_product_prefix = ''
- default_product_name = target_name
- default_product_ext = ''
- if target_type == 'static_library':
- static_library_prefix = generator_default_variables['STATIC_LIB_PREFIX']
- default_product_name = RemovePrefix(default_product_name,
- static_library_prefix)
- default_product_prefix = static_library_prefix
- default_product_ext = generator_default_variables['STATIC_LIB_SUFFIX']
-
- elif target_type in ('loadable_module', 'shared_library'):
- shared_library_prefix = generator_default_variables['SHARED_LIB_PREFIX']
- default_product_name = RemovePrefix(default_product_name,
- shared_library_prefix)
- default_product_prefix = shared_library_prefix
- default_product_ext = generator_default_variables['SHARED_LIB_SUFFIX']
-
- elif target_type != 'executable':
- print('ERROR: What output file should be generated?',
- 'type', target_type, 'target', target_name)
-
- product_prefix = spec.get('product_prefix', default_product_prefix)
- product_name = spec.get('product_name', default_product_name)
- product_ext = spec.get('product_extension')
- if product_ext:
- product_ext = '.' + product_ext
- else:
- product_ext = default_product_ext
-
- SetTargetProperty(output, cmake_target_name, 'PREFIX', product_prefix)
- SetTargetProperty(output, cmake_target_name,
- cmake_target_type.property_modifier + '_OUTPUT_NAME',
- product_name)
- SetTargetProperty(output, cmake_target_name, 'SUFFIX', product_ext)
-
- # Make the output of this target referenceable as a source.
- cmake_target_output_basename = product_prefix + product_name + product_ext
- cmake_target_output = os.path.join(cmake_target_output_directory,
- cmake_target_output_basename)
- SetFileProperty(output, cmake_target_output, 'GENERATED', ['TRUE'], '')
-
- # Includes
- includes = config.get('include_dirs')
- if includes:
- # This (target include directories) is what requires CMake 2.8.8
- includes_name = cmake_target_name + '__include_dirs'
- SetVariableList(output, includes_name,
- [NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, include)
- for include in includes])
- output.write('set_property(TARGET ')
- output.write(cmake_target_name)
- output.write(' APPEND PROPERTY INCLUDE_DIRECTORIES ')
- WriteVariable(output, includes_name, '')
- output.write(')\n')
-
- # Defines
- defines = config.get('defines')
- if defines is not None:
- SetTargetProperty(output,
- cmake_target_name,
- 'COMPILE_DEFINITIONS',
- defines,
- ';')
-
- # Compile Flags - http://www.cmake.org/Bug/view.php?id=6493
- # CMake currently does not have target C and CXX flags.
- # So, instead of doing...
-
- # cflags_c = config.get('cflags_c')
- # if cflags_c is not None:
- # SetTargetProperty(output, cmake_target_name,
- # 'C_COMPILE_FLAGS', cflags_c, ' ')
-
- # cflags_cc = config.get('cflags_cc')
- # if cflags_cc is not None:
- # SetTargetProperty(output, cmake_target_name,
- # 'CXX_COMPILE_FLAGS', cflags_cc, ' ')
-
- # Instead we must...
- cflags = config.get('cflags', [])
- cflags_c = config.get('cflags_c', [])
- cflags_cxx = config.get('cflags_cc', [])
- if (not cflags_c or not c_sources) and (not cflags_cxx or not cxx_sources):
- SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', cflags, ' ')
-
- elif c_sources and not (s_sources or cxx_sources):
- flags = []
- flags.extend(cflags)
- flags.extend(cflags_c)
- SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ')
-
- elif cxx_sources and not (s_sources or c_sources):
- flags = []
- flags.extend(cflags)
- flags.extend(cflags_cxx)
- SetTargetProperty(output, cmake_target_name, 'COMPILE_FLAGS', flags, ' ')
-
- else:
- # TODO: This is broken, one cannot generally set properties on files,
- # as other targets may require different properties on the same files.
- if s_sources and cflags:
- SetFilesProperty(output, s_sources_name, 'COMPILE_FLAGS', cflags, ' ')
-
- if c_sources and (cflags or cflags_c):
- flags = []
- flags.extend(cflags)
- flags.extend(cflags_c)
- SetFilesProperty(output, c_sources_name, 'COMPILE_FLAGS', flags, ' ')
-
- if cxx_sources and (cflags or cflags_cxx):
- flags = []
- flags.extend(cflags)
- flags.extend(cflags_cxx)
- SetFilesProperty(output, cxx_sources_name, 'COMPILE_FLAGS', flags, ' ')
-
- # Linker flags
- ldflags = config.get('ldflags')
- if ldflags is not None:
- SetTargetProperty(output, cmake_target_name, 'LINK_FLAGS', ldflags, ' ')
-
- # Note on Dependencies and Libraries:
- # CMake wants to handle link order, resolving the link line up front.
- # Gyp does not retain or enforce specifying enough information to do so.
- # So do as other gyp generators and use --start-group and --end-group.
- # Give CMake as little information as possible so that it doesn't mess it up.
-
- # Dependencies
- rawDeps = spec.get('dependencies', [])
-
- static_deps = []
- shared_deps = []
- other_deps = []
- for rawDep in rawDeps:
- dep_cmake_name = namer.CreateCMakeTargetName(rawDep)
- dep_spec = target_dicts.get(rawDep, {})
- dep_target_type = dep_spec.get('type', None)
-
- if dep_target_type == 'static_library':
- static_deps.append(dep_cmake_name)
- elif dep_target_type == 'shared_library':
- shared_deps.append(dep_cmake_name)
- else:
- other_deps.append(dep_cmake_name)
-
- # ensure all external dependencies are complete before internal dependencies
- # extra_deps currently only depend on their own deps, so otherwise run early
- if static_deps or shared_deps or other_deps:
- for extra_dep in extra_deps:
- output.write('add_dependencies(')
- output.write(extra_dep)
- output.write('\n')
- for deps in (static_deps, shared_deps, other_deps):
- for dep in gyp.common.uniquer(deps):
- output.write(' ')
- output.write(dep)
- output.write('\n')
- output.write(')\n')
-
- linkable = target_type in ('executable', 'loadable_module', 'shared_library')
- other_deps.extend(extra_deps)
- if other_deps or (not linkable and (static_deps or shared_deps)):
- output.write('add_dependencies(')
- output.write(cmake_target_name)
- output.write('\n')
- for dep in gyp.common.uniquer(other_deps):
- output.write(' ')
- output.write(dep)
- output.write('\n')
- if not linkable:
- for deps in (static_deps, shared_deps):
- for lib_dep in gyp.common.uniquer(deps):
- output.write(' ')
- output.write(lib_dep)
- output.write('\n')
- output.write(')\n')
-
- # Libraries
- if linkable:
- external_libs = [lib for lib in spec.get('libraries', []) if len(lib) > 0]
- if external_libs or static_deps or shared_deps:
- output.write('target_link_libraries(')
- output.write(cmake_target_name)
- output.write('\n')
- if static_deps:
- write_group = circular_libs and len(static_deps) > 1
- if write_group:
- output.write('-Wl,--start-group\n')
- for dep in gyp.common.uniquer(static_deps):
- output.write(' ')
- output.write(dep)
- output.write('\n')
- if write_group:
- output.write('-Wl,--end-group\n')
- if shared_deps:
- for dep in gyp.common.uniquer(shared_deps):
- output.write(' ')
- output.write(dep)
- output.write('\n')
- if external_libs:
- for lib in gyp.common.uniquer(external_libs):
- output.write(' ')
- output.write(lib)
- output.write('\n')
-
- output.write(')\n')
-
- UnsetVariable(output, 'TOOLSET')
- UnsetVariable(output, 'TARGET')
-
-
-def GenerateOutputForConfig(target_list, target_dicts, data,
- params, config_to_use):
- options = params['options']
- generator_flags = params['generator_flags']
-
- # generator_dir: relative path from pwd to where make puts build files.
- # Makes migrating from make to cmake easier, cmake doesn't put anything here.
- # Each Gyp configuration creates a different CMakeLists.txt file
- # to avoid incompatibilities between Gyp and CMake configurations.
- generator_dir = os.path.relpath(options.generator_output or '.')
-
- # output_dir: relative path from generator_dir to the build directory.
- output_dir = generator_flags.get('output_dir', 'out')
-
- # build_dir: relative path from source root to our output files.
- # e.g. "out/Debug"
- build_dir = os.path.normpath(os.path.join(generator_dir,
- output_dir,
- config_to_use))
-
- toplevel_build = os.path.join(options.toplevel_dir, build_dir)
-
- output_file = os.path.join(toplevel_build, 'CMakeLists.txt')
- gyp.common.EnsureDirExists(output_file)
-
- output = open(output_file, 'w')
- output.write('cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n')
- output.write('cmake_policy(VERSION 2.8.8)\n')
-
- gyp_file, project_target, _ = gyp.common.ParseQualifiedTarget(target_list[-1])
- output.write('project(')
- output.write(project_target)
- output.write(')\n')
-
- SetVariable(output, 'configuration', config_to_use)
-
- ar = None
- cc = None
- cxx = None
-
- make_global_settings = data[gyp_file].get('make_global_settings', [])
- build_to_top = gyp.common.InvertRelativePath(build_dir,
- options.toplevel_dir)
- for key, value in make_global_settings:
- if key == 'AR':
- ar = os.path.join(build_to_top, value)
- if key == 'CC':
- cc = os.path.join(build_to_top, value)
- if key == 'CXX':
- cxx = os.path.join(build_to_top, value)
-
- ar = gyp.common.GetEnvironFallback(['AR_target', 'AR'], ar)
- cc = gyp.common.GetEnvironFallback(['CC_target', 'CC'], cc)
- cxx = gyp.common.GetEnvironFallback(['CXX_target', 'CXX'], cxx)
-
- if ar:
- SetVariable(output, 'CMAKE_AR', ar)
- if cc:
- SetVariable(output, 'CMAKE_C_COMPILER', cc)
- if cxx:
- SetVariable(output, 'CMAKE_CXX_COMPILER', cxx)
-
- # The following appears to be as-yet undocumented.
- # http://public.kitware.com/Bug/view.php?id=8392
- output.write('enable_language(ASM)\n')
- # ASM-ATT does not support .S files.
- # output.write('enable_language(ASM-ATT)\n')
-
- if cc:
- SetVariable(output, 'CMAKE_ASM_COMPILER', cc)
-
- SetVariable(output, 'builddir', '${CMAKE_CURRENT_BINARY_DIR}')
- SetVariable(output, 'obj', '${builddir}/obj')
- output.write('\n')
-
- # TODO: Undocumented/unsupported (the CMake Java generator depends on it).
- # CMake by default names the object resulting from foo.c to be foo.c.o.
- # Gyp traditionally names the object resulting from foo.c foo.o.
- # This should be irrelevant, but some targets extract .o files from .a
- # and depend on the name of the extracted .o files.
- output.write('set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)\n')
- output.write('set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)\n')
- output.write('\n')
-
- # Force ninja to use rsp files. Otherwise link and ar lines can get too long,
- # resulting in 'Argument list too long' errors.
- output.write('set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1)\n')
- output.write('\n')
-
- namer = CMakeNamer(target_list)
-
- # The list of targets upon which the 'all' target should depend.
- # CMake has it's own implicit 'all' target, one is not created explicitly.
- all_qualified_targets = set()
- for build_file in params['build_files']:
- for qualified_target in gyp.common.AllTargets(target_list,
- target_dicts,
- os.path.normpath(build_file)):
- all_qualified_targets.add(qualified_target)
-
- for qualified_target in target_list:
- WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
- options, generator_flags, all_qualified_targets, output)
-
- output.close()
-
-
-def PerformBuild(data, configurations, params):
- options = params['options']
- generator_flags = params['generator_flags']
-
- # generator_dir: relative path from pwd to where make puts build files.
- # Makes migrating from make to cmake easier, cmake doesn't put anything here.
- generator_dir = os.path.relpath(options.generator_output or '.')
-
- # output_dir: relative path from generator_dir to the build directory.
- output_dir = generator_flags.get('output_dir', 'out')
-
- for config_name in configurations:
- # build_dir: relative path from source root to our output files.
- # e.g. "out/Debug"
- build_dir = os.path.normpath(os.path.join(generator_dir,
- output_dir,
- config_name))
- arguments = ['cmake', '-G', 'Ninja']
- print('Generating [%s]: %s' % (config_name, arguments))
- subprocess.check_call(arguments, cwd=build_dir)
-
- arguments = ['ninja', '-C', build_dir]
- print('Building [%s]: %s' % (config_name, arguments))
- subprocess.check_call(arguments)
-
-
-def CallGenerateOutputForConfig(arglist):
- # Ignore the interrupt signal so that the parent process catches it and
- # kills all multiprocessing children.
- signal.signal(signal.SIGINT, signal.SIG_IGN)
-
- target_list, target_dicts, data, params, config_name = arglist
- GenerateOutputForConfig(target_list, target_dicts, data, params, config_name)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- user_config = params.get('generator_flags', {}).get('config', None)
- if user_config:
- GenerateOutputForConfig(target_list, target_dicts, data,
- params, user_config)
- else:
- config_names = target_dicts[target_list[0]]['configurations'].keys()
- if params['parallel']:
- try:
- pool = multiprocessing.Pool(len(config_names))
- arglists = []
- for config_name in config_names:
- arglists.append((target_list, target_dicts, data,
- params, config_name))
- pool.map(CallGenerateOutputForConfig, arglists)
- except KeyboardInterrupt as e:
- pool.terminate()
- raise e
- else:
- for config_name in config_names:
- GenerateOutputForConfig(target_list, target_dicts, data,
- params, config_name)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
deleted file mode 100644
index 1b8490451..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright (c) 2016 Ben Noordhuis <info@bnoordhuis.nl>. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import gyp.common
-import gyp.xcode_emulation
-import json
-import os
-
-generator_additional_non_configuration_keys = []
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-generator_filelist_paths = None
-generator_supports_multiple_toolsets = True
-generator_wants_sorted_dependencies = False
-
-# Lifted from make.py. The actual values don't matter much.
-generator_default_variables = {
- 'CONFIGURATION_NAME': '$(BUILDTYPE)',
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/$(TARGET)/geni',
- 'PRODUCT_DIR': '$(builddir)',
- 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s',
- 'RULE_INPUT_EXT': '$(suffix $<)',
- 'RULE_INPUT_NAME': '$(notdir $<)',
- 'RULE_INPUT_PATH': '$(abspath $<)',
- 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s',
- 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen',
- 'SHARED_LIB_PREFIX': 'lib',
- 'STATIC_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
-}
-
-
-def IsMac(params):
- return 'mac' == gyp.common.GetFlavor(params)
-
-
-def CalculateVariables(default_variables, params):
- default_variables.setdefault('OS', gyp.common.GetFlavor(params))
-
-
-def AddCommandsForTarget(cwd, target, params, per_config_commands):
- output_dir = params['generator_flags']['output_dir']
- for configuration_name, configuration in target['configurations'].items():
- builddir_name = os.path.join(output_dir, configuration_name)
-
- if IsMac(params):
- xcode_settings = gyp.xcode_emulation.XcodeSettings(target)
- cflags = xcode_settings.GetCflags(configuration_name)
- cflags_c = xcode_settings.GetCflagsC(configuration_name)
- cflags_cc = xcode_settings.GetCflagsCC(configuration_name)
- else:
- cflags = configuration.get('cflags', [])
- cflags_c = configuration.get('cflags_c', [])
- cflags_cc = configuration.get('cflags_cc', [])
-
- cflags_c = cflags + cflags_c
- cflags_cc = cflags + cflags_cc
-
- defines = configuration.get('defines', [])
- defines = ['-D' + s for s in defines]
-
- # TODO(bnoordhuis) Handle generated source files.
- sources = target.get('sources', [])
- sources = [s for s in sources if s.endswith('.c') or s.endswith('.cc')]
-
- def resolve(filename):
- return os.path.abspath(os.path.join(cwd, filename))
-
- # TODO(bnoordhuis) Handle generated header files.
- include_dirs = configuration.get('include_dirs', [])
- include_dirs = [s for s in include_dirs if not s.startswith('$(obj)')]
- includes = ['-I' + resolve(s) for s in include_dirs]
-
- defines = gyp.common.EncodePOSIXShellList(defines)
- includes = gyp.common.EncodePOSIXShellList(includes)
- cflags_c = gyp.common.EncodePOSIXShellList(cflags_c)
- cflags_cc = gyp.common.EncodePOSIXShellList(cflags_cc)
-
- commands = per_config_commands.setdefault(configuration_name, [])
- for source in sources:
- file = resolve(source)
- isc = source.endswith('.c')
- cc = 'cc' if isc else 'c++'
- cflags = cflags_c if isc else cflags_cc
- command = ' '.join((cc, defines, includes, cflags,
- '-c', gyp.common.EncodePOSIXShellArgument(file)))
- commands.append(dict(command=command, directory=output_dir, file=file))
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- per_config_commands = {}
- for qualified_target, target in target_dicts.items():
- build_file, target_name, toolset = (
- gyp.common.ParseQualifiedTarget(qualified_target))
- if IsMac(params):
- settings = data[build_file]
- gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(settings, target)
- cwd = os.path.dirname(build_file)
- AddCommandsForTarget(cwd, target, params, per_config_commands)
-
- output_dir = params['generator_flags']['output_dir']
- for configuration_name, commands in per_config_commands.items():
- filename = os.path.join(output_dir,
- configuration_name,
- 'compile_commands.json')
- gyp.common.EnsureDirExists(filename)
- fp = open(filename, 'w')
- json.dump(commands, fp=fp, indent=0, check_circular=False)
-
-
-def PerformBuild(data, configurations, params):
- pass
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
deleted file mode 100644
index 8e4f3168f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
+++ /dev/null
@@ -1,100 +0,0 @@
-from __future__ import print_function
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import collections
-import os
-import gyp
-import gyp.common
-import gyp.msvs_emulation
-import json
-import sys
-
-generator_supports_multiple_toolsets = True
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_filelist_paths = {
-}
-
-generator_default_variables = {
-}
-for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR',
- 'LIB_DIR', 'SHARED_LIB_DIR']:
- # Some gyp steps fail if these are empty(!).
- generator_default_variables[dirname] = 'dir'
-for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
- 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
- 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
- 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
- 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
- 'CONFIGURATION_NAME']:
- generator_default_variables[unused] = ''
-
-
-def CalculateVariables(default_variables, params):
- generator_flags = params.get('generator_flags', {})
- for key, val in generator_flags.items():
- default_variables.setdefault(key, val)
- default_variables.setdefault('OS', gyp.common.GetFlavor(params))
-
- flavor = gyp.common.GetFlavor(params)
- if flavor =='win':
- # Copy additional generator configuration data from VS, which is shared
- # by the Windows Ninja generator.
- import gyp.generator.msvs as msvs_generator
- generator_additional_non_configuration_keys = getattr(msvs_generator,
- 'generator_additional_non_configuration_keys', [])
- generator_additional_path_sections = getattr(msvs_generator,
- 'generator_additional_path_sections', [])
-
- gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
-
-
-def CalculateGeneratorInputInfo(params):
- """Calculate the generator specific info that gets fed to input (called by
- gyp)."""
- generator_flags = params.get('generator_flags', {})
- if generator_flags.get('adjust_static_libraries', False):
- global generator_wants_static_library_dependencies_adjusted
- generator_wants_static_library_dependencies_adjusted = True
-
- toplevel = params['options'].toplevel_dir
- generator_dir = os.path.relpath(params['options'].generator_output or '.')
- # output_dir: relative path from generator_dir to the build directory.
- output_dir = generator_flags.get('output_dir', 'out')
- qualified_out_dir = os.path.normpath(os.path.join(
- toplevel, generator_dir, output_dir, 'gypfiles'))
- global generator_filelist_paths
- generator_filelist_paths = {
- 'toplevel': toplevel,
- 'qualified_out_dir': qualified_out_dir,
- }
-
-def GenerateOutput(target_list, target_dicts, data, params):
- # Map of target -> list of targets it depends on.
- edges = {}
-
- # Queue of targets to visit.
- targets_to_visit = target_list[:]
-
- while len(targets_to_visit) > 0:
- target = targets_to_visit.pop()
- if target in edges:
- continue
- edges[target] = []
-
- for dep in target_dicts[target].get('dependencies', []):
- edges[target].append(dep)
- targets_to_visit.append(dep)
-
- try:
- filepath = params['generator_flags']['output_dir']
- except KeyError:
- filepath = '.'
- filename = os.path.join(filepath, 'dump.json')
- f = open(filename, 'w')
- json.dump(edges, f)
- f.close()
- print('Wrote json to %s.' % filename)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
deleted file mode 100644
index 91f187d68..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
+++ /dev/null
@@ -1,431 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""GYP backend that generates Eclipse CDT settings files.
-
-This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
-files that can be imported into an Eclipse CDT project. The XML file contains a
-list of include paths and symbols (i.e. defines).
-
-Because a full .cproject definition is not created by this generator, it's not
-possible to properly define the include dirs and symbols for each file
-individually. Instead, one set of includes/symbols is generated for the entire
-project. This works fairly well (and is a vast improvement in general), but may
-still result in a few indexer issues here and there.
-
-This generator has no automated tests, so expect it to be broken.
-"""
-
-from xml.sax.saxutils import escape
-import os.path
-import subprocess
-import gyp
-import gyp.common
-import gyp.msvs_emulation
-import shlex
-import xml.etree.cElementTree as ET
-
-PY3 = bytes != str
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_default_variables = {
-}
-
-for dirname in ['INTERMEDIATE_DIR', 'PRODUCT_DIR', 'LIB_DIR', 'SHARED_LIB_DIR']:
- # Some gyp steps fail if these are empty(!), so we convert them to variables
- generator_default_variables[dirname] = '$' + dirname
-
-for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
- 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
- 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
- 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
- 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
- 'CONFIGURATION_NAME']:
- generator_default_variables[unused] = ''
-
-# Include dirs will occasionally use the SHARED_INTERMEDIATE_DIR variable as
-# part of the path when dealing with generated headers. This value will be
-# replaced dynamically for each configuration.
-generator_default_variables['SHARED_INTERMEDIATE_DIR'] = \
- '$SHARED_INTERMEDIATE_DIR'
-
-
-def CalculateVariables(default_variables, params):
- generator_flags = params.get('generator_flags', {})
- for key, val in generator_flags.items():
- default_variables.setdefault(key, val)
- flavor = gyp.common.GetFlavor(params)
- default_variables.setdefault('OS', flavor)
- if flavor == 'win':
- # Copy additional generator configuration data from VS, which is shared
- # by the Eclipse generator.
- import gyp.generator.msvs as msvs_generator
- generator_additional_non_configuration_keys = getattr(msvs_generator,
- 'generator_additional_non_configuration_keys', [])
- generator_additional_path_sections = getattr(msvs_generator,
- 'generator_additional_path_sections', [])
-
- gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
-
-
-def CalculateGeneratorInputInfo(params):
- """Calculate the generator specific info that gets fed to input (called by
- gyp)."""
- generator_flags = params.get('generator_flags', {})
- if generator_flags.get('adjust_static_libraries', False):
- global generator_wants_static_library_dependencies_adjusted
- generator_wants_static_library_dependencies_adjusted = True
-
-
-def GetAllIncludeDirectories(target_list, target_dicts,
- shared_intermediate_dirs, config_name, params,
- compiler_path):
- """Calculate the set of include directories to be used.
-
- Returns:
- A list including all the include_dir's specified for every target followed
- by any include directories that were added as cflag compiler options.
- """
-
- gyp_includes_set = set()
- compiler_includes_list = []
-
- # Find compiler's default include dirs.
- if compiler_path:
- command = shlex.split(compiler_path)
- command.extend(['-E', '-xc++', '-v', '-'])
- proc = subprocess.Popen(args=command, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output = proc.communicate()[1]
- if PY3:
- output = output.decode('utf-8')
- # Extract the list of include dirs from the output, which has this format:
- # ...
- # #include "..." search starts here:
- # #include <...> search starts here:
- # /usr/include/c++/4.6
- # /usr/local/include
- # End of search list.
- # ...
- in_include_list = False
- for line in output.splitlines():
- if line.startswith('#include'):
- in_include_list = True
- continue
- if line.startswith('End of search list.'):
- break
- if in_include_list:
- include_dir = line.strip()
- if include_dir not in compiler_includes_list:
- compiler_includes_list.append(include_dir)
-
- flavor = gyp.common.GetFlavor(params)
- if flavor == 'win':
- generator_flags = params.get('generator_flags', {})
- for target_name in target_list:
- target = target_dicts[target_name]
- if config_name in target['configurations']:
- config = target['configurations'][config_name]
-
- # Look for any include dirs that were explicitly added via cflags. This
- # may be done in gyp files to force certain includes to come at the end.
- # TODO(jgreenwald): Change the gyp files to not abuse cflags for this, and
- # remove this.
- if flavor == 'win':
- msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
- cflags = msvs_settings.GetCflags(config_name)
- else:
- cflags = config['cflags']
- for cflag in cflags:
- if cflag.startswith('-I'):
- include_dir = cflag[2:]
- if include_dir not in compiler_includes_list:
- compiler_includes_list.append(include_dir)
-
- # Find standard gyp include dirs.
- if 'include_dirs' in config:
- include_dirs = config['include_dirs']
- for shared_intermediate_dir in shared_intermediate_dirs:
- for include_dir in include_dirs:
- include_dir = include_dir.replace('$SHARED_INTERMEDIATE_DIR',
- shared_intermediate_dir)
- if not os.path.isabs(include_dir):
- base_dir = os.path.dirname(target_name)
-
- include_dir = base_dir + '/' + include_dir
- include_dir = os.path.abspath(include_dir)
-
- gyp_includes_set.add(include_dir)
-
- # Generate a list that has all the include dirs.
- all_includes_list = list(gyp_includes_set)
- all_includes_list.sort()
- for compiler_include in compiler_includes_list:
- if not compiler_include in gyp_includes_set:
- all_includes_list.append(compiler_include)
-
- # All done.
- return all_includes_list
-
-
-def GetCompilerPath(target_list, data, options):
- """Determine a command that can be used to invoke the compiler.
-
- Returns:
- If this is a gyp project that has explicit make settings, try to determine
- the compiler from that. Otherwise, see if a compiler was specified via the
- CC_target environment variable.
- """
- # First, see if the compiler is configured in make's settings.
- build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
- make_global_settings_dict = data[build_file].get('make_global_settings', {})
- for key, value in make_global_settings_dict:
- if key in ['CC', 'CXX']:
- return os.path.join(options.toplevel_dir, value)
-
- # Check to see if the compiler was specified as an environment variable.
- for key in ['CC_target', 'CC', 'CXX']:
- compiler = os.environ.get(key)
- if compiler:
- return compiler
-
- return 'gcc'
-
-
-def GetAllDefines(target_list, target_dicts, data, config_name, params,
- compiler_path):
- """Calculate the defines for a project.
-
- Returns:
- A dict that includes explicit defines declared in gyp files along with all of
- the default defines that the compiler uses.
- """
-
- # Get defines declared in the gyp files.
- all_defines = {}
- flavor = gyp.common.GetFlavor(params)
- if flavor == 'win':
- generator_flags = params.get('generator_flags', {})
- for target_name in target_list:
- target = target_dicts[target_name]
-
- if flavor == 'win':
- msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
- extra_defines = msvs_settings.GetComputedDefines(config_name)
- else:
- extra_defines = []
- if config_name in target['configurations']:
- config = target['configurations'][config_name]
- target_defines = config['defines']
- else:
- target_defines = []
- for define in target_defines + extra_defines:
- split_define = define.split('=', 1)
- if len(split_define) == 1:
- split_define.append('1')
- if split_define[0].strip() in all_defines:
- # Already defined
- continue
- all_defines[split_define[0].strip()] = split_define[1].strip()
- # Get default compiler defines (if possible).
- if flavor == 'win':
- return all_defines # Default defines already processed in the loop above.
- if compiler_path:
- command = shlex.split(compiler_path)
- command.extend(['-E', '-dM', '-'])
- cpp_proc = subprocess.Popen(args=command, cwd='.',
- stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- cpp_output = cpp_proc.communicate()[0]
- if PY3:
- cpp_output = cpp_output.decode('utf-8')
- cpp_lines = cpp_output.split('\n')
- for cpp_line in cpp_lines:
- if not cpp_line.strip():
- continue
- cpp_line_parts = cpp_line.split(' ', 2)
- key = cpp_line_parts[1]
- if len(cpp_line_parts) >= 3:
- val = cpp_line_parts[2]
- else:
- val = '1'
- all_defines[key] = val
-
- return all_defines
-
-
-def WriteIncludePaths(out, eclipse_langs, include_dirs):
- """Write the includes section of a CDT settings export file."""
-
- out.write(' <section name="org.eclipse.cdt.internal.ui.wizards.' \
- 'settingswizards.IncludePaths">\n')
- out.write(' <language name="holder for library settings"></language>\n')
- for lang in eclipse_langs:
- out.write(' <language name="%s">\n' % lang)
- for include_dir in include_dirs:
- out.write(' <includepath workspace_path="false">%s</includepath>\n' %
- include_dir)
- out.write(' </language>\n')
- out.write(' </section>\n')
-
-
-def WriteMacros(out, eclipse_langs, defines):
- """Write the macros section of a CDT settings export file."""
-
- out.write(' <section name="org.eclipse.cdt.internal.ui.wizards.' \
- 'settingswizards.Macros">\n')
- out.write(' <language name="holder for library settings"></language>\n')
- for lang in eclipse_langs:
- out.write(' <language name="%s">\n' % lang)
- for key in sorted(defines):
- out.write(' <macro><name>%s</name><value>%s</value></macro>\n' %
- (escape(key), escape(defines[key])))
- out.write(' </language>\n')
- out.write(' </section>\n')
-
-
-def GenerateOutputForConfig(target_list, target_dicts, data, params,
- config_name):
- options = params['options']
- generator_flags = params.get('generator_flags', {})
-
- # build_dir: relative path from source root to our output files.
- # e.g. "out/Debug"
- build_dir = os.path.join(generator_flags.get('output_dir', 'out'),
- config_name)
-
- toplevel_build = os.path.join(options.toplevel_dir, build_dir)
- # Ninja uses out/Debug/gen while make uses out/Debug/obj/gen as the
- # SHARED_INTERMEDIATE_DIR. Include both possible locations.
- shared_intermediate_dirs = [os.path.join(toplevel_build, 'obj', 'gen'),
- os.path.join(toplevel_build, 'gen')]
-
- GenerateCdtSettingsFile(target_list,
- target_dicts,
- data,
- params,
- config_name,
- os.path.join(toplevel_build,
- 'eclipse-cdt-settings.xml'),
- options,
- shared_intermediate_dirs)
- GenerateClasspathFile(target_list,
- target_dicts,
- options.toplevel_dir,
- toplevel_build,
- os.path.join(toplevel_build,
- 'eclipse-classpath.xml'))
-
-
-def GenerateCdtSettingsFile(target_list, target_dicts, data, params,
- config_name, out_name, options,
- shared_intermediate_dirs):
- gyp.common.EnsureDirExists(out_name)
- with open(out_name, 'w') as out:
- out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
- out.write('<cdtprojectproperties>\n')
-
- eclipse_langs = ['C++ Source File', 'C Source File', 'Assembly Source File',
- 'GNU C++', 'GNU C', 'Assembly']
- compiler_path = GetCompilerPath(target_list, data, options)
- include_dirs = GetAllIncludeDirectories(target_list, target_dicts,
- shared_intermediate_dirs,
- config_name, params, compiler_path)
- WriteIncludePaths(out, eclipse_langs, include_dirs)
- defines = GetAllDefines(target_list, target_dicts, data, config_name,
- params, compiler_path)
- WriteMacros(out, eclipse_langs, defines)
-
- out.write('</cdtprojectproperties>\n')
-
-
-def GenerateClasspathFile(target_list, target_dicts, toplevel_dir,
- toplevel_build, out_name):
- '''Generates a classpath file suitable for symbol navigation and code
- completion of Java code (such as in Android projects) by finding all
- .java and .jar files used as action inputs.'''
- gyp.common.EnsureDirExists(out_name)
- result = ET.Element('classpath')
-
- def AddElements(kind, paths):
- # First, we need to normalize the paths so they are all relative to the
- # toplevel dir.
- rel_paths = set()
- for path in paths:
- if os.path.isabs(path):
- rel_paths.add(os.path.relpath(path, toplevel_dir))
- else:
- rel_paths.add(path)
-
- for path in sorted(rel_paths):
- entry_element = ET.SubElement(result, 'classpathentry')
- entry_element.set('kind', kind)
- entry_element.set('path', path)
-
- AddElements('lib', GetJavaJars(target_list, target_dicts, toplevel_dir))
- AddElements('src', GetJavaSourceDirs(target_list, target_dicts, toplevel_dir))
- # Include the standard JRE container and a dummy out folder
- AddElements('con', ['org.eclipse.jdt.launching.JRE_CONTAINER'])
- # Include a dummy out folder so that Eclipse doesn't use the default /bin
- # folder in the root of the project.
- AddElements('output', [os.path.join(toplevel_build, '.eclipse-java-build')])
-
- ET.ElementTree(result).write(out_name)
-
-
-def GetJavaJars(target_list, target_dicts, toplevel_dir):
- '''Generates a sequence of all .jars used as inputs.'''
- for target_name in target_list:
- target = target_dicts[target_name]
- for action in target.get('actions', []):
- for input_ in action['inputs']:
- if os.path.splitext(input_)[1] == '.jar' and not input_.startswith('$'):
- if os.path.isabs(input_):
- yield input_
- else:
- yield os.path.join(os.path.dirname(target_name), input_)
-
-
-def GetJavaSourceDirs(target_list, target_dicts, toplevel_dir):
- '''Generates a sequence of all likely java package root directories.'''
- for target_name in target_list:
- target = target_dicts[target_name]
- for action in target.get('actions', []):
- for input_ in action['inputs']:
- if (os.path.splitext(input_)[1] == '.java' and
- not input_.startswith('$')):
- dir_ = os.path.dirname(os.path.join(os.path.dirname(target_name),
- input_))
- # If there is a parent 'src' or 'java' folder, navigate up to it -
- # these are canonical package root names in Chromium. This will
- # break if 'src' or 'java' exists in the package structure. This
- # could be further improved by inspecting the java file for the
- # package name if this proves to be too fragile in practice.
- parent_search = dir_
- while os.path.basename(parent_search) not in ['src', 'java']:
- parent_search, _ = os.path.split(parent_search)
- if not parent_search or parent_search == toplevel_dir:
- # Didn't find a known root, just return the original path
- yield dir_
- break
- else:
- yield parent_search
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- """Generate an XML settings file that can be imported into a CDT project."""
-
- if params['options'].generator_output:
- raise NotImplementedError("--generator_output not implemented for eclipse")
-
- user_config = params.get('generator_flags', {}).get('config', None)
- if user_config:
- GenerateOutputForConfig(target_list, target_dicts, data, params,
- user_config)
- else:
- config_names = target_dicts[target_list[0]]['configurations'].keys()
- for config_name in config_names:
- GenerateOutputForConfig(target_list, target_dicts, data, params,
- config_name)
-
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
deleted file mode 100644
index 78eeaa61b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""gypd output module
-
-This module produces gyp input as its output. Output files are given the
-.gypd extension to avoid overwriting the .gyp files that they are generated
-from. Internal references to .gyp files (such as those found in
-"dependencies" sections) are not adjusted to point to .gypd files instead;
-unlike other paths, which are relative to the .gyp or .gypd file, such paths
-are relative to the directory from which gyp was run to create the .gypd file.
-
-This generator module is intended to be a sample and a debugging aid, hence
-the "d" for "debug" in .gypd. It is useful to inspect the results of the
-various merges, expansions, and conditional evaluations performed by gyp
-and to see a representation of what would be fed to a generator module.
-
-It's not advisable to rename .gypd files produced by this module to .gyp,
-because they will have all merges, expansions, and evaluations already
-performed and the relevant constructs not present in the output; paths to
-dependencies may be wrong; and various sections that do not belong in .gyp
-files such as such as "included_files" and "*_excluded" will be present.
-Output will also be stripped of comments. This is not intended to be a
-general-purpose gyp pretty-printer; for that, you probably just want to
-run "pprint.pprint(eval(open('source.gyp').read()))", which will still strip
-comments but won't do all of the other things done to this module's output.
-
-The specific formatting of the output generated by this module is subject
-to change.
-"""
-
-
-import gyp.common
-import errno
-import os
-import pprint
-
-
-# These variables should just be spit back out as variable references.
-_generator_identity_variables = [
- 'CONFIGURATION_NAME',
- 'EXECUTABLE_PREFIX',
- 'EXECUTABLE_SUFFIX',
- 'INTERMEDIATE_DIR',
- 'LIB_DIR',
- 'PRODUCT_DIR',
- 'RULE_INPUT_ROOT',
- 'RULE_INPUT_DIRNAME',
- 'RULE_INPUT_EXT',
- 'RULE_INPUT_NAME',
- 'RULE_INPUT_PATH',
- 'SHARED_INTERMEDIATE_DIR',
- 'SHARED_LIB_DIR',
- 'SHARED_LIB_PREFIX',
- 'SHARED_LIB_SUFFIX',
- 'STATIC_LIB_PREFIX',
- 'STATIC_LIB_SUFFIX',
-]
-
-# gypd doesn't define a default value for OS like many other generator
-# modules. Specify "-D OS=whatever" on the command line to provide a value.
-generator_default_variables = {
-}
-
-# gypd supports multiple toolsets
-generator_supports_multiple_toolsets = True
-
-# TODO(mark): This always uses <, which isn't right. The input module should
-# notify the generator to tell it which phase it is operating in, and this
-# module should use < for the early phase and then switch to > for the late
-# phase. Bonus points for carrying @ back into the output too.
-for v in _generator_identity_variables:
- generator_default_variables[v] = '<(%s)' % v
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- output_files = {}
- for qualified_target in target_list:
- [input_file, target] = \
- gyp.common.ParseQualifiedTarget(qualified_target)[0:2]
-
- if input_file[-4:] != '.gyp':
- continue
- input_file_stem = input_file[:-4]
- output_file = input_file_stem + params['options'].suffix + '.gypd'
-
- if not output_file in output_files:
- output_files[output_file] = input_file
-
- for output_file, input_file in output_files.items():
- output = open(output_file, 'w')
- pprint.pprint(data[input_file], output)
- output.close()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
deleted file mode 100644
index bd405f43a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""gypsh output module
-
-gypsh is a GYP shell. It's not really a generator per se. All it does is
-fire up an interactive Python session with a few local variables set to the
-variables passed to the generator. Like gypd, it's intended as a debugging
-aid, to facilitate the exploration of .gyp structures after being processed
-by the input module.
-
-The expected usage is "gyp -f gypsh -D OS=desired_os".
-"""
-
-
-import code
-import sys
-
-
-# All of this stuff about generator variables was lovingly ripped from gypd.py.
-# That module has a much better description of what's going on and why.
-_generator_identity_variables = [
- 'EXECUTABLE_PREFIX',
- 'EXECUTABLE_SUFFIX',
- 'INTERMEDIATE_DIR',
- 'PRODUCT_DIR',
- 'RULE_INPUT_ROOT',
- 'RULE_INPUT_DIRNAME',
- 'RULE_INPUT_EXT',
- 'RULE_INPUT_NAME',
- 'RULE_INPUT_PATH',
- 'SHARED_INTERMEDIATE_DIR',
-]
-
-generator_default_variables = {
-}
-
-for v in _generator_identity_variables:
- generator_default_variables[v] = '<(%s)' % v
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- locals = {
- 'target_list': target_list,
- 'target_dicts': target_dicts,
- 'data': data,
- }
-
- # Use a banner that looks like the stock Python one and like what
- # code.interact uses by default, but tack on something to indicate what
- # locals are available, and identify gypsh.
- banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \
- (sys.version, sys.platform, repr(sorted(locals.keys())))
-
- code.interact(banner, local=locals)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
deleted file mode 100644
index 196053679..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ /dev/null
@@ -1,2265 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Notes:
-#
-# This is all roughly based on the Makefile system used by the Linux
-# kernel, but is a non-recursive make -- we put the entire dependency
-# graph in front of make and let it figure it out.
-#
-# The code below generates a separate .mk file for each target, but
-# all are sourced by the top-level Makefile. This means that all
-# variables in .mk-files clobber one another. Be careful to use :=
-# where appropriate for immediate evaluation, and similarly to watch
-# that you're not relying on a variable value to last between different
-# .mk files.
-#
-# TODOs:
-#
-# Global settings and utility functions are currently stuffed in the
-# toplevel Makefile. It may make sense to generate some .mk files on
-# the side to keep the files readable.
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import subprocess
-import gyp
-import gyp.common
-import gyp.xcode_emulation
-from gyp.common import GetEnvironFallback
-from gyp.common import GypError
-
-import hashlib
-
-generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'STATIC_LIB_PREFIX': 'lib',
- 'SHARED_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
- 'INTERMEDIATE_DIR': '$(obj).$(TOOLSET)/$(TARGET)/geni',
- 'SHARED_INTERMEDIATE_DIR': '$(obj)/gen',
- 'PRODUCT_DIR': '$(builddir)',
- 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python.
- 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s', # This gets expanded by Python.
- 'RULE_INPUT_PATH': '$(abspath $<)',
- 'RULE_INPUT_EXT': '$(suffix $<)',
- 'RULE_INPUT_NAME': '$(notdir $<)',
- 'CONFIGURATION_NAME': '$(BUILDTYPE)',
-}
-
-# Make supports multiple toolsets
-generator_supports_multiple_toolsets = True
-
-# Request sorted dependencies in the order from dependents to dependencies.
-generator_wants_sorted_dependencies = False
-
-# Placates pylint.
-generator_additional_non_configuration_keys = []
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-generator_filelist_paths = None
-
-
-def CalculateVariables(default_variables, params):
- """Calculate additional variables for use in the build (called by gyp)."""
- flavor = gyp.common.GetFlavor(params)
- if flavor == 'mac':
- default_variables.setdefault('OS', 'mac')
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
- default_variables.setdefault('SHARED_LIB_DIR',
- generator_default_variables['PRODUCT_DIR'])
- default_variables.setdefault('LIB_DIR',
- generator_default_variables['PRODUCT_DIR'])
-
- # Copy additional generator configuration data from Xcode, which is shared
- # by the Mac Make generator.
- import gyp.generator.xcode as xcode_generator
- global generator_additional_non_configuration_keys
- generator_additional_non_configuration_keys = getattr(xcode_generator,
- 'generator_additional_non_configuration_keys', [])
- global generator_additional_path_sections
- generator_additional_path_sections = getattr(xcode_generator,
- 'generator_additional_path_sections', [])
- global generator_extra_sources_for_rules
- generator_extra_sources_for_rules = getattr(xcode_generator,
- 'generator_extra_sources_for_rules', [])
- COMPILABLE_EXTENSIONS.update({'.m': 'objc', '.mm' : 'objcxx'})
- else:
- operating_system = flavor
- if flavor == 'android':
- operating_system = 'linux' # Keep this legacy behavior for now.
- default_variables.setdefault('OS', operating_system)
- if flavor == 'aix':
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.a')
- else:
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
- default_variables.setdefault('SHARED_LIB_DIR','$(builddir)/lib.$(TOOLSET)')
- default_variables.setdefault('LIB_DIR', '$(obj).$(TOOLSET)')
-
-
-def CalculateGeneratorInputInfo(params):
- """Calculate the generator specific info that gets fed to input (called by
- gyp)."""
- generator_flags = params.get('generator_flags', {})
- android_ndk_version = generator_flags.get('android_ndk_version', None)
- # Android NDK requires a strict link order.
- if android_ndk_version:
- global generator_wants_sorted_dependencies
- generator_wants_sorted_dependencies = True
-
- output_dir = params['options'].generator_output or \
- params['options'].toplevel_dir
- builddir_name = generator_flags.get('output_dir', 'out')
- qualified_out_dir = os.path.normpath(os.path.join(
- output_dir, builddir_name, 'gypfiles'))
-
- global generator_filelist_paths
- generator_filelist_paths = {
- 'toplevel': params['options'].toplevel_dir,
- 'qualified_out_dir': qualified_out_dir,
- }
-
-
-# The .d checking code below uses these functions:
-# wildcard, sort, foreach, shell, wordlist
-# wildcard can handle spaces, the rest can't.
-# Since I could find no way to make foreach work with spaces in filenames
-# correctly, the .d files have spaces replaced with another character. The .d
-# file for
-# Chromium\ Framework.framework/foo
-# is for example
-# out/Release/.deps/out/Release/Chromium?Framework.framework/foo
-# This is the replacement character.
-SPACE_REPLACEMENT = '?'
-
-
-LINK_COMMANDS_LINUX = """\
-quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
-
-# Due to circular dependencies between libraries :(, we wrap the
-# special "figure out circular dependencies" flags around the entire
-# input list during linking.
-quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
-
-# We support two kinds of shared objects (.so):
-# 1) shared_library, which is just bundling together many dependent libraries
-# into a link line.
-# 2) loadable_module, which is generating a module intended for dlopen().
-#
-# They differ only slightly:
-# In the former case, we want to package all dependent code into the .so.
-# In the latter case, we want to package just the API exposed by the
-# outermost module.
-# This means shared_library uses --whole-archive, while loadable_module doesn't.
-# (Note that --whole-archive is incompatible with the --start-group used in
-# normal linking.)
-
-# Other shared-object link notes:
-# - Set SONAME to the library filename so our binaries don't reference
-# the local, absolute paths used on the link command-line.
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
-"""
-
-LINK_COMMANDS_MAC = """\
-quiet_cmd_alink = LIBTOOL-STATIC $@
-cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
-
-quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
-
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
-"""
-
-LINK_COMMANDS_ANDROID = """\
-quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
-
-# Due to circular dependencies between libraries :(, we wrap the
-# special "figure out circular dependencies" flags around the entire
-# input list during linking.
-quiet_cmd_link = LINK($(TOOLSET)) $@
-quiet_cmd_link_host = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
-cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
-
-# Other shared-object link notes:
-# - Set SONAME to the library filename so our binaries don't reference
-# the local, absolute paths used on the link command-line.
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
-quiet_cmd_solink_module_host = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module_host = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
-"""
-
-
-LINK_COMMANDS_AIX = """\
-quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^)
-
-quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
-
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
-"""
-
-
-LINK_COMMANDS_OS390 = """\
-quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
-
-quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)
-
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) -Wl,DLL
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -Wl,DLL
-
-"""
-
-
-# Header of toplevel Makefile.
-# This should go into the build tree, but it's easier to keep it here for now.
-SHARED_HEADER = ("""\
-# We borrow heavily from the kernel build setup, though we are simpler since
-# we don't have Kconfig tweaking settings on us.
-
-# The implicit make rules have it looking for RCS files, among other things.
-# We instead explicitly write all the rules we care about.
-# It's even quicker (saves ~200ms) to pass -r on the command line.
-MAKEFLAGS=-r
-
-# The source directory tree.
-srcdir := %(srcdir)s
-abs_srcdir := $(abspath $(srcdir))
-
-# The name of the builddir.
-builddir_name ?= %(builddir)s
-
-# The V=1 flag on command line makes us verbosely print command lines.
-ifdef V
- quiet=
-else
- quiet=quiet_
-endif
-
-# Specify BUILDTYPE=Release on the command line for a release build.
-BUILDTYPE ?= %(default_configuration)s
-
-# Directory all our build output goes into.
-# Note that this must be two directories beneath src/ for unit tests to pass,
-# as they reach into the src/ directory for data with relative paths.
-builddir ?= $(builddir_name)/$(BUILDTYPE)
-abs_builddir := $(abspath $(builddir))
-depsdir := $(builddir)/.deps
-
-# Object output directory.
-obj := $(builddir)/obj
-abs_obj := $(abspath $(obj))
-
-# We build up a list of every single one of the targets so we can slurp in the
-# generated dependency rule Makefiles in one pass.
-all_deps :=
-
-%(make_global_settings)s
-
-CC.target ?= %(CC.target)s
-CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
-CXX.target ?= %(CXX.target)s
-CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
-LINK.target ?= %(LINK.target)s
-LDFLAGS.target ?= $(LDFLAGS)
-AR.target ?= $(AR)
-
-# C++ apps need to be linked with g++.
-LINK ?= $(CXX.target)
-
-# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
-# to replicate this environment fallback in make as well.
-CC.host ?= %(CC.host)s
-CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
-CXX.host ?= %(CXX.host)s
-CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
-LINK.host ?= %(LINK.host)s
-LDFLAGS.host ?=
-AR.host ?= %(AR.host)s
-
-# Define a dir function that can handle spaces.
-# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
-# "leading spaces cannot appear in the text of the first argument as written.
-# These characters can be put into the argument value by variable substitution."
-empty :=
-space := $(empty) $(empty)
-
-# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
-replace_spaces = $(subst $(space),""" + SPACE_REPLACEMENT + """,$1)
-unreplace_spaces = $(subst """ + SPACE_REPLACEMENT + """,$(space),$1)
-dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
-
-# Flags to make gcc output dependency info. Note that you need to be
-# careful here to use the flags that ccache and distcc can understand.
-# We write to a dep file on the side first and then rename at the end
-# so we can't end up with a broken dep file.
-depfile = $(depsdir)/$(call replace_spaces,$@).d
-DEPFLAGS = %(makedep_args)s -MF $(depfile).raw
-
-# We have to fixup the deps output in a few ways.
-# (1) the file output should mention the proper .o file.
-# ccache or distcc lose the path to the target, so we convert a rule of
-# the form:
-# foobar.o: DEP1 DEP2
-# into
-# path/to/foobar.o: DEP1 DEP2
-# (2) we want missing files not to cause us to fail to build.
-# We want to rewrite
-# foobar.o: DEP1 DEP2 \\
-# DEP3
-# to
-# DEP1:
-# DEP2:
-# DEP3:
-# so if the files are missing, they're just considered phony rules.
-# We have to do some pretty insane escaping to get those backslashes
-# and dollar signs past make, the shell, and sed at the same time.
-# Doesn't work with spaces, but that's fine: .d files have spaces in
-# their names replaced with other characters."""
-r"""
-define fixup_dep
-# The depfile may not exist if the input file didn't have any #includes.
-touch $(depfile).raw
-# Fixup path as in (1).
-sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
-# Add extra rules as in (2).
-# We remove slashes and replace spaces with new lines;
-# remove blank lines;
-# delete the first line and append a colon to the remaining lines.
-sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
- grep -v '^$$' |\
- sed -e 1d -e 's|$$|:|' \
- >> $(depfile)
-rm $(depfile).raw
-endef
-"""
-"""
-# Command definitions:
-# - cmd_foo is the actual command to run;
-# - quiet_cmd_foo is the brief-output summary of the command.
-
-quiet_cmd_cc = CC($(TOOLSET)) $@
-cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
-
-quiet_cmd_cxx = CXX($(TOOLSET)) $@
-cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
-%(extra_commands)s
-quiet_cmd_touch = TOUCH $@
-cmd_touch = touch $@
-
-quiet_cmd_copy = COPY $@
-# send stderr to /dev/null to ignore messages when linking directories.
-cmd_copy = rm -rf "$@" && cp %(copy_archive_args)s "$<" "$@"
-
-%(link_commands)s
-"""
-
-r"""
-# Define an escape_quotes function to escape single quotes.
-# This allows us to handle quotes properly as long as we always use
-# use single quotes and escape_quotes.
-escape_quotes = $(subst ','\'',$(1))
-# This comment is here just to include a ' to unconfuse syntax highlighting.
-# Define an escape_vars function to escape '$' variable syntax.
-# This allows us to read/write command lines with shell variables (e.g.
-# $LD_LIBRARY_PATH), without triggering make substitution.
-escape_vars = $(subst $$,$$$$,$(1))
-# Helper that expands to a shell command to echo a string exactly as it is in
-# make. This uses printf instead of echo because printf's behaviour with respect
-# to escape sequences is more portable than echo's across different shells
-# (e.g., dash, bash).
-exact_echo = printf '%%s\n' '$(call escape_quotes,$(1))'
-"""
-"""
-# Helper to compare the command we're about to run against the command
-# we logged the last time we ran the command. Produces an empty
-# string (false) when the commands match.
-# Tricky point: Make has no string-equality test function.
-# The kernel uses the following, but it seems like it would have false
-# positives, where one string reordered its arguments.
-# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \\
-# $(filter-out $(cmd_$@), $(cmd_$(1))))
-# We instead substitute each for the empty string into the other, and
-# say they're equal if both substitutions produce the empty string.
-# .d files contain """ + SPACE_REPLACEMENT + \
- """ instead of spaces, take that into account.
-command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\\
- $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
-
-# Helper that is non-empty when a prerequisite changes.
-# Normally make does this implicitly, but we force rules to always run
-# so we can check their command lines.
-# $? -- new prerequisites
-# $| -- order-only dependencies
-prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
-
-# Helper that executes all postbuilds until one fails.
-define do_postbuilds
- @E=0;\\
- for p in $(POSTBUILDS); do\\
- eval $$p;\\
- E=$$?;\\
- if [ $$E -ne 0 ]; then\\
- break;\\
- fi;\\
- done;\\
- if [ $$E -ne 0 ]; then\\
- rm -rf "$@";\\
- exit $$E;\\
- fi
-endef
-
-# do_cmd: run a command via the above cmd_foo names, if necessary.
-# Should always run for a given target to handle command-line changes.
-# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
-# Third argument, if non-zero, makes it do POSTBUILDS processing.
-# Note: We intentionally do NOT call dirx for depfile, since it contains """ + \
- SPACE_REPLACEMENT + """ for
-# spaces already and dirx strips the """ + SPACE_REPLACEMENT + \
- """ characters.
-define do_cmd
-$(if $(or $(command_changed),$(prereq_changed)),
- @$(call exact_echo, $($(quiet)cmd_$(1)))
- @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
- $(if $(findstring flock,$(word %(flock_index)d,$(cmd_$1))),
- @$(cmd_$(1))
- @echo " $(quiet_cmd_$(1)): Finished",
- @$(cmd_$(1))
- )
- @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
- @$(if $(2),$(fixup_dep))
- $(if $(and $(3), $(POSTBUILDS)),
- $(call do_postbuilds)
- )
-)
-endef
-
-# Declare the "%(default_target)s" target first so it is the default,
-# even though we don't have the deps yet.
-.PHONY: %(default_target)s
-%(default_target)s:
-
-# make looks for ways to re-generate included makefiles, but in our case, we
-# don't have a direct way. Explicitly telling make that it has nothing to do
-# for them makes it go faster.
-%%.d: ;
-
-# Use FORCE_DO_CMD to force a target to run. Should be coupled with
-# do_cmd.
-.PHONY: FORCE_DO_CMD
-FORCE_DO_CMD:
-
-""")
-
-SHARED_HEADER_MAC_COMMANDS = """
-quiet_cmd_objc = CXX($(TOOLSET)) $@
-cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
-
-quiet_cmd_objcxx = CXX($(TOOLSET)) $@
-cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
-
-# Commands for precompiled header files.
-quiet_cmd_pch_c = CXX($(TOOLSET)) $@
-cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
-quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
-cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
-quiet_cmd_pch_m = CXX($(TOOLSET)) $@
-cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
-quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
-cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
-
-# gyp-mac-tool is written next to the root Makefile by gyp.
-# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
-# already.
-quiet_cmd_mac_tool = MACTOOL $(4) $<
-cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
-
-quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
-cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
-
-quiet_cmd_infoplist = INFOPLIST $@
-cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
-"""
-
-
-def WriteRootHeaderSuffixRules(writer):
- extensions = sorted(COMPILABLE_EXTENSIONS.keys(), key=str.lower)
-
- writer.write('# Suffix rules, putting all outputs into $(obj).\n')
- for ext in extensions:
- writer.write('$(obj).$(TOOLSET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD\n' % ext)
- writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
-
- writer.write('\n# Try building from generated source, too.\n')
- for ext in extensions:
- writer.write(
- '$(obj).$(TOOLSET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD\n' % ext)
- writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
- writer.write('\n')
- for ext in extensions:
- writer.write('$(obj).$(TOOLSET)/%%.o: $(obj)/%%%s FORCE_DO_CMD\n' % ext)
- writer.write('\t@$(call do_cmd,%s,1)\n' % COMPILABLE_EXTENSIONS[ext])
- writer.write('\n')
-
-
-SHARED_HEADER_SUFFIX_RULES_COMMENT1 = ("""\
-# Suffix rules, putting all outputs into $(obj).
-""")
-
-
-SHARED_HEADER_SUFFIX_RULES_COMMENT2 = ("""\
-# Try building from generated source, too.
-""")
-
-
-SHARED_FOOTER = """\
-# "all" is a concatenation of the "all" targets from all the included
-# sub-makefiles. This is just here to clarify.
-all:
-
-# Add in dependency-tracking rules. $(all_deps) is the list of every single
-# target in our tree. Only consider the ones with .d (dependency) info:
-d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
-ifneq ($(d_files),)
- include $(d_files)
-endif
-"""
-
-header = """\
-# This file is generated by gyp; do not edit.
-
-"""
-
-# Maps every compilable file extension to the do_cmd that compiles it.
-COMPILABLE_EXTENSIONS = {
- '.c': 'cc',
- '.cc': 'cxx',
- '.cpp': 'cxx',
- '.cxx': 'cxx',
- '.s': 'cc',
- '.S': 'cc',
-}
-
-def Compilable(filename):
- """Return true if the file is compilable (should be in OBJS)."""
- for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS):
- if res:
- return True
- return False
-
-
-def Linkable(filename):
- """Return true if the file is linkable (should be on the link line)."""
- return filename.endswith('.o')
-
-
-def Target(filename):
- """Translate a compilable filename to its .o target."""
- return os.path.splitext(filename)[0] + '.o'
-
-
-def EscapeShellArgument(s):
- """Quotes an argument so that it will be interpreted literally by a POSIX
- shell. Taken from
- http://stackoverflow.com/questions/35817/whats-the-best-way-to-escape-ossystem-calls-in-python
- """
- return "'" + s.replace("'", "'\\''") + "'"
-
-
-def EscapeMakeVariableExpansion(s):
- """Make has its own variable expansion syntax using $. We must escape it for
- string to be interpreted literally."""
- return s.replace('$', '$$')
-
-
-def EscapeCppDefine(s):
- """Escapes a CPP define so that it will reach the compiler unaltered."""
- s = EscapeShellArgument(s)
- s = EscapeMakeVariableExpansion(s)
- # '#' characters must be escaped even embedded in a string, else Make will
- # treat it as the start of a comment.
- return s.replace('#', r'\#')
-
-
-def QuoteIfNecessary(string):
- """TODO: Should this ideally be replaced with one or more of the above
- functions?"""
- if '"' in string:
- string = '"' + string.replace('"', '\\"') + '"'
- return string
-
-
-def StringToMakefileVariable(string):
- """Convert a string to a value that is acceptable as a make variable name."""
- return re.sub('[^a-zA-Z0-9_]', '_', string)
-
-
-srcdir_prefix = ''
-def Sourceify(path):
- """Convert a path to its source directory form."""
- if '$(' in path:
- return path
- if os.path.isabs(path):
- return path
- return srcdir_prefix + path
-
-
-def QuoteSpaces(s, quote=r'\ '):
- return s.replace(' ', quote)
-
-def SourceifyAndQuoteSpaces(path):
- """Convert a path to its source directory form and quote spaces."""
- return QuoteSpaces(Sourceify(path))
-
-# TODO: Avoid code duplication with _ValidateSourcesForMSVSProject in msvs.py.
-def _ValidateSourcesForOSX(spec, all_sources):
- """Makes sure if duplicate basenames are not specified in the source list.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- """
- if spec.get('type', None) != 'static_library':
- return
-
- basenames = {}
- for source in all_sources:
- name, ext = os.path.splitext(source)
- is_compiled_file = ext in [
- '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
- if not is_compiled_file:
- continue
- basename = os.path.basename(name) # Don't include extension.
- basenames.setdefault(basename, []).append(source)
-
- error = ''
- for basename, files in basenames.items():
- if len(files) > 1:
- error += ' %s: %s\n' % (basename, ' '.join(files))
-
- if error:
- print(('static library %s has several files with the same basename:\n' % spec['target_name'])
- + error + 'libtool on OS X will generate' + ' warnings for them.')
- raise GypError('Duplicate basenames in sources section, see list above')
-
-
-# Map from qualified target to path to output.
-target_outputs = {}
-# Map from qualified target to any linkable output. A subset
-# of target_outputs. E.g. when mybinary depends on liba, we want to
-# include liba in the linker line; when otherbinary depends on
-# mybinary, we just want to build mybinary first.
-target_link_deps = {}
-
-
-class MakefileWriter(object):
- """MakefileWriter packages up the writing of one target-specific foobar.mk.
-
- Its only real entry point is Write(), and is mostly used for namespacing.
- """
-
- def __init__(self, generator_flags, flavor):
- self.generator_flags = generator_flags
- self.flavor = flavor
-
- self.suffix_rules_srcdir = {}
- self.suffix_rules_objdir1 = {}
- self.suffix_rules_objdir2 = {}
-
- # Generate suffix rules for all compilable extensions.
- for ext in COMPILABLE_EXTENSIONS.keys():
- # Suffix rules for source folder.
- self.suffix_rules_srcdir.update({ext: ("""\
-$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD
- @$(call do_cmd,%s,1)
-""" % (ext, COMPILABLE_EXTENSIONS[ext]))})
-
- # Suffix rules for generated source files.
- self.suffix_rules_objdir1.update({ext: ("""\
-$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD
- @$(call do_cmd,%s,1)
-""" % (ext, COMPILABLE_EXTENSIONS[ext]))})
- self.suffix_rules_objdir2.update({ext: ("""\
-$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
- @$(call do_cmd,%s,1)
-""" % (ext, COMPILABLE_EXTENSIONS[ext]))})
-
-
- def Write(self, qualified_target, base_path, output_filename, spec, configs,
- part_of_all):
- """The main entry point: writes a .mk file for a single target.
-
- Arguments:
- qualified_target: target we're generating
- base_path: path relative to source root we're building in, used to resolve
- target-relative paths
- output_filename: output .mk file name to write
- spec, configs: gyp info
- part_of_all: flag indicating this target is part of 'all'
- """
- gyp.common.EnsureDirExists(output_filename)
-
- self.fp = open(output_filename, 'w')
-
- self.fp.write(header)
-
- self.qualified_target = qualified_target
- self.path = base_path
- self.target = spec['target_name']
- self.type = spec['type']
- self.toolset = spec['toolset']
-
- self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec)
- if self.flavor == 'mac':
- self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec)
- else:
- self.xcode_settings = None
-
- deps, link_deps = self.ComputeDeps(spec)
-
- # Some of the generation below can add extra output, sources, or
- # link dependencies. All of the out params of the functions that
- # follow use names like extra_foo.
- extra_outputs = []
- extra_sources = []
- extra_link_deps = []
- extra_mac_bundle_resources = []
- mac_bundle_deps = []
-
- if self.is_mac_bundle:
- self.output = self.ComputeMacBundleOutput(spec)
- self.output_binary = self.ComputeMacBundleBinaryOutput(spec)
- else:
- self.output = self.output_binary = self.ComputeOutput(spec)
-
- self.is_standalone_static_library = bool(
- spec.get('standalone_static_library', 0))
- self._INSTALLABLE_TARGETS = ('executable', 'loadable_module',
- 'shared_library')
- if (self.is_standalone_static_library or
- self.type in self._INSTALLABLE_TARGETS):
- self.alias = os.path.basename(self.output)
- install_path = self._InstallableTargetInstallPath()
- else:
- self.alias = self.output
- install_path = self.output
-
- self.WriteLn("TOOLSET := " + self.toolset)
- self.WriteLn("TARGET := " + self.target)
-
- # Actions must come first, since they can generate more OBJs for use below.
- if 'actions' in spec:
- self.WriteActions(spec['actions'], extra_sources, extra_outputs,
- extra_mac_bundle_resources, part_of_all)
-
- # Rules must be early like actions.
- if 'rules' in spec:
- self.WriteRules(spec['rules'], extra_sources, extra_outputs,
- extra_mac_bundle_resources, part_of_all)
-
- if 'copies' in spec:
- self.WriteCopies(spec['copies'], extra_outputs, part_of_all)
-
- # Bundle resources.
- if self.is_mac_bundle:
- all_mac_bundle_resources = (
- spec.get('mac_bundle_resources', []) + extra_mac_bundle_resources)
- self.WriteMacBundleResources(all_mac_bundle_resources, mac_bundle_deps)
- self.WriteMacInfoPlist(mac_bundle_deps)
-
- # Sources.
- all_sources = spec.get('sources', []) + extra_sources
- if all_sources:
- if self.flavor == 'mac':
- # libtool on OS X generates warnings for duplicate basenames in the same
- # target.
- _ValidateSourcesForOSX(spec, all_sources)
- self.WriteSources(
- configs, deps, all_sources, extra_outputs,
- extra_link_deps, part_of_all,
- gyp.xcode_emulation.MacPrefixHeader(
- self.xcode_settings, lambda p: Sourceify(self.Absolutify(p)),
- self.Pchify))
- sources = list(filter(Compilable, all_sources))
- if sources:
- self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT1)
- extensions = set([os.path.splitext(s)[1] for s in sources])
- for ext in extensions:
- if ext in self.suffix_rules_srcdir:
- self.WriteLn(self.suffix_rules_srcdir[ext])
- self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT2)
- for ext in extensions:
- if ext in self.suffix_rules_objdir1:
- self.WriteLn(self.suffix_rules_objdir1[ext])
- for ext in extensions:
- if ext in self.suffix_rules_objdir2:
- self.WriteLn(self.suffix_rules_objdir2[ext])
- self.WriteLn('# End of this set of suffix rules')
-
- # Add dependency from bundle to bundle binary.
- if self.is_mac_bundle:
- mac_bundle_deps.append(self.output_binary)
-
- self.WriteTarget(spec, configs, deps, extra_link_deps + link_deps,
- mac_bundle_deps, extra_outputs, part_of_all)
-
- # Update global list of target outputs, used in dependency tracking.
- target_outputs[qualified_target] = install_path
-
- # Update global list of link dependencies.
- if self.type in ('static_library', 'shared_library'):
- target_link_deps[qualified_target] = self.output_binary
-
- # Currently any versions have the same effect, but in future the behavior
- # could be different.
- if self.generator_flags.get('android_ndk_version', None):
- self.WriteAndroidNdkModuleRule(self.target, all_sources, link_deps)
-
- self.fp.close()
-
-
- def WriteSubMake(self, output_filename, makefile_path, targets, build_dir):
- """Write a "sub-project" Makefile.
-
- This is a small, wrapper Makefile that calls the top-level Makefile to build
- the targets from a single gyp file (i.e. a sub-project).
-
- Arguments:
- output_filename: sub-project Makefile name to write
- makefile_path: path to the top-level Makefile
- targets: list of "all" targets for this sub-project
- build_dir: build output directory, relative to the sub-project
- """
- gyp.common.EnsureDirExists(output_filename)
- self.fp = open(output_filename, 'w')
- self.fp.write(header)
- # For consistency with other builders, put sub-project build output in the
- # sub-project dir (see test/subdirectory/gyptest-subdir-all.py).
- self.WriteLn('export builddir_name ?= %s' %
- os.path.join(os.path.dirname(output_filename), build_dir))
- self.WriteLn('.PHONY: all')
- self.WriteLn('all:')
- if makefile_path:
- makefile_path = ' -C ' + makefile_path
- self.WriteLn('\t$(MAKE)%s %s' % (makefile_path, ' '.join(targets)))
- self.fp.close()
-
-
- def WriteActions(self, actions, extra_sources, extra_outputs,
- extra_mac_bundle_resources, part_of_all):
- """Write Makefile code for any 'actions' from the gyp input.
-
- extra_sources: a list that will be filled in with newly generated source
- files, if any
- extra_outputs: a list that will be filled in with any outputs of these
- actions (used to make other pieces dependent on these
- actions)
- part_of_all: flag indicating this target is part of 'all'
- """
- env = self.GetSortedXcodeEnv()
- for action in actions:
- name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
- action['action_name']))
- self.WriteLn('### Rules for action "%s":' % action['action_name'])
- inputs = action['inputs']
- outputs = action['outputs']
-
- # Build up a list of outputs.
- # Collect the output dirs we'll need.
- dirs = set()
- for out in outputs:
- dir = os.path.split(out)[0]
- if dir:
- dirs.add(dir)
- if int(action.get('process_outputs_as_sources', False)):
- extra_sources += outputs
- if int(action.get('process_outputs_as_mac_bundle_resources', False)):
- extra_mac_bundle_resources += outputs
-
- # Write the actual command.
- action_commands = action['action']
- if self.flavor == 'mac':
- action_commands = [gyp.xcode_emulation.ExpandEnvVars(command, env)
- for command in action_commands]
- command = gyp.common.EncodePOSIXShellList(action_commands)
- if 'message' in action:
- self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, action['message']))
- else:
- self.WriteLn('quiet_cmd_%s = ACTION %s $@' % (name, name))
- if len(dirs) > 0:
- command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command
-
- cd_action = 'cd %s; ' % Sourceify(self.path or '.')
-
- # command and cd_action get written to a toplevel variable called
- # cmd_foo. Toplevel variables can't handle things that change per
- # makefile like $(TARGET), so hardcode the target.
- command = command.replace('$(TARGET)', self.target)
- cd_action = cd_action.replace('$(TARGET)', self.target)
-
- # Set LD_LIBRARY_PATH in case the action runs an executable from this
- # build which links to shared libs from this build.
- # actions run on the host, so they should in theory only use host
- # libraries, but until everything is made cross-compile safe, also use
- # target libraries.
- # TODO(piman): when everything is cross-compile safe, remove lib.target
- self.WriteLn('cmd_%s = LD_LIBRARY_PATH=$(builddir)/lib.host:'
- '$(builddir)/lib.target:$$LD_LIBRARY_PATH; '
- 'export LD_LIBRARY_PATH; '
- '%s%s'
- % (name, cd_action, command))
- self.WriteLn()
- outputs = [self.Absolutify(output) for output in outputs]
- # The makefile rules are all relative to the top dir, but the gyp actions
- # are defined relative to their containing dir. This replaces the obj
- # variable for the action rule with an absolute version so that the output
- # goes in the right place.
- # Only write the 'obj' and 'builddir' rules for the "primary" output (:1);
- # it's superfluous for the "extra outputs", and this avoids accidentally
- # writing duplicate dummy rules for those outputs.
- # Same for environment.
- self.WriteLn("%s: obj := $(abs_obj)" % QuoteSpaces(outputs[0]))
- self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(outputs[0]))
- self.WriteSortedXcodeEnv(outputs[0], self.GetSortedXcodeEnv())
-
- for input in inputs:
- assert ' ' not in input, (
- "Spaces in action input filenames not supported (%s)" % input)
- for output in outputs:
- assert ' ' not in output, (
- "Spaces in action output filenames not supported (%s)" % output)
-
- # See the comment in WriteCopies about expanding env vars.
- outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs]
- inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs]
-
- self.WriteDoCmd(outputs, [Sourceify(self.Absolutify(i)) for i in inputs],
- part_of_all=part_of_all, command=name)
-
- # Stuff the outputs in a variable so we can refer to them later.
- outputs_variable = 'action_%s_outputs' % name
- self.WriteLn('%s := %s' % (outputs_variable, ' '.join(outputs)))
- extra_outputs.append('$(%s)' % outputs_variable)
- self.WriteLn()
-
- self.WriteLn()
-
-
- def WriteRules(self, rules, extra_sources, extra_outputs,
- extra_mac_bundle_resources, part_of_all):
- """Write Makefile code for any 'rules' from the gyp input.
-
- extra_sources: a list that will be filled in with newly generated source
- files, if any
- extra_outputs: a list that will be filled in with any outputs of these
- rules (used to make other pieces dependent on these rules)
- part_of_all: flag indicating this target is part of 'all'
- """
- env = self.GetSortedXcodeEnv()
- for rule in rules:
- name = StringToMakefileVariable('%s_%s' % (self.qualified_target,
- rule['rule_name']))
- count = 0
- self.WriteLn('### Generated for rule %s:' % name)
-
- all_outputs = []
-
- for rule_source in rule.get('rule_sources', []):
- dirs = set()
- (rule_source_dirname, rule_source_basename) = os.path.split(rule_source)
- (rule_source_root, rule_source_ext) = \
- os.path.splitext(rule_source_basename)
-
- outputs = [self.ExpandInputRoot(out, rule_source_root,
- rule_source_dirname)
- for out in rule['outputs']]
-
- for out in outputs:
- dir = os.path.dirname(out)
- if dir:
- dirs.add(dir)
- if int(rule.get('process_outputs_as_sources', False)):
- extra_sources += outputs
- if int(rule.get('process_outputs_as_mac_bundle_resources', False)):
- extra_mac_bundle_resources += outputs
- inputs = [Sourceify(self.Absolutify(i)) for i
- in [rule_source] + rule.get('inputs', [])]
- actions = ['$(call do_cmd,%s_%d)' % (name, count)]
-
- if name == 'resources_grit':
- # HACK: This is ugly. Grit intentionally doesn't touch the
- # timestamp of its output file when the file doesn't change,
- # which is fine in hash-based dependency systems like scons
- # and forge, but not kosher in the make world. After some
- # discussion, hacking around it here seems like the least
- # amount of pain.
- actions += ['@touch --no-create $@']
-
- # See the comment in WriteCopies about expanding env vars.
- outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs]
- inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs]
-
- outputs = [self.Absolutify(output) for output in outputs]
- all_outputs += outputs
- # Only write the 'obj' and 'builddir' rules for the "primary" output
- # (:1); it's superfluous for the "extra outputs", and this avoids
- # accidentally writing duplicate dummy rules for those outputs.
- self.WriteLn('%s: obj := $(abs_obj)' % outputs[0])
- self.WriteLn('%s: builddir := $(abs_builddir)' % outputs[0])
- self.WriteMakeRule(outputs, inputs, actions,
- command="%s_%d" % (name, count))
- # Spaces in rule filenames are not supported, but rule variables have
- # spaces in them (e.g. RULE_INPUT_PATH expands to '$(abspath $<)').
- # The spaces within the variables are valid, so remove the variables
- # before checking.
- variables_with_spaces = re.compile(r'\$\([^ ]* \$<\)')
- for output in outputs:
- output = re.sub(variables_with_spaces, '', output)
- assert ' ' not in output, (
- "Spaces in rule filenames not yet supported (%s)" % output)
- self.WriteLn('all_deps += %s' % ' '.join(outputs))
-
- action = [self.ExpandInputRoot(ac, rule_source_root,
- rule_source_dirname)
- for ac in rule['action']]
- mkdirs = ''
- if len(dirs) > 0:
- mkdirs = 'mkdir -p %s; ' % ' '.join(dirs)
- cd_action = 'cd %s; ' % Sourceify(self.path or '.')
-
- # action, cd_action, and mkdirs get written to a toplevel variable
- # called cmd_foo. Toplevel variables can't handle things that change
- # per makefile like $(TARGET), so hardcode the target.
- if self.flavor == 'mac':
- action = [gyp.xcode_emulation.ExpandEnvVars(command, env)
- for command in action]
- action = gyp.common.EncodePOSIXShellList(action)
- action = action.replace('$(TARGET)', self.target)
- cd_action = cd_action.replace('$(TARGET)', self.target)
- mkdirs = mkdirs.replace('$(TARGET)', self.target)
-
- # Set LD_LIBRARY_PATH in case the rule runs an executable from this
- # build which links to shared libs from this build.
- # rules run on the host, so they should in theory only use host
- # libraries, but until everything is made cross-compile safe, also use
- # target libraries.
- # TODO(piman): when everything is cross-compile safe, remove lib.target
- self.WriteLn(
- "cmd_%(name)s_%(count)d = LD_LIBRARY_PATH="
- "$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; "
- "export LD_LIBRARY_PATH; "
- "%(cd_action)s%(mkdirs)s%(action)s" % {
- 'action': action,
- 'cd_action': cd_action,
- 'count': count,
- 'mkdirs': mkdirs,
- 'name': name,
- })
- self.WriteLn(
- 'quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@' % {
- 'count': count,
- 'name': name,
- })
- self.WriteLn()
- count += 1
-
- outputs_variable = 'rule_%s_outputs' % name
- self.WriteList(all_outputs, outputs_variable)
- extra_outputs.append('$(%s)' % outputs_variable)
-
- self.WriteLn('### Finished generating for rule: %s' % name)
- self.WriteLn()
- self.WriteLn('### Finished generating for all rules')
- self.WriteLn('')
-
-
- def WriteCopies(self, copies, extra_outputs, part_of_all):
- """Write Makefile code for any 'copies' from the gyp input.
-
- extra_outputs: a list that will be filled in with any outputs of this action
- (used to make other pieces dependent on this action)
- part_of_all: flag indicating this target is part of 'all'
- """
- self.WriteLn('### Generated for copy rule.')
-
- variable = StringToMakefileVariable(self.qualified_target + '_copies')
- outputs = []
- for copy in copies:
- for path in copy['files']:
- # Absolutify() may call normpath, and will strip trailing slashes.
- path = Sourceify(self.Absolutify(path))
- filename = os.path.split(path)[1]
- output = Sourceify(self.Absolutify(os.path.join(copy['destination'],
- filename)))
-
- # If the output path has variables in it, which happens in practice for
- # 'copies', writing the environment as target-local doesn't work,
- # because the variables are already needed for the target name.
- # Copying the environment variables into global make variables doesn't
- # work either, because then the .d files will potentially contain spaces
- # after variable expansion, and .d file handling cannot handle spaces.
- # As a workaround, manually expand variables at gyp time. Since 'copies'
- # can't run scripts, there's no need to write the env then.
- # WriteDoCmd() will escape spaces for .d files.
- env = self.GetSortedXcodeEnv()
- output = gyp.xcode_emulation.ExpandEnvVars(output, env)
- path = gyp.xcode_emulation.ExpandEnvVars(path, env)
- self.WriteDoCmd([output], [path], 'copy', part_of_all)
- outputs.append(output)
- self.WriteLn('%s = %s' % (variable, ' '.join(QuoteSpaces(o) for o in outputs)))
- extra_outputs.append('$(%s)' % variable)
- self.WriteLn()
-
-
- def WriteMacBundleResources(self, resources, bundle_deps):
- """Writes Makefile code for 'mac_bundle_resources'."""
- self.WriteLn('### Generated for mac_bundle_resources')
-
- for output, res in gyp.xcode_emulation.GetMacBundleResources(
- generator_default_variables['PRODUCT_DIR'], self.xcode_settings,
- [Sourceify(self.Absolutify(r)) for r in resources]):
- _, ext = os.path.splitext(output)
- if ext != '.xcassets':
- # Make does not supports '.xcassets' emulation.
- self.WriteDoCmd([output], [res], 'mac_tool,,,copy-bundle-resource',
- part_of_all=True)
- bundle_deps.append(output)
-
-
- def WriteMacInfoPlist(self, bundle_deps):
- """Write Makefile code for bundle Info.plist files."""
- info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist(
- generator_default_variables['PRODUCT_DIR'], self.xcode_settings,
- lambda p: Sourceify(self.Absolutify(p)))
- if not info_plist:
- return
- if defines:
- # Create an intermediate file to store preprocessed results.
- intermediate_plist = ('$(obj).$(TOOLSET)/$(TARGET)/' +
- os.path.basename(info_plist))
- self.WriteList(defines, intermediate_plist + ': INFOPLIST_DEFINES', '-D',
- quoter=EscapeCppDefine)
- self.WriteMakeRule([intermediate_plist], [info_plist],
- ['$(call do_cmd,infoplist)',
- # "Convert" the plist so that any weird whitespace changes from the
- # preprocessor do not affect the XML parser in mac_tool.
- '@plutil -convert xml1 $@ $@'])
- info_plist = intermediate_plist
- # plists can contain envvars and substitute them into the file.
- self.WriteSortedXcodeEnv(
- out, self.GetSortedXcodeEnv(additional_settings=extra_env))
- self.WriteDoCmd([out], [info_plist], 'mac_tool,,,copy-info-plist',
- part_of_all=True)
- bundle_deps.append(out)
-
-
- def WriteSources(self, configs, deps, sources,
- extra_outputs, extra_link_deps,
- part_of_all, precompiled_header):
- """Write Makefile code for any 'sources' from the gyp input.
- These are source files necessary to build the current target.
-
- configs, deps, sources: input from gyp.
- extra_outputs: a list of extra outputs this action should be dependent on;
- used to serialize action/rules before compilation
- extra_link_deps: a list that will be filled in with any outputs of
- compilation (to be used in link lines)
- part_of_all: flag indicating this target is part of 'all'
- """
-
- # Write configuration-specific variables for CFLAGS, etc.
- for configname in sorted(configs.keys()):
- config = configs[configname]
- self.WriteList(config.get('defines'), 'DEFS_%s' % configname, prefix='-D',
- quoter=EscapeCppDefine)
-
- if self.flavor == 'mac':
- cflags = self.xcode_settings.GetCflags(configname)
- cflags_c = self.xcode_settings.GetCflagsC(configname)
- cflags_cc = self.xcode_settings.GetCflagsCC(configname)
- cflags_objc = self.xcode_settings.GetCflagsObjC(configname)
- cflags_objcc = self.xcode_settings.GetCflagsObjCC(configname)
- else:
- cflags = config.get('cflags')
- cflags_c = config.get('cflags_c')
- cflags_cc = config.get('cflags_cc')
-
- self.WriteLn("# Flags passed to all source files.")
- self.WriteList(cflags, 'CFLAGS_%s' % configname)
- self.WriteLn("# Flags passed to only C files.")
- self.WriteList(cflags_c, 'CFLAGS_C_%s' % configname)
- self.WriteLn("# Flags passed to only C++ files.")
- self.WriteList(cflags_cc, 'CFLAGS_CC_%s' % configname)
- if self.flavor == 'mac':
- self.WriteLn("# Flags passed to only ObjC files.")
- self.WriteList(cflags_objc, 'CFLAGS_OBJC_%s' % configname)
- self.WriteLn("# Flags passed to only ObjC++ files.")
- self.WriteList(cflags_objcc, 'CFLAGS_OBJCC_%s' % configname)
- includes = config.get('include_dirs')
- if includes:
- includes = [Sourceify(self.Absolutify(i)) for i in includes]
- self.WriteList(includes, 'INCS_%s' % configname, prefix='-I')
-
- compilable = list(filter(Compilable, sources))
- objs = [self.Objectify(self.Absolutify(Target(c))) for c in compilable]
- self.WriteList(objs, 'OBJS')
-
- for obj in objs:
- assert ' ' not in obj, (
- "Spaces in object filenames not supported (%s)" % obj)
- self.WriteLn('# Add to the list of files we specially track '
- 'dependencies for.')
- self.WriteLn('all_deps += $(OBJS)')
- self.WriteLn()
-
- # Make sure our dependencies are built first.
- if deps:
- self.WriteMakeRule(['$(OBJS)'], deps,
- comment = 'Make sure our dependencies are built '
- 'before any of us.',
- order_only = True)
-
- # Make sure the actions and rules run first.
- # If they generate any extra headers etc., the per-.o file dep tracking
- # will catch the proper rebuilds, so order only is still ok here.
- if extra_outputs:
- self.WriteMakeRule(['$(OBJS)'], extra_outputs,
- comment = 'Make sure our actions/rules run '
- 'before any of us.',
- order_only = True)
-
- pchdeps = precompiled_header.GetObjDependencies(compilable, objs )
- if pchdeps:
- self.WriteLn('# Dependencies from obj files to their precompiled headers')
- for source, obj, gch in pchdeps:
- self.WriteLn('%s: %s' % (obj, gch))
- self.WriteLn('# End precompiled header dependencies')
-
- if objs:
- extra_link_deps.append('$(OBJS)')
- self.WriteLn("""\
-# CFLAGS et al overrides must be target-local.
-# See "Target-specific Variable Values" in the GNU Make manual.""")
- self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)")
- self.WriteLn("$(OBJS): GYP_CFLAGS := "
- "$(DEFS_$(BUILDTYPE)) "
- "$(INCS_$(BUILDTYPE)) "
- "%s " % precompiled_header.GetInclude('c') +
- "$(CFLAGS_$(BUILDTYPE)) "
- "$(CFLAGS_C_$(BUILDTYPE))")
- self.WriteLn("$(OBJS): GYP_CXXFLAGS := "
- "$(DEFS_$(BUILDTYPE)) "
- "$(INCS_$(BUILDTYPE)) "
- "%s " % precompiled_header.GetInclude('cc') +
- "$(CFLAGS_$(BUILDTYPE)) "
- "$(CFLAGS_CC_$(BUILDTYPE))")
- if self.flavor == 'mac':
- self.WriteLn("$(OBJS): GYP_OBJCFLAGS := "
- "$(DEFS_$(BUILDTYPE)) "
- "$(INCS_$(BUILDTYPE)) "
- "%s " % precompiled_header.GetInclude('m') +
- "$(CFLAGS_$(BUILDTYPE)) "
- "$(CFLAGS_C_$(BUILDTYPE)) "
- "$(CFLAGS_OBJC_$(BUILDTYPE))")
- self.WriteLn("$(OBJS): GYP_OBJCXXFLAGS := "
- "$(DEFS_$(BUILDTYPE)) "
- "$(INCS_$(BUILDTYPE)) "
- "%s " % precompiled_header.GetInclude('mm') +
- "$(CFLAGS_$(BUILDTYPE)) "
- "$(CFLAGS_CC_$(BUILDTYPE)) "
- "$(CFLAGS_OBJCC_$(BUILDTYPE))")
-
- self.WritePchTargets(precompiled_header.GetPchBuildCommands())
-
- # If there are any object files in our input file list, link them into our
- # output.
- extra_link_deps += list(filter(Linkable, sources))
-
- self.WriteLn()
-
- def WritePchTargets(self, pch_commands):
- """Writes make rules to compile prefix headers."""
- if not pch_commands:
- return
-
- for gch, lang_flag, lang, input in pch_commands:
- extra_flags = {
- 'c': '$(CFLAGS_C_$(BUILDTYPE))',
- 'cc': '$(CFLAGS_CC_$(BUILDTYPE))',
- 'm': '$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))',
- 'mm': '$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))',
- }[lang]
- var_name = {
- 'c': 'GYP_PCH_CFLAGS',
- 'cc': 'GYP_PCH_CXXFLAGS',
- 'm': 'GYP_PCH_OBJCFLAGS',
- 'mm': 'GYP_PCH_OBJCXXFLAGS',
- }[lang]
- self.WriteLn("%s: %s := %s " % (gch, var_name, lang_flag) +
- "$(DEFS_$(BUILDTYPE)) "
- "$(INCS_$(BUILDTYPE)) "
- "$(CFLAGS_$(BUILDTYPE)) " +
- extra_flags)
-
- self.WriteLn('%s: %s FORCE_DO_CMD' % (gch, input))
- self.WriteLn('\t@$(call do_cmd,pch_%s,1)' % lang)
- self.WriteLn('')
- assert ' ' not in gch, (
- "Spaces in gch filenames not supported (%s)" % gch)
- self.WriteLn('all_deps += %s' % gch)
- self.WriteLn('')
-
-
- def ComputeOutputBasename(self, spec):
- """Return the 'output basename' of a gyp spec.
-
- E.g., the loadable module 'foobar' in directory 'baz' will produce
- 'libfoobar.so'
- """
- assert not self.is_mac_bundle
-
- if self.flavor == 'mac' and self.type in (
- 'static_library', 'executable', 'shared_library', 'loadable_module'):
- return self.xcode_settings.GetExecutablePath()
-
- target = spec['target_name']
- target_prefix = ''
- target_ext = ''
- if self.type == 'static_library':
- if target[:3] == 'lib':
- target = target[3:]
- target_prefix = 'lib'
- target_ext = '.a'
- elif self.type in ('loadable_module', 'shared_library'):
- if target[:3] == 'lib':
- target = target[3:]
- target_prefix = 'lib'
- if self.flavor == 'aix':
- target_ext = '.a'
- else:
- target_ext = '.so'
- elif self.type == 'none':
- target = '%s.stamp' % target
- elif self.type != 'executable':
- print("ERROR: What output file should be generated?",
- "type", self.type, "target", target)
-
- target_prefix = spec.get('product_prefix', target_prefix)
- target = spec.get('product_name', target)
- product_ext = spec.get('product_extension')
- if product_ext:
- target_ext = '.' + product_ext
-
- return target_prefix + target + target_ext
-
-
- def _InstallImmediately(self):
- return self.toolset == 'target' and self.flavor == 'mac' and self.type in (
- 'static_library', 'executable', 'shared_library', 'loadable_module')
-
-
- def ComputeOutput(self, spec):
- """Return the 'output' (full output path) of a gyp spec.
-
- E.g., the loadable module 'foobar' in directory 'baz' will produce
- '$(obj)/baz/libfoobar.so'
- """
- assert not self.is_mac_bundle
-
- path = os.path.join('$(obj).' + self.toolset, self.path)
- if self.type == 'executable' or self._InstallImmediately():
- path = '$(builddir)'
- path = spec.get('product_dir', path)
- return os.path.join(path, self.ComputeOutputBasename(spec))
-
-
- def ComputeMacBundleOutput(self, spec):
- """Return the 'output' (full output path) to a bundle output directory."""
- assert self.is_mac_bundle
- path = generator_default_variables['PRODUCT_DIR']
- return os.path.join(path, self.xcode_settings.GetWrapperName())
-
-
- def ComputeMacBundleBinaryOutput(self, spec):
- """Return the 'output' (full output path) to the binary in a bundle."""
- path = generator_default_variables['PRODUCT_DIR']
- return os.path.join(path, self.xcode_settings.GetExecutablePath())
-
-
- def ComputeDeps(self, spec):
- """Compute the dependencies of a gyp spec.
-
- Returns a tuple (deps, link_deps), where each is a list of
- filenames that will need to be put in front of make for either
- building (deps) or linking (link_deps).
- """
- deps = []
- link_deps = []
- if 'dependencies' in spec:
- deps.extend([target_outputs[dep] for dep in spec['dependencies']
- if target_outputs[dep]])
- for dep in spec['dependencies']:
- if dep in target_link_deps:
- link_deps.append(target_link_deps[dep])
- deps.extend(link_deps)
- # TODO: It seems we need to transitively link in libraries (e.g. -lfoo)?
- # This hack makes it work:
- # link_deps.extend(spec.get('libraries', []))
- return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps))
-
-
- def WriteDependencyOnExtraOutputs(self, target, extra_outputs):
- self.WriteMakeRule([self.output_binary], extra_outputs,
- comment = 'Build our special outputs first.',
- order_only = True)
-
-
- def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
- extra_outputs, part_of_all):
- """Write Makefile code to produce the final target of the gyp spec.
-
- spec, configs: input from gyp.
- deps, link_deps: dependency lists; see ComputeDeps()
- extra_outputs: any extra outputs that our target should depend on
- part_of_all: flag indicating this target is part of 'all'
- """
-
- self.WriteLn('### Rules for final target.')
-
- if extra_outputs:
- self.WriteDependencyOnExtraOutputs(self.output_binary, extra_outputs)
- self.WriteMakeRule(extra_outputs, deps,
- comment=('Preserve order dependency of '
- 'special output on deps.'),
- order_only = True)
-
- target_postbuilds = {}
- if self.type != 'none':
- for configname in sorted(configs.keys()):
- config = configs[configname]
- if self.flavor == 'mac':
- ldflags = self.xcode_settings.GetLdflags(configname,
- generator_default_variables['PRODUCT_DIR'],
- lambda p: Sourceify(self.Absolutify(p)))
-
- # TARGET_POSTBUILDS_$(BUILDTYPE) is added to postbuilds later on.
- gyp_to_build = gyp.common.InvertRelativePath(self.path)
- target_postbuild = self.xcode_settings.AddImplicitPostbuilds(
- configname,
- QuoteSpaces(os.path.normpath(os.path.join(gyp_to_build,
- self.output))),
- QuoteSpaces(os.path.normpath(os.path.join(gyp_to_build,
- self.output_binary))))
- if target_postbuild:
- target_postbuilds[configname] = target_postbuild
- else:
- ldflags = config.get('ldflags', [])
- # Compute an rpath for this output if needed.
- if any(dep.endswith('.so') or '.so.' in dep for dep in deps):
- # We want to get the literal string "$ORIGIN" into the link command,
- # so we need lots of escaping.
- ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset)
- ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' %
- self.toolset)
- library_dirs = config.get('library_dirs', [])
- ldflags += [('-L%s' % library_dir) for library_dir in library_dirs]
- self.WriteList(ldflags, 'LDFLAGS_%s' % configname)
- if self.flavor == 'mac':
- self.WriteList(self.xcode_settings.GetLibtoolflags(configname),
- 'LIBTOOLFLAGS_%s' % configname)
- libraries = spec.get('libraries')
- if libraries:
- # Remove duplicate entries
- libraries = gyp.common.uniquer(libraries)
- if self.flavor == 'mac':
- libraries = self.xcode_settings.AdjustLibraries(libraries)
- self.WriteList(libraries, 'LIBS')
- self.WriteLn('%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))' %
- QuoteSpaces(self.output_binary))
- self.WriteLn('%s: LIBS := $(LIBS)' % QuoteSpaces(self.output_binary))
-
- if self.flavor == 'mac':
- self.WriteLn('%s: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))' %
- QuoteSpaces(self.output_binary))
-
- # Postbuild actions. Like actions, but implicitly depend on the target's
- # output.
- postbuilds = []
- if self.flavor == 'mac':
- if target_postbuilds:
- postbuilds.append('$(TARGET_POSTBUILDS_$(BUILDTYPE))')
- postbuilds.extend(
- gyp.xcode_emulation.GetSpecPostbuildCommands(spec))
-
- if postbuilds:
- # Envvars may be referenced by TARGET_POSTBUILDS_$(BUILDTYPE),
- # so we must output its definition first, since we declare variables
- # using ":=".
- self.WriteSortedXcodeEnv(self.output, self.GetSortedXcodePostbuildEnv())
-
- for configname in target_postbuilds:
- self.WriteLn('%s: TARGET_POSTBUILDS_%s := %s' %
- (QuoteSpaces(self.output),
- configname,
- gyp.common.EncodePOSIXShellList(target_postbuilds[configname])))
-
- # Postbuilds expect to be run in the gyp file's directory, so insert an
- # implicit postbuild to cd to there.
- postbuilds.insert(0, gyp.common.EncodePOSIXShellList(['cd', self.path]))
- for i in range(len(postbuilds)):
- if not postbuilds[i].startswith('$'):
- postbuilds[i] = EscapeShellArgument(postbuilds[i])
- self.WriteLn('%s: builddir := $(abs_builddir)' % QuoteSpaces(self.output))
- self.WriteLn('%s: POSTBUILDS := %s' % (
- QuoteSpaces(self.output), ' '.join(postbuilds)))
-
- # A bundle directory depends on its dependencies such as bundle resources
- # and bundle binary. When all dependencies have been built, the bundle
- # needs to be packaged.
- if self.is_mac_bundle:
- # If the framework doesn't contain a binary, then nothing depends
- # on the actions -- make the framework depend on them directly too.
- self.WriteDependencyOnExtraOutputs(self.output, extra_outputs)
-
- # Bundle dependencies. Note that the code below adds actions to this
- # target, so if you move these two lines, move the lines below as well.
- self.WriteList([QuoteSpaces(dep) for dep in bundle_deps], 'BUNDLE_DEPS')
- self.WriteLn('%s: $(BUNDLE_DEPS)' % QuoteSpaces(self.output))
-
- # After the framework is built, package it. Needs to happen before
- # postbuilds, since postbuilds depend on this.
- if self.type in ('shared_library', 'loadable_module'):
- self.WriteLn('\t@$(call do_cmd,mac_package_framework,,,%s)' %
- self.xcode_settings.GetFrameworkVersion())
-
- # Bundle postbuilds can depend on the whole bundle, so run them after
- # the bundle is packaged, not already after the bundle binary is done.
- if postbuilds:
- self.WriteLn('\t@$(call do_postbuilds)')
- postbuilds = [] # Don't write postbuilds for target's output.
-
- # Needed by test/mac/gyptest-rebuild.py.
- self.WriteLn('\t@true # No-op, used by tests')
-
- # Since this target depends on binary and resources which are in
- # nested subfolders, the framework directory will be older than
- # its dependencies usually. To prevent this rule from executing
- # on every build (expensive, especially with postbuilds), expliclity
- # update the time on the framework directory.
- self.WriteLn('\t@touch -c %s' % QuoteSpaces(self.output))
-
- if postbuilds:
- assert not self.is_mac_bundle, ('Postbuilds for bundles should be done '
- 'on the bundle, not the binary (target \'%s\')' % self.target)
- assert 'product_dir' not in spec, ('Postbuilds do not work with '
- 'custom product_dir')
-
- if self.type == 'executable':
- self.WriteLn('%s: LD_INPUTS := %s' % (
- QuoteSpaces(self.output_binary),
- ' '.join(QuoteSpaces(dep) for dep in link_deps)))
- if self.toolset == 'host' and self.flavor == 'android':
- self.WriteDoCmd([self.output_binary], link_deps, 'link_host',
- part_of_all, postbuilds=postbuilds)
- else:
- self.WriteDoCmd([self.output_binary], link_deps, 'link', part_of_all,
- postbuilds=postbuilds)
-
- elif self.type == 'static_library':
- for link_dep in link_deps:
- assert ' ' not in link_dep, (
- "Spaces in alink input filenames not supported (%s)" % link_dep)
- if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
- self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
- else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
- elif self.type == 'shared_library':
- self.WriteLn('%s: LD_INPUTS := %s' % (
- QuoteSpaces(self.output_binary),
- ' '.join(QuoteSpaces(dep) for dep in link_deps)))
- self.WriteDoCmd([self.output_binary], link_deps, 'solink', part_of_all,
- postbuilds=postbuilds)
- elif self.type == 'loadable_module':
- for link_dep in link_deps:
- assert ' ' not in link_dep, (
- "Spaces in module input filenames not supported (%s)" % link_dep)
- if self.toolset == 'host' and self.flavor == 'android':
- self.WriteDoCmd([self.output_binary], link_deps, 'solink_module_host',
- part_of_all, postbuilds=postbuilds)
- else:
- self.WriteDoCmd(
- [self.output_binary], link_deps, 'solink_module', part_of_all,
- postbuilds=postbuilds)
- elif self.type == 'none':
- # Write a stamp line.
- self.WriteDoCmd([self.output_binary], deps, 'touch', part_of_all,
- postbuilds=postbuilds)
- else:
- print("WARNING: no output for", self.type, self.target)
-
- # Add an alias for each target (if there are any outputs).
- # Installable target aliases are created below.
- if ((self.output and self.output != self.target) and
- (self.type not in self._INSTALLABLE_TARGETS)):
- self.WriteMakeRule([self.target], [self.output],
- comment='Add target alias', phony = True)
- if part_of_all:
- self.WriteMakeRule(['all'], [self.target],
- comment = 'Add target alias to "all" target.',
- phony = True)
-
- # Add special-case rules for our installable targets.
- # 1) They need to install to the build dir or "product" dir.
- # 2) They get shortcuts for building (e.g. "make chrome").
- # 3) They are part of "make all".
- if (self.type in self._INSTALLABLE_TARGETS or
- self.is_standalone_static_library):
- if self.type == 'shared_library':
- file_desc = 'shared library'
- elif self.type == 'static_library':
- file_desc = 'static library'
- else:
- file_desc = 'executable'
- install_path = self._InstallableTargetInstallPath()
- installable_deps = [self.output]
- if (self.flavor == 'mac' and not 'product_dir' in spec and
- self.toolset == 'target'):
- # On mac, products are created in install_path immediately.
- assert install_path == self.output, '%s != %s' % (
- install_path, self.output)
-
- # Point the target alias to the final binary output.
- self.WriteMakeRule([self.target], [install_path],
- comment='Add target alias', phony = True)
- if install_path != self.output:
- assert not self.is_mac_bundle # See comment a few lines above.
- self.WriteDoCmd([install_path], [self.output], 'copy',
- comment = 'Copy this to the %s output path.' %
- file_desc, part_of_all=part_of_all)
- installable_deps.append(install_path)
- if self.output != self.alias and self.alias != self.target:
- self.WriteMakeRule([self.alias], installable_deps,
- comment = 'Short alias for building this %s.' %
- file_desc, phony = True)
- if part_of_all:
- self.WriteMakeRule(['all'], [install_path],
- comment = 'Add %s to "all" target.' % file_desc,
- phony = True)
-
-
- def WriteList(self, value_list, variable=None, prefix='',
- quoter=QuoteIfNecessary):
- """Write a variable definition that is a list of values.
-
- E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out
- foo = blaha blahb
- but in a pretty-printed style.
- """
- values = ''
- if value_list:
- value_list = [quoter(prefix + l) for l in value_list]
- values = ' \\\n\t' + ' \\\n\t'.join(value_list)
- self.fp.write('%s :=%s\n\n' % (variable, values))
-
-
- def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None,
- postbuilds=False):
- """Write a Makefile rule that uses do_cmd.
-
- This makes the outputs dependent on the command line that was run,
- as well as support the V= make command line flag.
- """
- suffix = ''
- if postbuilds:
- assert ',' not in command
- suffix = ',,1' # Tell do_cmd to honor $POSTBUILDS
- self.WriteMakeRule(outputs, inputs,
- actions = ['$(call do_cmd,%s%s)' % (command, suffix)],
- comment = comment,
- command = command,
- force = True)
- # Add our outputs to the list of targets we read depfiles from.
- # all_deps is only used for deps file reading, and for deps files we replace
- # spaces with ? because escaping doesn't work with make's $(sort) and
- # other functions.
- outputs = [QuoteSpaces(o, SPACE_REPLACEMENT) for o in outputs]
- self.WriteLn('all_deps += %s' % ' '.join(outputs))
-
-
- def WriteMakeRule(self, outputs, inputs, actions=None, comment=None,
- order_only=False, force=False, phony=False, command=None):
- """Write a Makefile rule, with some extra tricks.
-
- outputs: a list of outputs for the rule (note: this is not directly
- supported by make; see comments below)
- inputs: a list of inputs for the rule
- actions: a list of shell commands to run for the rule
- comment: a comment to put in the Makefile above the rule (also useful
- for making this Python script's code self-documenting)
- order_only: if true, makes the dependency order-only
- force: if true, include FORCE_DO_CMD as an order-only dep
- phony: if true, the rule does not actually generate the named output, the
- output is just a name to run the rule
- command: (optional) command name to generate unambiguous labels
- """
- outputs = [QuoteSpaces(o) for o in outputs]
- inputs = [QuoteSpaces(i) for i in inputs]
-
- if comment:
- self.WriteLn('# ' + comment)
- if phony:
- self.WriteLn('.PHONY: ' + ' '.join(outputs))
- if actions:
- self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0])
- force_append = ' FORCE_DO_CMD' if force else ''
-
- if order_only:
- # Order only rule: Just write a simple rule.
- # TODO(evanm): just make order_only a list of deps instead of this hack.
- self.WriteLn('%s: | %s%s' %
- (' '.join(outputs), ' '.join(inputs), force_append))
- elif len(outputs) == 1:
- # Regular rule, one output: Just write a simple rule.
- self.WriteLn('%s: %s%s' % (outputs[0], ' '.join(inputs), force_append))
- else:
- # Regular rule, more than one output: Multiple outputs are tricky in
- # make. We will write three rules:
- # - All outputs depend on an intermediate file.
- # - Make .INTERMEDIATE depend on the intermediate.
- # - The intermediate file depends on the inputs and executes the
- # actual command.
- # - The intermediate recipe will 'touch' the intermediate file.
- # - The multi-output rule will have an do-nothing recipe.
-
- # Hash the target name to avoid generating overlong filenames.
- cmddigest = hashlib.sha1((command or self.target).encode('utf-8')).hexdigest()
- intermediate = "%s.intermediate" % cmddigest
- self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
- self.WriteLn('\t%s' % '@:')
- self.WriteLn('%s: %s' % ('.INTERMEDIATE', intermediate))
- self.WriteLn('%s: %s%s' %
- (intermediate, ' '.join(inputs), force_append))
- actions.insert(0, '$(call do_cmd,touch)')
-
- if actions:
- for action in actions:
- self.WriteLn('\t%s' % action)
- self.WriteLn()
-
-
- def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps):
- """Write a set of LOCAL_XXX definitions for Android NDK.
-
- These variable definitions will be used by Android NDK but do nothing for
- non-Android applications.
-
- Arguments:
- module_name: Android NDK module name, which must be unique among all
- module names.
- all_sources: A list of source files (will be filtered by Compilable).
- link_deps: A list of link dependencies, which must be sorted in
- the order from dependencies to dependents.
- """
- if self.type not in ('executable', 'shared_library', 'static_library'):
- return
-
- self.WriteLn('# Variable definitions for Android applications')
- self.WriteLn('include $(CLEAR_VARS)')
- self.WriteLn('LOCAL_MODULE := ' + module_name)
- self.WriteLn('LOCAL_CFLAGS := $(CFLAGS_$(BUILDTYPE)) '
- '$(DEFS_$(BUILDTYPE)) '
- # LOCAL_CFLAGS is applied to both of C and C++. There is
- # no way to specify $(CFLAGS_C_$(BUILDTYPE)) only for C
- # sources.
- '$(CFLAGS_C_$(BUILDTYPE)) '
- # $(INCS_$(BUILDTYPE)) includes the prefix '-I' while
- # LOCAL_C_INCLUDES does not expect it. So put it in
- # LOCAL_CFLAGS.
- '$(INCS_$(BUILDTYPE))')
- # LOCAL_CXXFLAGS is obsolete and LOCAL_CPPFLAGS is preferred.
- self.WriteLn('LOCAL_CPPFLAGS := $(CFLAGS_CC_$(BUILDTYPE))')
- self.WriteLn('LOCAL_C_INCLUDES :=')
- self.WriteLn('LOCAL_LDLIBS := $(LDFLAGS_$(BUILDTYPE)) $(LIBS)')
-
- # Detect the C++ extension.
- cpp_ext = {'.cc': 0, '.cpp': 0, '.cxx': 0}
- default_cpp_ext = '.cpp'
- for filename in all_sources:
- ext = os.path.splitext(filename)[1]
- if ext in cpp_ext:
- cpp_ext[ext] += 1
- if cpp_ext[ext] > cpp_ext[default_cpp_ext]:
- default_cpp_ext = ext
- self.WriteLn('LOCAL_CPP_EXTENSION := ' + default_cpp_ext)
-
- self.WriteList(list(map(self.Absolutify, filter(Compilable, all_sources))),
- 'LOCAL_SRC_FILES')
-
- # Filter out those which do not match prefix and suffix and produce
- # the resulting list without prefix and suffix.
- def DepsToModules(deps, prefix, suffix):
- modules = []
- for filepath in deps:
- filename = os.path.basename(filepath)
- if filename.startswith(prefix) and filename.endswith(suffix):
- modules.append(filename[len(prefix):-len(suffix)])
- return modules
-
- # Retrieve the default value of 'SHARED_LIB_SUFFIX'
- params = {'flavor': 'linux'}
- default_variables = {}
- CalculateVariables(default_variables, params)
-
- self.WriteList(
- DepsToModules(link_deps,
- generator_default_variables['SHARED_LIB_PREFIX'],
- default_variables['SHARED_LIB_SUFFIX']),
- 'LOCAL_SHARED_LIBRARIES')
- self.WriteList(
- DepsToModules(link_deps,
- generator_default_variables['STATIC_LIB_PREFIX'],
- generator_default_variables['STATIC_LIB_SUFFIX']),
- 'LOCAL_STATIC_LIBRARIES')
-
- if self.type == 'executable':
- self.WriteLn('include $(BUILD_EXECUTABLE)')
- elif self.type == 'shared_library':
- self.WriteLn('include $(BUILD_SHARED_LIBRARY)')
- elif self.type == 'static_library':
- self.WriteLn('include $(BUILD_STATIC_LIBRARY)')
- self.WriteLn()
-
-
- def WriteLn(self, text=''):
- self.fp.write(text + '\n')
-
-
- def GetSortedXcodeEnv(self, additional_settings=None):
- return gyp.xcode_emulation.GetSortedXcodeEnv(
- self.xcode_settings, "$(abs_builddir)",
- os.path.join("$(abs_srcdir)", self.path), "$(BUILDTYPE)",
- additional_settings)
-
-
- def GetSortedXcodePostbuildEnv(self):
- # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
- # TODO(thakis): It would be nice to have some general mechanism instead.
- strip_save_file = self.xcode_settings.GetPerTargetSetting(
- 'CHROMIUM_STRIP_SAVE_FILE', '')
- # Even if strip_save_file is empty, explicitly write it. Else a postbuild
- # might pick up an export from an earlier target.
- return self.GetSortedXcodeEnv(
- additional_settings={'CHROMIUM_STRIP_SAVE_FILE': strip_save_file})
-
-
- def WriteSortedXcodeEnv(self, target, env):
- for k, v in env:
- # For
- # foo := a\ b
- # the escaped space does the right thing. For
- # export foo := a\ b
- # it does not -- the backslash is written to the env as literal character.
- # So don't escape spaces in |env[k]|.
- self.WriteLn('%s: export %s := %s' % (QuoteSpaces(target), k, v))
-
-
- def Objectify(self, path):
- """Convert a path to its output directory form."""
- if '$(' in path:
- path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/' % self.toolset)
- if not '$(obj)' in path:
- path = '$(obj).%s/$(TARGET)/%s' % (self.toolset, path)
- return path
-
-
- def Pchify(self, path, lang):
- """Convert a prefix header path to its output directory form."""
- path = self.Absolutify(path)
- if '$(' in path:
- path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/pch-%s' %
- (self.toolset, lang))
- return path
- return '$(obj).%s/$(TARGET)/pch-%s/%s' % (self.toolset, lang, path)
-
-
- def Absolutify(self, path):
- """Convert a subdirectory-relative path into a base-relative path.
- Skips over paths that contain variables."""
- if '$(' in path:
- # Don't call normpath in this case, as it might collapse the
- # path too aggressively if it features '..'. However it's still
- # important to strip trailing slashes.
- return path.rstrip('/')
- return os.path.normpath(os.path.join(self.path, path))
-
-
- def ExpandInputRoot(self, template, expansion, dirname):
- if '%(INPUT_ROOT)s' not in template and '%(INPUT_DIRNAME)s' not in template:
- return template
- path = template % {
- 'INPUT_ROOT': expansion,
- 'INPUT_DIRNAME': dirname,
- }
- return path
-
-
- def _InstallableTargetInstallPath(self):
- """Returns the location of the final output for an installable target."""
- # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files
- # rely on this. Emulate this behavior for mac.
-
- # XXX(TooTallNate): disabling this code since we don't want this behavior...
- #if (self.type == 'shared_library' and
- # (self.flavor != 'mac' or self.toolset != 'target')):
- # # Install all shared libs into a common directory (per toolset) for
- # # convenient access with LD_LIBRARY_PATH.
- # return '$(builddir)/lib.%s/%s' % (self.toolset, self.alias)
- return '$(builddir)/' + self.alias
-
-
-def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
- build_files):
- """Write the target to regenerate the Makefile."""
- options = params['options']
- build_files_args = [gyp.common.RelativePath(filename, options.toplevel_dir)
- for filename in params['build_files_arg']]
-
- gyp_binary = gyp.common.FixIfRelativePath(params['gyp_binary'],
- options.toplevel_dir)
- if not gyp_binary.startswith(os.sep):
- gyp_binary = os.path.join('.', gyp_binary)
-
- root_makefile.write(
- "quiet_cmd_regen_makefile = ACTION Regenerating $@\n"
- "cmd_regen_makefile = cd $(srcdir); %(cmd)s\n"
- "%(makefile_name)s: %(deps)s\n"
- "\t$(call do_cmd,regen_makefile)\n\n" % {
- 'makefile_name': makefile_name,
- 'deps': ' '.join(SourceifyAndQuoteSpaces(bf) for bf in build_files),
- 'cmd': gyp.common.EncodePOSIXShellList(
- [gyp_binary, '-fmake'] +
- gyp.RegenerateFlags(options) +
- build_files_args)})
-
-
-def PerformBuild(data, configurations, params):
- options = params['options']
- for config in configurations:
- arguments = ['make']
- if options.toplevel_dir and options.toplevel_dir != '.':
- arguments += '-C', options.toplevel_dir
- arguments.append('BUILDTYPE=' + config)
- print('Building [%s]: %s' % (config, arguments))
- subprocess.check_call(arguments)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- options = params['options']
- flavor = gyp.common.GetFlavor(params)
- generator_flags = params.get('generator_flags', {})
- builddir_name = generator_flags.get('output_dir', 'out')
- android_ndk_version = generator_flags.get('android_ndk_version', None)
- default_target = generator_flags.get('default_target', 'all')
-
- def CalculateMakefilePath(build_file, base_name):
- """Determine where to write a Makefile for a given gyp file."""
- # Paths in gyp files are relative to the .gyp file, but we want
- # paths relative to the source root for the master makefile. Grab
- # the path of the .gyp file as the base to relativize against.
- # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp".
- base_path = gyp.common.RelativePath(os.path.dirname(build_file),
- options.depth)
- # We write the file in the base_path directory.
- output_file = os.path.join(options.depth, base_path, base_name)
- if options.generator_output:
- output_file = os.path.join(
- options.depth, options.generator_output, base_path, base_name)
- base_path = gyp.common.RelativePath(os.path.dirname(build_file),
- options.toplevel_dir)
- return base_path, output_file
-
- # TODO: search for the first non-'Default' target. This can go
- # away when we add verification that all targets have the
- # necessary configurations.
- default_configuration = None
- toolsets = set([target_dicts[target]['toolset'] for target in target_list])
- for target in target_list:
- spec = target_dicts[target]
- if spec['default_configuration'] != 'Default':
- default_configuration = spec['default_configuration']
- break
- if not default_configuration:
- default_configuration = 'Default'
-
- srcdir = '.'
- makefile_name = 'Makefile' + options.suffix
- makefile_path = os.path.join(options.toplevel_dir, makefile_name)
- if options.generator_output:
- global srcdir_prefix
- makefile_path = os.path.join(
- options.toplevel_dir, options.generator_output, makefile_name)
- srcdir = gyp.common.RelativePath(srcdir, options.generator_output)
- srcdir_prefix = '$(srcdir)/'
-
- flock_command= 'flock'
- copy_archive_arguments = '-af'
- makedep_arguments = '-MMD'
- header_params = {
- 'default_target': default_target,
- 'builddir': builddir_name,
- 'default_configuration': default_configuration,
- 'flock': flock_command,
- 'flock_index': 1,
- 'link_commands': LINK_COMMANDS_LINUX,
- 'extra_commands': '',
- 'srcdir': srcdir,
- 'copy_archive_args': copy_archive_arguments,
- 'makedep_args': makedep_arguments,
- 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'),
- 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
- 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
- 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
- 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
- 'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
- 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
- 'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
- }
- if flavor == 'mac':
- flock_command = './gyp-mac-tool flock'
- header_params.update({
- 'flock': flock_command,
- 'flock_index': 2,
- 'link_commands': LINK_COMMANDS_MAC,
- 'extra_commands': SHARED_HEADER_MAC_COMMANDS,
- })
- elif flavor == 'android':
- header_params.update({
- 'link_commands': LINK_COMMANDS_ANDROID,
- })
- elif flavor == 'zos':
- copy_archive_arguments = '-fPR'
- makedep_arguments = '-qmakedep=gcc'
- header_params.update({
- 'copy_archive_args': copy_archive_arguments,
- 'makedep_args': makedep_arguments,
- 'link_commands': LINK_COMMANDS_OS390,
- 'CC.target': GetEnvironFallback(('CC_target', 'CC'), 'njsc'),
- 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), 'njsc++'),
- 'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'njsc'),
- 'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'njsc++'),
- })
- elif flavor == 'solaris':
- header_params.update({
- 'flock': './gyp-flock-tool flock',
- 'flock_index': 2,
- })
- elif flavor == 'freebsd':
- # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific.
- header_params.update({
- 'flock': 'lockf',
- })
- elif flavor == 'openbsd':
- copy_archive_arguments = '-pPRf'
- header_params.update({
- 'copy_archive_args': copy_archive_arguments,
- })
- elif flavor == 'aix':
- copy_archive_arguments = '-pPRf'
- header_params.update({
- 'copy_archive_args': copy_archive_arguments,
- 'link_commands': LINK_COMMANDS_AIX,
- 'flock': './gyp-flock-tool flock',
- 'flock_index': 2,
- })
-
- build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
- make_global_settings_array = data[build_file].get('make_global_settings', [])
- wrappers = {}
- for key, value in make_global_settings_array:
- if key.endswith('_wrapper'):
- wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value
- make_global_settings = ''
- for key, value in make_global_settings_array:
- if re.match('.*_wrapper', key):
- continue
- if value[0] != '$':
- value = '$(abspath %s)' % value
- wrapper = wrappers.get(key)
- if wrapper:
- value = '%s %s' % (wrapper, value)
- del wrappers[key]
- if key in ('CC', 'CC.host', 'CXX', 'CXX.host'):
- make_global_settings += (
- 'ifneq (,$(filter $(origin %s), undefined default))\n' % key)
- # Let gyp-time envvars win over global settings.
- env_key = key.replace('.', '_') # CC.host -> CC_host
- if env_key in os.environ:
- value = os.environ[env_key]
- make_global_settings += ' %s = %s\n' % (key, value)
- make_global_settings += 'endif\n'
- else:
- make_global_settings += '%s ?= %s\n' % (key, value)
- # TODO(ukai): define cmd when only wrapper is specified in
- # make_global_settings.
-
- header_params['make_global_settings'] = make_global_settings
-
- gyp.common.EnsureDirExists(makefile_path)
- root_makefile = open(makefile_path, 'w')
- root_makefile.write(SHARED_HEADER % header_params)
- # Currently any versions have the same effect, but in future the behavior
- # could be different.
- if android_ndk_version:
- root_makefile.write(
- '# Define LOCAL_PATH for build of Android applications.\n'
- 'LOCAL_PATH := $(call my-dir)\n'
- '\n')
- for toolset in toolsets:
- root_makefile.write('TOOLSET := %s\n' % toolset)
- WriteRootHeaderSuffixRules(root_makefile)
-
- # Put build-time support tools next to the root Makefile.
- dest_path = os.path.dirname(makefile_path)
- gyp.common.CopyTool(flavor, dest_path)
-
- # Find the list of targets that derive from the gyp file(s) being built.
- needed_targets = set()
- for build_file in params['build_files']:
- for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
- needed_targets.add(target)
-
- build_files = set()
- include_list = set()
- for qualified_target in target_list:
- build_file, target, toolset = gyp.common.ParseQualifiedTarget(
- qualified_target)
-
- this_make_global_settings = data[build_file].get('make_global_settings', [])
- assert make_global_settings_array == this_make_global_settings, (
- "make_global_settings needs to be the same for all targets. %s vs. %s" %
- (this_make_global_settings, make_global_settings))
-
- build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir))
- included_files = data[build_file]['included_files']
- for included_file in included_files:
- # The included_files entries are relative to the dir of the build file
- # that included them, so we have to undo that and then make them relative
- # to the root dir.
- relative_include_file = gyp.common.RelativePath(
- gyp.common.UnrelativePath(included_file, build_file),
- options.toplevel_dir)
- abs_include_file = os.path.abspath(relative_include_file)
- # If the include file is from the ~/.gyp dir, we should use absolute path
- # so that relocating the src dir doesn't break the path.
- if (params['home_dot_gyp'] and
- abs_include_file.startswith(params['home_dot_gyp'])):
- build_files.add(abs_include_file)
- else:
- build_files.add(relative_include_file)
-
- base_path, output_file = CalculateMakefilePath(build_file,
- target + '.' + toolset + options.suffix + '.mk')
-
- spec = target_dicts[qualified_target]
- configs = spec['configurations']
-
- if flavor == 'mac':
- gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
-
- writer = MakefileWriter(generator_flags, flavor)
- writer.Write(qualified_target, base_path, output_file, spec, configs,
- part_of_all=qualified_target in needed_targets)
-
- # Our root_makefile lives at the source root. Compute the relative path
- # from there to the output_file for including.
- mkfile_rel_path = gyp.common.RelativePath(output_file,
- os.path.dirname(makefile_path))
- include_list.add(mkfile_rel_path)
-
- # Write out per-gyp (sub-project) Makefiles.
- depth_rel_path = gyp.common.RelativePath(options.depth, os.getcwd())
- for build_file in build_files:
- # The paths in build_files were relativized above, so undo that before
- # testing against the non-relativized items in target_list and before
- # calculating the Makefile path.
- build_file = os.path.join(depth_rel_path, build_file)
- gyp_targets = [target_dicts[target]['target_name'] for target in target_list
- if target.startswith(build_file) and
- target in needed_targets]
- # Only generate Makefiles for gyp files with targets.
- if not gyp_targets:
- continue
- base_path, output_file = CalculateMakefilePath(build_file,
- os.path.splitext(os.path.basename(build_file))[0] + '.Makefile')
- makefile_rel_path = gyp.common.RelativePath(os.path.dirname(makefile_path),
- os.path.dirname(output_file))
- writer.WriteSubMake(output_file, makefile_rel_path, gyp_targets,
- builddir_name)
-
-
- # Write out the sorted list of includes.
- root_makefile.write('\n')
- for include_file in sorted(include_list):
- # We wrap each .mk include in an if statement so users can tell make to
- # not load a file by setting NO_LOAD. The below make code says, only
- # load the .mk file if the .mk filename doesn't start with a token in
- # NO_LOAD.
- root_makefile.write(
- "ifeq ($(strip $(foreach prefix,$(NO_LOAD),\\\n"
- " $(findstring $(join ^,$(prefix)),\\\n"
- " $(join ^," + include_file + ")))),)\n")
- root_makefile.write(" include " + include_file + "\n")
- root_makefile.write("endif\n")
- root_makefile.write('\n')
-
- if (not generator_flags.get('standalone')
- and generator_flags.get('auto_regeneration', True)):
- WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)
-
- root_makefile.write(SHARED_FOOTER)
-
- root_makefile.close()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
deleted file mode 100644
index 8dbe0dc05..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
+++ /dev/null
@@ -1,3522 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from __future__ import print_function
-
-import copy
-import ntpath
-import os
-import posixpath
-import re
-import subprocess
-import sys
-
-from collections import OrderedDict
-
-import gyp.common
-import gyp.easy_xml as easy_xml
-import gyp.generator.ninja as ninja_generator
-import gyp.MSVSNew as MSVSNew
-import gyp.MSVSProject as MSVSProject
-import gyp.MSVSSettings as MSVSSettings
-import gyp.MSVSToolFile as MSVSToolFile
-import gyp.MSVSUserFile as MSVSUserFile
-import gyp.MSVSUtil as MSVSUtil
-import gyp.MSVSVersion as MSVSVersion
-from gyp.common import GypError
-from gyp.common import OrderedSet
-
-PY3 = bytes != str
-
-
-# Regular expression for validating Visual Studio GUIDs. If the GUID
-# contains lowercase hex letters, MSVS will be fine. However,
-# IncrediBuild BuildConsole will parse the solution file, but then
-# silently skip building the target causing hard to track down errors.
-# Note that this only happens with the BuildConsole, and does not occur
-# if IncrediBuild is executed from inside Visual Studio. This regex
-# validates that the string looks like a GUID with all uppercase hex
-# letters.
-VALID_MSVS_GUID_CHARS = re.compile(r'^[A-F0-9\-]+$')
-
-
-generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '.exe',
- 'STATIC_LIB_PREFIX': '',
- 'SHARED_LIB_PREFIX': '',
- 'STATIC_LIB_SUFFIX': '.lib',
- 'SHARED_LIB_SUFFIX': '.dll',
- 'INTERMEDIATE_DIR': '$(IntDir)',
- 'SHARED_INTERMEDIATE_DIR': '$(OutDir)obj/global_intermediate',
- 'OS': 'win',
- 'PRODUCT_DIR': '$(OutDir)',
- 'LIB_DIR': '$(OutDir)lib',
- 'RULE_INPUT_ROOT': '$(InputName)',
- 'RULE_INPUT_DIRNAME': '$(InputDir)',
- 'RULE_INPUT_EXT': '$(InputExt)',
- 'RULE_INPUT_NAME': '$(InputFileName)',
- 'RULE_INPUT_PATH': '$(InputPath)',
- 'CONFIGURATION_NAME': '$(ConfigurationName)',
-}
-
-
-# The msvs specific sections that hold paths
-generator_additional_path_sections = [
- 'msvs_cygwin_dirs',
- 'msvs_props',
-]
-
-
-generator_additional_non_configuration_keys = [
- 'msvs_cygwin_dirs',
- 'msvs_cygwin_shell',
- 'msvs_large_pdb',
- 'msvs_shard',
- 'msvs_external_builder',
- 'msvs_external_builder_out_dir',
- 'msvs_external_builder_build_cmd',
- 'msvs_external_builder_clean_cmd',
- 'msvs_external_builder_clcompile_cmd',
- 'msvs_enable_winrt',
- 'msvs_requires_importlibrary',
- 'msvs_enable_winphone',
- 'msvs_enable_marmasm',
- 'msvs_application_type_revision',
- 'msvs_target_platform_version',
- 'msvs_target_platform_minversion',
-]
-
-
-# List of precompiled header related keys.
-precomp_keys = [
- 'msvs_precompiled_header',
- 'msvs_precompiled_source',
-]
-
-
-cached_username = None
-
-
-cached_domain = None
-
-
-# TODO(gspencer): Switch the os.environ calls to be
-# win32api.GetDomainName() and win32api.GetUserName() once the
-# python version in depot_tools has been updated to work on Vista
-# 64-bit.
-def _GetDomainAndUserName():
- if sys.platform not in ('win32', 'cygwin'):
- return ('DOMAIN', 'USERNAME')
- global cached_username
- global cached_domain
- if not cached_domain or not cached_username:
- domain = os.environ.get('USERDOMAIN')
- username = os.environ.get('USERNAME')
- if not domain or not username:
- call = subprocess.Popen(['net', 'config', 'Workstation'],
- stdout=subprocess.PIPE)
- config = call.communicate()[0]
- if PY3:
- config = config.decode('utf-8')
- username_re = re.compile(r'^User name\s+(\S+)', re.MULTILINE)
- username_match = username_re.search(config)
- if username_match:
- username = username_match.group(1)
- domain_re = re.compile(r'^Logon domain\s+(\S+)', re.MULTILINE)
- domain_match = domain_re.search(config)
- if domain_match:
- domain = domain_match.group(1)
- cached_domain = domain
- cached_username = username
- return (cached_domain, cached_username)
-
-fixpath_prefix = None
-
-
-def _NormalizedSource(source):
- """Normalize the path.
-
- But not if that gets rid of a variable, as this may expand to something
- larger than one directory.
-
- Arguments:
- source: The path to be normalize.d
-
- Returns:
- The normalized path.
- """
- normalized = os.path.normpath(source)
- if source.count('$') == normalized.count('$'):
- source = normalized
- return source
-
-
-def _FixPath(path):
- """Convert paths to a form that will make sense in a vcproj file.
-
- Arguments:
- path: The path to convert, may contain / etc.
- Returns:
- The path with all slashes made into backslashes.
- """
- if fixpath_prefix and path and not os.path.isabs(path) and not path[0] == '$' and not _IsWindowsAbsPath(path):
- path = os.path.join(fixpath_prefix, path)
- path = path.replace('/', '\\')
- path = _NormalizedSource(path)
- if path and path[-1] == '\\':
- path = path[:-1]
- return path
-
-
-def _IsWindowsAbsPath(path):
- r"""
- On Cygwin systems Python needs a little help determining if a path is an absolute Windows path or not, so that
- it does not treat those as relative, which results in bad paths like:
-
- '..\C:\<some path>\some_source_code_file.cc'
- """
- return path.startswith('c:') or path.startswith('C:')
-
-
-def _FixPaths(paths):
- """Fix each of the paths of the list."""
- return [_FixPath(i) for i in paths]
-
-
-def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None,
- list_excluded=True, msvs_version=None):
- """Converts a list split source file paths into a vcproj folder hierarchy.
-
- Arguments:
- sources: A list of source file paths split.
- prefix: A list of source file path layers meant to apply to each of sources.
- excluded: A set of excluded files.
- msvs_version: A MSVSVersion object.
-
- Returns:
- A hierarchy of filenames and MSVSProject.Filter objects that matches the
- layout of the source tree.
- For example:
- _ConvertSourcesToFilterHierarchy([['a', 'bob1.c'], ['b', 'bob2.c']],
- prefix=['joe'])
- -->
- [MSVSProject.Filter('a', contents=['joe\\a\\bob1.c']),
- MSVSProject.Filter('b', contents=['joe\\b\\bob2.c'])]
- """
- if not prefix: prefix = []
- result = []
- excluded_result = []
- folders = OrderedDict()
- # Gather files into the final result, excluded, or folders.
- for s in sources:
- if len(s) == 1:
- filename = _NormalizedSource('\\'.join(prefix + s))
- if filename in excluded:
- excluded_result.append(filename)
- else:
- result.append(filename)
- elif msvs_version and not msvs_version.UsesVcxproj():
- # For MSVS 2008 and earlier, we need to process all files before walking
- # the sub folders.
- if not folders.get(s[0]):
- folders[s[0]] = []
- folders[s[0]].append(s[1:])
- else:
- contents = _ConvertSourcesToFilterHierarchy([s[1:]], prefix + [s[0]],
- excluded=excluded,
- list_excluded=list_excluded,
- msvs_version=msvs_version)
- contents = MSVSProject.Filter(s[0], contents=contents)
- result.append(contents)
- # Add a folder for excluded files.
- if excluded_result and list_excluded:
- excluded_folder = MSVSProject.Filter('_excluded_files',
- contents=excluded_result)
- result.append(excluded_folder)
-
- if msvs_version and msvs_version.UsesVcxproj():
- return result
-
- # Populate all the folders.
- for f in folders:
- contents = _ConvertSourcesToFilterHierarchy(folders[f], prefix=prefix + [f],
- excluded=excluded,
- list_excluded=list_excluded,
- msvs_version=msvs_version)
- contents = MSVSProject.Filter(f, contents=contents)
- result.append(contents)
- return result
-
-
-def _ToolAppend(tools, tool_name, setting, value, only_if_unset=False):
- if not value: return
- _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset)
-
-
-def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False):
- # TODO(bradnelson): ugly hack, fix this more generally!!!
- if 'Directories' in setting or 'Dependencies' in setting:
- if type(value) == str:
- value = value.replace('/', '\\')
- else:
- value = [i.replace('/', '\\') for i in value]
- if not tools.get(tool_name):
- tools[tool_name] = dict()
- tool = tools[tool_name]
- if tool.get(setting):
- if only_if_unset: return
- if type(tool[setting]) == list and type(value) == list:
- tool[setting] += value
- else:
- raise TypeError(
- 'Appending "%s" to a non-list setting "%s" for tool "%s" is '
- 'not allowed, previous value: %s' % (
- value, setting, tool_name, str(tool[setting])))
- else:
- tool[setting] = value
-
-
-def _ConfigPlatform(config_data):
- return config_data.get('msvs_configuration_platform', 'Win32')
-
-
-def _ConfigBaseName(config_name, platform_name):
- if config_name.endswith('_' + platform_name):
- return config_name[0:-len(platform_name) - 1]
- else:
- return config_name
-
-
-def _ConfigFullName(config_name, config_data):
- platform_name = _ConfigPlatform(config_data)
- return '%s|%s' % (_ConfigBaseName(config_name, platform_name), platform_name)
-
-
-def _ConfigWindowsTargetPlatformVersion(config_data):
- ver = config_data.get('msvs_windows_target_platform_version')
- if not ver or re.match(r'^\d+', ver):
- return ver
- for key in [r'HKLM\Software\Microsoft\Microsoft SDKs\Windows\%s',
- r'HKLM\Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows\%s']:
- sdkdir = MSVSVersion._RegistryGetValue(key % ver, 'InstallationFolder')
- if not sdkdir:
- continue
- version = MSVSVersion._RegistryGetValue(key % ver, 'ProductVersion') or ''
- # find a matching entry in sdkdir\include
- names = sorted([x for x in os.listdir(r'%s\include' % sdkdir) \
- if x.startswith(version)], reverse = True)
- return names[0]
-
-
-def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path,
- quote_cmd, do_setup_env):
-
- if [x for x in cmd if '$(InputDir)' in x]:
- input_dir_preamble = (
- 'set INPUTDIR=$(InputDir)\n'
- 'if NOT DEFINED INPUTDIR set INPUTDIR=.\\\n'
- 'set INPUTDIR=%INPUTDIR:~0,-1%\n'
- )
- else:
- input_dir_preamble = ''
-
- if cygwin_shell:
- # Find path to cygwin.
- cygwin_dir = _FixPath(spec.get('msvs_cygwin_dirs', ['.'])[0])
- # Prepare command.
- direct_cmd = cmd
- direct_cmd = [i.replace('$(IntDir)',
- '`cygpath -m "${INTDIR}"`') for i in direct_cmd]
- direct_cmd = [i.replace('$(OutDir)',
- '`cygpath -m "${OUTDIR}"`') for i in direct_cmd]
- direct_cmd = [i.replace('$(InputDir)',
- '`cygpath -m "${INPUTDIR}"`') for i in direct_cmd]
- if has_input_path:
- direct_cmd = [i.replace('$(InputPath)',
- '`cygpath -m "${INPUTPATH}"`')
- for i in direct_cmd]
- direct_cmd = ['\\"%s\\"' % i.replace('"', '\\\\\\"') for i in direct_cmd]
- # direct_cmd = gyp.common.EncodePOSIXShellList(direct_cmd)
- direct_cmd = ' '.join(direct_cmd)
- # TODO(quote): regularize quoting path names throughout the module
- cmd = ''
- if do_setup_env:
- cmd += 'call "$(ProjectDir)%(cygwin_dir)s\\setup_env.bat" && '
- cmd += 'set CYGWIN=nontsec&& '
- if direct_cmd.find('NUMBER_OF_PROCESSORS') >= 0:
- cmd += 'set /a NUMBER_OF_PROCESSORS_PLUS_1=%%NUMBER_OF_PROCESSORS%%+1&& '
- if direct_cmd.find('INTDIR') >= 0:
- cmd += 'set INTDIR=$(IntDir)&& '
- if direct_cmd.find('OUTDIR') >= 0:
- cmd += 'set OUTDIR=$(OutDir)&& '
- if has_input_path and direct_cmd.find('INPUTPATH') >= 0:
- cmd += 'set INPUTPATH=$(InputPath) && '
- cmd += 'bash -c "%(cmd)s"'
- cmd = cmd % {'cygwin_dir': cygwin_dir,
- 'cmd': direct_cmd}
- return input_dir_preamble + cmd
- else:
- # Convert cat --> type to mimic unix.
- if cmd[0] == 'cat':
- command = ['type']
- else:
- command = [cmd[0].replace('/', '\\')]
- # Add call before command to ensure that commands can be tied together one
- # after the other without aborting in Incredibuild, since IB makes a bat
- # file out of the raw command string, and some commands (like python) are
- # actually batch files themselves.
- command.insert(0, 'call')
- # Fix the paths
- # TODO(quote): This is a really ugly heuristic, and will miss path fixing
- # for arguments like "--arg=path" or "/opt:path".
- # If the argument starts with a slash or dash, it's probably a command line
- # switch
- arguments = [i if (i[:1] in "/-") else _FixPath(i) for i in cmd[1:]]
- arguments = [i.replace('$(InputDir)', '%INPUTDIR%') for i in arguments]
- arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments]
- if quote_cmd:
- # Support a mode for using cmd directly.
- # Convert any paths to native form (first element is used directly).
- # TODO(quote): regularize quoting path names throughout the module
- arguments = ['"%s"' % i for i in arguments]
- # Collapse into a single command.
- return input_dir_preamble + ' '.join(command + arguments)
-
-
-def _BuildCommandLineForRule(spec, rule, has_input_path, do_setup_env):
- # Currently this weird argument munging is used to duplicate the way a
- # python script would need to be run as part of the chrome tree.
- # Eventually we should add some sort of rule_default option to set this
- # per project. For now the behavior chrome needs is the default.
- mcs = rule.get('msvs_cygwin_shell')
- if mcs is None:
- mcs = int(spec.get('msvs_cygwin_shell', 1))
- elif isinstance(mcs, str):
- mcs = int(mcs)
- quote_cmd = int(rule.get('msvs_quote_cmd', 1))
- return _BuildCommandLineForRuleRaw(spec, rule['action'], mcs, has_input_path,
- quote_cmd, do_setup_env=do_setup_env)
-
-
-def _AddActionStep(actions_dict, inputs, outputs, description, command):
- """Merge action into an existing list of actions.
-
- Care must be taken so that actions which have overlapping inputs either don't
- get assigned to the same input, or get collapsed into one.
-
- Arguments:
- actions_dict: dictionary keyed on input name, which maps to a list of
- dicts describing the actions attached to that input file.
- inputs: list of inputs
- outputs: list of outputs
- description: description of the action
- command: command line to execute
- """
- # Require there to be at least one input (call sites will ensure this).
- assert inputs
-
- action = {
- 'inputs': inputs,
- 'outputs': outputs,
- 'description': description,
- 'command': command,
- }
-
- # Pick where to stick this action.
- # While less than optimal in terms of build time, attach them to the first
- # input for now.
- chosen_input = inputs[0]
-
- # Add it there.
- if chosen_input not in actions_dict:
- actions_dict[chosen_input] = []
- actions_dict[chosen_input].append(action)
-
-
-def _AddCustomBuildToolForMSVS(p, spec, primary_input,
- inputs, outputs, description, cmd):
- """Add a custom build tool to execute something.
-
- Arguments:
- p: the target project
- spec: the target project dict
- primary_input: input file to attach the build tool to
- inputs: list of inputs
- outputs: list of outputs
- description: description of the action
- cmd: command line to execute
- """
- inputs = _FixPaths(inputs)
- outputs = _FixPaths(outputs)
- tool = MSVSProject.Tool(
- 'VCCustomBuildTool',
- {'Description': description,
- 'AdditionalDependencies': ';'.join(inputs),
- 'Outputs': ';'.join(outputs),
- 'CommandLine': cmd,
- })
- # Add to the properties of primary input for each config.
- for config_name, c_data in spec['configurations'].items():
- p.AddFileConfig(_FixPath(primary_input),
- _ConfigFullName(config_name, c_data), tools=[tool])
-
-
-def _AddAccumulatedActionsToMSVS(p, spec, actions_dict):
- """Add actions accumulated into an actions_dict, merging as needed.
-
- Arguments:
- p: the target project
- spec: the target project dict
- actions_dict: dictionary keyed on input name, which maps to a list of
- dicts describing the actions attached to that input file.
- """
- for primary_input in actions_dict:
- inputs = OrderedSet()
- outputs = OrderedSet()
- descriptions = []
- commands = []
- for action in actions_dict[primary_input]:
- inputs.update(OrderedSet(action['inputs']))
- outputs.update(OrderedSet(action['outputs']))
- descriptions.append(action['description'])
- commands.append(action['command'])
- # Add the custom build step for one input file.
- description = ', and also '.join(descriptions)
- command = '\r\n'.join(commands)
- _AddCustomBuildToolForMSVS(p, spec,
- primary_input=primary_input,
- inputs=inputs,
- outputs=outputs,
- description=description,
- cmd=command)
-
-
-def _RuleExpandPath(path, input_file):
- """Given the input file to which a rule applied, string substitute a path.
-
- Arguments:
- path: a path to string expand
- input_file: the file to which the rule applied.
- Returns:
- The string substituted path.
- """
- path = path.replace('$(InputName)',
- os.path.splitext(os.path.split(input_file)[1])[0])
- path = path.replace('$(InputDir)', os.path.dirname(input_file))
- path = path.replace('$(InputExt)',
- os.path.splitext(os.path.split(input_file)[1])[1])
- path = path.replace('$(InputFileName)', os.path.split(input_file)[1])
- path = path.replace('$(InputPath)', input_file)
- return path
-
-
-def _FindRuleTriggerFiles(rule, sources):
- """Find the list of files which a particular rule applies to.
-
- Arguments:
- rule: the rule in question
- sources: the set of all known source files for this project
- Returns:
- The list of sources that trigger a particular rule.
- """
- return rule.get('rule_sources', [])
-
-
-def _RuleInputsAndOutputs(rule, trigger_file):
- """Find the inputs and outputs generated by a rule.
-
- Arguments:
- rule: the rule in question.
- trigger_file: the main trigger for this rule.
- Returns:
- The pair of (inputs, outputs) involved in this rule.
- """
- raw_inputs = _FixPaths(rule.get('inputs', []))
- raw_outputs = _FixPaths(rule.get('outputs', []))
- inputs = OrderedSet()
- outputs = OrderedSet()
- inputs.add(trigger_file)
- for i in raw_inputs:
- inputs.add(_RuleExpandPath(i, trigger_file))
- for o in raw_outputs:
- outputs.add(_RuleExpandPath(o, trigger_file))
- return (inputs, outputs)
-
-
-def _GenerateNativeRulesForMSVS(p, rules, output_dir, spec, options):
- """Generate a native rules file.
-
- Arguments:
- p: the target project
- rules: the set of rules to include
- output_dir: the directory in which the project/gyp resides
- spec: the project dict
- options: global generator options
- """
- rules_filename = '%s%s.rules' % (spec['target_name'],
- options.suffix)
- rules_file = MSVSToolFile.Writer(os.path.join(output_dir, rules_filename),
- spec['target_name'])
- # Add each rule.
- for r in rules:
- rule_name = r['rule_name']
- rule_ext = r['extension']
- inputs = _FixPaths(r.get('inputs', []))
- outputs = _FixPaths(r.get('outputs', []))
- # Skip a rule with no action and no inputs.
- if 'action' not in r and not r.get('rule_sources', []):
- continue
- cmd = _BuildCommandLineForRule(spec, r, has_input_path=True,
- do_setup_env=True)
- rules_file.AddCustomBuildRule(name=rule_name,
- description=r.get('message', rule_name),
- extensions=[rule_ext],
- additional_dependencies=inputs,
- outputs=outputs,
- cmd=cmd)
- # Write out rules file.
- rules_file.WriteIfChanged()
-
- # Add rules file to project.
- p.AddToolFile(rules_filename)
-
-
-def _Cygwinify(path):
- path = path.replace('$(OutDir)', '$(OutDirCygwin)')
- path = path.replace('$(IntDir)', '$(IntDirCygwin)')
- return path
-
-
-def _GenerateExternalRules(rules, output_dir, spec,
- sources, options, actions_to_add):
- """Generate an external makefile to do a set of rules.
-
- Arguments:
- rules: the list of rules to include
- output_dir: path containing project and gyp files
- spec: project specification data
- sources: set of sources known
- options: global generator options
- actions_to_add: The list of actions we will add to.
- """
- filename = '%s_rules%s.mk' % (spec['target_name'], options.suffix)
- mk_file = gyp.common.WriteOnDiff(os.path.join(output_dir, filename))
- # Find cygwin style versions of some paths.
- mk_file.write('OutDirCygwin:=$(shell cygpath -u "$(OutDir)")\n')
- mk_file.write('IntDirCygwin:=$(shell cygpath -u "$(IntDir)")\n')
- # Gather stuff needed to emit all: target.
- all_inputs = OrderedSet()
- all_outputs = OrderedSet()
- all_output_dirs = OrderedSet()
- first_outputs = []
- for rule in rules:
- trigger_files = _FindRuleTriggerFiles(rule, sources)
- for tf in trigger_files:
- inputs, outputs = _RuleInputsAndOutputs(rule, tf)
- all_inputs.update(OrderedSet(inputs))
- all_outputs.update(OrderedSet(outputs))
- # Only use one target from each rule as the dependency for
- # 'all' so we don't try to build each rule multiple times.
- first_outputs.append(list(outputs)[0])
- # Get the unique output directories for this rule.
- output_dirs = [os.path.split(i)[0] for i in outputs]
- for od in output_dirs:
- all_output_dirs.add(od)
- first_outputs_cyg = [_Cygwinify(i) for i in first_outputs]
- # Write out all: target, including mkdir for each output directory.
- mk_file.write('all: %s\n' % ' '.join(first_outputs_cyg))
- for od in all_output_dirs:
- if od:
- mk_file.write('\tmkdir -p `cygpath -u "%s"`\n' % od)
- mk_file.write('\n')
- # Define how each output is generated.
- for rule in rules:
- trigger_files = _FindRuleTriggerFiles(rule, sources)
- for tf in trigger_files:
- # Get all the inputs and outputs for this rule for this trigger file.
- inputs, outputs = _RuleInputsAndOutputs(rule, tf)
- inputs = [_Cygwinify(i) for i in inputs]
- outputs = [_Cygwinify(i) for i in outputs]
- # Prepare the command line for this rule.
- cmd = [_RuleExpandPath(c, tf) for c in rule['action']]
- cmd = ['"%s"' % i for i in cmd]
- cmd = ' '.join(cmd)
- # Add it to the makefile.
- mk_file.write('%s: %s\n' % (' '.join(outputs), ' '.join(inputs)))
- mk_file.write('\t%s\n\n' % cmd)
- # Close up the file.
- mk_file.close()
-
- # Add makefile to list of sources.
- sources.add(filename)
- # Add a build action to call makefile.
- cmd = ['make',
- 'OutDir=$(OutDir)',
- 'IntDir=$(IntDir)',
- '-j', '${NUMBER_OF_PROCESSORS_PLUS_1}',
- '-f', filename]
- cmd = _BuildCommandLineForRuleRaw(spec, cmd, True, False, True, True)
- # Insert makefile as 0'th input, so it gets the action attached there,
- # as this is easier to understand from in the IDE.
- all_inputs = list(all_inputs)
- all_inputs.insert(0, filename)
- _AddActionStep(actions_to_add,
- inputs=_FixPaths(all_inputs),
- outputs=_FixPaths(all_outputs),
- description='Running external rules for %s' %
- spec['target_name'],
- command=cmd)
-
-
-def _EscapeEnvironmentVariableExpansion(s):
- """Escapes % characters.
-
- Escapes any % characters so that Windows-style environment variable
- expansions will leave them alone.
- See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile
- to understand why we have to do this.
-
- Args:
- s: The string to be escaped.
-
- Returns:
- The escaped string.
- """
- s = s.replace('%', '%%')
- return s
-
-
-quote_replacer_regex = re.compile(r'(\\*)"')
-
-
-def _EscapeCommandLineArgumentForMSVS(s):
- """Escapes a Windows command-line argument.
-
- So that the Win32 CommandLineToArgv function will turn the escaped result back
- into the original string.
- See http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
- ("Parsing C++ Command-Line Arguments") to understand why we have to do
- this.
-
- Args:
- s: the string to be escaped.
- Returns:
- the escaped string.
- """
-
- def _Replace(match):
- # For a literal quote, CommandLineToArgv requires an odd number of
- # backslashes preceding it, and it produces half as many literal backslashes
- # (rounded down). So we need to produce 2n+1 backslashes.
- return 2 * match.group(1) + '\\"'
-
- # Escape all quotes so that they are interpreted literally.
- s = quote_replacer_regex.sub(_Replace, s)
- # Now add unescaped quotes so that any whitespace is interpreted literally.
- s = '"' + s + '"'
- return s
-
-
-delimiters_replacer_regex = re.compile(r'(\\*)([,;]+)')
-
-
-def _EscapeVCProjCommandLineArgListItem(s):
- """Escapes command line arguments for MSVS.
-
- The VCProj format stores string lists in a single string using commas and
- semi-colons as separators, which must be quoted if they are to be
- interpreted literally. However, command-line arguments may already have
- quotes, and the VCProj parser is ignorant of the backslash escaping
- convention used by CommandLineToArgv, so the command-line quotes and the
- VCProj quotes may not be the same quotes. So to store a general
- command-line argument in a VCProj list, we need to parse the existing
- quoting according to VCProj's convention and quote any delimiters that are
- not already quoted by that convention. The quotes that we add will also be
- seen by CommandLineToArgv, so if backslashes precede them then we also have
- to escape those backslashes according to the CommandLineToArgv
- convention.
-
- Args:
- s: the string to be escaped.
- Returns:
- the escaped string.
- """
-
- def _Replace(match):
- # For a non-literal quote, CommandLineToArgv requires an even number of
- # backslashes preceding it, and it produces half as many literal
- # backslashes. So we need to produce 2n backslashes.
- return 2 * match.group(1) + '"' + match.group(2) + '"'
-
- segments = s.split('"')
- # The unquoted segments are at the even-numbered indices.
- for i in range(0, len(segments), 2):
- segments[i] = delimiters_replacer_regex.sub(_Replace, segments[i])
- # Concatenate back into a single string
- s = '"'.join(segments)
- if len(segments) % 2 == 0:
- # String ends while still quoted according to VCProj's convention. This
- # means the delimiter and the next list item that follow this one in the
- # .vcproj file will be misinterpreted as part of this item. There is nothing
- # we can do about this. Adding an extra quote would correct the problem in
- # the VCProj but cause the same problem on the final command-line. Moving
- # the item to the end of the list does works, but that's only possible if
- # there's only one such item. Let's just warn the user.
- print('Warning: MSVS may misinterpret the odd number of ' +
- 'quotes in ' + s, file=sys.stderr)
- return s
-
-
-def _EscapeCppDefineForMSVS(s):
- """Escapes a CPP define so that it will reach the compiler unaltered."""
- s = _EscapeEnvironmentVariableExpansion(s)
- s = _EscapeCommandLineArgumentForMSVS(s)
- s = _EscapeVCProjCommandLineArgListItem(s)
- # cl.exe replaces literal # characters with = in preprocesor definitions for
- # some reason. Octal-encode to work around that.
- s = s.replace('#', '\\%03o' % ord('#'))
- return s
-
-
-quote_replacer_regex2 = re.compile(r'(\\+)"')
-
-
-def _EscapeCommandLineArgumentForMSBuild(s):
- """Escapes a Windows command-line argument for use by MSBuild."""
-
- def _Replace(match):
- return (len(match.group(1)) / 2 * 4) * '\\' + '\\"'
-
- # Escape all quotes so that they are interpreted literally.
- s = quote_replacer_regex2.sub(_Replace, s)
- return s
-
-
-def _EscapeMSBuildSpecialCharacters(s):
- escape_dictionary = {
- '%': '%25',
- '$': '%24',
- '@': '%40',
- "'": '%27',
- ';': '%3B',
- '?': '%3F',
- '*': '%2A'
- }
- result = ''.join([escape_dictionary.get(c, c) for c in s])
- return result
-
-
-def _EscapeCppDefineForMSBuild(s):
- """Escapes a CPP define so that it will reach the compiler unaltered."""
- s = _EscapeEnvironmentVariableExpansion(s)
- s = _EscapeCommandLineArgumentForMSBuild(s)
- s = _EscapeMSBuildSpecialCharacters(s)
- # cl.exe replaces literal # characters with = in preprocesor definitions for
- # some reason. Octal-encode to work around that.
- s = s.replace('#', '\\%03o' % ord('#'))
- return s
-
-
-def _GenerateRulesForMSVS(p, output_dir, options, spec,
- sources, excluded_sources,
- actions_to_add):
- """Generate all the rules for a particular project.
-
- Arguments:
- p: the project
- output_dir: directory to emit rules to
- options: global options passed to the generator
- spec: the specification for this project
- sources: the set of all known source files in this project
- excluded_sources: the set of sources excluded from normal processing
- actions_to_add: deferred list of actions to add in
- """
- rules = spec.get('rules', [])
- rules_native = [r for r in rules if not int(r.get('msvs_external_rule', 0))]
- rules_external = [r for r in rules if int(r.get('msvs_external_rule', 0))]
-
- # Handle rules that use a native rules file.
- if rules_native:
- _GenerateNativeRulesForMSVS(p, rules_native, output_dir, spec, options)
-
- # Handle external rules (non-native rules).
- if rules_external:
- _GenerateExternalRules(rules_external, output_dir, spec,
- sources, options, actions_to_add)
- _AdjustSourcesForRules(rules, sources, excluded_sources, False)
-
-
-def _AdjustSourcesForRules(rules, sources, excluded_sources, is_msbuild):
- # Add outputs generated by each rule (if applicable).
- for rule in rules:
- # Add in the outputs from this rule.
- trigger_files = _FindRuleTriggerFiles(rule, sources)
- for trigger_file in trigger_files:
- # Remove trigger_file from excluded_sources to let the rule be triggered
- # (e.g. rule trigger ax_enums.idl is added to excluded_sources
- # because it's also in an action's inputs in the same project)
- excluded_sources.discard(_FixPath(trigger_file))
- # Done if not processing outputs as sources.
- if int(rule.get('process_outputs_as_sources', False)):
- inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file)
- inputs = OrderedSet(_FixPaths(inputs))
- outputs = OrderedSet(_FixPaths(outputs))
- inputs.remove(_FixPath(trigger_file))
- sources.update(inputs)
- if not is_msbuild:
- excluded_sources.update(inputs)
- sources.update(outputs)
-
-
-def _FilterActionsFromExcluded(excluded_sources, actions_to_add):
- """Take inputs with actions attached out of the list of exclusions.
-
- Arguments:
- excluded_sources: list of source files not to be built.
- actions_to_add: dict of actions keyed on source file they're attached to.
- Returns:
- excluded_sources with files that have actions attached removed.
- """
- must_keep = OrderedSet(_FixPaths(actions_to_add.keys()))
- return [s for s in excluded_sources if s not in must_keep]
-
-
-def _GetDefaultConfiguration(spec):
- return spec['configurations'][spec['default_configuration']]
-
-
-def _GetGuidOfProject(proj_path, spec):
- """Get the guid for the project.
-
- Arguments:
- proj_path: Path of the vcproj or vcxproj file to generate.
- spec: The target dictionary containing the properties of the target.
- Returns:
- the guid.
- Raises:
- ValueError: if the specified GUID is invalid.
- """
- # Pluck out the default configuration.
- default_config = _GetDefaultConfiguration(spec)
- # Decide the guid of the project.
- guid = default_config.get('msvs_guid')
- if guid:
- if VALID_MSVS_GUID_CHARS.match(guid) is None:
- raise ValueError('Invalid MSVS guid: "%s". Must match regex: "%s".' %
- (guid, VALID_MSVS_GUID_CHARS.pattern))
- guid = '{%s}' % guid
- guid = guid or MSVSNew.MakeGuid(proj_path)
- return guid
-
-
-def _GetMsbuildToolsetOfProject(proj_path, spec, version):
- """Get the platform toolset for the project.
-
- Arguments:
- proj_path: Path of the vcproj or vcxproj file to generate.
- spec: The target dictionary containing the properties of the target.
- version: The MSVSVersion object.
- Returns:
- the platform toolset string or None.
- """
- # Pluck out the default configuration.
- default_config = _GetDefaultConfiguration(spec)
- toolset = default_config.get('msbuild_toolset')
- if not toolset and version.DefaultToolset():
- toolset = version.DefaultToolset()
- return toolset
-
-
-def _GenerateProject(project, options, version, generator_flags):
- """Generates a vcproj file.
-
- Arguments:
- project: the MSVSProject object.
- options: global generator options.
- version: the MSVSVersion object.
- generator_flags: dict of generator-specific flags.
- Returns:
- A list of source files that cannot be found on disk.
- """
- default_config = _GetDefaultConfiguration(project.spec)
-
- # Skip emitting anything if told to with msvs_existing_vcproj option.
- if default_config.get('msvs_existing_vcproj'):
- return []
-
- if version.UsesVcxproj():
- return _GenerateMSBuildProject(project, options, version, generator_flags)
- else:
- return _GenerateMSVSProject(project, options, version, generator_flags)
-
-
-# TODO: Avoid code duplication with _ValidateSourcesForOSX in make.py.
-def _ValidateSourcesForMSVSProject(spec, version):
- """Makes sure if duplicate basenames are not specified in the source list.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- version: The VisualStudioVersion object.
- """
- # This validation should not be applied to MSVC2010 and later.
- assert not version.UsesVcxproj()
-
- # TODO: Check if MSVC allows this for loadable_module targets.
- if spec.get('type', None) not in ('static_library', 'shared_library'):
- return
- sources = spec.get('sources', [])
- basenames = {}
- for source in sources:
- name, ext = os.path.splitext(source)
- is_compiled_file = ext in [
- '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
- if not is_compiled_file:
- continue
- basename = os.path.basename(name) # Don't include extension.
- basenames.setdefault(basename, []).append(source)
-
- error = ''
- for basename, files in basenames.items():
- if len(files) > 1:
- error += ' %s: %s\n' % (basename, ' '.join(files))
-
- if error:
- print('static library %s has several files with the same basename:\n' % spec['target_name']
- + error + 'MSVC08 cannot handle that.')
- raise GypError('Duplicate basenames in sources section, see list above')
-
-
-def _GenerateMSVSProject(project, options, version, generator_flags):
- """Generates a .vcproj file. It may create .rules and .user files too.
-
- Arguments:
- project: The project object we will generate the file for.
- options: Global options passed to the generator.
- version: The VisualStudioVersion object.
- generator_flags: dict of generator-specific flags.
- """
- spec = project.spec
- gyp.common.EnsureDirExists(project.path)
-
- platforms = _GetUniquePlatforms(spec)
- p = MSVSProject.Writer(project.path, version, spec['target_name'],
- project.guid, platforms)
-
- # Get directory project file is in.
- project_dir = os.path.split(project.path)[0]
- gyp_path = _NormalizedSource(project.build_file)
- relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir)
-
- config_type = _GetMSVSConfigurationType(spec, project.build_file)
- for config_name, config in spec['configurations'].items():
- _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config)
-
- # MSVC08 and prior version cannot handle duplicate basenames in the same
- # target.
- # TODO: Take excluded sources into consideration if possible.
- _ValidateSourcesForMSVSProject(spec, version)
-
- # Prepare list of sources and excluded sources.
- gyp_file = os.path.split(project.build_file)[1]
- sources, excluded_sources = _PrepareListOfSources(spec, generator_flags,
- gyp_file)
-
- # Add rules.
- actions_to_add = {}
- _GenerateRulesForMSVS(p, project_dir, options, spec,
- sources, excluded_sources,
- actions_to_add)
- list_excluded = generator_flags.get('msvs_list_excluded_files', True)
- sources, excluded_sources, excluded_idl = (
- _AdjustSourcesAndConvertToFilterHierarchy(spec, options, project_dir,
- sources, excluded_sources,
- list_excluded, version))
-
- # Add in files.
- missing_sources = _VerifySourcesExist(sources, project_dir)
- p.AddFiles(sources)
-
- _AddToolFilesToMSVS(p, spec)
- _HandlePreCompiledHeaders(p, sources, spec)
- _AddActions(actions_to_add, spec, relative_path_of_gyp_file)
- _AddCopies(actions_to_add, spec)
- _WriteMSVSUserFile(project.path, version, spec)
-
- # NOTE: this stanza must appear after all actions have been decided.
- # Don't excluded sources with actions attached, or they won't run.
- excluded_sources = _FilterActionsFromExcluded(
- excluded_sources, actions_to_add)
- _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl,
- list_excluded)
- _AddAccumulatedActionsToMSVS(p, spec, actions_to_add)
-
- # Write it out.
- p.WriteIfChanged()
-
- return missing_sources
-
-
-def _GetUniquePlatforms(spec):
- """Returns the list of unique platforms for this spec, e.g ['win32', ...].
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- Returns:
- The MSVSUserFile object created.
- """
- # Gather list of unique platforms.
- platforms = OrderedSet()
- for configuration in spec['configurations']:
- platforms.add(_ConfigPlatform(spec['configurations'][configuration]))
- platforms = list(platforms)
- return platforms
-
-
-def _CreateMSVSUserFile(proj_path, version, spec):
- """Generates a .user file for the user running this Gyp program.
-
- Arguments:
- proj_path: The path of the project file being created. The .user file
- shares the same path (with an appropriate suffix).
- version: The VisualStudioVersion object.
- spec: The target dictionary containing the properties of the target.
- Returns:
- The MSVSUserFile object created.
- """
- (domain, username) = _GetDomainAndUserName()
- vcuser_filename = '.'.join([proj_path, domain, username, 'user'])
- user_file = MSVSUserFile.Writer(vcuser_filename, version,
- spec['target_name'])
- return user_file
-
-
-def _GetMSVSConfigurationType(spec, build_file):
- """Returns the configuration type for this project.
-
- It's a number defined by Microsoft. May raise an exception.
-
- Args:
- spec: The target dictionary containing the properties of the target.
- build_file: The path of the gyp file.
- Returns:
- An integer, the configuration type.
- """
- try:
- config_type = {
- 'executable': '1', # .exe
- 'shared_library': '2', # .dll
- 'loadable_module': '2', # .dll
- 'static_library': '4', # .lib
- 'none': '10', # Utility type
- }[spec['type']]
- except KeyError:
- if spec.get('type'):
- raise GypError('Target type %s is not a valid target type for '
- 'target %s in %s.' %
- (spec['type'], spec['target_name'], build_file))
- else:
- raise GypError('Missing type field for target %s in %s.' %
- (spec['target_name'], build_file))
- return config_type
-
-
-def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config):
- """Adds a configuration to the MSVS project.
-
- Many settings in a vcproj file are specific to a configuration. This
- function the main part of the vcproj file that's configuration specific.
-
- Arguments:
- p: The target project being generated.
- spec: The target dictionary containing the properties of the target.
- config_type: The configuration type, a number as defined by Microsoft.
- config_name: The name of the configuration.
- config: The dictionary that defines the special processing to be done
- for this configuration.
- """
- # Get the information for this configuration
- include_dirs, midl_include_dirs, resource_include_dirs = \
- _GetIncludeDirs(config)
- libraries = _GetLibraries(spec)
- library_dirs = _GetLibraryDirs(config)
- out_file, vc_tool, _ = _GetOutputFilePathAndTool(spec, msbuild=False)
- defines = _GetDefines(config)
- defines = [_EscapeCppDefineForMSVS(d) for d in defines]
- disabled_warnings = _GetDisabledWarnings(config)
- prebuild = config.get('msvs_prebuild')
- postbuild = config.get('msvs_postbuild')
- def_file = _GetModuleDefinition(spec)
- precompiled_header = config.get('msvs_precompiled_header')
-
- # Prepare the list of tools as a dictionary.
- tools = dict()
- # Add in user specified msvs_settings.
- msvs_settings = config.get('msvs_settings', {})
- MSVSSettings.ValidateMSVSSettings(msvs_settings)
-
- # Prevent default library inheritance from the environment.
- _ToolAppend(tools, 'VCLinkerTool', 'AdditionalDependencies', ['$(NOINHERIT)'])
-
- for tool in msvs_settings:
- settings = config['msvs_settings'][tool]
- for setting in settings:
- _ToolAppend(tools, tool, setting, settings[setting])
- # Add the information to the appropriate tool
- _ToolAppend(tools, 'VCCLCompilerTool',
- 'AdditionalIncludeDirectories', include_dirs)
- _ToolAppend(tools, 'VCMIDLTool',
- 'AdditionalIncludeDirectories', midl_include_dirs)
- _ToolAppend(tools, 'VCResourceCompilerTool',
- 'AdditionalIncludeDirectories', resource_include_dirs)
- # Add in libraries.
- _ToolAppend(tools, 'VCLinkerTool', 'AdditionalDependencies', libraries)
- _ToolAppend(tools, 'VCLinkerTool', 'AdditionalLibraryDirectories',
- library_dirs)
- if out_file:
- _ToolAppend(tools, vc_tool, 'OutputFile', out_file, only_if_unset=True)
- # Add defines.
- _ToolAppend(tools, 'VCCLCompilerTool', 'PreprocessorDefinitions', defines)
- _ToolAppend(tools, 'VCResourceCompilerTool', 'PreprocessorDefinitions',
- defines)
- # Change program database directory to prevent collisions.
- _ToolAppend(tools, 'VCCLCompilerTool', 'ProgramDataBaseFileName',
- '$(IntDir)$(ProjectName)\\vc80.pdb', only_if_unset=True)
- # Add disabled warnings.
- _ToolAppend(tools, 'VCCLCompilerTool',
- 'DisableSpecificWarnings', disabled_warnings)
- # Add Pre-build.
- _ToolAppend(tools, 'VCPreBuildEventTool', 'CommandLine', prebuild)
- # Add Post-build.
- _ToolAppend(tools, 'VCPostBuildEventTool', 'CommandLine', postbuild)
- # Turn on precompiled headers if appropriate.
- if precompiled_header:
- precompiled_header = os.path.split(precompiled_header)[1]
- _ToolAppend(tools, 'VCCLCompilerTool', 'UsePrecompiledHeader', '2')
- _ToolAppend(tools, 'VCCLCompilerTool',
- 'PrecompiledHeaderThrough', precompiled_header)
- _ToolAppend(tools, 'VCCLCompilerTool',
- 'ForcedIncludeFiles', precompiled_header)
- # Loadable modules don't generate import libraries;
- # tell dependent projects to not expect one.
- if spec['type'] == 'loadable_module':
- _ToolAppend(tools, 'VCLinkerTool', 'IgnoreImportLibrary', 'true')
- # Set the module definition file if any.
- if def_file:
- _ToolAppend(tools, 'VCLinkerTool', 'ModuleDefinitionFile', def_file)
-
- _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name)
-
-
-def _GetIncludeDirs(config):
- """Returns the list of directories to be used for #include directives.
-
- Arguments:
- config: The dictionary that defines the special processing to be done
- for this configuration.
- Returns:
- The list of directory paths.
- """
- # TODO(bradnelson): include_dirs should really be flexible enough not to
- # require this sort of thing.
- include_dirs = (
- config.get('include_dirs', []) +
- config.get('msvs_system_include_dirs', []))
- midl_include_dirs = (
- config.get('midl_include_dirs', []) +
- config.get('msvs_system_include_dirs', []))
- resource_include_dirs = config.get('resource_include_dirs', include_dirs)
- include_dirs = _FixPaths(include_dirs)
- midl_include_dirs = _FixPaths(midl_include_dirs)
- resource_include_dirs = _FixPaths(resource_include_dirs)
- return include_dirs, midl_include_dirs, resource_include_dirs
-
-
-def _GetLibraryDirs(config):
- """Returns the list of directories to be used for library search paths.
-
- Arguments:
- config: The dictionary that defines the special processing to be done
- for this configuration.
- Returns:
- The list of directory paths.
- """
-
- library_dirs = config.get('library_dirs', [])
- library_dirs = _FixPaths(library_dirs)
- return library_dirs
-
-
-def _GetLibraries(spec):
- """Returns the list of libraries for this configuration.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- Returns:
- The list of directory paths.
- """
- libraries = spec.get('libraries', [])
- # Strip out -l, as it is not used on windows (but is needed so we can pass
- # in libraries that are assumed to be in the default library path).
- # Also remove duplicate entries, leaving only the last duplicate, while
- # preserving order.
- found = OrderedSet()
- unique_libraries_list = []
- for entry in reversed(libraries):
- library = re.sub(r'^\-l', '', entry)
- if not os.path.splitext(library)[1]:
- library += '.lib'
- if library not in found:
- found.add(library)
- unique_libraries_list.append(library)
- unique_libraries_list.reverse()
- return unique_libraries_list
-
-
-def _GetOutputFilePathAndTool(spec, msbuild):
- """Returns the path and tool to use for this target.
-
- Figures out the path of the file this spec will create and the name of
- the VC tool that will create it.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- Returns:
- A triple of (file path, name of the vc tool, name of the msbuild tool)
- """
- # Select a name for the output file.
- out_file = ''
- vc_tool = ''
- msbuild_tool = ''
- output_file_map = {
- 'executable': ('VCLinkerTool', 'Link', '$(OutDir)', '.exe'),
- 'shared_library': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'),
- 'loadable_module': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'),
- 'static_library': ('VCLibrarianTool', 'Lib', '$(OutDir)lib\\', '.lib'),
- }
- output_file_props = output_file_map.get(spec['type'])
- if output_file_props and int(spec.get('msvs_auto_output_file', 1)):
- vc_tool, msbuild_tool, out_dir, suffix = output_file_props
- if spec.get('standalone_static_library', 0):
- out_dir = '$(OutDir)'
- out_dir = spec.get('product_dir', out_dir)
- product_extension = spec.get('product_extension')
- if product_extension:
- suffix = '.' + product_extension
- elif msbuild:
- suffix = '$(TargetExt)'
- prefix = spec.get('product_prefix', '')
- product_name = spec.get('product_name', '$(ProjectName)')
- out_file = ntpath.join(out_dir, prefix + product_name + suffix)
- return out_file, vc_tool, msbuild_tool
-
-
-def _GetOutputTargetExt(spec):
- """Returns the extension for this target, including the dot
-
- If product_extension is specified, set target_extension to this to avoid
- MSB8012, returns None otherwise. Ignores any target_extension settings in
- the input files.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- Returns:
- A string with the extension, or None
- """
- target_extension = spec.get('product_extension')
- if target_extension:
- return '.' + target_extension
- return None
-
-
-def _GetDefines(config):
- """Returns the list of preprocessor definitions for this configuation.
-
- Arguments:
- config: The dictionary that defines the special processing to be done
- for this configuration.
- Returns:
- The list of preprocessor definitions.
- """
- defines = []
- for d in config.get('defines', []):
- if type(d) == list:
- fd = '='.join([str(dpart) for dpart in d])
- else:
- fd = str(d)
- defines.append(fd)
- return defines
-
-
-def _GetDisabledWarnings(config):
- return [str(i) for i in config.get('msvs_disabled_warnings', [])]
-
-
-def _GetModuleDefinition(spec):
- def_file = ''
- if spec['type'] in ['shared_library', 'loadable_module', 'executable']:
- def_files = [s for s in spec.get('sources', []) if s.endswith('.def')]
- if len(def_files) == 1:
- def_file = _FixPath(def_files[0])
- elif def_files:
- raise ValueError(
- 'Multiple module definition files in one target, target %s lists '
- 'multiple .def files: %s' % (
- spec['target_name'], ' '.join(def_files)))
- return def_file
-
-
-def _ConvertToolsToExpectedForm(tools):
- """Convert tools to a form expected by Visual Studio.
-
- Arguments:
- tools: A dictionary of settings; the tool name is the key.
- Returns:
- A list of Tool objects.
- """
- tool_list = []
- for tool, settings in tools.items():
- # Collapse settings with lists.
- settings_fixed = {}
- for setting, value in settings.items():
- if type(value) == list:
- if ((tool == 'VCLinkerTool' and
- setting == 'AdditionalDependencies') or
- setting == 'AdditionalOptions'):
- settings_fixed[setting] = ' '.join(value)
- else:
- settings_fixed[setting] = ';'.join(value)
- else:
- settings_fixed[setting] = value
- # Add in this tool.
- tool_list.append(MSVSProject.Tool(tool, settings_fixed))
- return tool_list
-
-
-def _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name):
- """Add to the project file the configuration specified by config.
-
- Arguments:
- p: The target project being generated.
- spec: the target project dict.
- tools: A dictionary of settings; the tool name is the key.
- config: The dictionary that defines the special processing to be done
- for this configuration.
- config_type: The configuration type, a number as defined by Microsoft.
- config_name: The name of the configuration.
- """
- attributes = _GetMSVSAttributes(spec, config, config_type)
- # Add in this configuration.
- tool_list = _ConvertToolsToExpectedForm(tools)
- p.AddConfig(_ConfigFullName(config_name, config),
- attrs=attributes, tools=tool_list)
-
-
-def _GetMSVSAttributes(spec, config, config_type):
- # Prepare configuration attributes.
- prepared_attrs = {}
- source_attrs = config.get('msvs_configuration_attributes', {})
- for a in source_attrs:
- prepared_attrs[a] = source_attrs[a]
- # Add props files.
- vsprops_dirs = config.get('msvs_props', [])
- vsprops_dirs = _FixPaths(vsprops_dirs)
- if vsprops_dirs:
- prepared_attrs['InheritedPropertySheets'] = ';'.join(vsprops_dirs)
- # Set configuration type.
- prepared_attrs['ConfigurationType'] = config_type
- output_dir = prepared_attrs.get('OutputDirectory',
- '$(SolutionDir)$(ConfigurationName)')
- prepared_attrs['OutputDirectory'] = _FixPath(output_dir) + '\\'
- if 'IntermediateDirectory' not in prepared_attrs:
- intermediate = '$(ConfigurationName)\\obj\\$(ProjectName)'
- prepared_attrs['IntermediateDirectory'] = _FixPath(intermediate) + '\\'
- else:
- intermediate = _FixPath(prepared_attrs['IntermediateDirectory']) + '\\'
- intermediate = MSVSSettings.FixVCMacroSlashes(intermediate)
- prepared_attrs['IntermediateDirectory'] = intermediate
- return prepared_attrs
-
-
-def _AddNormalizedSources(sources_set, sources_array):
- sources_set.update(_NormalizedSource(s) for s in sources_array)
-
-
-def _PrepareListOfSources(spec, generator_flags, gyp_file):
- """Prepare list of sources and excluded sources.
-
- Besides the sources specified directly in the spec, adds the gyp file so
- that a change to it will cause a re-compile. Also adds appropriate sources
- for actions and copies. Assumes later stage will un-exclude files which
- have custom build steps attached.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- gyp_file: The name of the gyp file.
- Returns:
- A pair of (list of sources, list of excluded sources).
- The sources will be relative to the gyp file.
- """
- sources = OrderedSet()
- _AddNormalizedSources(sources, spec.get('sources', []))
- excluded_sources = OrderedSet()
- # Add in the gyp file.
- if not generator_flags.get('standalone'):
- sources.add(gyp_file)
-
- # Add in 'action' inputs and outputs.
- for a in spec.get('actions', []):
- inputs = a['inputs']
- inputs = [_NormalizedSource(i) for i in inputs]
- # Add all inputs to sources and excluded sources.
- inputs = OrderedSet(inputs)
- sources.update(inputs)
- if not spec.get('msvs_external_builder'):
- excluded_sources.update(inputs)
- if int(a.get('process_outputs_as_sources', False)):
- _AddNormalizedSources(sources, a.get('outputs', []))
- # Add in 'copies' inputs and outputs.
- for cpy in spec.get('copies', []):
- _AddNormalizedSources(sources, cpy.get('files', []))
- return (sources, excluded_sources)
-
-
-def _AdjustSourcesAndConvertToFilterHierarchy(
- spec, options, gyp_dir, sources, excluded_sources, list_excluded, version):
- """Adjusts the list of sources and excluded sources.
-
- Also converts the sets to lists.
-
- Arguments:
- spec: The target dictionary containing the properties of the target.
- options: Global generator options.
- gyp_dir: The path to the gyp file being processed.
- sources: A set of sources to be included for this project.
- excluded_sources: A set of sources to be excluded for this project.
- version: A MSVSVersion object.
- Returns:
- A trio of (list of sources, list of excluded sources,
- path of excluded IDL file)
- """
- # Exclude excluded sources coming into the generator.
- excluded_sources.update(OrderedSet(spec.get('sources_excluded', [])))
- # Add excluded sources into sources for good measure.
- sources.update(excluded_sources)
- # Convert to proper windows form.
- # NOTE: sources goes from being a set to a list here.
- # NOTE: excluded_sources goes from being a set to a list here.
- sources = _FixPaths(sources)
- # Convert to proper windows form.
- excluded_sources = _FixPaths(excluded_sources)
-
- excluded_idl = _IdlFilesHandledNonNatively(spec, sources)
-
- precompiled_related = _GetPrecompileRelatedFiles(spec)
- # Find the excluded ones, minus the precompiled header related ones.
- fully_excluded = [i for i in excluded_sources if i not in precompiled_related]
-
- # Convert to folders and the right slashes.
- sources = [i.split('\\') for i in sources]
- sources = _ConvertSourcesToFilterHierarchy(sources, excluded=fully_excluded,
- list_excluded=list_excluded,
- msvs_version=version)
-
- # Prune filters with a single child to flatten ugly directory structures
- # such as ../../src/modules/module1 etc.
- if version.UsesVcxproj():
- while all([isinstance(s, MSVSProject.Filter) for s in sources]) \
- and len(set([s.name for s in sources])) == 1:
- assert all([len(s.contents) == 1 for s in sources])
- sources = [s.contents[0] for s in sources]
- else:
- while len(sources) == 1 and isinstance(sources[0], MSVSProject.Filter):
- sources = sources[0].contents
-
- return sources, excluded_sources, excluded_idl
-
-
-def _IdlFilesHandledNonNatively(spec, sources):
- # If any non-native rules use 'idl' as an extension exclude idl files.
- # Gather a list here to use later.
- using_idl = False
- for rule in spec.get('rules', []):
- if rule['extension'] == 'idl' and int(rule.get('msvs_external_rule', 0)):
- using_idl = True
- break
- if using_idl:
- excluded_idl = [i for i in sources if i.endswith('.idl')]
- else:
- excluded_idl = []
- return excluded_idl
-
-
-def _GetPrecompileRelatedFiles(spec):
- # Gather a list of precompiled header related sources.
- precompiled_related = []
- for _, config in spec['configurations'].items():
- for k in precomp_keys:
- f = config.get(k)
- if f:
- precompiled_related.append(_FixPath(f))
- return precompiled_related
-
-
-def _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl,
- list_excluded):
- exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl)
- for file_name, excluded_configs in exclusions.items():
- if (not list_excluded and
- len(excluded_configs) == len(spec['configurations'])):
- # If we're not listing excluded files, then they won't appear in the
- # project, so don't try to configure them to be excluded.
- pass
- else:
- for config_name, config in excluded_configs:
- p.AddFileConfig(file_name, _ConfigFullName(config_name, config),
- {'ExcludedFromBuild': 'true'})
-
-
-def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl):
- exclusions = {}
- # Exclude excluded sources from being built.
- for f in excluded_sources:
- excluded_configs = []
- for config_name, config in spec['configurations'].items():
- precomped = [_FixPath(config.get(i, '')) for i in precomp_keys]
- # Don't do this for ones that are precompiled header related.
- if f not in precomped:
- excluded_configs.append((config_name, config))
- exclusions[f] = excluded_configs
- # If any non-native rules use 'idl' as an extension exclude idl files.
- # Exclude them now.
- for f in excluded_idl:
- excluded_configs = []
- for config_name, config in spec['configurations'].items():
- excluded_configs.append((config_name, config))
- exclusions[f] = excluded_configs
- return exclusions
-
-
-def _AddToolFilesToMSVS(p, spec):
- # Add in tool files (rules).
- tool_files = OrderedSet()
- for _, config in spec['configurations'].items():
- for f in config.get('msvs_tool_files', []):
- tool_files.add(f)
- for f in tool_files:
- p.AddToolFile(f)
-
-
-def _HandlePreCompiledHeaders(p, sources, spec):
- # Pre-compiled header source stubs need a different compiler flag
- # (generate precompiled header) and any source file not of the same
- # kind (i.e. C vs. C++) as the precompiled header source stub needs
- # to have use of precompiled headers disabled.
- extensions_excluded_from_precompile = []
- for config_name, config in spec['configurations'].items():
- source = config.get('msvs_precompiled_source')
- if source:
- source = _FixPath(source)
- # UsePrecompiledHeader=1 for if using precompiled headers.
- tool = MSVSProject.Tool('VCCLCompilerTool',
- {'UsePrecompiledHeader': '1'})
- p.AddFileConfig(source, _ConfigFullName(config_name, config),
- {}, tools=[tool])
- basename, extension = os.path.splitext(source)
- if extension == '.c':
- extensions_excluded_from_precompile = ['.cc', '.cpp', '.cxx']
- else:
- extensions_excluded_from_precompile = ['.c']
- def DisableForSourceTree(source_tree):
- for source in source_tree:
- if isinstance(source, MSVSProject.Filter):
- DisableForSourceTree(source.contents)
- else:
- basename, extension = os.path.splitext(source)
- if extension in extensions_excluded_from_precompile:
- for config_name, config in spec['configurations'].items():
- tool = MSVSProject.Tool('VCCLCompilerTool',
- {'UsePrecompiledHeader': '0',
- 'ForcedIncludeFiles': '$(NOINHERIT)'})
- p.AddFileConfig(_FixPath(source),
- _ConfigFullName(config_name, config),
- {}, tools=[tool])
- # Do nothing if there was no precompiled source.
- if extensions_excluded_from_precompile:
- DisableForSourceTree(sources)
-
-
-def _AddActions(actions_to_add, spec, relative_path_of_gyp_file):
- # Add actions.
- actions = spec.get('actions', [])
- # Don't setup_env every time. When all the actions are run together in one
- # batch file in VS, the PATH will grow too long.
- # Membership in this set means that the cygwin environment has been set up,
- # and does not need to be set up again.
- have_setup_env = set()
- for a in actions:
- # Attach actions to the gyp file if nothing else is there.
- inputs = a.get('inputs') or [relative_path_of_gyp_file]
- attached_to = inputs[0]
- need_setup_env = attached_to not in have_setup_env
- cmd = _BuildCommandLineForRule(spec, a, has_input_path=False,
- do_setup_env=need_setup_env)
- have_setup_env.add(attached_to)
- # Add the action.
- _AddActionStep(actions_to_add,
- inputs=inputs,
- outputs=a.get('outputs', []),
- description=a.get('message', a['action_name']),
- command=cmd)
-
-
-def _WriteMSVSUserFile(project_path, version, spec):
- # Add run_as and test targets.
- if 'run_as' in spec:
- run_as = spec['run_as']
- action = run_as.get('action', [])
- environment = run_as.get('environment', [])
- working_directory = run_as.get('working_directory', '.')
- elif int(spec.get('test', 0)):
- action = ['$(TargetPath)', '--gtest_print_time']
- environment = []
- working_directory = '.'
- else:
- return # Nothing to add
- # Write out the user file.
- user_file = _CreateMSVSUserFile(project_path, version, spec)
- for config_name, c_data in spec['configurations'].items():
- user_file.AddDebugSettings(_ConfigFullName(config_name, c_data),
- action, environment, working_directory)
- user_file.WriteIfChanged()
-
-
-def _AddCopies(actions_to_add, spec):
- copies = _GetCopies(spec)
- for inputs, outputs, cmd, description in copies:
- _AddActionStep(actions_to_add, inputs=inputs, outputs=outputs,
- description=description, command=cmd)
-
-
-def _GetCopies(spec):
- copies = []
- # Add copies.
- for cpy in spec.get('copies', []):
- for src in cpy.get('files', []):
- dst = os.path.join(cpy['destination'], os.path.basename(src))
- # _AddCustomBuildToolForMSVS() will call _FixPath() on the inputs and
- # outputs, so do the same for our generated command line.
- if src.endswith('/'):
- src_bare = src[:-1]
- base_dir = posixpath.split(src_bare)[0]
- outer_dir = posixpath.split(src_bare)[1]
- cmd = 'cd "%s" && xcopy /e /f /y "%s" "%s\\%s\\"' % (
- _FixPath(base_dir), outer_dir, _FixPath(dst), outer_dir)
- copies.append(([src], ['dummy_copies', dst], cmd,
- 'Copying %s to %s' % (src, dst)))
- else:
- cmd = 'mkdir "%s" 2>nul & set ERRORLEVEL=0 & copy /Y "%s" "%s"' % (
- _FixPath(cpy['destination']), _FixPath(src), _FixPath(dst))
- copies.append(([src], [dst], cmd, 'Copying %s to %s' % (src, dst)))
- return copies
-
-
-def _GetPathDict(root, path):
- # |path| will eventually be empty (in the recursive calls) if it was initially
- # relative; otherwise it will eventually end up as '\', 'D:\', etc.
- if not path or path.endswith(os.sep):
- return root
- parent, folder = os.path.split(path)
- parent_dict = _GetPathDict(root, parent)
- if folder not in parent_dict:
- parent_dict[folder] = dict()
- return parent_dict[folder]
-
-
-def _DictsToFolders(base_path, bucket, flat):
- # Convert to folders recursively.
- children = []
- for folder, contents in bucket.items():
- if type(contents) == dict:
- folder_children = _DictsToFolders(os.path.join(base_path, folder),
- contents, flat)
- if flat:
- children += folder_children
- else:
- folder_children = MSVSNew.MSVSFolder(os.path.join(base_path, folder),
- name='(' + folder + ')',
- entries=folder_children)
- children.append(folder_children)
- else:
- children.append(contents)
- return children
-
-
-def _CollapseSingles(parent, node):
- # Recursively explorer the tree of dicts looking for projects which are
- # the sole item in a folder which has the same name as the project. Bring
- # such projects up one level.
- if (type(node) == dict and
- len(node) == 1 and
- list(node)[0] == parent + '.vcproj'):
- return node[list(node)[0]]
- if type(node) != dict:
- return node
- for child in node:
- node[child] = _CollapseSingles(child, node[child])
- return node
-
-
-def _GatherSolutionFolders(sln_projects, project_objects, flat):
- root = {}
- # Convert into a tree of dicts on path.
- for p in sln_projects:
- gyp_file, target = gyp.common.ParseQualifiedTarget(p)[0:2]
- gyp_dir = os.path.dirname(gyp_file)
- path_dict = _GetPathDict(root, gyp_dir)
- path_dict[target + '.vcproj'] = project_objects[p]
- # Walk down from the top until we hit a folder that has more than one entry.
- # In practice, this strips the top-level "src/" dir from the hierarchy in
- # the solution.
- while len(root) == 1 and type(root[list(root)[0]]) == dict:
- root = root[list(root)[0]]
- # Collapse singles.
- root = _CollapseSingles('', root)
- # Merge buckets until everything is a root entry.
- return _DictsToFolders('', root, flat)
-
-
-def _GetPathOfProject(qualified_target, spec, options, msvs_version):
- default_config = _GetDefaultConfiguration(spec)
- proj_filename = default_config.get('msvs_existing_vcproj')
- if not proj_filename:
- proj_filename = (spec['target_name'] + options.suffix +
- msvs_version.ProjectExtension())
-
- build_file = gyp.common.BuildFile(qualified_target)
- proj_path = os.path.join(os.path.dirname(build_file), proj_filename)
- fix_prefix = None
- if options.generator_output:
- project_dir_path = os.path.dirname(os.path.abspath(proj_path))
- proj_path = os.path.join(options.generator_output, proj_path)
- fix_prefix = gyp.common.RelativePath(project_dir_path,
- os.path.dirname(proj_path))
- return proj_path, fix_prefix
-
-
-def _GetPlatformOverridesOfProject(spec):
- # Prepare a dict indicating which project configurations are used for which
- # solution configurations for this target.
- config_platform_overrides = {}
- for config_name, c in spec['configurations'].items():
- config_fullname = _ConfigFullName(config_name, c)
- platform = c.get('msvs_target_platform', _ConfigPlatform(c))
- fixed_config_fullname = '%s|%s' % (
- _ConfigBaseName(config_name, _ConfigPlatform(c)), platform)
- config_platform_overrides[config_fullname] = fixed_config_fullname
- return config_platform_overrides
-
-
-def _CreateProjectObjects(target_list, target_dicts, options, msvs_version):
- """Create a MSVSProject object for the targets found in target list.
-
- Arguments:
- target_list: the list of targets to generate project objects for.
- target_dicts: the dictionary of specifications.
- options: global generator options.
- msvs_version: the MSVSVersion object.
- Returns:
- A set of created projects, keyed by target.
- """
- global fixpath_prefix
- # Generate each project.
- projects = {}
- for qualified_target in target_list:
- spec = target_dicts[qualified_target]
- if spec['toolset'] != 'target':
- raise GypError(
- 'Multiple toolsets not supported in msvs build (target %s)' %
- qualified_target)
- proj_path, fixpath_prefix = _GetPathOfProject(qualified_target, spec,
- options, msvs_version)
- guid = _GetGuidOfProject(proj_path, spec)
- overrides = _GetPlatformOverridesOfProject(spec)
- build_file = gyp.common.BuildFile(qualified_target)
- # Create object for this project.
- obj = MSVSNew.MSVSProject(
- proj_path,
- name=spec['target_name'],
- guid=guid,
- spec=spec,
- build_file=build_file,
- config_platform_overrides=overrides,
- fixpath_prefix=fixpath_prefix)
- # Set project toolset if any (MS build only)
- if msvs_version.UsesVcxproj():
- obj.set_msbuild_toolset(
- _GetMsbuildToolsetOfProject(proj_path, spec, msvs_version))
- projects[qualified_target] = obj
- # Set all the dependencies, but not if we are using an external builder like
- # ninja
- for project in projects.values():
- if not project.spec.get('msvs_external_builder'):
- deps = project.spec.get('dependencies', [])
- deps = [projects[d] for d in deps]
- project.set_dependencies(deps)
- return projects
-
-
-def _InitNinjaFlavor(params, target_list, target_dicts):
- """Initialize targets for the ninja flavor.
-
- This sets up the necessary variables in the targets to generate msvs projects
- that use ninja as an external builder. The variables in the spec are only set
- if they have not been set. This allows individual specs to override the
- default values initialized here.
- Arguments:
- params: Params provided to the generator.
- target_list: List of target pairs: 'base/base.gyp:base'.
- target_dicts: Dict of target properties keyed on target pair.
- """
- for qualified_target in target_list:
- spec = target_dicts[qualified_target]
- if spec.get('msvs_external_builder'):
- # The spec explicitly defined an external builder, so don't change it.
- continue
-
- path_to_ninja = spec.get('msvs_path_to_ninja', 'ninja.exe')
-
- spec['msvs_external_builder'] = 'ninja'
- if not spec.get('msvs_external_builder_out_dir'):
- gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target)
- gyp_dir = os.path.dirname(gyp_file)
- configuration = '$(Configuration)'
- if params.get('target_arch') == 'x64':
- configuration += '_x64'
- if params.get('target_arch') == 'arm64':
- configuration += '_arm64'
- spec['msvs_external_builder_out_dir'] = os.path.join(
- gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir),
- ninja_generator.ComputeOutputDir(params),
- configuration)
- if not spec.get('msvs_external_builder_build_cmd'):
- spec['msvs_external_builder_build_cmd'] = [
- path_to_ninja,
- '-C',
- '$(OutDir)',
- '$(ProjectName)',
- ]
- if not spec.get('msvs_external_builder_clean_cmd'):
- spec['msvs_external_builder_clean_cmd'] = [
- path_to_ninja,
- '-C',
- '$(OutDir)',
- '-tclean',
- '$(ProjectName)',
- ]
-
-
-def CalculateVariables(default_variables, params):
- """Generated variables that require params to be known."""
-
- generator_flags = params.get('generator_flags', {})
-
- # Select project file format version (if unset, default to auto detecting).
- msvs_version = MSVSVersion.SelectVisualStudioVersion(
- generator_flags.get('msvs_version', 'auto'))
- # Stash msvs_version for later (so we don't have to probe the system twice).
- params['msvs_version'] = msvs_version
-
- # Set a variable so conditions can be based on msvs_version.
- default_variables['MSVS_VERSION'] = msvs_version.ShortName()
-
- # To determine processor word size on Windows, in addition to checking
- # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
- # process), it is also necessary to check PROCESSOR_ARCITEW6432 (which
- # contains the actual word size of the system when running thru WOW64).
- if (os.environ.get('PROCESSOR_ARCHITECTURE', '').find('64') >= 0 or
- os.environ.get('PROCESSOR_ARCHITEW6432', '').find('64') >= 0):
- default_variables['MSVS_OS_BITS'] = 64
- else:
- default_variables['MSVS_OS_BITS'] = 32
-
- if gyp.common.GetFlavor(params) == 'ninja':
- default_variables['SHARED_INTERMEDIATE_DIR'] = '$(OutDir)gen'
-
-
-def PerformBuild(data, configurations, params):
- options = params['options']
- msvs_version = params['msvs_version']
- devenv = os.path.join(msvs_version.path, 'Common7', 'IDE', 'devenv.com')
-
- for build_file, build_file_dict in data.items():
- (build_file_root, build_file_ext) = os.path.splitext(build_file)
- if build_file_ext != '.gyp':
- continue
- sln_path = build_file_root + options.suffix + '.sln'
- if options.generator_output:
- sln_path = os.path.join(options.generator_output, sln_path)
-
- for config in configurations:
- arguments = [devenv, sln_path, '/Build', config]
- print('Building [%s]: %s' % (config, arguments))
- rtn = subprocess.check_call(arguments)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- """Generate .sln and .vcproj files.
-
- This is the entry point for this generator.
- Arguments:
- target_list: List of target pairs: 'base/base.gyp:base'.
- target_dicts: Dict of target properties keyed on target pair.
- data: Dictionary containing per .gyp data.
- """
- global fixpath_prefix
-
- options = params['options']
-
- # Get the project file format version back out of where we stashed it in
- # GeneratorCalculatedVariables.
- msvs_version = params['msvs_version']
-
- generator_flags = params.get('generator_flags', {})
-
- # Optionally shard targets marked with 'msvs_shard': SHARD_COUNT.
- (target_list, target_dicts) = MSVSUtil.ShardTargets(target_list, target_dicts)
-
- # Optionally use the large PDB workaround for targets marked with
- # 'msvs_large_pdb': 1.
- (target_list, target_dicts) = MSVSUtil.InsertLargePdbShims(
- target_list, target_dicts, generator_default_variables)
-
- # Optionally configure each spec to use ninja as the external builder.
- if params.get('flavor') == 'ninja':
- _InitNinjaFlavor(params, target_list, target_dicts)
-
- # Prepare the set of configurations.
- configs = set()
- for qualified_target in target_list:
- spec = target_dicts[qualified_target]
- for config_name, config in spec['configurations'].items():
- configs.add(_ConfigFullName(config_name, config))
- configs = list(configs)
-
- # Figure out all the projects that will be generated and their guids
- project_objects = _CreateProjectObjects(target_list, target_dicts, options,
- msvs_version)
-
- # Generate each project.
- missing_sources = []
- for project in project_objects.values():
- fixpath_prefix = project.fixpath_prefix
- missing_sources.extend(_GenerateProject(project, options, msvs_version,
- generator_flags))
- fixpath_prefix = None
-
- for build_file in data:
- # Validate build_file extension
- if not build_file.endswith('.gyp'):
- continue
- sln_path = os.path.splitext(build_file)[0] + options.suffix + '.sln'
- if options.generator_output:
- sln_path = os.path.join(options.generator_output, sln_path)
- # Get projects in the solution, and their dependents.
- sln_projects = gyp.common.BuildFileTargets(target_list, build_file)
- sln_projects += gyp.common.DeepDependencyTargets(target_dicts, sln_projects)
- # Create folder hierarchy.
- root_entries = _GatherSolutionFolders(
- sln_projects, project_objects, flat=msvs_version.FlatSolution())
- # Create solution.
- sln = MSVSNew.MSVSSolution(sln_path,
- entries=root_entries,
- variants=configs,
- websiteProperties=False,
- version=msvs_version)
- sln.Write()
-
- if missing_sources:
- error_message = "Missing input files:\n" + \
- '\n'.join(set(missing_sources))
- if generator_flags.get('msvs_error_on_missing_sources', False):
- raise GypError(error_message)
- else:
- print("Warning: " + error_message, file=sys.stdout)
-
-
-def _GenerateMSBuildFiltersFile(filters_path, source_files,
- rule_dependencies, extension_to_rule_name,
- platforms):
- """Generate the filters file.
-
- This file is used by Visual Studio to organize the presentation of source
- files into folders.
-
- Arguments:
- filters_path: The path of the file to be created.
- source_files: The hierarchical structure of all the sources.
- extension_to_rule_name: A dictionary mapping file extensions to rules.
- """
- filter_group = []
- source_group = []
- _AppendFiltersForMSBuild('', source_files, rule_dependencies,
- extension_to_rule_name, platforms,
- filter_group, source_group)
- if filter_group:
- content = ['Project',
- {'ToolsVersion': '4.0',
- 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'
- },
- ['ItemGroup'] + filter_group,
- ['ItemGroup'] + source_group
- ]
- easy_xml.WriteXmlIfChanged(content, filters_path, pretty=True, win32=True)
- elif os.path.exists(filters_path):
- # We don't need this filter anymore. Delete the old filter file.
- os.unlink(filters_path)
-
-
-def _AppendFiltersForMSBuild(parent_filter_name, sources, rule_dependencies,
- extension_to_rule_name, platforms,
- filter_group, source_group):
- """Creates the list of filters and sources to be added in the filter file.
-
- Args:
- parent_filter_name: The name of the filter under which the sources are
- found.
- sources: The hierarchy of filters and sources to process.
- extension_to_rule_name: A dictionary mapping file extensions to rules.
- filter_group: The list to which filter entries will be appended.
- source_group: The list to which source entries will be appeneded.
- """
- for source in sources:
- if isinstance(source, MSVSProject.Filter):
- # We have a sub-filter. Create the name of that sub-filter.
- if not parent_filter_name:
- filter_name = source.name
- else:
- filter_name = '%s\\%s' % (parent_filter_name, source.name)
- # Add the filter to the group.
- filter_group.append(
- ['Filter', {'Include': filter_name},
- ['UniqueIdentifier', MSVSNew.MakeGuid(source.name)]])
- # Recurse and add its dependents.
- _AppendFiltersForMSBuild(filter_name, source.contents,
- rule_dependencies, extension_to_rule_name,
- platforms, filter_group, source_group)
- else:
- # It's a source. Create a source entry.
- _, element = _MapFileToMsBuildSourceType(source, rule_dependencies,
- extension_to_rule_name,
- platforms)
- source_entry = [element, {'Include': source}]
- # Specify the filter it is part of, if any.
- if parent_filter_name:
- source_entry.append(['Filter', parent_filter_name])
- source_group.append(source_entry)
-
-
-def _MapFileToMsBuildSourceType(source, rule_dependencies,
- extension_to_rule_name, platforms):
- """Returns the group and element type of the source file.
-
- Arguments:
- source: The source file name.
- extension_to_rule_name: A dictionary mapping file extensions to rules.
-
- Returns:
- A pair of (group this file should be part of, the label of element)
- """
- _, ext = os.path.splitext(source)
- if ext in extension_to_rule_name:
- group = 'rule'
- element = extension_to_rule_name[ext]
- elif ext in ['.cc', '.cpp', '.c', '.cxx', '.mm']:
- group = 'compile'
- element = 'ClCompile'
- elif ext in ['.h', '.hxx']:
- group = 'include'
- element = 'ClInclude'
- elif ext == '.rc':
- group = 'resource'
- element = 'ResourceCompile'
- elif ext == '.asm':
- group = 'masm'
- element = 'MASM'
- for platform in platforms:
- if platform.lower() in ['arm', 'arm64']:
- element = 'MARMASM'
- elif ext == '.idl':
- group = 'midl'
- element = 'Midl'
- elif source in rule_dependencies:
- group = 'rule_dependency'
- element = 'CustomBuild'
- else:
- group = 'none'
- element = 'None'
- return (group, element)
-
-
-def _GenerateRulesForMSBuild(output_dir, options, spec,
- sources, excluded_sources,
- props_files_of_rules, targets_files_of_rules,
- actions_to_add, rule_dependencies,
- extension_to_rule_name):
- # MSBuild rules are implemented using three files: an XML file, a .targets
- # file and a .props file.
- # See http://blogs.msdn.com/b/vcblog/archive/2010/04/21/quick-help-on-vs2010-custom-build-rule.aspx
- # for more details.
- rules = spec.get('rules', [])
- rules_native = [r for r in rules if not int(r.get('msvs_external_rule', 0))]
- rules_external = [r for r in rules if int(r.get('msvs_external_rule', 0))]
-
- msbuild_rules = []
- for rule in rules_native:
- # Skip a rule with no action and no inputs.
- if 'action' not in rule and not rule.get('rule_sources', []):
- continue
- msbuild_rule = MSBuildRule(rule, spec)
- msbuild_rules.append(msbuild_rule)
- rule_dependencies.update(msbuild_rule.additional_dependencies.split(';'))
- extension_to_rule_name[msbuild_rule.extension] = msbuild_rule.rule_name
- if msbuild_rules:
- base = spec['target_name'] + options.suffix
- props_name = base + '.props'
- targets_name = base + '.targets'
- xml_name = base + '.xml'
-
- props_files_of_rules.add(props_name)
- targets_files_of_rules.add(targets_name)
-
- props_path = os.path.join(output_dir, props_name)
- targets_path = os.path.join(output_dir, targets_name)
- xml_path = os.path.join(output_dir, xml_name)
-
- _GenerateMSBuildRulePropsFile(props_path, msbuild_rules)
- _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules)
- _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules)
-
- if rules_external:
- _GenerateExternalRules(rules_external, output_dir, spec,
- sources, options, actions_to_add)
- _AdjustSourcesForRules(rules, sources, excluded_sources, True)
-
-
-class MSBuildRule(object):
- """Used to store information used to generate an MSBuild rule.
-
- Attributes:
- rule_name: The rule name, sanitized to use in XML.
- target_name: The name of the target.
- after_targets: The name of the AfterTargets element.
- before_targets: The name of the BeforeTargets element.
- depends_on: The name of the DependsOn element.
- compute_output: The name of the ComputeOutput element.
- dirs_to_make: The name of the DirsToMake element.
- inputs: The name of the _inputs element.
- tlog: The name of the _tlog element.
- extension: The extension this rule applies to.
- description: The message displayed when this rule is invoked.
- additional_dependencies: A string listing additional dependencies.
- outputs: The outputs of this rule.
- command: The command used to run the rule.
- """
-
- def __init__(self, rule, spec):
- self.display_name = rule['rule_name']
- # Assure that the rule name is only characters and numbers
- self.rule_name = re.sub(r'\W', '_', self.display_name)
- # Create the various element names, following the example set by the
- # Visual Studio 2008 to 2010 conversion. I don't know if VS2010
- # is sensitive to the exact names.
- self.target_name = '_' + self.rule_name
- self.after_targets = self.rule_name + 'AfterTargets'
- self.before_targets = self.rule_name + 'BeforeTargets'
- self.depends_on = self.rule_name + 'DependsOn'
- self.compute_output = 'Compute%sOutput' % self.rule_name
- self.dirs_to_make = self.rule_name + 'DirsToMake'
- self.inputs = self.rule_name + '_inputs'
- self.tlog = self.rule_name + '_tlog'
- self.extension = rule['extension']
- if not self.extension.startswith('.'):
- self.extension = '.' + self.extension
-
- self.description = MSVSSettings.ConvertVCMacrosToMSBuild(
- rule.get('message', self.rule_name))
- old_additional_dependencies = _FixPaths(rule.get('inputs', []))
- self.additional_dependencies = (
- ';'.join([MSVSSettings.ConvertVCMacrosToMSBuild(i)
- for i in old_additional_dependencies]))
- old_outputs = _FixPaths(rule.get('outputs', []))
- self.outputs = ';'.join([MSVSSettings.ConvertVCMacrosToMSBuild(i)
- for i in old_outputs])
- old_command = _BuildCommandLineForRule(spec, rule, has_input_path=True,
- do_setup_env=True)
- self.command = MSVSSettings.ConvertVCMacrosToMSBuild(old_command)
-
-
-def _GenerateMSBuildRulePropsFile(props_path, msbuild_rules):
- """Generate the .props file."""
- content = ['Project',
- {'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'}]
- for rule in msbuild_rules:
- content.extend([
- ['PropertyGroup',
- {'Condition': "'$(%s)' == '' and '$(%s)' == '' and "
- "'$(ConfigurationType)' != 'Makefile'" % (rule.before_targets,
- rule.after_targets)
- },
- [rule.before_targets, 'Midl'],
- [rule.after_targets, 'CustomBuild'],
- ],
- ['PropertyGroup',
- [rule.depends_on,
- {'Condition': "'$(ConfigurationType)' != 'Makefile'"},
- '_SelectedFiles;$(%s)' % rule.depends_on
- ],
- ],
- ['ItemDefinitionGroup',
- [rule.rule_name,
- ['CommandLineTemplate', rule.command],
- ['Outputs', rule.outputs],
- ['ExecutionDescription', rule.description],
- ['AdditionalDependencies', rule.additional_dependencies],
- ],
- ]
- ])
- easy_xml.WriteXmlIfChanged(content, props_path, pretty=True, win32=True)
-
-
-def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules):
- """Generate the .targets file."""
- content = ['Project',
- {'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'
- }
- ]
- item_group = [
- 'ItemGroup',
- ['PropertyPageSchema',
- {'Include': '$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml'}
- ]
- ]
- for rule in msbuild_rules:
- item_group.append(
- ['AvailableItemName',
- {'Include': rule.rule_name},
- ['Targets', rule.target_name],
- ])
- content.append(item_group)
-
- for rule in msbuild_rules:
- content.append(
- ['UsingTask',
- {'TaskName': rule.rule_name,
- 'TaskFactory': 'XamlTaskFactory',
- 'AssemblyName': 'Microsoft.Build.Tasks.v4.0'
- },
- ['Task', '$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml'],
- ])
- for rule in msbuild_rules:
- rule_name = rule.rule_name
- target_outputs = '%%(%s.Outputs)' % rule_name
- target_inputs = ('%%(%s.Identity);%%(%s.AdditionalDependencies);'
- '$(MSBuildProjectFile)') % (rule_name, rule_name)
- rule_inputs = '%%(%s.Identity)' % rule_name
- extension_condition = ("'%(Extension)'=='.obj' or "
- "'%(Extension)'=='.res' or "
- "'%(Extension)'=='.rsc' or "
- "'%(Extension)'=='.lib'")
- remove_section = [
- 'ItemGroup',
- {'Condition': "'@(SelectedFiles)' != ''"},
- [rule_name,
- {'Remove': '@(%s)' % rule_name,
- 'Condition': "'%(Identity)' != '@(SelectedFiles)'"
- }
- ]
- ]
- inputs_section = [
- 'ItemGroup',
- [rule.inputs, {'Include': '%%(%s.AdditionalDependencies)' % rule_name}]
- ]
- logging_section = [
- 'ItemGroup',
- [rule.tlog,
- {'Include': '%%(%s.Outputs)' % rule_name,
- 'Condition': ("'%%(%s.Outputs)' != '' and "
- "'%%(%s.ExcludedFromBuild)' != 'true'" %
- (rule_name, rule_name))
- },
- ['Source', "@(%s, '|')" % rule_name],
- ['Inputs', "@(%s -> '%%(Fullpath)', ';')" % rule.inputs],
- ],
- ]
- message_section = [
- 'Message',
- {'Importance': 'High',
- 'Text': '%%(%s.ExecutionDescription)' % rule_name
- }
- ]
- write_tlog_section = [
- 'WriteLinesToFile',
- {'Condition': "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != "
- "'true'" % (rule.tlog, rule.tlog),
- 'File': '$(IntDir)$(ProjectName).write.1.tlog',
- 'Lines': "^%%(%s.Source);@(%s->'%%(Fullpath)')" % (rule.tlog,
- rule.tlog)
- }
- ]
- read_tlog_section = [
- 'WriteLinesToFile',
- {'Condition': "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != "
- "'true'" % (rule.tlog, rule.tlog),
- 'File': '$(IntDir)$(ProjectName).read.1.tlog',
- 'Lines': "^%%(%s.Source);%%(%s.Inputs)" % (rule.tlog, rule.tlog)
- }
- ]
- command_and_input_section = [
- rule_name,
- {'Condition': "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != "
- "'true'" % (rule_name, rule_name),
- 'EchoOff': 'true',
- 'StandardOutputImportance': 'High',
- 'StandardErrorImportance': 'High',
- 'CommandLineTemplate': '%%(%s.CommandLineTemplate)' % rule_name,
- 'AdditionalOptions': '%%(%s.AdditionalOptions)' % rule_name,
- 'Inputs': rule_inputs
- }
- ]
- content.extend([
- ['Target',
- {'Name': rule.target_name,
- 'BeforeTargets': '$(%s)' % rule.before_targets,
- 'AfterTargets': '$(%s)' % rule.after_targets,
- 'Condition': "'@(%s)' != ''" % rule_name,
- 'DependsOnTargets': '$(%s);%s' % (rule.depends_on,
- rule.compute_output),
- 'Outputs': target_outputs,
- 'Inputs': target_inputs
- },
- remove_section,
- inputs_section,
- logging_section,
- message_section,
- write_tlog_section,
- read_tlog_section,
- command_and_input_section,
- ],
- ['PropertyGroup',
- ['ComputeLinkInputsTargets',
- '$(ComputeLinkInputsTargets);',
- '%s;' % rule.compute_output
- ],
- ['ComputeLibInputsTargets',
- '$(ComputeLibInputsTargets);',
- '%s;' % rule.compute_output
- ],
- ],
- ['Target',
- {'Name': rule.compute_output,
- 'Condition': "'@(%s)' != ''" % rule_name
- },
- ['ItemGroup',
- [rule.dirs_to_make,
- {'Condition': "'@(%s)' != '' and "
- "'%%(%s.ExcludedFromBuild)' != 'true'" % (rule_name, rule_name),
- 'Include': '%%(%s.Outputs)' % rule_name
- }
- ],
- ['Link',
- {'Include': '%%(%s.Identity)' % rule.dirs_to_make,
- 'Condition': extension_condition
- }
- ],
- ['Lib',
- {'Include': '%%(%s.Identity)' % rule.dirs_to_make,
- 'Condition': extension_condition
- }
- ],
- ['ImpLib',
- {'Include': '%%(%s.Identity)' % rule.dirs_to_make,
- 'Condition': extension_condition
- }
- ],
- ],
- ['MakeDir',
- {'Directories': ("@(%s->'%%(RootDir)%%(Directory)')" %
- rule.dirs_to_make)
- }
- ]
- ],
- ])
- easy_xml.WriteXmlIfChanged(content, targets_path, pretty=True, win32=True)
-
-
-def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules):
- # Generate the .xml file
- content = [
- 'ProjectSchemaDefinitions',
- {'xmlns': ('clr-namespace:Microsoft.Build.Framework.XamlTypes;'
- 'assembly=Microsoft.Build.Framework'),
- 'xmlns:x': 'http://schemas.microsoft.com/winfx/2006/xaml',
- 'xmlns:sys': 'clr-namespace:System;assembly=mscorlib',
- 'xmlns:transformCallback':
- 'Microsoft.Cpp.Dev10.ConvertPropertyCallback'
- }
- ]
- for rule in msbuild_rules:
- content.extend([
- ['Rule',
- {'Name': rule.rule_name,
- 'PageTemplate': 'tool',
- 'DisplayName': rule.display_name,
- 'Order': '200'
- },
- ['Rule.DataSource',
- ['DataSource',
- {'Persistence': 'ProjectFile',
- 'ItemType': rule.rule_name
- }
- ]
- ],
- ['Rule.Categories',
- ['Category',
- {'Name': 'General'},
- ['Category.DisplayName',
- ['sys:String', 'General'],
- ],
- ],
- ['Category',
- {'Name': 'Command Line',
- 'Subtype': 'CommandLine'
- },
- ['Category.DisplayName',
- ['sys:String', 'Command Line'],
- ],
- ],
- ],
- ['StringListProperty',
- {'Name': 'Inputs',
- 'Category': 'Command Line',
- 'IsRequired': 'true',
- 'Switch': ' '
- },
- ['StringListProperty.DataSource',
- ['DataSource',
- {'Persistence': 'ProjectFile',
- 'ItemType': rule.rule_name,
- 'SourceType': 'Item'
- }
- ]
- ],
- ],
- ['StringProperty',
- {'Name': 'CommandLineTemplate',
- 'DisplayName': 'Command Line',
- 'Visible': 'False',
- 'IncludeInCommandLine': 'False'
- }
- ],
- ['DynamicEnumProperty',
- {'Name': rule.before_targets,
- 'Category': 'General',
- 'EnumProvider': 'Targets',
- 'IncludeInCommandLine': 'False'
- },
- ['DynamicEnumProperty.DisplayName',
- ['sys:String', 'Execute Before'],
- ],
- ['DynamicEnumProperty.Description',
- ['sys:String', 'Specifies the targets for the build customization'
- ' to run before.'
- ],
- ],
- ['DynamicEnumProperty.ProviderSettings',
- ['NameValuePair',
- {'Name': 'Exclude',
- 'Value': '^%s|^Compute' % rule.before_targets
- }
- ]
- ],
- ['DynamicEnumProperty.DataSource',
- ['DataSource',
- {'Persistence': 'ProjectFile',
- 'HasConfigurationCondition': 'true'
- }
- ]
- ],
- ],
- ['DynamicEnumProperty',
- {'Name': rule.after_targets,
- 'Category': 'General',
- 'EnumProvider': 'Targets',
- 'IncludeInCommandLine': 'False'
- },
- ['DynamicEnumProperty.DisplayName',
- ['sys:String', 'Execute After'],
- ],
- ['DynamicEnumProperty.Description',
- ['sys:String', ('Specifies the targets for the build customization'
- ' to run after.')
- ],
- ],
- ['DynamicEnumProperty.ProviderSettings',
- ['NameValuePair',
- {'Name': 'Exclude',
- 'Value': '^%s|^Compute' % rule.after_targets
- }
- ]
- ],
- ['DynamicEnumProperty.DataSource',
- ['DataSource',
- {'Persistence': 'ProjectFile',
- 'ItemType': '',
- 'HasConfigurationCondition': 'true'
- }
- ]
- ],
- ],
- ['StringListProperty',
- {'Name': 'Outputs',
- 'DisplayName': 'Outputs',
- 'Visible': 'False',
- 'IncludeInCommandLine': 'False'
- }
- ],
- ['StringProperty',
- {'Name': 'ExecutionDescription',
- 'DisplayName': 'Execution Description',
- 'Visible': 'False',
- 'IncludeInCommandLine': 'False'
- }
- ],
- ['StringListProperty',
- {'Name': 'AdditionalDependencies',
- 'DisplayName': 'Additional Dependencies',
- 'IncludeInCommandLine': 'False',
- 'Visible': 'false'
- }
- ],
- ['StringProperty',
- {'Subtype': 'AdditionalOptions',
- 'Name': 'AdditionalOptions',
- 'Category': 'Command Line'
- },
- ['StringProperty.DisplayName',
- ['sys:String', 'Additional Options'],
- ],
- ['StringProperty.Description',
- ['sys:String', 'Additional Options'],
- ],
- ],
- ],
- ['ItemType',
- {'Name': rule.rule_name,
- 'DisplayName': rule.display_name
- }
- ],
- ['FileExtension',
- {'Name': '*' + rule.extension,
- 'ContentType': rule.rule_name
- }
- ],
- ['ContentType',
- {'Name': rule.rule_name,
- 'DisplayName': '',
- 'ItemType': rule.rule_name
- }
- ]
- ])
- easy_xml.WriteXmlIfChanged(content, xml_path, pretty=True, win32=True)
-
-
-def _GetConfigurationAndPlatform(name, settings):
- configuration = name.rsplit('_', 1)[0]
- platform = settings.get('msvs_configuration_platform', 'Win32')
- return (configuration, platform)
-
-
-def _GetConfigurationCondition(name, settings):
- return (r"'$(Configuration)|$(Platform)'=='%s|%s'" %
- _GetConfigurationAndPlatform(name, settings))
-
-
-def _GetMSBuildProjectConfigurations(configurations):
- group = ['ItemGroup', {'Label': 'ProjectConfigurations'}]
- for (name, settings) in sorted(configurations.items()):
- configuration, platform = _GetConfigurationAndPlatform(name, settings)
- designation = '%s|%s' % (configuration, platform)
- group.append(
- ['ProjectConfiguration', {'Include': designation},
- ['Configuration', configuration],
- ['Platform', platform]])
- return [group]
-
-
-def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name):
- namespace = os.path.splitext(gyp_file_name)[0]
- properties = [
- ['PropertyGroup', {'Label': 'Globals'},
- ['ProjectGuid', guid],
- ['Keyword', 'Win32Proj'],
- ['RootNamespace', namespace],
- ['IgnoreWarnCompileDuplicatedFilename', 'true'],
- ]
- ]
-
- if os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or \
- os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64':
- properties[0].append(['PreferredToolArchitecture', 'x64'])
-
- if spec.get('msvs_enable_winrt'):
- properties[0].append(['DefaultLanguage', 'en-US'])
- properties[0].append(['AppContainerApplication', 'true'])
- if spec.get('msvs_application_type_revision'):
- app_type_revision = spec.get('msvs_application_type_revision')
- properties[0].append(['ApplicationTypeRevision', app_type_revision])
- else:
- properties[0].append(['ApplicationTypeRevision', '8.1'])
-
- if spec.get('msvs_target_platform_version'):
- target_platform_version = spec.get('msvs_target_platform_version')
- properties[0].append(['WindowsTargetPlatformVersion',
- target_platform_version])
- if spec.get('msvs_target_platform_minversion'):
- target_platform_minversion = spec.get('msvs_target_platform_minversion')
- properties[0].append(['WindowsTargetPlatformMinVersion',
- target_platform_minversion])
- else:
- properties[0].append(['WindowsTargetPlatformMinVersion',
- target_platform_version])
- if spec.get('msvs_enable_winphone'):
- properties[0].append(['ApplicationType', 'Windows Phone'])
- else:
- properties[0].append(['ApplicationType', 'Windows Store'])
-
- platform_name = None
- msvs_windows_target_platform_version = None
- for configuration in spec['configurations'].values():
- platform_name = platform_name or _ConfigPlatform(configuration)
- msvs_windows_target_platform_version = \
- msvs_windows_target_platform_version or \
- _ConfigWindowsTargetPlatformVersion(configuration)
- if platform_name and msvs_windows_target_platform_version:
- break
-
- if platform_name == 'ARM':
- properties[0].append(['WindowsSDKDesktopARMSupport', 'true'])
- if msvs_windows_target_platform_version:
- properties[0].append(['WindowsTargetPlatformVersion', \
- str(msvs_windows_target_platform_version)])
-
- return properties
-
-def _GetMSBuildConfigurationDetails(spec, build_file):
- properties = {}
- for name, settings in spec['configurations'].items():
- msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file)
- condition = _GetConfigurationCondition(name, settings)
- character_set = msbuild_attributes.get('CharacterSet')
- _AddConditionalProperty(properties, condition, 'ConfigurationType',
- msbuild_attributes['ConfigurationType'])
- if character_set:
- if 'msvs_enable_winrt' not in spec :
- _AddConditionalProperty(properties, condition, 'CharacterSet',
- character_set)
- return _GetMSBuildPropertyGroup(spec, 'Configuration', properties)
-
-
-def _GetMSBuildLocalProperties(msbuild_toolset):
- # Currently the only local property we support is PlatformToolset
- properties = {}
- if msbuild_toolset:
- properties = [
- ['PropertyGroup', {'Label': 'Locals'},
- ['PlatformToolset', msbuild_toolset],
- ]
- ]
- return properties
-
-
-def _GetMSBuildPropertySheets(configurations):
- user_props = r'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props'
- additional_props = {}
- props_specified = False
- for name, settings in sorted(configurations.items()):
- configuration = _GetConfigurationCondition(name, settings)
- if 'msbuild_props' in settings:
- additional_props[configuration] = _FixPaths(settings['msbuild_props'])
- props_specified = True
- else:
- additional_props[configuration] = ''
-
- if not props_specified:
- return [
- ['ImportGroup',
- {'Label': 'PropertySheets'},
- ['Import',
- {'Project': user_props,
- 'Condition': "exists('%s')" % user_props,
- 'Label': 'LocalAppDataPlatform'
- }
- ]
- ]
- ]
- else:
- sheets = []
- for condition, props in additional_props.items():
- import_group = [
- 'ImportGroup',
- {'Label': 'PropertySheets',
- 'Condition': condition
- },
- ['Import',
- {'Project': user_props,
- 'Condition': "exists('%s')" % user_props,
- 'Label': 'LocalAppDataPlatform'
- }
- ]
- ]
- for props_file in props:
- import_group.append(['Import', {'Project':props_file}])
- sheets.append(import_group)
- return sheets
-
-def _ConvertMSVSBuildAttributes(spec, config, build_file):
- config_type = _GetMSVSConfigurationType(spec, build_file)
- msvs_attributes = _GetMSVSAttributes(spec, config, config_type)
- msbuild_attributes = {}
- for a in msvs_attributes:
- if a in ['IntermediateDirectory', 'OutputDirectory']:
- directory = MSVSSettings.ConvertVCMacrosToMSBuild(msvs_attributes[a])
- if not directory.endswith('\\'):
- directory += '\\'
- msbuild_attributes[a] = directory
- elif a == 'CharacterSet':
- msbuild_attributes[a] = _ConvertMSVSCharacterSet(msvs_attributes[a])
- elif a == 'ConfigurationType':
- msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a])
- else:
- print('Warning: Do not know how to convert MSVS attribute ' + a)
- return msbuild_attributes
-
-
-def _ConvertMSVSCharacterSet(char_set):
- if char_set.isdigit():
- char_set = {
- '0': 'MultiByte',
- '1': 'Unicode',
- '2': 'MultiByte',
- }[char_set]
- return char_set
-
-
-def _ConvertMSVSConfigurationType(config_type):
- if config_type.isdigit():
- config_type = {
- '1': 'Application',
- '2': 'DynamicLibrary',
- '4': 'StaticLibrary',
- '10': 'Utility'
- }[config_type]
- return config_type
-
-
-def _GetMSBuildAttributes(spec, config, build_file):
- if 'msbuild_configuration_attributes' not in config:
- msbuild_attributes = _ConvertMSVSBuildAttributes(spec, config, build_file)
-
- else:
- config_type = _GetMSVSConfigurationType(spec, build_file)
- config_type = _ConvertMSVSConfigurationType(config_type)
- msbuild_attributes = config.get('msbuild_configuration_attributes', {})
- msbuild_attributes.setdefault('ConfigurationType', config_type)
- output_dir = msbuild_attributes.get('OutputDirectory',
- '$(SolutionDir)$(Configuration)')
- msbuild_attributes['OutputDirectory'] = _FixPath(output_dir) + '\\'
- if 'IntermediateDirectory' not in msbuild_attributes:
- intermediate = _FixPath('$(Configuration)') + '\\'
- msbuild_attributes['IntermediateDirectory'] = intermediate
- if 'CharacterSet' in msbuild_attributes:
- msbuild_attributes['CharacterSet'] = _ConvertMSVSCharacterSet(
- msbuild_attributes['CharacterSet'])
- if 'TargetName' not in msbuild_attributes:
- prefix = spec.get('product_prefix', '')
- product_name = spec.get('product_name', '$(ProjectName)')
- target_name = prefix + product_name
- msbuild_attributes['TargetName'] = target_name
- if 'TargetExt' not in msbuild_attributes and 'product_extension' in spec:
- ext = spec.get('product_extension')
- msbuild_attributes['TargetExt'] = '.' + ext
-
- if spec.get('msvs_external_builder'):
- external_out_dir = spec.get('msvs_external_builder_out_dir', '.')
- msbuild_attributes['OutputDirectory'] = _FixPath(external_out_dir) + '\\'
-
- # Make sure that 'TargetPath' matches 'Lib.OutputFile' or 'Link.OutputFile'
- # (depending on the tool used) to avoid MSB8012 warning.
- msbuild_tool_map = {
- 'executable': 'Link',
- 'shared_library': 'Link',
- 'loadable_module': 'Link',
- 'static_library': 'Lib',
- }
- msbuild_tool = msbuild_tool_map.get(spec['type'])
- if msbuild_tool:
- msbuild_settings = config['finalized_msbuild_settings']
- out_file = msbuild_settings[msbuild_tool].get('OutputFile')
- if out_file:
- msbuild_attributes['TargetPath'] = _FixPath(out_file)
- target_ext = msbuild_settings[msbuild_tool].get('TargetExt')
- if target_ext:
- msbuild_attributes['TargetExt'] = target_ext
-
- return msbuild_attributes
-
-
-def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file):
- # TODO(jeanluc) We could optimize out the following and do it only if
- # there are actions.
- # TODO(jeanluc) Handle the equivalent of setting 'CYGWIN=nontsec'.
- new_paths = []
- cygwin_dirs = spec.get('msvs_cygwin_dirs', ['.'])[0]
- if cygwin_dirs:
- cyg_path = '$(MSBuildProjectDirectory)\\%s\\bin\\' % _FixPath(cygwin_dirs)
- new_paths.append(cyg_path)
- # TODO(jeanluc) Change the convention to have both a cygwin_dir and a
- # python_dir.
- python_path = cyg_path.replace('cygwin\\bin', 'python_26')
- new_paths.append(python_path)
- if new_paths:
- new_paths = '$(ExecutablePath);' + ';'.join(new_paths)
-
- properties = {}
- for (name, configuration) in sorted(configurations.items()):
- condition = _GetConfigurationCondition(name, configuration)
- attributes = _GetMSBuildAttributes(spec, configuration, build_file)
- msbuild_settings = configuration['finalized_msbuild_settings']
- _AddConditionalProperty(properties, condition, 'IntDir',
- attributes['IntermediateDirectory'])
- _AddConditionalProperty(properties, condition, 'OutDir',
- attributes['OutputDirectory'])
- _AddConditionalProperty(properties, condition, 'TargetName',
- attributes['TargetName'])
- if 'TargetExt' in attributes:
- _AddConditionalProperty(properties, condition, 'TargetExt',
- attributes['TargetExt'])
-
- if attributes.get('TargetPath'):
- _AddConditionalProperty(properties, condition, 'TargetPath',
- attributes['TargetPath'])
- if attributes.get('TargetExt'):
- _AddConditionalProperty(properties, condition, 'TargetExt',
- attributes['TargetExt'])
-
- if new_paths:
- _AddConditionalProperty(properties, condition, 'ExecutablePath',
- new_paths)
- tool_settings = msbuild_settings.get('', {})
- for name, value in sorted(tool_settings.items()):
- formatted_value = _GetValueFormattedForMSBuild('', name, value)
- _AddConditionalProperty(properties, condition, name, formatted_value)
- return _GetMSBuildPropertyGroup(spec, None, properties)
-
-
-def _AddConditionalProperty(properties, condition, name, value):
- """Adds a property / conditional value pair to a dictionary.
-
- Arguments:
- properties: The dictionary to be modified. The key is the name of the
- property. The value is itself a dictionary; its key is the value and
- the value a list of condition for which this value is true.
- condition: The condition under which the named property has the value.
- name: The name of the property.
- value: The value of the property.
- """
- if name not in properties:
- properties[name] = {}
- values = properties[name]
- if value not in values:
- values[value] = []
- conditions = values[value]
- conditions.append(condition)
-
-
-# Regex for msvs variable references ( i.e. $(FOO) ).
-MSVS_VARIABLE_REFERENCE = re.compile(r'\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)')
-
-
-def _GetMSBuildPropertyGroup(spec, label, properties):
- """Returns a PropertyGroup definition for the specified properties.
-
- Arguments:
- spec: The target project dict.
- label: An optional label for the PropertyGroup.
- properties: The dictionary to be converted. The key is the name of the
- property. The value is itself a dictionary; its key is the value and
- the value a list of condition for which this value is true.
- """
- group = ['PropertyGroup']
- if label:
- group.append({'Label': label})
- num_configurations = len(spec['configurations'])
- def GetEdges(node):
- # Use a definition of edges such that user_of_variable -> used_varible.
- # This happens to be easier in this case, since a variable's
- # definition contains all variables it references in a single string.
- edges = set()
- for value in sorted(properties[node].keys()):
- # Add to edges all $(...) references to variables.
- #
- # Variable references that refer to names not in properties are excluded
- # These can exist for instance to refer built in definitions like
- # $(SolutionDir).
- #
- # Self references are ignored. Self reference is used in a few places to
- # append to the default value. I.e. PATH=$(PATH);other_path
- edges.update(set([v for v in MSVS_VARIABLE_REFERENCE.findall(value)
- if v in properties and v != node]))
- return edges
- properties_ordered = gyp.common.TopologicallySorted(
- properties.keys(), GetEdges)
- # Walk properties in the reverse of a topological sort on
- # user_of_variable -> used_variable as this ensures variables are
- # defined before they are used.
- # NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG))
- for name in reversed(properties_ordered):
- values = properties[name]
- for value, conditions in sorted(values.items()):
- if len(conditions) == num_configurations:
- # If the value is the same all configurations,
- # just add one unconditional entry.
- group.append([name, value])
- else:
- for condition in conditions:
- group.append([name, {'Condition': condition}, value])
- return [group]
-
-
-def _GetMSBuildToolSettingsSections(spec, configurations):
- groups = []
- for (name, configuration) in sorted(configurations.items()):
- msbuild_settings = configuration['finalized_msbuild_settings']
- group = ['ItemDefinitionGroup',
- {'Condition': _GetConfigurationCondition(name, configuration)}
- ]
- for tool_name, tool_settings in sorted(msbuild_settings.items()):
- # Skip the tool named '' which is a holder of global settings handled
- # by _GetMSBuildConfigurationGlobalProperties.
- if tool_name:
- if tool_settings:
- tool = [tool_name]
- for name, value in sorted(tool_settings.items()):
- formatted_value = _GetValueFormattedForMSBuild(tool_name, name,
- value)
- tool.append([name, formatted_value])
- group.append(tool)
- groups.append(group)
- return groups
-
-
-def _FinalizeMSBuildSettings(spec, configuration):
- if 'msbuild_settings' in configuration:
- converted = False
- msbuild_settings = configuration['msbuild_settings']
- MSVSSettings.ValidateMSBuildSettings(msbuild_settings)
- else:
- converted = True
- msvs_settings = configuration.get('msvs_settings', {})
- msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings)
- include_dirs, midl_include_dirs, resource_include_dirs = \
- _GetIncludeDirs(configuration)
- libraries = _GetLibraries(spec)
- library_dirs = _GetLibraryDirs(configuration)
- out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec, msbuild=True)
- target_ext = _GetOutputTargetExt(spec)
- defines = _GetDefines(configuration)
- if converted:
- # Visual Studio 2010 has TR1
- defines = [d for d in defines if d != '_HAS_TR1=0']
- # Warn of ignored settings
- ignored_settings = ['msvs_tool_files']
- for ignored_setting in ignored_settings:
- value = configuration.get(ignored_setting)
- if value:
- print('Warning: The automatic conversion to MSBuild does not handle '
- '%s. Ignoring setting of %s' % (ignored_setting, str(value)))
-
- defines = [_EscapeCppDefineForMSBuild(d) for d in defines]
- disabled_warnings = _GetDisabledWarnings(configuration)
- prebuild = configuration.get('msvs_prebuild')
- postbuild = configuration.get('msvs_postbuild')
- def_file = _GetModuleDefinition(spec)
- precompiled_header = configuration.get('msvs_precompiled_header')
-
- # Add the information to the appropriate tool
- # TODO(jeanluc) We could optimize and generate these settings only if
- # the corresponding files are found, e.g. don't generate ResourceCompile
- # if you don't have any resources.
- _ToolAppend(msbuild_settings, 'ClCompile',
- 'AdditionalIncludeDirectories', include_dirs)
- _ToolAppend(msbuild_settings, 'Midl',
- 'AdditionalIncludeDirectories', midl_include_dirs)
- _ToolAppend(msbuild_settings, 'ResourceCompile',
- 'AdditionalIncludeDirectories', resource_include_dirs)
- # Add in libraries, note that even for empty libraries, we want this
- # set, to prevent inheriting default libraries from the environment.
- _ToolSetOrAppend(msbuild_settings, 'Link', 'AdditionalDependencies',
- libraries)
- _ToolAppend(msbuild_settings, 'Link', 'AdditionalLibraryDirectories',
- library_dirs)
- if out_file:
- _ToolAppend(msbuild_settings, msbuild_tool, 'OutputFile', out_file,
- only_if_unset=True)
- if target_ext:
- _ToolAppend(msbuild_settings, msbuild_tool, 'TargetExt', target_ext,
- only_if_unset=True)
- # Add defines.
- _ToolAppend(msbuild_settings, 'ClCompile',
- 'PreprocessorDefinitions', defines)
- _ToolAppend(msbuild_settings, 'ResourceCompile',
- 'PreprocessorDefinitions', defines)
- # Add disabled warnings.
- _ToolAppend(msbuild_settings, 'ClCompile',
- 'DisableSpecificWarnings', disabled_warnings)
- # Turn on precompiled headers if appropriate.
- if precompiled_header:
- precompiled_header = os.path.split(precompiled_header)[1]
- _ToolAppend(msbuild_settings, 'ClCompile', 'PrecompiledHeader', 'Use')
- _ToolAppend(msbuild_settings, 'ClCompile',
- 'PrecompiledHeaderFile', precompiled_header)
- _ToolAppend(msbuild_settings, 'ClCompile',
- 'ForcedIncludeFiles', [precompiled_header])
- else:
- _ToolAppend(msbuild_settings, 'ClCompile', 'PrecompiledHeader', 'NotUsing')
- # Turn off WinRT compilation
- _ToolAppend(msbuild_settings, 'ClCompile', 'CompileAsWinRT', 'false')
- # Turn on import libraries if appropriate
- if spec.get('msvs_requires_importlibrary'):
- _ToolAppend(msbuild_settings, '', 'IgnoreImportLibrary', 'false')
- # Loadable modules don't generate import libraries;
- # tell dependent projects to not expect one.
- if spec['type'] == 'loadable_module':
- _ToolAppend(msbuild_settings, '', 'IgnoreImportLibrary', 'true')
- # Set the module definition file if any.
- if def_file:
- _ToolAppend(msbuild_settings, 'Link', 'ModuleDefinitionFile', def_file)
- configuration['finalized_msbuild_settings'] = msbuild_settings
- if prebuild:
- _ToolAppend(msbuild_settings, 'PreBuildEvent', 'Command', prebuild)
- if postbuild:
- _ToolAppend(msbuild_settings, 'PostBuildEvent', 'Command', postbuild)
-
-
-def _GetValueFormattedForMSBuild(tool_name, name, value):
- if type(value) == list:
- # For some settings, VS2010 does not automatically extends the settings
- # TODO(jeanluc) Is this what we want?
- if name in ['AdditionalIncludeDirectories',
- 'AdditionalLibraryDirectories',
- 'AdditionalOptions',
- 'DelayLoadDLLs',
- 'DisableSpecificWarnings',
- 'PreprocessorDefinitions']:
- value.append('%%(%s)' % name)
- # For most tools, entries in a list should be separated with ';' but some
- # settings use a space. Check for those first.
- exceptions = {
- 'ClCompile': ['AdditionalOptions'],
- 'Link': ['AdditionalOptions'],
- 'Lib': ['AdditionalOptions']}
- if tool_name in exceptions and name in exceptions[tool_name]:
- char = ' '
- else:
- char = ';'
- formatted_value = char.join(
- [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value])
- else:
- formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value)
- return formatted_value
-
-
-def _VerifySourcesExist(sources, root_dir):
- """Verifies that all source files exist on disk.
-
- Checks that all regular source files, i.e. not created at run time,
- exist on disk. Missing files cause needless recompilation but no otherwise
- visible errors.
-
- Arguments:
- sources: A recursive list of Filter/file names.
- root_dir: The root directory for the relative path names.
- Returns:
- A list of source files that cannot be found on disk.
- """
- missing_sources = []
- for source in sources:
- if isinstance(source, MSVSProject.Filter):
- missing_sources.extend(_VerifySourcesExist(source.contents, root_dir))
- else:
- if '$' not in source:
- full_path = os.path.join(root_dir, source)
- if not os.path.exists(full_path):
- missing_sources.append(full_path)
- return missing_sources
-
-
-def _GetMSBuildSources(spec, sources, exclusions, rule_dependencies,
- extension_to_rule_name, actions_spec,
- sources_handled_by_action, list_excluded):
- groups = ['none', 'masm', 'midl', 'include', 'compile', 'resource', 'rule',
- 'rule_dependency']
- grouped_sources = {}
- for g in groups:
- grouped_sources[g] = []
-
- _AddSources2(spec, sources, exclusions, grouped_sources,
- rule_dependencies, extension_to_rule_name,
- sources_handled_by_action, list_excluded)
- sources = []
- for g in groups:
- if grouped_sources[g]:
- sources.append(['ItemGroup'] + grouped_sources[g])
- if actions_spec:
- sources.append(['ItemGroup'] + actions_spec)
- return sources
-
-
-def _AddSources2(spec, sources, exclusions, grouped_sources,
- rule_dependencies, extension_to_rule_name,
- sources_handled_by_action,
- list_excluded):
- extensions_excluded_from_precompile = []
- for source in sources:
- if isinstance(source, MSVSProject.Filter):
- _AddSources2(spec, source.contents, exclusions, grouped_sources,
- rule_dependencies, extension_to_rule_name,
- sources_handled_by_action,
- list_excluded)
- else:
- if not source in sources_handled_by_action:
- detail = []
- excluded_configurations = exclusions.get(source, [])
- if len(excluded_configurations) == len(spec['configurations']):
- detail.append(['ExcludedFromBuild', 'true'])
- else:
- for config_name, configuration in sorted(excluded_configurations):
- condition = _GetConfigurationCondition(config_name, configuration)
- detail.append(['ExcludedFromBuild',
- {'Condition': condition},
- 'true'])
- # Add precompile if needed
- for config_name, configuration in spec['configurations'].items():
- precompiled_source = configuration.get('msvs_precompiled_source', '')
- if precompiled_source != '':
- precompiled_source = _FixPath(precompiled_source)
- if not extensions_excluded_from_precompile:
- # If the precompiled header is generated by a C source, we must
- # not try to use it for C++ sources, and vice versa.
- basename, extension = os.path.splitext(precompiled_source)
- if extension == '.c':
- extensions_excluded_from_precompile = ['.cc', '.cpp', '.cxx']
- else:
- extensions_excluded_from_precompile = ['.c']
-
- if precompiled_source == source:
- condition = _GetConfigurationCondition(config_name, configuration)
- detail.append(['PrecompiledHeader',
- {'Condition': condition},
- 'Create'
- ])
- else:
- # Turn off precompiled header usage for source files of a
- # different type than the file that generated the
- # precompiled header.
- for extension in extensions_excluded_from_precompile:
- if source.endswith(extension):
- detail.append(['PrecompiledHeader', ''])
- detail.append(['ForcedIncludeFiles', ''])
-
- group, element = _MapFileToMsBuildSourceType(source, rule_dependencies,
- extension_to_rule_name,
- _GetUniquePlatforms(spec))
- grouped_sources[group].append([element, {'Include': source}] + detail)
-
-
-def _GetMSBuildProjectReferences(project):
- references = []
- if project.dependencies:
- group = ['ItemGroup']
- for dependency in project.dependencies:
- guid = dependency.guid
- project_dir = os.path.split(project.path)[0]
- relative_path = gyp.common.RelativePath(dependency.path, project_dir)
- project_ref = ['ProjectReference',
- {'Include': relative_path},
- ['Project', guid],
- ['ReferenceOutputAssembly', 'false']
- ]
- for config in dependency.spec.get('configurations', {}).values():
- if config.get('msvs_use_library_dependency_inputs', 0):
- project_ref.append(['UseLibraryDependencyInputs', 'true'])
- break
- # If it's disabled in any config, turn it off in the reference.
- if config.get('msvs_2010_disable_uldi_when_referenced', 0):
- project_ref.append(['UseLibraryDependencyInputs', 'false'])
- break
- group.append(project_ref)
- references.append(group)
- return references
-
-
-def _GenerateMSBuildProject(project, options, version, generator_flags):
- spec = project.spec
- configurations = spec['configurations']
- project_dir, project_file_name = os.path.split(project.path)
- gyp.common.EnsureDirExists(project.path)
- # Prepare list of sources and excluded sources.
- gyp_path = _NormalizedSource(project.build_file)
- relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir)
-
- gyp_file = os.path.split(project.build_file)[1]
- sources, excluded_sources = _PrepareListOfSources(spec, generator_flags,
- gyp_file)
- # Add rules.
- actions_to_add = {}
- props_files_of_rules = set()
- targets_files_of_rules = set()
- rule_dependencies = set()
- extension_to_rule_name = {}
- list_excluded = generator_flags.get('msvs_list_excluded_files', True)
-
- # Don't generate rules if we are using an external builder like ninja.
- if not spec.get('msvs_external_builder'):
- _GenerateRulesForMSBuild(project_dir, options, spec,
- sources, excluded_sources,
- props_files_of_rules, targets_files_of_rules,
- actions_to_add, rule_dependencies,
- extension_to_rule_name)
- else:
- rules = spec.get('rules', [])
- _AdjustSourcesForRules(rules, sources, excluded_sources, True)
-
- sources, excluded_sources, excluded_idl = (
- _AdjustSourcesAndConvertToFilterHierarchy(spec, options,
- project_dir, sources,
- excluded_sources,
- list_excluded, version))
-
- # Don't add actions if we are using an external builder like ninja.
- if not spec.get('msvs_external_builder'):
- _AddActions(actions_to_add, spec, project.build_file)
- _AddCopies(actions_to_add, spec)
-
- # NOTE: this stanza must appear after all actions have been decided.
- # Don't excluded sources with actions attached, or they won't run.
- excluded_sources = _FilterActionsFromExcluded(
- excluded_sources, actions_to_add)
-
- exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl)
- actions_spec, sources_handled_by_action = _GenerateActionsForMSBuild(
- spec, actions_to_add)
-
- _GenerateMSBuildFiltersFile(project.path + '.filters', sources,
- rule_dependencies,
- extension_to_rule_name, _GetUniquePlatforms(spec))
- missing_sources = _VerifySourcesExist(sources, project_dir)
-
- for configuration in configurations.values():
- _FinalizeMSBuildSettings(spec, configuration)
-
- # Add attributes to root element
-
- import_default_section = [
- ['Import', {'Project': r'$(VCTargetsPath)\Microsoft.Cpp.Default.props'}]]
- import_cpp_props_section = [
- ['Import', {'Project': r'$(VCTargetsPath)\Microsoft.Cpp.props'}]]
- import_cpp_targets_section = [
- ['Import', {'Project': r'$(VCTargetsPath)\Microsoft.Cpp.targets'}]]
- import_masm_props_section = [
- ['Import',
- {'Project': r'$(VCTargetsPath)\BuildCustomizations\masm.props'}]]
- import_masm_targets_section = [
- ['Import',
- {'Project': r'$(VCTargetsPath)\BuildCustomizations\masm.targets'}]]
- import_marmasm_props_section = [
- ['Import',
- {'Project': r'$(VCTargetsPath)\BuildCustomizations\marmasm.props'}]]
- import_marmasm_targets_section = [
- ['Import',
- {'Project': r'$(VCTargetsPath)\BuildCustomizations\marmasm.targets'}]]
- macro_section = [['PropertyGroup', {'Label': 'UserMacros'}]]
-
- content = [
- 'Project',
- {'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003',
- 'ToolsVersion': version.ProjectVersion(),
- 'DefaultTargets': 'Build'
- }]
-
- content += _GetMSBuildProjectConfigurations(configurations)
- content += _GetMSBuildGlobalProperties(spec, project.guid, project_file_name)
- content += import_default_section
- content += _GetMSBuildConfigurationDetails(spec, project.build_file)
- if spec.get('msvs_enable_winphone'):
- content += _GetMSBuildLocalProperties('v120_wp81')
- else:
- content += _GetMSBuildLocalProperties(project.msbuild_toolset)
- content += import_cpp_props_section
- content += import_masm_props_section
- if spec.get('msvs_enable_marmasm'):
- content += import_marmasm_props_section
- content += _GetMSBuildExtensions(props_files_of_rules)
- content += _GetMSBuildPropertySheets(configurations)
- content += macro_section
- content += _GetMSBuildConfigurationGlobalProperties(spec, configurations,
- project.build_file)
- content += _GetMSBuildToolSettingsSections(spec, configurations)
- content += _GetMSBuildSources(
- spec, sources, exclusions, rule_dependencies, extension_to_rule_name,
- actions_spec, sources_handled_by_action, list_excluded)
- content += _GetMSBuildProjectReferences(project)
- content += import_cpp_targets_section
- content += import_masm_targets_section
- if spec.get('msvs_enable_marmasm'):
- content += import_marmasm_targets_section
- content += _GetMSBuildExtensionTargets(targets_files_of_rules)
-
- if spec.get('msvs_external_builder'):
- content += _GetMSBuildExternalBuilderTargets(spec)
-
- # TODO(jeanluc) File a bug to get rid of runas. We had in MSVS:
- # has_run_as = _WriteMSVSUserFile(project.path, version, spec)
-
- easy_xml.WriteXmlIfChanged(content, project.path, pretty=True, win32=True)
-
- return missing_sources
-
-
-def _GetMSBuildExternalBuilderTargets(spec):
- """Return a list of MSBuild targets for external builders.
-
- The "Build" and "Clean" targets are always generated. If the spec contains
- 'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also
- be generated, to support building selected C/C++ files.
-
- Arguments:
- spec: The gyp target spec.
- Returns:
- List of MSBuild 'Target' specs.
- """
- build_cmd = _BuildCommandLineForRuleRaw(
- spec, spec['msvs_external_builder_build_cmd'],
- False, False, False, False)
- build_target = ['Target', {'Name': 'Build'}]
- build_target.append(['Exec', {'Command': build_cmd}])
-
- clean_cmd = _BuildCommandLineForRuleRaw(
- spec, spec['msvs_external_builder_clean_cmd'],
- False, False, False, False)
- clean_target = ['Target', {'Name': 'Clean'}]
- clean_target.append(['Exec', {'Command': clean_cmd}])
-
- targets = [build_target, clean_target]
-
- if spec.get('msvs_external_builder_clcompile_cmd'):
- clcompile_cmd = _BuildCommandLineForRuleRaw(
- spec, spec['msvs_external_builder_clcompile_cmd'],
- False, False, False, False)
- clcompile_target = ['Target', {'Name': 'ClCompile'}]
- clcompile_target.append(['Exec', {'Command': clcompile_cmd}])
- targets.append(clcompile_target)
-
- return targets
-
-
-def _GetMSBuildExtensions(props_files_of_rules):
- extensions = ['ImportGroup', {'Label': 'ExtensionSettings'}]
- for props_file in props_files_of_rules:
- extensions.append(['Import', {'Project': props_file}])
- return [extensions]
-
-
-def _GetMSBuildExtensionTargets(targets_files_of_rules):
- targets_node = ['ImportGroup', {'Label': 'ExtensionTargets'}]
- for targets_file in sorted(targets_files_of_rules):
- targets_node.append(['Import', {'Project': targets_file}])
- return [targets_node]
-
-
-def _GenerateActionsForMSBuild(spec, actions_to_add):
- """Add actions accumulated into an actions_to_add, merging as needed.
-
- Arguments:
- spec: the target project dict
- actions_to_add: dictionary keyed on input name, which maps to a list of
- dicts describing the actions attached to that input file.
-
- Returns:
- A pair of (action specification, the sources handled by this action).
- """
- sources_handled_by_action = OrderedSet()
- actions_spec = []
- for primary_input, actions in actions_to_add.items():
- inputs = OrderedSet()
- outputs = OrderedSet()
- descriptions = []
- commands = []
- for action in actions:
- inputs.update(OrderedSet(action['inputs']))
- outputs.update(OrderedSet(action['outputs']))
- descriptions.append(action['description'])
- cmd = action['command']
- # For most actions, add 'call' so that actions that invoke batch files
- # return and continue executing. msbuild_use_call provides a way to
- # disable this but I have not seen any adverse effect from doing that
- # for everything.
- if action.get('msbuild_use_call', True):
- cmd = 'call ' + cmd
- commands.append(cmd)
- # Add the custom build action for one input file.
- description = ', and also '.join(descriptions)
-
- # We can't join the commands simply with && because the command line will
- # get too long. See also _AddActions: cygwin's setup_env mustn't be called
- # for every invocation or the command that sets the PATH will grow too
- # long.
- command = '\r\n'.join([c + '\r\nif %errorlevel% neq 0 exit /b %errorlevel%'
- for c in commands])
- _AddMSBuildAction(spec,
- primary_input,
- inputs,
- outputs,
- command,
- description,
- sources_handled_by_action,
- actions_spec)
- return actions_spec, sources_handled_by_action
-
-
-def _AddMSBuildAction(spec, primary_input, inputs, outputs, cmd, description,
- sources_handled_by_action, actions_spec):
- command = MSVSSettings.ConvertVCMacrosToMSBuild(cmd)
- primary_input = _FixPath(primary_input)
- inputs_array = _FixPaths(inputs)
- outputs_array = _FixPaths(outputs)
- additional_inputs = ';'.join([i for i in inputs_array
- if i != primary_input])
- outputs = ';'.join(outputs_array)
- sources_handled_by_action.add(primary_input)
- action_spec = ['CustomBuild', {'Include': primary_input}]
- action_spec.extend(
- # TODO(jeanluc) 'Document' for all or just if as_sources?
- [['FileType', 'Document'],
- ['Command', command],
- ['Message', description],
- ['Outputs', outputs]
- ])
- if additional_inputs:
- action_spec.append(['AdditionalInputs', additional_inputs])
- actions_spec.append(action_spec)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
deleted file mode 100755
index daf4f411b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Unit tests for the msvs.py file. """
-
-import gyp.generator.msvs as msvs
-import unittest
-try:
- from cStringIO import StringIO
-except ImportError:
- from io import StringIO
-
-
-class TestSequenceFunctions(unittest.TestCase):
-
- def setUp(self):
- self.stderr = StringIO()
-
- def test_GetLibraries(self):
- self.assertEqual(
- msvs._GetLibraries({}),
- [])
- self.assertEqual(
- msvs._GetLibraries({'libraries': []}),
- [])
- self.assertEqual(
- msvs._GetLibraries({'other':'foo', 'libraries': ['a.lib']}),
- ['a.lib'])
- self.assertEqual(
- msvs._GetLibraries({'libraries': ['-la']}),
- ['a.lib'])
- self.assertEqual(
- msvs._GetLibraries({'libraries': ['a.lib', 'b.lib', 'c.lib', '-lb.lib',
- '-lb.lib', 'd.lib', 'a.lib']}),
- ['c.lib', 'b.lib', 'd.lib', 'a.lib'])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
deleted file mode 100644
index 33cc253ab..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
+++ /dev/null
@@ -1,2426 +0,0 @@
-from __future__ import print_function
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import collections
-import copy
-import hashlib
-import json
-import multiprocessing
-import os.path
-import re
-import signal
-import subprocess
-import sys
-import gyp
-import gyp.common
-from gyp.common import OrderedSet
-import gyp.msvs_emulation
-import gyp.MSVSUtil as MSVSUtil
-import gyp.xcode_emulation
-try:
- from cStringIO import StringIO
-except ImportError:
- from io import StringIO
-
-from gyp.common import GetEnvironFallback
-import gyp.ninja_syntax as ninja_syntax
-
-generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'STATIC_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
- 'SHARED_LIB_PREFIX': 'lib',
-
- # Gyp expects the following variables to be expandable by the build
- # system to the appropriate locations. Ninja prefers paths to be
- # known at gyp time. To resolve this, introduce special
- # variables starting with $! and $| (which begin with a $ so gyp knows it
- # should be treated specially, but is otherwise an invalid
- # ninja/shell variable) that are passed to gyp here but expanded
- # before writing out into the target .ninja files; see
- # ExpandSpecial.
- # $! is used for variables that represent a path and that can only appear at
- # the start of a string, while $| is used for variables that can appear
- # anywhere in a string.
- 'INTERMEDIATE_DIR': '$!INTERMEDIATE_DIR',
- 'SHARED_INTERMEDIATE_DIR': '$!PRODUCT_DIR/gen',
- 'PRODUCT_DIR': '$!PRODUCT_DIR',
- 'CONFIGURATION_NAME': '$|CONFIGURATION_NAME',
-
- # Special variables that may be used by gyp 'rule' targets.
- # We generate definitions for these variables on the fly when processing a
- # rule.
- 'RULE_INPUT_ROOT': '${root}',
- 'RULE_INPUT_DIRNAME': '${dirname}',
- 'RULE_INPUT_PATH': '${source}',
- 'RULE_INPUT_EXT': '${ext}',
- 'RULE_INPUT_NAME': '${name}',
-}
-
-# Placates pylint.
-generator_additional_non_configuration_keys = []
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-generator_filelist_paths = None
-
-generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested()
-
-def StripPrefix(arg, prefix):
- if arg.startswith(prefix):
- return arg[len(prefix):]
- return arg
-
-
-def QuoteShellArgument(arg, flavor):
- """Quote a string such that it will be interpreted as a single argument
- by the shell."""
- # Rather than attempting to enumerate the bad shell characters, just
- # whitelist common OK ones and quote anything else.
- if re.match(r'^[a-zA-Z0-9_=.\\/-]+$', arg):
- return arg # No quoting necessary.
- if flavor == 'win':
- return gyp.msvs_emulation.QuoteForRspFile(arg)
- return "'" + arg.replace("'", "'" + '"\'"' + "'") + "'"
-
-
-def Define(d, flavor):
- """Takes a preprocessor define and returns a -D parameter that's ninja- and
- shell-escaped."""
- if flavor == 'win':
- # cl.exe replaces literal # characters with = in preprocesor definitions for
- # some reason. Octal-encode to work around that.
- d = d.replace('#', '\\%03o' % ord('#'))
- return QuoteShellArgument(ninja_syntax.escape('-D' + d), flavor)
-
-
-def AddArch(output, arch):
- """Adds an arch string to an output path."""
- output, extension = os.path.splitext(output)
- return '%s.%s%s' % (output, arch, extension)
-
-
-class Target(object):
- """Target represents the paths used within a single gyp target.
-
- Conceptually, building a single target A is a series of steps:
-
- 1) actions/rules/copies generates source/resources/etc.
- 2) compiles generates .o files
- 3) link generates a binary (library/executable)
- 4) bundle merges the above in a mac bundle
-
- (Any of these steps can be optional.)
-
- From a build ordering perspective, a dependent target B could just
- depend on the last output of this series of steps.
-
- But some dependent commands sometimes need to reach inside the box.
- For example, when linking B it needs to get the path to the static
- library generated by A.
-
- This object stores those paths. To keep things simple, member
- variables only store concrete paths to single files, while methods
- compute derived values like "the last output of the target".
- """
- def __init__(self, type):
- # Gyp type ("static_library", etc.) of this target.
- self.type = type
- # File representing whether any input dependencies necessary for
- # dependent actions have completed.
- self.preaction_stamp = None
- # File representing whether any input dependencies necessary for
- # dependent compiles have completed.
- self.precompile_stamp = None
- # File representing the completion of actions/rules/copies, if any.
- self.actions_stamp = None
- # Path to the output of the link step, if any.
- self.binary = None
- # Path to the file representing the completion of building the bundle,
- # if any.
- self.bundle = None
- # On Windows, incremental linking requires linking against all the .objs
- # that compose a .lib (rather than the .lib itself). That list is stored
- # here. In this case, we also need to save the compile_deps for the target,
- # so that the target that directly depends on the .objs can also depend
- # on those.
- self.component_objs = None
- self.compile_deps = None
- # Windows only. The import .lib is the output of a build step, but
- # because dependents only link against the lib (not both the lib and the
- # dll) we keep track of the import library here.
- self.import_lib = None
-
- def Linkable(self):
- """Return true if this is a target that can be linked against."""
- return self.type in ('static_library', 'shared_library')
-
- def UsesToc(self, flavor):
- """Return true if the target should produce a restat rule based on a TOC
- file."""
- # For bundles, the .TOC should be produced for the binary, not for
- # FinalOutput(). But the naive approach would put the TOC file into the
- # bundle, so don't do this for bundles for now.
- if flavor == 'win' or self.bundle:
- return False
- return self.type in ('shared_library', 'loadable_module')
-
- def PreActionInput(self, flavor):
- """Return the path, if any, that should be used as a dependency of
- any dependent action step."""
- if self.UsesToc(flavor):
- return self.FinalOutput() + '.TOC'
- return self.FinalOutput() or self.preaction_stamp
-
- def PreCompileInput(self):
- """Return the path, if any, that should be used as a dependency of
- any dependent compile step."""
- return self.actions_stamp or self.precompile_stamp
-
- def FinalOutput(self):
- """Return the last output of the target, which depends on all prior
- steps."""
- return self.bundle or self.binary or self.actions_stamp
-
-
-# A small discourse on paths as used within the Ninja build:
-# All files we produce (both at gyp and at build time) appear in the
-# build directory (e.g. out/Debug).
-#
-# Paths within a given .gyp file are always relative to the directory
-# containing the .gyp file. Call these "gyp paths". This includes
-# sources as well as the starting directory a given gyp rule/action
-# expects to be run from. We call the path from the source root to
-# the gyp file the "base directory" within the per-.gyp-file
-# NinjaWriter code.
-#
-# All paths as written into the .ninja files are relative to the build
-# directory. Call these paths "ninja paths".
-#
-# We translate between these two notions of paths with two helper
-# functions:
-#
-# - GypPathToNinja translates a gyp path (i.e. relative to the .gyp file)
-# into the equivalent ninja path.
-#
-# - GypPathToUniqueOutput translates a gyp path into a ninja path to write
-# an output file; the result can be namespaced such that it is unique
-# to the input file name as well as the output target name.
-
-class NinjaWriter(object):
- def __init__(self, hash_for_rules, target_outputs, base_dir, build_dir,
- output_file, toplevel_build, output_file_name, flavor,
- toplevel_dir=None):
- """
- base_dir: path from source root to directory containing this gyp file,
- by gyp semantics, all input paths are relative to this
- build_dir: path from source root to build output
- toplevel_dir: path to the toplevel directory
- """
-
- self.hash_for_rules = hash_for_rules
- self.target_outputs = target_outputs
- self.base_dir = base_dir
- self.build_dir = build_dir
- self.ninja = ninja_syntax.Writer(output_file)
- self.toplevel_build = toplevel_build
- self.output_file_name = output_file_name
-
- self.flavor = flavor
- self.abs_build_dir = None
- if toplevel_dir is not None:
- self.abs_build_dir = os.path.abspath(os.path.join(toplevel_dir,
- build_dir))
- self.obj_ext = '.obj' if flavor == 'win' else '.o'
- if flavor == 'win':
- # See docstring of msvs_emulation.GenerateEnvironmentFiles().
- self.win_env = {}
- for arch in ('x86', 'x64'):
- self.win_env[arch] = 'environment.' + arch
-
- # Relative path from build output dir to base dir.
- build_to_top = gyp.common.InvertRelativePath(build_dir, toplevel_dir)
- self.build_to_base = os.path.join(build_to_top, base_dir)
- # Relative path from base dir to build dir.
- base_to_top = gyp.common.InvertRelativePath(base_dir, toplevel_dir)
- self.base_to_build = os.path.join(base_to_top, build_dir)
-
- def ExpandSpecial(self, path, product_dir=None):
- """Expand specials like $!PRODUCT_DIR in |path|.
-
- If |product_dir| is None, assumes the cwd is already the product
- dir. Otherwise, |product_dir| is the relative path to the product
- dir.
- """
-
- PRODUCT_DIR = '$!PRODUCT_DIR'
- if PRODUCT_DIR in path:
- if product_dir:
- path = path.replace(PRODUCT_DIR, product_dir)
- else:
- path = path.replace(PRODUCT_DIR + '/', '')
- path = path.replace(PRODUCT_DIR + '\\', '')
- path = path.replace(PRODUCT_DIR, '.')
-
- INTERMEDIATE_DIR = '$!INTERMEDIATE_DIR'
- if INTERMEDIATE_DIR in path:
- int_dir = self.GypPathToUniqueOutput('gen')
- # GypPathToUniqueOutput generates a path relative to the product dir,
- # so insert product_dir in front if it is provided.
- path = path.replace(INTERMEDIATE_DIR,
- os.path.join(product_dir or '', int_dir))
-
- CONFIGURATION_NAME = '$|CONFIGURATION_NAME'
- path = path.replace(CONFIGURATION_NAME, self.config_name)
-
- return path
-
- def ExpandRuleVariables(self, path, root, dirname, source, ext, name):
- if self.flavor == 'win':
- path = self.msvs_settings.ConvertVSMacros(
- path, config=self.config_name)
- path = path.replace(generator_default_variables['RULE_INPUT_ROOT'], root)
- path = path.replace(generator_default_variables['RULE_INPUT_DIRNAME'],
- dirname)
- path = path.replace(generator_default_variables['RULE_INPUT_PATH'], source)
- path = path.replace(generator_default_variables['RULE_INPUT_EXT'], ext)
- path = path.replace(generator_default_variables['RULE_INPUT_NAME'], name)
- return path
-
- def GypPathToNinja(self, path, env=None):
- """Translate a gyp path to a ninja path, optionally expanding environment
- variable references in |path| with |env|.
-
- See the above discourse on path conversions."""
- if env:
- if self.flavor == 'mac':
- path = gyp.xcode_emulation.ExpandEnvVars(path, env)
- elif self.flavor == 'win':
- path = gyp.msvs_emulation.ExpandMacros(path, env)
- if path.startswith('$!'):
- expanded = self.ExpandSpecial(path)
- if self.flavor == 'win':
- expanded = os.path.normpath(expanded)
- return expanded
- if '$|' in path:
- path = self.ExpandSpecial(path)
- assert '$' not in path, path
- return os.path.normpath(os.path.join(self.build_to_base, path))
-
- def GypPathToUniqueOutput(self, path, qualified=True):
- """Translate a gyp path to a ninja path for writing output.
-
- If qualified is True, qualify the resulting filename with the name
- of the target. This is necessary when e.g. compiling the same
- path twice for two separate output targets.
-
- See the above discourse on path conversions."""
-
- path = self.ExpandSpecial(path)
- assert not path.startswith('$'), path
-
- # Translate the path following this scheme:
- # Input: foo/bar.gyp, target targ, references baz/out.o
- # Output: obj/foo/baz/targ.out.o (if qualified)
- # obj/foo/baz/out.o (otherwise)
- # (and obj.host instead of obj for cross-compiles)
- #
- # Why this scheme and not some other one?
- # 1) for a given input, you can compute all derived outputs by matching
- # its path, even if the input is brought via a gyp file with '..'.
- # 2) simple files like libraries and stamps have a simple filename.
-
- obj = 'obj'
- if self.toolset != 'target':
- obj += '.' + self.toolset
-
- path_dir, path_basename = os.path.split(path)
- assert not os.path.isabs(path_dir), (
- "'%s' can not be absolute path (see crbug.com/462153)." % path_dir)
-
- if qualified:
- path_basename = self.name + '.' + path_basename
- return os.path.normpath(os.path.join(obj, self.base_dir, path_dir,
- path_basename))
-
- def WriteCollapsedDependencies(self, name, targets, order_only=None):
- """Given a list of targets, return a path for a single file
- representing the result of building all the targets or None.
-
- Uses a stamp file if necessary."""
-
- assert targets == filter(None, targets), targets
- if len(targets) == 0:
- assert not order_only
- return None
- if len(targets) > 1 or order_only:
- stamp = self.GypPathToUniqueOutput(name + '.stamp')
- targets = self.ninja.build(stamp, 'stamp', targets, order_only=order_only)
- self.ninja.newline()
- return targets[0]
-
- def _SubninjaNameForArch(self, arch):
- output_file_base = os.path.splitext(self.output_file_name)[0]
- return '%s.%s.ninja' % (output_file_base, arch)
-
- def WriteSpec(self, spec, config_name, generator_flags):
- """The main entry point for NinjaWriter: write the build rules for a spec.
-
- Returns a Target object, which represents the output paths for this spec.
- Returns None if there are no outputs (e.g. a settings-only 'none' type
- target)."""
-
- self.config_name = config_name
- self.name = spec['target_name']
- self.toolset = spec['toolset']
- config = spec['configurations'][config_name]
- self.target = Target(spec['type'])
- self.is_standalone_static_library = bool(
- spec.get('standalone_static_library', 0))
- # Track if this target contains any C++ files, to decide if gcc or g++
- # should be used for linking.
- self.uses_cpp = False
-
- self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec)
- self.xcode_settings = self.msvs_settings = None
- if self.flavor == 'mac':
- self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec)
- if self.flavor == 'win':
- self.msvs_settings = gyp.msvs_emulation.MsvsSettings(spec,
- generator_flags)
- arch = self.msvs_settings.GetArch(config_name)
- self.ninja.variable('arch', self.win_env[arch])
- self.ninja.variable('cc', '$cl_' + arch)
- self.ninja.variable('cxx', '$cl_' + arch)
- self.ninja.variable('cc_host', '$cl_' + arch)
- self.ninja.variable('cxx_host', '$cl_' + arch)
- self.ninja.variable('asm', '$ml_' + arch)
-
- if self.flavor == 'mac':
- self.archs = self.xcode_settings.GetActiveArchs(config_name)
- if len(self.archs) > 1:
- self.arch_subninjas = dict(
- (arch, ninja_syntax.Writer(
- OpenOutput(os.path.join(self.toplevel_build,
- self._SubninjaNameForArch(arch)),
- 'w')))
- for arch in self.archs)
-
- # Compute predepends for all rules.
- # actions_depends is the dependencies this target depends on before running
- # any of its action/rule/copy steps.
- # compile_depends is the dependencies this target depends on before running
- # any of its compile steps.
- actions_depends = []
- compile_depends = []
- # TODO(evan): it is rather confusing which things are lists and which
- # are strings. Fix these.
- if 'dependencies' in spec:
- for dep in spec['dependencies']:
- if dep in self.target_outputs:
- target = self.target_outputs[dep]
- actions_depends.append(target.PreActionInput(self.flavor))
- compile_depends.append(target.PreCompileInput())
- actions_depends = filter(None, actions_depends)
- compile_depends = filter(None, compile_depends)
- actions_depends = self.WriteCollapsedDependencies('actions_depends',
- actions_depends)
- compile_depends = self.WriteCollapsedDependencies('compile_depends',
- compile_depends)
- self.target.preaction_stamp = actions_depends
- self.target.precompile_stamp = compile_depends
-
- # Write out actions, rules, and copies. These must happen before we
- # compile any sources, so compute a list of predependencies for sources
- # while we do it.
- extra_sources = []
- mac_bundle_depends = []
- self.target.actions_stamp = self.WriteActionsRulesCopies(
- spec, extra_sources, actions_depends, mac_bundle_depends)
-
- # If we have actions/rules/copies, we depend directly on those, but
- # otherwise we depend on dependent target's actions/rules/copies etc.
- # We never need to explicitly depend on previous target's link steps,
- # because no compile ever depends on them.
- compile_depends_stamp = (self.target.actions_stamp or compile_depends)
-
- # Write out the compilation steps, if any.
- link_deps = []
- sources = extra_sources + spec.get('sources', [])
- if sources:
- if self.flavor == 'mac' and len(self.archs) > 1:
- # Write subninja file containing compile and link commands scoped to
- # a single arch if a fat binary is being built.
- for arch in self.archs:
- self.ninja.subninja(self._SubninjaNameForArch(arch))
-
- pch = None
- if self.flavor == 'win':
- gyp.msvs_emulation.VerifyMissingSources(
- sources, self.abs_build_dir, generator_flags, self.GypPathToNinja)
- pch = gyp.msvs_emulation.PrecompiledHeader(
- self.msvs_settings, config_name, self.GypPathToNinja,
- self.GypPathToUniqueOutput, self.obj_ext)
- else:
- pch = gyp.xcode_emulation.MacPrefixHeader(
- self.xcode_settings, self.GypPathToNinja,
- lambda path, lang: self.GypPathToUniqueOutput(path + '-' + lang))
- link_deps = self.WriteSources(
- self.ninja, config_name, config, sources, compile_depends_stamp, pch,
- spec)
- # Some actions/rules output 'sources' that are already object files.
- obj_outputs = [f for f in sources if f.endswith(self.obj_ext)]
- if obj_outputs:
- if self.flavor != 'mac' or len(self.archs) == 1:
- link_deps += [self.GypPathToNinja(o) for o in obj_outputs]
- else:
- print("Warning: Actions/rules writing object files don't work with " \
- "multiarch targets, dropping. (target %s)" % spec['target_name'])
- elif self.flavor == 'mac' and len(self.archs) > 1:
- link_deps = collections.defaultdict(list)
-
- compile_deps = self.target.actions_stamp or actions_depends
- if self.flavor == 'win' and self.target.type == 'static_library':
- self.target.component_objs = link_deps
- self.target.compile_deps = compile_deps
-
- # Write out a link step, if needed.
- output = None
- is_empty_bundle = not link_deps and not mac_bundle_depends
- if link_deps or self.target.actions_stamp or actions_depends:
- output = self.WriteTarget(spec, config_name, config, link_deps,
- compile_deps)
- if self.is_mac_bundle:
- mac_bundle_depends.append(output)
-
- # Bundle all of the above together, if needed.
- if self.is_mac_bundle:
- output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle)
-
- if not output:
- return None
-
- assert self.target.FinalOutput(), output
- return self.target
-
- def _WinIdlRule(self, source, prebuild, outputs):
- """Handle the implicit VS .idl rule for one source file. Fills |outputs|
- with files that are generated."""
- outdir, output, vars, flags = self.msvs_settings.GetIdlBuildData(
- source, self.config_name)
- outdir = self.GypPathToNinja(outdir)
- def fix_path(path, rel=None):
- path = os.path.join(outdir, path)
- dirname, basename = os.path.split(source)
- root, ext = os.path.splitext(basename)
- path = self.ExpandRuleVariables(
- path, root, dirname, source, ext, basename)
- if rel:
- path = os.path.relpath(path, rel)
- return path
- vars = [(name, fix_path(value, outdir)) for name, value in vars]
- output = [fix_path(p) for p in output]
- vars.append(('outdir', outdir))
- vars.append(('idlflags', flags))
- input = self.GypPathToNinja(source)
- self.ninja.build(output, 'idl', input,
- variables=vars, order_only=prebuild)
- outputs.extend(output)
-
- def WriteWinIdlFiles(self, spec, prebuild):
- """Writes rules to match MSVS's implicit idl handling."""
- assert self.flavor == 'win'
- if self.msvs_settings.HasExplicitIdlRulesOrActions(spec):
- return []
- outputs = []
- for source in filter(lambda x: x.endswith('.idl'), spec['sources']):
- self._WinIdlRule(source, prebuild, outputs)
- return outputs
-
- def WriteActionsRulesCopies(self, spec, extra_sources, prebuild,
- mac_bundle_depends):
- """Write out the Actions, Rules, and Copies steps. Return a path
- representing the outputs of these steps."""
- outputs = []
- if self.is_mac_bundle:
- mac_bundle_resources = spec.get('mac_bundle_resources', [])[:]
- else:
- mac_bundle_resources = []
- extra_mac_bundle_resources = []
-
- if 'actions' in spec:
- outputs += self.WriteActions(spec['actions'], extra_sources, prebuild,
- extra_mac_bundle_resources)
- if 'rules' in spec:
- outputs += self.WriteRules(spec['rules'], extra_sources, prebuild,
- mac_bundle_resources,
- extra_mac_bundle_resources)
- if 'copies' in spec:
- outputs += self.WriteCopies(spec['copies'], prebuild, mac_bundle_depends)
-
- if 'sources' in spec and self.flavor == 'win':
- outputs += self.WriteWinIdlFiles(spec, prebuild)
-
- stamp = self.WriteCollapsedDependencies('actions_rules_copies', outputs)
-
- if self.is_mac_bundle:
- xcassets = self.WriteMacBundleResources(
- extra_mac_bundle_resources + mac_bundle_resources, mac_bundle_depends)
- partial_info_plist = self.WriteMacXCassets(xcassets, mac_bundle_depends)
- self.WriteMacInfoPlist(partial_info_plist, mac_bundle_depends)
-
- return stamp
-
- def GenerateDescription(self, verb, message, fallback):
- """Generate and return a description of a build step.
-
- |verb| is the short summary, e.g. ACTION or RULE.
- |message| is a hand-written description, or None if not available.
- |fallback| is the gyp-level name of the step, usable as a fallback.
- """
- if self.toolset != 'target':
- verb += '(%s)' % self.toolset
- if message:
- return '%s %s' % (verb, self.ExpandSpecial(message))
- else:
- return '%s %s: %s' % (verb, self.name, fallback)
-
- def WriteActions(self, actions, extra_sources, prebuild,
- extra_mac_bundle_resources):
- # Actions cd into the base directory.
- env = self.GetToolchainEnv()
- all_outputs = []
- for action in actions:
- # First write out a rule for the action.
- name = '%s_%s' % (action['action_name'], self.hash_for_rules)
- description = self.GenerateDescription('ACTION',
- action.get('message', None),
- name)
- is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(action)
- if self.flavor == 'win' else False)
- args = action['action']
- depfile = action.get('depfile', None)
- if depfile:
- depfile = self.ExpandSpecial(depfile, self.base_to_build)
- pool = 'console' if int(action.get('ninja_use_console', 0)) else None
- rule_name, _ = self.WriteNewNinjaRule(name, args, description,
- is_cygwin, env, pool,
- depfile=depfile)
-
- inputs = [self.GypPathToNinja(i, env) for i in action['inputs']]
- if int(action.get('process_outputs_as_sources', False)):
- extra_sources += action['outputs']
- if int(action.get('process_outputs_as_mac_bundle_resources', False)):
- extra_mac_bundle_resources += action['outputs']
- outputs = [self.GypPathToNinja(o, env) for o in action['outputs']]
-
- # Then write out an edge using the rule.
- self.ninja.build(outputs, rule_name, inputs,
- order_only=prebuild)
- all_outputs += outputs
-
- self.ninja.newline()
-
- return all_outputs
-
- def WriteRules(self, rules, extra_sources, prebuild,
- mac_bundle_resources, extra_mac_bundle_resources):
- env = self.GetToolchainEnv()
- all_outputs = []
- for rule in rules:
- # Skip a rule with no action and no inputs.
- if 'action' not in rule and not rule.get('rule_sources', []):
- continue
-
- # First write out a rule for the rule action.
- name = '%s_%s' % (rule['rule_name'], self.hash_for_rules)
-
- args = rule['action']
- description = self.GenerateDescription(
- 'RULE',
- rule.get('message', None),
- ('%s ' + generator_default_variables['RULE_INPUT_PATH']) % name)
- is_cygwin = (self.msvs_settings.IsRuleRunUnderCygwin(rule)
- if self.flavor == 'win' else False)
- pool = 'console' if int(rule.get('ninja_use_console', 0)) else None
- rule_name, args = self.WriteNewNinjaRule(
- name, args, description, is_cygwin, env, pool)
-
- # TODO: if the command references the outputs directly, we should
- # simplify it to just use $out.
-
- # Rules can potentially make use of some special variables which
- # must vary per source file.
- # Compute the list of variables we'll need to provide.
- special_locals = ('source', 'root', 'dirname', 'ext', 'name')
- needed_variables = set(['source'])
- for argument in args:
- for var in special_locals:
- if '${%s}' % var in argument:
- needed_variables.add(var)
-
- def cygwin_munge(path):
- # pylint: disable=cell-var-from-loop
- if is_cygwin:
- return path.replace('\\', '/')
- return path
-
- inputs = [self.GypPathToNinja(i, env) for i in rule.get('inputs', [])]
-
- # If there are n source files matching the rule, and m additional rule
- # inputs, then adding 'inputs' to each build edge written below will
- # write m * n inputs. Collapsing reduces this to m + n.
- sources = rule.get('rule_sources', [])
- num_inputs = len(inputs)
- if prebuild:
- num_inputs += 1
- if num_inputs > 2 and len(sources) > 2:
- inputs = [self.WriteCollapsedDependencies(
- rule['rule_name'], inputs, order_only=prebuild)]
- prebuild = []
-
- # For each source file, write an edge that generates all the outputs.
- for source in sources:
- source = os.path.normpath(source)
- dirname, basename = os.path.split(source)
- root, ext = os.path.splitext(basename)
-
- # Gather the list of inputs and outputs, expanding $vars if possible.
- outputs = [self.ExpandRuleVariables(o, root, dirname,
- source, ext, basename)
- for o in rule['outputs']]
-
- if int(rule.get('process_outputs_as_sources', False)):
- extra_sources += outputs
-
- was_mac_bundle_resource = source in mac_bundle_resources
- if was_mac_bundle_resource or \
- int(rule.get('process_outputs_as_mac_bundle_resources', False)):
- extra_mac_bundle_resources += outputs
- # Note: This is n_resources * n_outputs_in_rule. Put to-be-removed
- # items in a set and remove them all in a single pass if this becomes
- # a performance issue.
- if was_mac_bundle_resource:
- mac_bundle_resources.remove(source)
-
- extra_bindings = []
- for var in needed_variables:
- if var == 'root':
- extra_bindings.append(('root', cygwin_munge(root)))
- elif var == 'dirname':
- # '$dirname' is a parameter to the rule action, which means
- # it shouldn't be converted to a Ninja path. But we don't
- # want $!PRODUCT_DIR in there either.
- dirname_expanded = self.ExpandSpecial(dirname, self.base_to_build)
- extra_bindings.append(('dirname', cygwin_munge(dirname_expanded)))
- elif var == 'source':
- # '$source' is a parameter to the rule action, which means
- # it shouldn't be converted to a Ninja path. But we don't
- # want $!PRODUCT_DIR in there either.
- source_expanded = self.ExpandSpecial(source, self.base_to_build)
- extra_bindings.append(('source', cygwin_munge(source_expanded)))
- elif var == 'ext':
- extra_bindings.append(('ext', ext))
- elif var == 'name':
- extra_bindings.append(('name', cygwin_munge(basename)))
- else:
- assert var is None, repr(var)
-
- outputs = [self.GypPathToNinja(o, env) for o in outputs]
- if self.flavor == 'win':
- # WriteNewNinjaRule uses unique_name for creating an rsp file on win.
- extra_bindings.append(('unique_name',
- hashlib.md5(outputs[0]).hexdigest()))
- self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
- implicit=inputs,
- order_only=prebuild,
- variables=extra_bindings)
-
- all_outputs.extend(outputs)
-
- return all_outputs
-
- def WriteCopies(self, copies, prebuild, mac_bundle_depends):
- outputs = []
- env = self.GetToolchainEnv()
- for copy in copies:
- for path in copy['files']:
- # Normalize the path so trailing slashes don't confuse us.
- path = os.path.normpath(path)
- basename = os.path.split(path)[1]
- src = self.GypPathToNinja(path, env)
- dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
- env)
- outputs += self.ninja.build(dst, 'copy', src, order_only=prebuild)
- if self.is_mac_bundle:
- # gyp has mac_bundle_resources to copy things into a bundle's
- # Resources folder, but there's no built-in way to copy files to other
- # places in the bundle. Hence, some targets use copies for this. Check
- # if this file is copied into the current bundle, and if so add it to
- # the bundle depends so that dependent targets get rebuilt if the copy
- # input changes.
- if dst.startswith(self.xcode_settings.GetBundleContentsFolderPath()):
- mac_bundle_depends.append(dst)
-
- return outputs
-
- def WriteMacBundleResources(self, resources, bundle_depends):
- """Writes ninja edges for 'mac_bundle_resources'."""
- xcassets = []
- for output, res in gyp.xcode_emulation.GetMacBundleResources(
- generator_default_variables['PRODUCT_DIR'],
- self.xcode_settings, map(self.GypPathToNinja, resources)):
- output = self.ExpandSpecial(output)
- if os.path.splitext(output)[-1] != '.xcassets':
- isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name)
- self.ninja.build(output, 'mac_tool', res,
- variables=[('mactool_cmd', 'copy-bundle-resource'), \
- ('binary', isBinary)])
- bundle_depends.append(output)
- else:
- xcassets.append(res)
- return xcassets
-
- def WriteMacXCassets(self, xcassets, bundle_depends):
- """Writes ninja edges for 'mac_bundle_resources' .xcassets files.
-
- This add an invocation of 'actool' via the 'mac_tool.py' helper script.
- It assumes that the assets catalogs define at least one imageset and
- thus an Assets.car file will be generated in the application resources
- directory. If this is not the case, then the build will probably be done
- at each invocation of ninja."""
- if not xcassets:
- return
-
- extra_arguments = {}
- settings_to_arg = {
- 'XCASSETS_APP_ICON': 'app-icon',
- 'XCASSETS_LAUNCH_IMAGE': 'launch-image',
- }
- settings = self.xcode_settings.xcode_settings[self.config_name]
- for settings_key, arg_name in settings_to_arg.items():
- value = settings.get(settings_key)
- if value:
- extra_arguments[arg_name] = value
-
- partial_info_plist = None
- if extra_arguments:
- partial_info_plist = self.GypPathToUniqueOutput(
- 'assetcatalog_generated_info.plist')
- extra_arguments['output-partial-info-plist'] = partial_info_plist
-
- outputs = []
- outputs.append(
- os.path.join(
- self.xcode_settings.GetBundleResourceFolder(),
- 'Assets.car'))
- if partial_info_plist:
- outputs.append(partial_info_plist)
-
- keys = QuoteShellArgument(json.dumps(extra_arguments), self.flavor)
- extra_env = self.xcode_settings.GetPerTargetSettings()
- env = self.GetSortedXcodeEnv(additional_settings=extra_env)
- env = self.ComputeExportEnvString(env)
-
- bundle_depends.extend(self.ninja.build(
- outputs, 'compile_xcassets', xcassets,
- variables=[('env', env), ('keys', keys)]))
- return partial_info_plist
-
- def WriteMacInfoPlist(self, partial_info_plist, bundle_depends):
- """Write build rules for bundle Info.plist files."""
- info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist(
- generator_default_variables['PRODUCT_DIR'],
- self.xcode_settings, self.GypPathToNinja)
- if not info_plist:
- return
- out = self.ExpandSpecial(out)
- if defines:
- # Create an intermediate file to store preprocessed results.
- intermediate_plist = self.GypPathToUniqueOutput(
- os.path.basename(info_plist))
- defines = ' '.join([Define(d, self.flavor) for d in defines])
- info_plist = self.ninja.build(
- intermediate_plist, 'preprocess_infoplist', info_plist,
- variables=[('defines',defines)])
-
- env = self.GetSortedXcodeEnv(additional_settings=extra_env)
- env = self.ComputeExportEnvString(env)
-
- if partial_info_plist:
- intermediate_plist = self.GypPathToUniqueOutput('merged_info.plist')
- info_plist = self.ninja.build(
- intermediate_plist, 'merge_infoplist',
- [partial_info_plist, info_plist])
-
- keys = self.xcode_settings.GetExtraPlistItems(self.config_name)
- keys = QuoteShellArgument(json.dumps(keys), self.flavor)
- isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name)
- self.ninja.build(out, 'copy_infoplist', info_plist,
- variables=[('env', env), ('keys', keys),
- ('binary', isBinary)])
- bundle_depends.append(out)
-
- def WriteSources(self, ninja_file, config_name, config, sources, predepends,
- precompiled_header, spec):
- """Write build rules to compile all of |sources|."""
- if self.toolset == 'host':
- self.ninja.variable('ar', '$ar_host')
- self.ninja.variable('cc', '$cc_host')
- self.ninja.variable('cxx', '$cxx_host')
- self.ninja.variable('ld', '$ld_host')
- self.ninja.variable('ldxx', '$ldxx_host')
- self.ninja.variable('nm', '$nm_host')
- self.ninja.variable('readelf', '$readelf_host')
-
- if self.flavor != 'mac' or len(self.archs) == 1:
- return self.WriteSourcesForArch(
- self.ninja, config_name, config, sources, predepends,
- precompiled_header, spec)
- else:
- return dict((arch, self.WriteSourcesForArch(
- self.arch_subninjas[arch], config_name, config, sources, predepends,
- precompiled_header, spec, arch=arch))
- for arch in self.archs)
-
- def WriteSourcesForArch(self, ninja_file, config_name, config, sources,
- predepends, precompiled_header, spec, arch=None):
- """Write build rules to compile all of |sources|."""
-
- extra_defines = []
- if self.flavor == 'mac':
- cflags = self.xcode_settings.GetCflags(config_name, arch=arch)
- cflags_c = self.xcode_settings.GetCflagsC(config_name)
- cflags_cc = self.xcode_settings.GetCflagsCC(config_name)
- cflags_objc = ['$cflags_c'] + \
- self.xcode_settings.GetCflagsObjC(config_name)
- cflags_objcc = ['$cflags_cc'] + \
- self.xcode_settings.GetCflagsObjCC(config_name)
- elif self.flavor == 'win':
- asmflags = self.msvs_settings.GetAsmflags(config_name)
- cflags = self.msvs_settings.GetCflags(config_name)
- cflags_c = self.msvs_settings.GetCflagsC(config_name)
- cflags_cc = self.msvs_settings.GetCflagsCC(config_name)
- extra_defines = self.msvs_settings.GetComputedDefines(config_name)
- # See comment at cc_command for why there's two .pdb files.
- pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName(
- config_name, self.ExpandSpecial)
- if not pdbpath_c:
- obj = 'obj'
- if self.toolset != 'target':
- obj += '.' + self.toolset
- pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, self.name))
- pdbpath_c = pdbpath + '.c.pdb'
- pdbpath_cc = pdbpath + '.cc.pdb'
- self.WriteVariableList(ninja_file, 'pdbname_c', [pdbpath_c])
- self.WriteVariableList(ninja_file, 'pdbname_cc', [pdbpath_cc])
- self.WriteVariableList(ninja_file, 'pchprefix', [self.name])
- else:
- cflags = config.get('cflags', [])
- cflags_c = config.get('cflags_c', [])
- cflags_cc = config.get('cflags_cc', [])
-
- # Respect environment variables related to build, but target-specific
- # flags can still override them.
- if self.toolset == 'target':
- cflags_c = (os.environ.get('CPPFLAGS', '').split() +
- os.environ.get('CFLAGS', '').split() + cflags_c)
- cflags_cc = (os.environ.get('CPPFLAGS', '').split() +
- os.environ.get('CXXFLAGS', '').split() + cflags_cc)
- elif self.toolset == 'host':
- cflags_c = (os.environ.get('CPPFLAGS_host', '').split() +
- os.environ.get('CFLAGS_host', '').split() + cflags_c)
- cflags_cc = (os.environ.get('CPPFLAGS_host', '').split() +
- os.environ.get('CXXFLAGS_host', '').split() + cflags_cc)
-
- defines = config.get('defines', []) + extra_defines
- self.WriteVariableList(ninja_file, 'defines',
- [Define(d, self.flavor) for d in defines])
- if self.flavor == 'win':
- self.WriteVariableList(ninja_file, 'asmflags',
- map(self.ExpandSpecial, asmflags))
- self.WriteVariableList(ninja_file, 'rcflags',
- [QuoteShellArgument(self.ExpandSpecial(f), self.flavor)
- for f in self.msvs_settings.GetRcflags(config_name,
- self.GypPathToNinja)])
-
- include_dirs = config.get('include_dirs', [])
-
- env = self.GetToolchainEnv()
- if self.flavor == 'win':
- include_dirs = self.msvs_settings.AdjustIncludeDirs(include_dirs,
- config_name)
- self.WriteVariableList(ninja_file, 'includes',
- [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor)
- for i in include_dirs])
-
- if self.flavor == 'win':
- midl_include_dirs = config.get('midl_include_dirs', [])
- midl_include_dirs = self.msvs_settings.AdjustMidlIncludeDirs(
- midl_include_dirs, config_name)
- self.WriteVariableList(ninja_file, 'midl_includes',
- [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor)
- for i in midl_include_dirs])
-
- pch_commands = precompiled_header.GetPchBuildCommands(arch)
- if self.flavor == 'mac':
- # Most targets use no precompiled headers, so only write these if needed.
- for ext, var in [('c', 'cflags_pch_c'), ('cc', 'cflags_pch_cc'),
- ('m', 'cflags_pch_objc'), ('mm', 'cflags_pch_objcc')]:
- include = precompiled_header.GetInclude(ext, arch)
- if include: ninja_file.variable(var, include)
-
- arflags = config.get('arflags', [])
-
- self.WriteVariableList(ninja_file, 'cflags',
- map(self.ExpandSpecial, cflags))
- self.WriteVariableList(ninja_file, 'cflags_c',
- map(self.ExpandSpecial, cflags_c))
- self.WriteVariableList(ninja_file, 'cflags_cc',
- map(self.ExpandSpecial, cflags_cc))
- if self.flavor == 'mac':
- self.WriteVariableList(ninja_file, 'cflags_objc',
- map(self.ExpandSpecial, cflags_objc))
- self.WriteVariableList(ninja_file, 'cflags_objcc',
- map(self.ExpandSpecial, cflags_objcc))
- self.WriteVariableList(ninja_file, 'arflags',
- map(self.ExpandSpecial, arflags))
- ninja_file.newline()
- outputs = []
- has_rc_source = False
- for source in sources:
- filename, ext = os.path.splitext(source)
- ext = ext[1:]
- obj_ext = self.obj_ext
- if ext in ('cc', 'cpp', 'cxx'):
- command = 'cxx'
- self.uses_cpp = True
- elif ext == 'c' or (ext == 'S' and self.flavor != 'win'):
- command = 'cc'
- elif ext == 's' and self.flavor != 'win': # Doesn't generate .o.d files.
- command = 'cc_s'
- elif (self.flavor == 'win' and ext == 'asm' and
- not self.msvs_settings.HasExplicitAsmRules(spec)):
- command = 'asm'
- # Add the _asm suffix as msvs is capable of handling .cc and
- # .asm files of the same name without collision.
- obj_ext = '_asm.obj'
- elif self.flavor == 'mac' and ext == 'm':
- command = 'objc'
- elif self.flavor == 'mac' and ext == 'mm':
- command = 'objcxx'
- self.uses_cpp = True
- elif self.flavor == 'win' and ext == 'rc':
- command = 'rc'
- obj_ext = '.res'
- has_rc_source = True
- else:
- # Ignore unhandled extensions.
- continue
- input = self.GypPathToNinja(source)
- output = self.GypPathToUniqueOutput(filename + obj_ext)
- if arch is not None:
- output = AddArch(output, arch)
- implicit = precompiled_header.GetObjDependencies([input], [output], arch)
- variables = []
- if self.flavor == 'win':
- variables, output, implicit = precompiled_header.GetFlagsModifications(
- input, output, implicit, command, cflags_c, cflags_cc,
- self.ExpandSpecial)
- ninja_file.build(output, command, input,
- implicit=[gch for _, _, gch in implicit],
- order_only=predepends, variables=variables)
- outputs.append(output)
-
- if has_rc_source:
- resource_include_dirs = config.get('resource_include_dirs', include_dirs)
- self.WriteVariableList(ninja_file, 'resource_includes',
- [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor)
- for i in resource_include_dirs])
-
- self.WritePchTargets(ninja_file, pch_commands)
-
- ninja_file.newline()
- return outputs
-
- def WritePchTargets(self, ninja_file, pch_commands):
- """Writes ninja rules to compile prefix headers."""
- if not pch_commands:
- return
-
- for gch, lang_flag, lang, input in pch_commands:
- var_name = {
- 'c': 'cflags_pch_c',
- 'cc': 'cflags_pch_cc',
- 'm': 'cflags_pch_objc',
- 'mm': 'cflags_pch_objcc',
- }[lang]
-
- map = { 'c': 'cc', 'cc': 'cxx', 'm': 'objc', 'mm': 'objcxx', }
- cmd = map.get(lang)
- ninja_file.build(gch, cmd, input, variables=[(var_name, lang_flag)])
-
- def WriteLink(self, spec, config_name, config, link_deps):
- """Write out a link step. Fills out target.binary. """
- if self.flavor != 'mac' or len(self.archs) == 1:
- return self.WriteLinkForArch(
- self.ninja, spec, config_name, config, link_deps)
- else:
- output = self.ComputeOutput(spec)
- inputs = [self.WriteLinkForArch(self.arch_subninjas[arch], spec,
- config_name, config, link_deps[arch],
- arch=arch)
- for arch in self.archs]
- extra_bindings = []
- build_output = output
- if not self.is_mac_bundle:
- self.AppendPostbuildVariable(extra_bindings, spec, output, output)
-
- # TODO(yyanagisawa): more work needed to fix:
- # https://code.google.com/p/gyp/issues/detail?id=411
- if (spec['type'] in ('shared_library', 'loadable_module') and
- not self.is_mac_bundle):
- extra_bindings.append(('lib', output))
- self.ninja.build([output, output + '.TOC'], 'solipo', inputs,
- variables=extra_bindings)
- else:
- self.ninja.build(build_output, 'lipo', inputs, variables=extra_bindings)
- return output
-
- def WriteLinkForArch(self, ninja_file, spec, config_name, config,
- link_deps, arch=None):
- """Write out a link step. Fills out target.binary. """
- command = {
- 'executable': 'link',
- 'loadable_module': 'solink_module',
- 'shared_library': 'solink',
- }[spec['type']]
- command_suffix = ''
-
- implicit_deps = set()
- solibs = set()
- order_deps = set()
-
- if 'dependencies' in spec:
- # Two kinds of dependencies:
- # - Linkable dependencies (like a .a or a .so): add them to the link line.
- # - Non-linkable dependencies (like a rule that generates a file
- # and writes a stamp file): add them to implicit_deps
- extra_link_deps = set()
- for dep in spec['dependencies']:
- target = self.target_outputs.get(dep)
- if not target:
- continue
- linkable = target.Linkable()
- if linkable:
- new_deps = []
- if (self.flavor == 'win' and
- target.component_objs and
- self.msvs_settings.IsUseLibraryDependencyInputs(config_name)):
- new_deps = target.component_objs
- if target.compile_deps:
- order_deps.add(target.compile_deps)
- elif self.flavor == 'win' and target.import_lib:
- new_deps = [target.import_lib]
- elif target.UsesToc(self.flavor):
- solibs.add(target.binary)
- implicit_deps.add(target.binary + '.TOC')
- else:
- new_deps = [target.binary]
- for new_dep in new_deps:
- if new_dep not in extra_link_deps:
- extra_link_deps.add(new_dep)
- link_deps.append(new_dep)
-
- final_output = target.FinalOutput()
- if not linkable or final_output != target.binary:
- implicit_deps.add(final_output)
-
- extra_bindings = []
- if self.uses_cpp and self.flavor != 'win':
- extra_bindings.append(('ld', '$ldxx'))
-
- output = self.ComputeOutput(spec, arch)
- if arch is None and not self.is_mac_bundle:
- self.AppendPostbuildVariable(extra_bindings, spec, output, output)
-
- is_executable = spec['type'] == 'executable'
- # The ldflags config key is not used on mac or win. On those platforms
- # linker flags are set via xcode_settings and msvs_settings, respectively.
- env_ldflags = os.environ.get('LDFLAGS', '').split()
- if self.flavor == 'mac':
- ldflags = self.xcode_settings.GetLdflags(config_name,
- self.ExpandSpecial(generator_default_variables['PRODUCT_DIR']),
- self.GypPathToNinja, arch)
- ldflags = env_ldflags + ldflags
- elif self.flavor == 'win':
- manifest_base_name = self.GypPathToUniqueOutput(
- self.ComputeOutputFileName(spec))
- ldflags, intermediate_manifest, manifest_files = \
- self.msvs_settings.GetLdflags(config_name, self.GypPathToNinja,
- self.ExpandSpecial, manifest_base_name,
- output, is_executable,
- self.toplevel_build)
- ldflags = env_ldflags + ldflags
- self.WriteVariableList(ninja_file, 'manifests', manifest_files)
- implicit_deps = implicit_deps.union(manifest_files)
- if intermediate_manifest:
- self.WriteVariableList(
- ninja_file, 'intermediatemanifest', [intermediate_manifest])
- command_suffix = _GetWinLinkRuleNameSuffix(
- self.msvs_settings.IsEmbedManifest(config_name))
- def_file = self.msvs_settings.GetDefFile(self.GypPathToNinja)
- if def_file:
- implicit_deps.add(def_file)
- else:
- # Respect environment variables related to build, but target-specific
- # flags can still override them.
- ldflags = env_ldflags + config.get('ldflags', [])
- if is_executable and len(solibs):
- rpath = 'lib/'
- if self.toolset != 'target':
- rpath += self.toolset
- ldflags.append(r'-Wl,-rpath=\$$ORIGIN/%s' % rpath)
- ldflags.append('-Wl,-rpath-link=%s' % rpath)
- self.WriteVariableList(ninja_file, 'ldflags',
- map(self.ExpandSpecial, ldflags))
-
- library_dirs = config.get('library_dirs', [])
- if self.flavor == 'win':
- library_dirs = [self.msvs_settings.ConvertVSMacros(l, config_name)
- for l in library_dirs]
- library_dirs = ['/LIBPATH:' + QuoteShellArgument(self.GypPathToNinja(l),
- self.flavor)
- for l in library_dirs]
- else:
- library_dirs = [QuoteShellArgument('-L' + self.GypPathToNinja(l),
- self.flavor)
- for l in library_dirs]
-
- libraries = gyp.common.uniquer(map(self.ExpandSpecial,
- spec.get('libraries', [])))
- if self.flavor == 'mac':
- libraries = self.xcode_settings.AdjustLibraries(libraries, config_name)
- elif self.flavor == 'win':
- libraries = self.msvs_settings.AdjustLibraries(libraries)
-
- self.WriteVariableList(ninja_file, 'libs', library_dirs + libraries)
-
- linked_binary = output
-
- if command in ('solink', 'solink_module'):
- extra_bindings.append(('soname', os.path.split(output)[1]))
- extra_bindings.append(('lib',
- gyp.common.EncodePOSIXShellArgument(output)))
- if self.flavor != 'win':
- link_file_list = output
- if self.is_mac_bundle:
- # 'Dependency Framework.framework/Versions/A/Dependency Framework' ->
- # 'Dependency Framework.framework.rsp'
- link_file_list = self.xcode_settings.GetWrapperName()
- if arch:
- link_file_list += '.' + arch
- link_file_list += '.rsp'
- # If an rspfile contains spaces, ninja surrounds the filename with
- # quotes around it and then passes it to open(), creating a file with
- # quotes in its name (and when looking for the rsp file, the name
- # makes it through bash which strips the quotes) :-/
- link_file_list = link_file_list.replace(' ', '_')
- extra_bindings.append(
- ('link_file_list',
- gyp.common.EncodePOSIXShellArgument(link_file_list)))
- if self.flavor == 'win':
- extra_bindings.append(('binary', output))
- if ('/NOENTRY' not in ldflags and
- not self.msvs_settings.GetNoImportLibrary(config_name)):
- self.target.import_lib = output + '.lib'
- extra_bindings.append(('implibflag',
- '/IMPLIB:%s' % self.target.import_lib))
- pdbname = self.msvs_settings.GetPDBName(
- config_name, self.ExpandSpecial, output + '.pdb')
- output = [output, self.target.import_lib]
- if pdbname:
- output.append(pdbname)
- elif not self.is_mac_bundle:
- output = [output, output + '.TOC']
- else:
- command = command + '_notoc'
- elif self.flavor == 'win':
- extra_bindings.append(('binary', output))
- pdbname = self.msvs_settings.GetPDBName(
- config_name, self.ExpandSpecial, output + '.pdb')
- if pdbname:
- output = [output, pdbname]
-
-
- if len(solibs):
- extra_bindings.append(('solibs', gyp.common.EncodePOSIXShellList(solibs)))
-
- ninja_file.build(output, command + command_suffix, link_deps,
- implicit=list(implicit_deps),
- order_only=list(order_deps),
- variables=extra_bindings)
- return linked_binary
-
- def WriteTarget(self, spec, config_name, config, link_deps, compile_deps):
- extra_link_deps = any(self.target_outputs.get(dep).Linkable()
- for dep in spec.get('dependencies', [])
- if dep in self.target_outputs)
- if spec['type'] == 'none' or (not link_deps and not extra_link_deps):
- # TODO(evan): don't call this function for 'none' target types, as
- # it doesn't do anything, and we fake out a 'binary' with a stamp file.
- self.target.binary = compile_deps
- self.target.type = 'none'
- elif spec['type'] == 'static_library':
- self.target.binary = self.ComputeOutput(spec)
- if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
- self.is_standalone_static_library):
- self.ninja.build(self.target.binary, 'alink_thin', link_deps,
- order_only=compile_deps)
- else:
- variables = []
- if self.xcode_settings:
- libtool_flags = self.xcode_settings.GetLibtoolflags(config_name)
- if libtool_flags:
- variables.append(('libtool_flags', libtool_flags))
- if self.msvs_settings:
- libflags = self.msvs_settings.GetLibFlags(config_name,
- self.GypPathToNinja)
- variables.append(('libflags', libflags))
-
- if self.flavor != 'mac' or len(self.archs) == 1:
- self.AppendPostbuildVariable(variables, spec,
- self.target.binary, self.target.binary)
- self.ninja.build(self.target.binary, 'alink', link_deps,
- order_only=compile_deps, variables=variables)
- else:
- inputs = []
- for arch in self.archs:
- output = self.ComputeOutput(spec, arch)
- self.arch_subninjas[arch].build(output, 'alink', link_deps[arch],
- order_only=compile_deps,
- variables=variables)
- inputs.append(output)
- # TODO: It's not clear if libtool_flags should be passed to the alink
- # call that combines single-arch .a files into a fat .a file.
- self.AppendPostbuildVariable(variables, spec,
- self.target.binary, self.target.binary)
- self.ninja.build(self.target.binary, 'alink', inputs,
- # FIXME: test proving order_only=compile_deps isn't
- # needed.
- variables=variables)
- else:
- self.target.binary = self.WriteLink(spec, config_name, config, link_deps)
- return self.target.binary
-
- def WriteMacBundle(self, spec, mac_bundle_depends, is_empty):
- assert self.is_mac_bundle
- package_framework = spec['type'] in ('shared_library', 'loadable_module')
- output = self.ComputeMacBundleOutput()
- if is_empty:
- output += '.stamp'
- variables = []
- self.AppendPostbuildVariable(variables, spec, output, self.target.binary,
- is_command_start=not package_framework)
- if package_framework and not is_empty:
- variables.append(('version', self.xcode_settings.GetFrameworkVersion()))
- self.ninja.build(output, 'package_framework', mac_bundle_depends,
- variables=variables)
- else:
- self.ninja.build(output, 'stamp', mac_bundle_depends,
- variables=variables)
- self.target.bundle = output
- return output
-
- def GetToolchainEnv(self, additional_settings=None):
- """Returns the variables toolchain would set for build steps."""
- env = self.GetSortedXcodeEnv(additional_settings=additional_settings)
- if self.flavor == 'win':
- env = self.GetMsvsToolchainEnv(
- additional_settings=additional_settings)
- return env
-
- def GetMsvsToolchainEnv(self, additional_settings=None):
- """Returns the variables Visual Studio would set for build steps."""
- return self.msvs_settings.GetVSMacroEnv('$!PRODUCT_DIR',
- config=self.config_name)
-
- def GetSortedXcodeEnv(self, additional_settings=None):
- """Returns the variables Xcode would set for build steps."""
- assert self.abs_build_dir
- abs_build_dir = self.abs_build_dir
- return gyp.xcode_emulation.GetSortedXcodeEnv(
- self.xcode_settings, abs_build_dir,
- os.path.join(abs_build_dir, self.build_to_base), self.config_name,
- additional_settings)
-
- def GetSortedXcodePostbuildEnv(self):
- """Returns the variables Xcode would set for postbuild steps."""
- postbuild_settings = {}
- # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack.
- # TODO(thakis): It would be nice to have some general mechanism instead.
- strip_save_file = self.xcode_settings.GetPerTargetSetting(
- 'CHROMIUM_STRIP_SAVE_FILE')
- if strip_save_file:
- postbuild_settings['CHROMIUM_STRIP_SAVE_FILE'] = strip_save_file
- return self.GetSortedXcodeEnv(additional_settings=postbuild_settings)
-
- def AppendPostbuildVariable(self, variables, spec, output, binary,
- is_command_start=False):
- """Adds a 'postbuild' variable if there is a postbuild for |output|."""
- postbuild = self.GetPostbuildCommand(spec, output, binary, is_command_start)
- if postbuild:
- variables.append(('postbuilds', postbuild))
-
- def GetPostbuildCommand(self, spec, output, output_binary, is_command_start):
- """Returns a shell command that runs all the postbuilds, and removes
- |output| if any of them fails. If |is_command_start| is False, then the
- returned string will start with ' && '."""
- if not self.xcode_settings or spec['type'] == 'none' or not output:
- return ''
- output = QuoteShellArgument(output, self.flavor)
- postbuilds = gyp.xcode_emulation.GetSpecPostbuildCommands(spec, quiet=True)
- if output_binary is not None:
- postbuilds = self.xcode_settings.AddImplicitPostbuilds(
- self.config_name,
- os.path.normpath(os.path.join(self.base_to_build, output)),
- QuoteShellArgument(
- os.path.normpath(os.path.join(self.base_to_build, output_binary)),
- self.flavor),
- postbuilds, quiet=True)
-
- if not postbuilds:
- return ''
- # Postbuilds expect to be run in the gyp file's directory, so insert an
- # implicit postbuild to cd to there.
- postbuilds.insert(0, gyp.common.EncodePOSIXShellList(
- ['cd', self.build_to_base]))
- env = self.ComputeExportEnvString(self.GetSortedXcodePostbuildEnv())
- # G will be non-null if any postbuild fails. Run all postbuilds in a
- # subshell.
- commands = env + ' (' + \
- ' && '.join([ninja_syntax.escape(command) for command in postbuilds])
- command_string = (commands + '); G=$$?; '
- # Remove the final output if any postbuild failed.
- '((exit $$G) || rm -rf %s) ' % output + '&& exit $$G)')
- if is_command_start:
- return '(' + command_string + ' && '
- else:
- return '$ && (' + command_string
-
- def ComputeExportEnvString(self, env):
- """Given an environment, returns a string looking like
- 'export FOO=foo; export BAR="${FOO} bar;'
- that exports |env| to the shell."""
- export_str = []
- for k, v in env:
- export_str.append('export %s=%s;' %
- (k, ninja_syntax.escape(gyp.common.EncodePOSIXShellArgument(v))))
- return ' '.join(export_str)
-
- def ComputeMacBundleOutput(self):
- """Return the 'output' (full output path) to a bundle output directory."""
- assert self.is_mac_bundle
- path = generator_default_variables['PRODUCT_DIR']
- return self.ExpandSpecial(
- os.path.join(path, self.xcode_settings.GetWrapperName()))
-
- def ComputeOutputFileName(self, spec, type=None):
- """Compute the filename of the final output for the current target."""
- if not type:
- type = spec['type']
-
- default_variables = copy.copy(generator_default_variables)
- CalculateVariables(default_variables, {'flavor': self.flavor})
-
- # Compute filename prefix: the product prefix, or a default for
- # the product type.
- DEFAULT_PREFIX = {
- 'loadable_module': default_variables['SHARED_LIB_PREFIX'],
- 'shared_library': default_variables['SHARED_LIB_PREFIX'],
- 'static_library': default_variables['STATIC_LIB_PREFIX'],
- 'executable': default_variables['EXECUTABLE_PREFIX'],
- }
- prefix = spec.get('product_prefix', DEFAULT_PREFIX.get(type, ''))
-
- # Compute filename extension: the product extension, or a default
- # for the product type.
- DEFAULT_EXTENSION = {
- 'loadable_module': default_variables['SHARED_LIB_SUFFIX'],
- 'shared_library': default_variables['SHARED_LIB_SUFFIX'],
- 'static_library': default_variables['STATIC_LIB_SUFFIX'],
- 'executable': default_variables['EXECUTABLE_SUFFIX'],
- }
- extension = spec.get('product_extension')
- if extension:
- extension = '.' + extension
- else:
- extension = DEFAULT_EXTENSION.get(type, '')
-
- if 'product_name' in spec:
- # If we were given an explicit name, use that.
- target = spec['product_name']
- else:
- # Otherwise, derive a name from the target name.
- target = spec['target_name']
- if prefix == 'lib':
- # Snip out an extra 'lib' from libs if appropriate.
- target = StripPrefix(target, 'lib')
-
- if type in ('static_library', 'loadable_module', 'shared_library',
- 'executable'):
- return '%s%s%s' % (prefix, target, extension)
- elif type == 'none':
- return '%s.stamp' % target
- else:
- raise Exception('Unhandled output type %s' % type)
-
- def ComputeOutput(self, spec, arch=None):
- """Compute the path for the final output of the spec."""
- type = spec['type']
-
- if self.flavor == 'win':
- override = self.msvs_settings.GetOutputName(self.config_name,
- self.ExpandSpecial)
- if override:
- return override
-
- if arch is None and self.flavor == 'mac' and type in (
- 'static_library', 'executable', 'shared_library', 'loadable_module'):
- filename = self.xcode_settings.GetExecutablePath()
- else:
- filename = self.ComputeOutputFileName(spec, type)
-
- if arch is None and 'product_dir' in spec:
- path = os.path.join(spec['product_dir'], filename)
- return self.ExpandSpecial(path)
-
- # Some products go into the output root, libraries go into shared library
- # dir, and everything else goes into the normal place.
- type_in_output_root = ['executable', 'loadable_module']
- if self.flavor == 'mac' and self.toolset == 'target':
- type_in_output_root += ['shared_library', 'static_library']
- elif self.flavor == 'win' and self.toolset == 'target':
- type_in_output_root += ['shared_library']
-
- if arch is not None:
- # Make sure partial executables don't end up in a bundle or the regular
- # output directory.
- archdir = 'arch'
- if self.toolset != 'target':
- archdir = os.path.join('arch', '%s' % self.toolset)
- return os.path.join(archdir, AddArch(filename, arch))
- elif type in type_in_output_root or self.is_standalone_static_library:
- return filename
- elif type == 'shared_library':
- libdir = 'lib'
- if self.toolset != 'target':
- libdir = os.path.join('lib', '%s' % self.toolset)
- return os.path.join(libdir, filename)
- else:
- return self.GypPathToUniqueOutput(filename, qualified=False)
-
- def WriteVariableList(self, ninja_file, var, values):
- assert not isinstance(values, str)
- if values is None:
- values = []
- ninja_file.variable(var, ' '.join(values))
-
- def WriteNewNinjaRule(self, name, args, description, is_cygwin, env, pool,
- depfile=None):
- """Write out a new ninja "rule" statement for a given command.
-
- Returns the name of the new rule, and a copy of |args| with variables
- expanded."""
-
- if self.flavor == 'win':
- args = [self.msvs_settings.ConvertVSMacros(
- arg, self.base_to_build, config=self.config_name)
- for arg in args]
- description = self.msvs_settings.ConvertVSMacros(
- description, config=self.config_name)
- elif self.flavor == 'mac':
- # |env| is an empty list on non-mac.
- args = [gyp.xcode_emulation.ExpandEnvVars(arg, env) for arg in args]
- description = gyp.xcode_emulation.ExpandEnvVars(description, env)
-
- # TODO: we shouldn't need to qualify names; we do it because
- # currently the ninja rule namespace is global, but it really
- # should be scoped to the subninja.
- rule_name = self.name
- if self.toolset == 'target':
- rule_name += '.' + self.toolset
- rule_name += '.' + name
- rule_name = re.sub('[^a-zA-Z0-9_]', '_', rule_name)
-
- # Remove variable references, but not if they refer to the magic rule
- # variables. This is not quite right, as it also protects these for
- # actions, not just for rules where they are valid. Good enough.
- protect = [ '${root}', '${dirname}', '${source}', '${ext}', '${name}' ]
- protect = '(?!' + '|'.join(map(re.escape, protect)) + ')'
- description = re.sub(protect + r'\$', '_', description)
-
- # gyp dictates that commands are run from the base directory.
- # cd into the directory before running, and adjust paths in
- # the arguments to point to the proper locations.
- rspfile = None
- rspfile_content = None
- args = [self.ExpandSpecial(arg, self.base_to_build) for arg in args]
- if self.flavor == 'win':
- rspfile = rule_name + '.$unique_name.rsp'
- # The cygwin case handles this inside the bash sub-shell.
- run_in = '' if is_cygwin else ' ' + self.build_to_base
- if is_cygwin:
- rspfile_content = self.msvs_settings.BuildCygwinBashCommandLine(
- args, self.build_to_base)
- else:
- rspfile_content = gyp.msvs_emulation.EncodeRspFileList(args)
- command = ('%s gyp-win-tool action-wrapper $arch ' % sys.executable +
- rspfile + run_in)
- else:
- env = self.ComputeExportEnvString(env)
- command = gyp.common.EncodePOSIXShellList(args)
- command = 'cd %s; ' % self.build_to_base + env + command
-
- # GYP rules/actions express being no-ops by not touching their outputs.
- # Avoid executing downstream dependencies in this case by specifying
- # restat=1 to ninja.
- self.ninja.rule(rule_name, command, description, depfile=depfile,
- restat=True, pool=pool,
- rspfile=rspfile, rspfile_content=rspfile_content)
- self.ninja.newline()
-
- return rule_name, args
-
-
-def CalculateVariables(default_variables, params):
- """Calculate additional variables for use in the build (called by gyp)."""
- global generator_additional_non_configuration_keys
- global generator_additional_path_sections
- flavor = gyp.common.GetFlavor(params)
- if flavor == 'mac':
- default_variables.setdefault('OS', 'mac')
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.dylib')
- default_variables.setdefault('SHARED_LIB_DIR',
- generator_default_variables['PRODUCT_DIR'])
- default_variables.setdefault('LIB_DIR',
- generator_default_variables['PRODUCT_DIR'])
-
- # Copy additional generator configuration data from Xcode, which is shared
- # by the Mac Ninja generator.
- import gyp.generator.xcode as xcode_generator
- generator_additional_non_configuration_keys = getattr(xcode_generator,
- 'generator_additional_non_configuration_keys', [])
- generator_additional_path_sections = getattr(xcode_generator,
- 'generator_additional_path_sections', [])
- global generator_extra_sources_for_rules
- generator_extra_sources_for_rules = getattr(xcode_generator,
- 'generator_extra_sources_for_rules', [])
- elif flavor == 'win':
- exts = gyp.MSVSUtil.TARGET_TYPE_EXT
- default_variables.setdefault('OS', 'win')
- default_variables['EXECUTABLE_SUFFIX'] = '.' + exts['executable']
- default_variables['STATIC_LIB_PREFIX'] = ''
- default_variables['STATIC_LIB_SUFFIX'] = '.' + exts['static_library']
- default_variables['SHARED_LIB_PREFIX'] = ''
- default_variables['SHARED_LIB_SUFFIX'] = '.' + exts['shared_library']
-
- # Copy additional generator configuration data from VS, which is shared
- # by the Windows Ninja generator.
- import gyp.generator.msvs as msvs_generator
- generator_additional_non_configuration_keys = getattr(msvs_generator,
- 'generator_additional_non_configuration_keys', [])
- generator_additional_path_sections = getattr(msvs_generator,
- 'generator_additional_path_sections', [])
-
- gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
- else:
- operating_system = flavor
- if flavor == 'android':
- operating_system = 'linux' # Keep this legacy behavior for now.
- default_variables.setdefault('OS', operating_system)
- default_variables.setdefault('SHARED_LIB_SUFFIX', '.so')
- default_variables.setdefault('SHARED_LIB_DIR',
- os.path.join('$!PRODUCT_DIR', 'lib'))
- default_variables.setdefault('LIB_DIR',
- os.path.join('$!PRODUCT_DIR', 'obj'))
-
-def ComputeOutputDir(params):
- """Returns the path from the toplevel_dir to the build output directory."""
- # generator_dir: relative path from pwd to where make puts build files.
- # Makes migrating from make to ninja easier, ninja doesn't put anything here.
- generator_dir = os.path.relpath(params['options'].generator_output or '.')
-
- # output_dir: relative path from generator_dir to the build directory.
- output_dir = params.get('generator_flags', {}).get('output_dir', 'out')
-
- # Relative path from source root to our output files. e.g. "out"
- return os.path.normpath(os.path.join(generator_dir, output_dir))
-
-
-def CalculateGeneratorInputInfo(params):
- """Called by __init__ to initialize generator values based on params."""
- # E.g. "out/gypfiles"
- toplevel = params['options'].toplevel_dir
- qualified_out_dir = os.path.normpath(os.path.join(
- toplevel, ComputeOutputDir(params), 'gypfiles'))
-
- global generator_filelist_paths
- generator_filelist_paths = {
- 'toplevel': toplevel,
- 'qualified_out_dir': qualified_out_dir,
- }
-
-
-def OpenOutput(path, mode='w'):
- """Open |path| for writing, creating directories if necessary."""
- gyp.common.EnsureDirExists(path)
- return open(path, mode)
-
-
-def CommandWithWrapper(cmd, wrappers, prog):
- wrapper = wrappers.get(cmd, '')
- if wrapper:
- return wrapper + ' ' + prog
- return prog
-
-
-def GetDefaultConcurrentLinks():
- """Returns a best-guess for a number of concurrent links."""
- pool_size = int(os.environ.get('GYP_LINK_CONCURRENCY', 0))
- if pool_size:
- return pool_size
-
- if sys.platform in ('win32', 'cygwin'):
- import ctypes
-
- class MEMORYSTATUSEX(ctypes.Structure):
- _fields_ = [
- ("dwLength", ctypes.c_ulong),
- ("dwMemoryLoad", ctypes.c_ulong),
- ("ullTotalPhys", ctypes.c_ulonglong),
- ("ullAvailPhys", ctypes.c_ulonglong),
- ("ullTotalPageFile", ctypes.c_ulonglong),
- ("ullAvailPageFile", ctypes.c_ulonglong),
- ("ullTotalVirtual", ctypes.c_ulonglong),
- ("ullAvailVirtual", ctypes.c_ulonglong),
- ("sullAvailExtendedVirtual", ctypes.c_ulonglong),
- ]
-
- stat = MEMORYSTATUSEX()
- stat.dwLength = ctypes.sizeof(stat)
- ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))
-
- # VS 2015 uses 20% more working set than VS 2013 and can consume all RAM
- # on a 64 GB machine.
- mem_limit = max(1, stat.ullTotalPhys / (5 * (2 ** 30))) # total / 5GB
- hard_cap = max(1, int(os.environ.get('GYP_LINK_CONCURRENCY_MAX', 2**32)))
- return min(mem_limit, hard_cap)
- elif sys.platform.startswith('linux'):
- if os.path.exists("/proc/meminfo"):
- with open("/proc/meminfo") as meminfo:
- memtotal_re = re.compile(r'^MemTotal:\s*(\d*)\s*kB')
- for line in meminfo:
- match = memtotal_re.match(line)
- if not match:
- continue
- # Allow 8Gb per link on Linux because Gold is quite memory hungry
- return max(1, int(match.group(1)) / (8 * (2 ** 20)))
- return 1
- elif sys.platform == 'darwin':
- try:
- avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
- # A static library debug build of Chromium's unit_tests takes ~2.7GB, so
- # 4GB per ld process allows for some more bloat.
- return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB
- except:
- return 1
- else:
- # TODO(scottmg): Implement this for other platforms.
- return 1
-
-
-def _GetWinLinkRuleNameSuffix(embed_manifest):
- """Returns the suffix used to select an appropriate linking rule depending on
- whether the manifest embedding is enabled."""
- return '_embed' if embed_manifest else ''
-
-
-def _AddWinLinkRules(master_ninja, embed_manifest):
- """Adds link rules for Windows platform to |master_ninja|."""
- def FullLinkCommand(ldcmd, out, binary_type):
- resource_name = {
- 'exe': '1',
- 'dll': '2',
- }[binary_type]
- return '%(python)s gyp-win-tool link-with-manifests $arch %(embed)s ' \
- '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' \
- '$manifests' % {
- 'python': sys.executable,
- 'out': out,
- 'ldcmd': ldcmd,
- 'resname': resource_name,
- 'embed': embed_manifest }
- rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest)
- use_separate_mspdbsrv = (
- int(os.environ.get('GYP_USE_SEPARATE_MSPDBSRV', '0')) != 0)
- dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper()
- dllcmd = ('%s gyp-win-tool link-wrapper $arch %s '
- '$ld /nologo $implibflag /DLL /OUT:$binary '
- '@$binary.rsp' % (sys.executable, use_separate_mspdbsrv))
- dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll')
- master_ninja.rule('solink' + rule_name_suffix,
- description=dlldesc, command=dllcmd,
- rspfile='$binary.rsp',
- rspfile_content='$libs $in_newline $ldflags',
- restat=True,
- pool='link_pool')
- master_ninja.rule('solink_module' + rule_name_suffix,
- description=dlldesc, command=dllcmd,
- rspfile='$binary.rsp',
- rspfile_content='$libs $in_newline $ldflags',
- restat=True,
- pool='link_pool')
- # Note that ldflags goes at the end so that it has the option of
- # overriding default settings earlier in the command line.
- exe_cmd = ('%s gyp-win-tool link-wrapper $arch %s '
- '$ld /nologo /OUT:$binary @$binary.rsp' %
- (sys.executable, use_separate_mspdbsrv))
- exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe')
- master_ninja.rule('link' + rule_name_suffix,
- description='LINK%s $binary' % rule_name_suffix.upper(),
- command=exe_cmd,
- rspfile='$binary.rsp',
- rspfile_content='$in_newline $libs $ldflags',
- pool='link_pool')
-
-
-def GenerateOutputForConfig(target_list, target_dicts, data, params,
- config_name):
- options = params['options']
- flavor = gyp.common.GetFlavor(params)
- generator_flags = params.get('generator_flags', {})
-
- # build_dir: relative path from source root to our output files.
- # e.g. "out/Debug"
- build_dir = os.path.normpath(
- os.path.join(ComputeOutputDir(params), config_name))
-
- toplevel_build = os.path.join(options.toplevel_dir, build_dir)
-
- master_ninja_file = OpenOutput(os.path.join(toplevel_build, 'build.ninja'))
- master_ninja = ninja_syntax.Writer(master_ninja_file, width=120)
-
- # Put build-time support tools in out/{config_name}.
- gyp.common.CopyTool(flavor, toplevel_build)
-
- # Grab make settings for CC/CXX.
- # The rules are
- # - The priority from low to high is gcc/g++, the 'make_global_settings' in
- # gyp, the environment variable.
- # - If there is no 'make_global_settings' for CC.host/CXX.host or
- # 'CC_host'/'CXX_host' environment variable, cc_host/cxx_host should be set
- # to cc/cxx.
- if flavor == 'win':
- ar = 'lib.exe'
- # cc and cxx must be set to the correct architecture by overriding with one
- # of cl_x86 or cl_x64 below.
- cc = 'UNSET'
- cxx = 'UNSET'
- ld = 'link.exe'
- ld_host = '$ld'
- else:
- ar = 'ar'
- cc = 'cc'
- cxx = 'c++'
- ld = '$cc'
- ldxx = '$cxx'
- ld_host = '$cc_host'
- ldxx_host = '$cxx_host'
-
- ar_host = 'ar'
- cc_host = None
- cxx_host = None
- cc_host_global_setting = None
- cxx_host_global_setting = None
- clang_cl = None
- nm = 'nm'
- nm_host = 'nm'
- readelf = 'readelf'
- readelf_host = 'readelf'
-
- build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
- make_global_settings = data[build_file].get('make_global_settings', [])
- build_to_root = gyp.common.InvertRelativePath(build_dir,
- options.toplevel_dir)
- wrappers = {}
- for key, value in make_global_settings:
- if key == 'AR':
- ar = os.path.join(build_to_root, value)
- if key == 'AR.host':
- ar_host = os.path.join(build_to_root, value)
- if key == 'CC':
- cc = os.path.join(build_to_root, value)
- if cc.endswith('clang-cl'):
- clang_cl = cc
- if key == 'CXX':
- cxx = os.path.join(build_to_root, value)
- if key == 'CC.host':
- cc_host = os.path.join(build_to_root, value)
- cc_host_global_setting = value
- if key == 'CXX.host':
- cxx_host = os.path.join(build_to_root, value)
- cxx_host_global_setting = value
- if key == 'LD':
- ld = os.path.join(build_to_root, value)
- if key == 'LD.host':
- ld_host = os.path.join(build_to_root, value)
- if key == 'LDXX':
- ldxx = os.path.join(build_to_root, value)
- if key == 'LDXX.host':
- ldxx_host = os.path.join(build_to_root, value)
- if key == 'NM':
- nm = os.path.join(build_to_root, value)
- if key == 'NM.host':
- nm_host = os.path.join(build_to_root, value)
- if key == 'READELF':
- readelf = os.path.join(build_to_root, value)
- if key == 'READELF.host':
- readelf_host = os.path.join(build_to_root, value)
- if key.endswith('_wrapper'):
- wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value)
-
- # Support wrappers from environment variables too.
- for key, value in os.environ.items():
- if key.lower().endswith('_wrapper'):
- key_prefix = key[:-len('_wrapper')]
- key_prefix = re.sub(r'\.HOST$', '.host', key_prefix)
- wrappers[key_prefix] = os.path.join(build_to_root, value)
-
- if flavor == 'win':
- configs = [target_dicts[qualified_target]['configurations'][config_name]
- for qualified_target in target_list]
- shared_system_includes = None
- if not generator_flags.get('ninja_use_custom_environment_files', 0):
- shared_system_includes = \
- gyp.msvs_emulation.ExtractSharedMSVSSystemIncludes(
- configs, generator_flags)
- cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles(
- toplevel_build, generator_flags, shared_system_includes, OpenOutput)
- for arch, path in cl_paths.items():
- if clang_cl:
- # If we have selected clang-cl, use that instead.
- path = clang_cl
- command = CommandWithWrapper('CC', wrappers,
- QuoteShellArgument(path, 'win'))
- if clang_cl:
- # Use clang-cl to cross-compile for x86 or x86_64.
- command += (' -m32' if arch == 'x86' else ' -m64')
- master_ninja.variable('cl_' + arch, command)
-
- cc = GetEnvironFallback(['CC_target', 'CC'], cc)
- master_ninja.variable('cc', CommandWithWrapper('CC', wrappers, cc))
- cxx = GetEnvironFallback(['CXX_target', 'CXX'], cxx)
- master_ninja.variable('cxx', CommandWithWrapper('CXX', wrappers, cxx))
-
- if flavor == 'win':
- master_ninja.variable('ld', ld)
- master_ninja.variable('idl', 'midl.exe')
- master_ninja.variable('ar', ar)
- master_ninja.variable('rc', 'rc.exe')
- master_ninja.variable('ml_x86', 'ml.exe')
- master_ninja.variable('ml_x64', 'ml64.exe')
- master_ninja.variable('mt', 'mt.exe')
- else:
- master_ninja.variable('ld', CommandWithWrapper('LINK', wrappers, ld))
- master_ninja.variable('ldxx', CommandWithWrapper('LINK', wrappers, ldxx))
- master_ninja.variable('ar', GetEnvironFallback(['AR_target', 'AR'], ar))
- if flavor != 'mac':
- # Mac does not use readelf/nm for .TOC generation, so avoiding polluting
- # the master ninja with extra unused variables.
- master_ninja.variable(
- 'nm', GetEnvironFallback(['NM_target', 'NM'], nm))
- master_ninja.variable(
- 'readelf', GetEnvironFallback(['READELF_target', 'READELF'], readelf))
-
- if generator_supports_multiple_toolsets:
- if not cc_host:
- cc_host = cc
- if not cxx_host:
- cxx_host = cxx
-
- master_ninja.variable('ar_host', GetEnvironFallback(['AR_host'], ar_host))
- master_ninja.variable('nm_host', GetEnvironFallback(['NM_host'], nm_host))
- master_ninja.variable('readelf_host',
- GetEnvironFallback(['READELF_host'], readelf_host))
- cc_host = GetEnvironFallback(['CC_host'], cc_host)
- cxx_host = GetEnvironFallback(['CXX_host'], cxx_host)
-
- # The environment variable could be used in 'make_global_settings', like
- # ['CC.host', '$(CC)'] or ['CXX.host', '$(CXX)'], transform them here.
- if '$(CC)' in cc_host and cc_host_global_setting:
- cc_host = cc_host_global_setting.replace('$(CC)', cc)
- if '$(CXX)' in cxx_host and cxx_host_global_setting:
- cxx_host = cxx_host_global_setting.replace('$(CXX)', cxx)
- master_ninja.variable('cc_host',
- CommandWithWrapper('CC.host', wrappers, cc_host))
- master_ninja.variable('cxx_host',
- CommandWithWrapper('CXX.host', wrappers, cxx_host))
- if flavor == 'win':
- master_ninja.variable('ld_host', ld_host)
- master_ninja.variable('ldxx_host', ldxx_host)
- else:
- master_ninja.variable('ld_host', CommandWithWrapper(
- 'LINK', wrappers, ld_host))
- master_ninja.variable('ldxx_host', CommandWithWrapper(
- 'LINK', wrappers, ldxx_host))
-
- master_ninja.newline()
-
- master_ninja.pool('link_pool', depth=GetDefaultConcurrentLinks())
- master_ninja.newline()
-
- deps = 'msvc' if flavor == 'win' else 'gcc'
-
- if flavor != 'win':
- master_ninja.rule(
- 'cc',
- description='CC $out',
- command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c '
- '$cflags_pch_c -c $in -o $out'),
- depfile='$out.d',
- deps=deps)
- master_ninja.rule(
- 'cc_s',
- description='CC $out',
- command=('$cc $defines $includes $cflags $cflags_c '
- '$cflags_pch_c -c $in -o $out'))
- master_ninja.rule(
- 'cxx',
- description='CXX $out',
- command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc '
- '$cflags_pch_cc -c $in -o $out'),
- depfile='$out.d',
- deps=deps)
- else:
- # TODO(scottmg) Separate pdb names is a test to see if it works around
- # http://crbug.com/142362. It seems there's a race between the creation of
- # the .pdb by the precompiled header step for .cc and the compilation of
- # .c files. This should be handled by mspdbsrv, but rarely errors out with
- # c1xx : fatal error C1033: cannot open program database
- # By making the rules target separate pdb files this might be avoided.
- cc_command = ('ninja -t msvc -e $arch ' +
- '-- '
- '$cc /nologo /showIncludes /FC '
- '@$out.rsp /c $in /Fo$out /Fd$pdbname_c ')
- cxx_command = ('ninja -t msvc -e $arch ' +
- '-- '
- '$cxx /nologo /showIncludes /FC '
- '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ')
- master_ninja.rule(
- 'cc',
- description='CC $out',
- command=cc_command,
- rspfile='$out.rsp',
- rspfile_content='$defines $includes $cflags $cflags_c',
- deps=deps)
- master_ninja.rule(
- 'cxx',
- description='CXX $out',
- command=cxx_command,
- rspfile='$out.rsp',
- rspfile_content='$defines $includes $cflags $cflags_cc',
- deps=deps)
- master_ninja.rule(
- 'idl',
- description='IDL $in',
- command=('%s gyp-win-tool midl-wrapper $arch $outdir '
- '$tlb $h $dlldata $iid $proxy $in '
- '$midl_includes $idlflags' % sys.executable))
- master_ninja.rule(
- 'rc',
- description='RC $in',
- # Note: $in must be last otherwise rc.exe complains.
- command=('%s gyp-win-tool rc-wrapper '
- '$arch $rc $defines $resource_includes $rcflags /fo$out $in' %
- sys.executable))
- master_ninja.rule(
- 'asm',
- description='ASM $out',
- command=('%s gyp-win-tool asm-wrapper '
- '$arch $asm $defines $includes $asmflags /c /Fo $out $in' %
- sys.executable))
-
- if flavor != 'mac' and flavor != 'win':
- master_ninja.rule(
- 'alink',
- description='AR $out',
- command='rm -f $out && $ar rcs $arflags $out $in')
- master_ninja.rule(
- 'alink_thin',
- description='AR $out',
- command='rm -f $out && $ar rcsT $arflags $out $in')
-
- # This allows targets that only need to depend on $lib's API to declare an
- # order-only dependency on $lib.TOC and avoid relinking such downstream
- # dependencies when $lib changes only in non-public ways.
- # The resulting string leaves an uninterpolated %{suffix} which
- # is used in the final substitution below.
- mtime_preserving_solink_base = (
- 'if [ ! -e $lib -o ! -e $lib.TOC ]; then '
- '%(solink)s && %(extract_toc)s > $lib.TOC; else '
- '%(solink)s && %(extract_toc)s > $lib.tmp && '
- 'if ! cmp -s $lib.tmp $lib.TOC; then mv $lib.tmp $lib.TOC ; '
- 'fi; fi'
- % { 'solink':
- '$ld -shared $ldflags -o $lib -Wl,-soname=$soname %(suffix)s',
- 'extract_toc':
- ('{ $readelf -d $lib | grep SONAME ; '
- '$nm -gD -f p $lib | cut -f1-2 -d\' \'; }')})
-
- master_ninja.rule(
- 'solink',
- description='SOLINK $lib',
- restat=True,
- command=mtime_preserving_solink_base % {'suffix': '@$link_file_list'},
- rspfile='$link_file_list',
- rspfile_content=
- '-Wl,--whole-archive $in $solibs -Wl,--no-whole-archive $libs',
- pool='link_pool')
- master_ninja.rule(
- 'solink_module',
- description='SOLINK(module) $lib',
- restat=True,
- command=mtime_preserving_solink_base % {'suffix': '@$link_file_list'},
- rspfile='$link_file_list',
- rspfile_content='-Wl,--start-group $in $solibs $libs -Wl,--end-group',
- pool='link_pool')
- master_ninja.rule(
- 'link',
- description='LINK $out',
- command=('$ld $ldflags -o $out '
- '-Wl,--start-group $in $solibs $libs -Wl,--end-group'),
- pool='link_pool')
- elif flavor == 'win':
- master_ninja.rule(
- 'alink',
- description='LIB $out',
- command=('%s gyp-win-tool link-wrapper $arch False '
- '$ar /nologo /ignore:4221 /OUT:$out @$out.rsp' %
- sys.executable),
- rspfile='$out.rsp',
- rspfile_content='$in_newline $libflags')
- _AddWinLinkRules(master_ninja, embed_manifest=True)
- _AddWinLinkRules(master_ninja, embed_manifest=False)
- else:
- master_ninja.rule(
- 'objc',
- description='OBJC $out',
- command=('$cc -MMD -MF $out.d $defines $includes $cflags $cflags_objc '
- '$cflags_pch_objc -c $in -o $out'),
- depfile='$out.d',
- deps=deps)
- master_ninja.rule(
- 'objcxx',
- description='OBJCXX $out',
- command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_objcc '
- '$cflags_pch_objcc -c $in -o $out'),
- depfile='$out.d',
- deps=deps)
- master_ninja.rule(
- 'alink',
- description='LIBTOOL-STATIC $out, POSTBUILDS',
- command='rm -f $out && '
- './gyp-mac-tool filter-libtool libtool $libtool_flags '
- '-static -o $out $in'
- '$postbuilds')
- master_ninja.rule(
- 'lipo',
- description='LIPO $out, POSTBUILDS',
- command='rm -f $out && lipo -create $in -output $out$postbuilds')
- master_ninja.rule(
- 'solipo',
- description='SOLIPO $out, POSTBUILDS',
- command=(
- 'rm -f $lib $lib.TOC && lipo -create $in -output $lib$postbuilds &&'
- '%(extract_toc)s > $lib.TOC'
- % { 'extract_toc':
- '{ otool -l $lib | grep LC_ID_DYLIB -A 5; '
- 'nm -gP $lib | cut -f1-2 -d\' \' | grep -v U$$; true; }'}))
-
-
- # Record the public interface of $lib in $lib.TOC. See the corresponding
- # comment in the posix section above for details.
- solink_base = '$ld %(type)s $ldflags -o $lib %(suffix)s'
- mtime_preserving_solink_base = (
- 'if [ ! -e $lib -o ! -e $lib.TOC ] || '
- # Always force dependent targets to relink if this library
- # reexports something. Handling this correctly would require
- # recursive TOC dumping but this is rare in practice, so punt.
- 'otool -l $lib | grep -q LC_REEXPORT_DYLIB ; then '
- '%(solink)s && %(extract_toc)s > $lib.TOC; '
- 'else '
- '%(solink)s && %(extract_toc)s > $lib.tmp && '
- 'if ! cmp -s $lib.tmp $lib.TOC; then '
- 'mv $lib.tmp $lib.TOC ; '
- 'fi; '
- 'fi'
- % { 'solink': solink_base,
- 'extract_toc':
- '{ otool -l $lib | grep LC_ID_DYLIB -A 5; '
- 'nm -gP $lib | cut -f1-2 -d\' \' | grep -v U$$; true; }'})
-
-
- solink_suffix = '@$link_file_list$postbuilds'
- master_ninja.rule(
- 'solink',
- description='SOLINK $lib, POSTBUILDS',
- restat=True,
- command=mtime_preserving_solink_base % {'suffix': solink_suffix,
- 'type': '-shared'},
- rspfile='$link_file_list',
- rspfile_content='$in $solibs $libs',
- pool='link_pool')
- master_ninja.rule(
- 'solink_notoc',
- description='SOLINK $lib, POSTBUILDS',
- restat=True,
- command=solink_base % {'suffix':solink_suffix, 'type': '-shared'},
- rspfile='$link_file_list',
- rspfile_content='$in $solibs $libs',
- pool='link_pool')
-
- master_ninja.rule(
- 'solink_module',
- description='SOLINK(module) $lib, POSTBUILDS',
- restat=True,
- command=mtime_preserving_solink_base % {'suffix': solink_suffix,
- 'type': '-bundle'},
- rspfile='$link_file_list',
- rspfile_content='$in $solibs $libs',
- pool='link_pool')
- master_ninja.rule(
- 'solink_module_notoc',
- description='SOLINK(module) $lib, POSTBUILDS',
- restat=True,
- command=solink_base % {'suffix': solink_suffix, 'type': '-bundle'},
- rspfile='$link_file_list',
- rspfile_content='$in $solibs $libs',
- pool='link_pool')
-
- master_ninja.rule(
- 'link',
- description='LINK $out, POSTBUILDS',
- command=('$ld $ldflags -o $out '
- '$in $solibs $libs$postbuilds'),
- pool='link_pool')
- master_ninja.rule(
- 'preprocess_infoplist',
- description='PREPROCESS INFOPLIST $out',
- command=('$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && '
- 'plutil -convert xml1 $out $out'))
- master_ninja.rule(
- 'copy_infoplist',
- description='COPY INFOPLIST $in',
- command='$env ./gyp-mac-tool copy-info-plist $in $out $binary $keys')
- master_ninja.rule(
- 'merge_infoplist',
- description='MERGE INFOPLISTS $in',
- command='$env ./gyp-mac-tool merge-info-plist $out $in')
- master_ninja.rule(
- 'compile_xcassets',
- description='COMPILE XCASSETS $in',
- command='$env ./gyp-mac-tool compile-xcassets $keys $in')
- master_ninja.rule(
- 'mac_tool',
- description='MACTOOL $mactool_cmd $in',
- command='$env ./gyp-mac-tool $mactool_cmd $in $out $binary')
- master_ninja.rule(
- 'package_framework',
- description='PACKAGE FRAMEWORK $out, POSTBUILDS',
- command='./gyp-mac-tool package-framework $out $version$postbuilds '
- '&& touch $out')
- if flavor == 'win':
- master_ninja.rule(
- 'stamp',
- description='STAMP $out',
- command='%s gyp-win-tool stamp $out' % sys.executable)
- else:
- master_ninja.rule(
- 'stamp',
- description='STAMP $out',
- command='${postbuilds}touch $out')
- if flavor == 'win':
- master_ninja.rule(
- 'copy',
- description='COPY $in $out',
- command='%s gyp-win-tool recursive-mirror $in $out' % sys.executable)
- elif flavor == 'zos':
- master_ninja.rule(
- 'copy',
- description='COPY $in $out',
- command='rm -rf $out && cp -fRP $in $out')
- else:
- master_ninja.rule(
- 'copy',
- description='COPY $in $out',
- command='rm -rf $out && cp -af $in $out')
- master_ninja.newline()
-
- all_targets = set()
- for build_file in params['build_files']:
- for target in gyp.common.AllTargets(target_list,
- target_dicts,
- os.path.normpath(build_file)):
- all_targets.add(target)
- all_outputs = set()
-
- # target_outputs is a map from qualified target name to a Target object.
- target_outputs = {}
- # target_short_names is a map from target short name to a list of Target
- # objects.
- target_short_names = {}
-
- # short name of targets that were skipped because they didn't contain anything
- # interesting.
- # NOTE: there may be overlap between this an non_empty_target_names.
- empty_target_names = set()
-
- # Set of non-empty short target names.
- # NOTE: there may be overlap between this an empty_target_names.
- non_empty_target_names = set()
-
- for qualified_target in target_list:
- # qualified_target is like: third_party/icu/icu.gyp:icui18n#target
- build_file, name, toolset = \
- gyp.common.ParseQualifiedTarget(qualified_target)
-
- this_make_global_settings = data[build_file].get('make_global_settings', [])
- assert make_global_settings == this_make_global_settings, (
- "make_global_settings needs to be the same for all targets. %s vs. %s" %
- (this_make_global_settings, make_global_settings))
-
- spec = target_dicts[qualified_target]
- if flavor == 'mac':
- gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
-
- # If build_file is a symlink, we must not follow it because there's a chance
- # it could point to a path above toplevel_dir, and we cannot correctly deal
- # with that case at the moment.
- build_file = gyp.common.RelativePath(build_file, options.toplevel_dir,
- False)
-
- qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
- toolset)
- hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
-
- base_path = os.path.dirname(build_file)
- obj = 'obj'
- if toolset != 'target':
- obj += '.' + toolset
- output_file = os.path.join(obj, base_path, name + '.ninja')
-
- ninja_output = StringIO()
- writer = NinjaWriter(hash_for_rules, target_outputs, base_path, build_dir,
- ninja_output,
- toplevel_build, output_file,
- flavor, toplevel_dir=options.toplevel_dir)
-
- target = writer.WriteSpec(spec, config_name, generator_flags)
-
- if ninja_output.tell() > 0:
- # Only create files for ninja files that actually have contents.
- with OpenOutput(os.path.join(toplevel_build, output_file)) as ninja_file:
- ninja_file.write(ninja_output.getvalue())
- ninja_output.close()
- master_ninja.subninja(output_file)
-
- if target:
- if name != target.FinalOutput() and spec['toolset'] == 'target':
- target_short_names.setdefault(name, []).append(target)
- target_outputs[qualified_target] = target
- if qualified_target in all_targets:
- all_outputs.add(target.FinalOutput())
- non_empty_target_names.add(name)
- else:
- empty_target_names.add(name)
-
- if target_short_names:
- # Write a short name to build this target. This benefits both the
- # "build chrome" case as well as the gyp tests, which expect to be
- # able to run actions and build libraries by their short name.
- master_ninja.newline()
- master_ninja.comment('Short names for targets.')
- for short_name in target_short_names:
- master_ninja.build(short_name, 'phony', [x.FinalOutput() for x in
- target_short_names[short_name]])
-
- # Write phony targets for any empty targets that weren't written yet. As
- # short names are not necessarily unique only do this for short names that
- # haven't already been output for another target.
- empty_target_names = empty_target_names - non_empty_target_names
- if empty_target_names:
- master_ninja.newline()
- master_ninja.comment('Empty targets (output for completeness).')
- for name in sorted(empty_target_names):
- master_ninja.build(name, 'phony')
-
- if all_outputs:
- master_ninja.newline()
- master_ninja.build('all', 'phony', list(all_outputs))
- master_ninja.default(generator_flags.get('default_target', 'all'))
-
- master_ninja_file.close()
-
-
-def PerformBuild(data, configurations, params):
- options = params['options']
- for config in configurations:
- builddir = os.path.join(options.toplevel_dir, 'out', config)
- arguments = ['ninja', '-C', builddir]
- print('Building [%s]: %s' % (config, arguments))
- subprocess.check_call(arguments)
-
-
-def CallGenerateOutputForConfig(arglist):
- # Ignore the interrupt signal so that the parent process catches it and
- # kills all multiprocessing children.
- signal.signal(signal.SIGINT, signal.SIG_IGN)
-
- (target_list, target_dicts, data, params, config_name) = arglist
- GenerateOutputForConfig(target_list, target_dicts, data, params, config_name)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- # Update target_dicts for iOS device builds.
- target_dicts = gyp.xcode_emulation.CloneConfigurationForDeviceAndEmulator(
- target_dicts)
-
- user_config = params.get('generator_flags', {}).get('config', None)
- if gyp.common.GetFlavor(params) == 'win':
- target_list, target_dicts = MSVSUtil.ShardTargets(target_list, target_dicts)
- target_list, target_dicts = MSVSUtil.InsertLargePdbShims(
- target_list, target_dicts, generator_default_variables)
-
- if user_config:
- GenerateOutputForConfig(target_list, target_dicts, data, params,
- user_config)
- else:
- config_names = target_dicts[target_list[0]]['configurations'].keys()
- if params['parallel']:
- try:
- pool = multiprocessing.Pool(len(config_names))
- arglists = []
- for config_name in config_names:
- arglists.append(
- (target_list, target_dicts, data, params, config_name))
- pool.map(CallGenerateOutputForConfig, arglists)
- except KeyboardInterrupt as e:
- pool.terminate()
- raise e
- else:
- for config_name in config_names:
- GenerateOutputForConfig(target_list, target_dicts, data, params,
- config_name)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
deleted file mode 100644
index 5ecfbdf00..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Unit tests for the ninja.py file. """
-
-import gyp.generator.ninja as ninja
-import unittest
-import sys
-
-
-class TestPrefixesAndSuffixes(unittest.TestCase):
- def test_BinaryNamesWindows(self):
- # These cannot run on non-Windows as they require a VS installation to
- # correctly handle variable expansion.
- if sys.platform.startswith('win'):
- writer = ninja.NinjaWriter('foo', 'wee', '.', '.', 'build.ninja', '.',
- 'build.ninja', 'win')
- spec = { 'target_name': 'wee' }
- self.assertTrue(writer.ComputeOutputFileName(spec, 'executable').
- endswith('.exe'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'shared_library').
- endswith('.dll'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'static_library').
- endswith('.lib'))
-
- def test_BinaryNamesLinux(self):
- writer = ninja.NinjaWriter('foo', 'wee', '.', '.', 'build.ninja', '.',
- 'build.ninja', 'linux')
- spec = { 'target_name': 'wee' }
- self.assertTrue('.' not in writer.ComputeOutputFileName(spec,
- 'executable'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'shared_library').
- startswith('lib'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'static_library').
- startswith('lib'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'shared_library').
- endswith('.so'))
- self.assertTrue(writer.ComputeOutputFileName(spec, 'static_library').
- endswith('.a'))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
deleted file mode 100644
index 6317d04c7..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
+++ /dev/null
@@ -1,1301 +0,0 @@
-from __future__ import print_function
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import filecmp
-import gyp.common
-import gyp.xcodeproj_file
-import gyp.xcode_ninja
-import errno
-import os
-import sys
-import posixpath
-import re
-import shutil
-import subprocess
-import tempfile
-
-
-# Project files generated by this module will use _intermediate_var as a
-# custom Xcode setting whose value is a DerivedSources-like directory that's
-# project-specific and configuration-specific. The normal choice,
-# DERIVED_FILE_DIR, is target-specific, which is thought to be too restrictive
-# as it is likely that multiple targets within a single project file will want
-# to access the same set of generated files. The other option,
-# PROJECT_DERIVED_FILE_DIR, is unsuitable because while it is project-specific,
-# it is not configuration-specific. INTERMEDIATE_DIR is defined as
-# $(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION).
-_intermediate_var = 'INTERMEDIATE_DIR'
-
-# SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all
-# targets that share the same BUILT_PRODUCTS_DIR.
-_shared_intermediate_var = 'SHARED_INTERMEDIATE_DIR'
-
-_library_search_paths_var = 'LIBRARY_SEARCH_PATHS'
-
-generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
- 'EXECUTABLE_SUFFIX': '',
- 'STATIC_LIB_PREFIX': 'lib',
- 'SHARED_LIB_PREFIX': 'lib',
- 'STATIC_LIB_SUFFIX': '.a',
- 'SHARED_LIB_SUFFIX': '.dylib',
- # INTERMEDIATE_DIR is a place for targets to build up intermediate products.
- # It is specific to each build environment. It is only guaranteed to exist
- # and be constant within the context of a project, corresponding to a single
- # input file. Some build environments may allow their intermediate directory
- # to be shared on a wider scale, but this is not guaranteed.
- 'INTERMEDIATE_DIR': '$(%s)' % _intermediate_var,
- 'OS': 'mac',
- 'PRODUCT_DIR': '$(BUILT_PRODUCTS_DIR)',
- 'LIB_DIR': '$(BUILT_PRODUCTS_DIR)',
- 'RULE_INPUT_ROOT': '$(INPUT_FILE_BASE)',
- 'RULE_INPUT_EXT': '$(INPUT_FILE_SUFFIX)',
- 'RULE_INPUT_NAME': '$(INPUT_FILE_NAME)',
- 'RULE_INPUT_PATH': '$(INPUT_FILE_PATH)',
- 'RULE_INPUT_DIRNAME': '$(INPUT_FILE_DIRNAME)',
- 'SHARED_INTERMEDIATE_DIR': '$(%s)' % _shared_intermediate_var,
- 'CONFIGURATION_NAME': '$(CONFIGURATION)',
-}
-
-# The Xcode-specific sections that hold paths.
-generator_additional_path_sections = [
- 'mac_bundle_resources',
- 'mac_framework_headers',
- 'mac_framework_private_headers',
- # 'mac_framework_dirs', input already handles _dirs endings.
-]
-
-# The Xcode-specific keys that exist on targets and aren't moved down to
-# configurations.
-generator_additional_non_configuration_keys = [
- 'ios_app_extension',
- 'ios_watch_app',
- 'ios_watchkit_extension',
- 'mac_bundle',
- 'mac_bundle_resources',
- 'mac_framework_headers',
- 'mac_framework_private_headers',
- 'mac_xctest_bundle',
- 'xcode_create_dependents_test_runner',
-]
-
-# We want to let any rules apply to files that are resources also.
-generator_extra_sources_for_rules = [
- 'mac_bundle_resources',
- 'mac_framework_headers',
- 'mac_framework_private_headers',
-]
-
-generator_filelist_paths = None
-
-# Xcode's standard set of library directories, which don't need to be duplicated
-# in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay.
-xcode_standard_library_dirs = frozenset([
- '$(SDKROOT)/usr/lib',
- '$(SDKROOT)/usr/local/lib',
-])
-
-def CreateXCConfigurationList(configuration_names):
- xccl = gyp.xcodeproj_file.XCConfigurationList({'buildConfigurations': []})
- if len(configuration_names) == 0:
- configuration_names = ['Default']
- for configuration_name in configuration_names:
- xcbc = gyp.xcodeproj_file.XCBuildConfiguration({
- 'name': configuration_name})
- xccl.AppendProperty('buildConfigurations', xcbc)
- xccl.SetProperty('defaultConfigurationName', configuration_names[0])
- return xccl
-
-
-class XcodeProject(object):
- def __init__(self, gyp_path, path, build_file_dict):
- self.gyp_path = gyp_path
- self.path = path
- self.project = gyp.xcodeproj_file.PBXProject(path=path)
- projectDirPath = gyp.common.RelativePath(
- os.path.dirname(os.path.abspath(self.gyp_path)),
- os.path.dirname(path) or '.')
- self.project.SetProperty('projectDirPath', projectDirPath)
- self.project_file = \
- gyp.xcodeproj_file.XCProjectFile({'rootObject': self.project})
- self.build_file_dict = build_file_dict
-
- # TODO(mark): add destructor that cleans up self.path if created_dir is
- # True and things didn't complete successfully. Or do something even
- # better with "try"?
- self.created_dir = False
- try:
- os.makedirs(self.path)
- self.created_dir = True
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
-
- def Finalize1(self, xcode_targets, serialize_all_tests):
- # Collect a list of all of the build configuration names used by the
- # various targets in the file. It is very heavily advised to keep each
- # target in an entire project (even across multiple project files) using
- # the same set of configuration names.
- configurations = []
- for xct in self.project.GetProperty('targets'):
- xccl = xct.GetProperty('buildConfigurationList')
- xcbcs = xccl.GetProperty('buildConfigurations')
- for xcbc in xcbcs:
- name = xcbc.GetProperty('name')
- if name not in configurations:
- configurations.append(name)
-
- # Replace the XCConfigurationList attached to the PBXProject object with
- # a new one specifying all of the configuration names used by the various
- # targets.
- try:
- xccl = CreateXCConfigurationList(configurations)
- self.project.SetProperty('buildConfigurationList', xccl)
- except:
- sys.stderr.write("Problem with gyp file %s\n" % self.gyp_path)
- raise
-
- # The need for this setting is explained above where _intermediate_var is
- # defined. The comments below about wanting to avoid project-wide build
- # settings apply here too, but this needs to be set on a project-wide basis
- # so that files relative to the _intermediate_var setting can be displayed
- # properly in the Xcode UI.
- #
- # Note that for configuration-relative files such as anything relative to
- # _intermediate_var, for the purposes of UI tree view display, Xcode will
- # only resolve the configuration name once, when the project file is
- # opened. If the active build configuration is changed, the project file
- # must be closed and reopened if it is desired for the tree view to update.
- # This is filed as Apple radar 6588391.
- xccl.SetBuildSetting(_intermediate_var,
- '$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)')
- xccl.SetBuildSetting(_shared_intermediate_var,
- '$(SYMROOT)/DerivedSources/$(CONFIGURATION)')
-
- # Set user-specified project-wide build settings and config files. This
- # is intended to be used very sparingly. Really, almost everything should
- # go into target-specific build settings sections. The project-wide
- # settings are only intended to be used in cases where Xcode attempts to
- # resolve variable references in a project context as opposed to a target
- # context, such as when resolving sourceTree references while building up
- # the tree tree view for UI display.
- # Any values set globally are applied to all configurations, then any
- # per-configuration values are applied.
- for xck, xcv in self.build_file_dict.get('xcode_settings', {}).items():
- xccl.SetBuildSetting(xck, xcv)
- if 'xcode_config_file' in self.build_file_dict:
- config_ref = self.project.AddOrGetFileInRootGroup(
- self.build_file_dict['xcode_config_file'])
- xccl.SetBaseConfiguration(config_ref)
- build_file_configurations = self.build_file_dict.get('configurations', {})
- if build_file_configurations:
- for config_name in configurations:
- build_file_configuration_named = \
- build_file_configurations.get(config_name, {})
- if build_file_configuration_named:
- xcc = xccl.ConfigurationNamed(config_name)
- for xck, xcv in build_file_configuration_named.get('xcode_settings',
- {}).items():
- xcc.SetBuildSetting(xck, xcv)
- if 'xcode_config_file' in build_file_configuration_named:
- config_ref = self.project.AddOrGetFileInRootGroup(
- build_file_configurations[config_name]['xcode_config_file'])
- xcc.SetBaseConfiguration(config_ref)
-
- # Sort the targets based on how they appeared in the input.
- # TODO(mark): Like a lot of other things here, this assumes internal
- # knowledge of PBXProject - in this case, of its "targets" property.
-
- # ordinary_targets are ordinary targets that are already in the project
- # file. run_test_targets are the targets that run unittests and should be
- # used for the Run All Tests target. support_targets are the action/rule
- # targets used by GYP file targets, just kept for the assert check.
- ordinary_targets = []
- run_test_targets = []
- support_targets = []
-
- # targets is full list of targets in the project.
- targets = []
-
- # does the it define it's own "all"?
- has_custom_all = False
-
- # targets_for_all is the list of ordinary_targets that should be listed
- # in this project's "All" target. It includes each non_runtest_target
- # that does not have suppress_wildcard set.
- targets_for_all = []
-
- for target in self.build_file_dict['targets']:
- target_name = target['target_name']
- toolset = target['toolset']
- qualified_target = gyp.common.QualifiedTarget(self.gyp_path, target_name,
- toolset)
- xcode_target = xcode_targets[qualified_target]
- # Make sure that the target being added to the sorted list is already in
- # the unsorted list.
- assert xcode_target in self.project._properties['targets']
- targets.append(xcode_target)
- ordinary_targets.append(xcode_target)
- if xcode_target.support_target:
- support_targets.append(xcode_target.support_target)
- targets.append(xcode_target.support_target)
-
- if not int(target.get('suppress_wildcard', False)):
- targets_for_all.append(xcode_target)
-
- if target_name.lower() == 'all':
- has_custom_all = True
-
- # If this target has a 'run_as' attribute, add its target to the
- # targets, and add it to the test targets.
- if target.get('run_as'):
- # Make a target to run something. It should have one
- # dependency, the parent xcode target.
- xccl = CreateXCConfigurationList(configurations)
- run_target = gyp.xcodeproj_file.PBXAggregateTarget({
- 'name': 'Run ' + target_name,
- 'productName': xcode_target.GetProperty('productName'),
- 'buildConfigurationList': xccl,
- },
- parent=self.project)
- run_target.AddDependency(xcode_target)
-
- command = target['run_as']
- script = ''
- if command.get('working_directory'):
- script = script + 'cd "%s"\n' % \
- gyp.xcodeproj_file.ConvertVariablesToShellSyntax(
- command.get('working_directory'))
-
- if command.get('environment'):
- script = script + "\n".join(
- ['export %s="%s"' %
- (key, gyp.xcodeproj_file.ConvertVariablesToShellSyntax(val))
- for (key, val) in command.get('environment').items()]) + "\n"
-
- # Some test end up using sockets, files on disk, etc. and can get
- # confused if more then one test runs at a time. The generator
- # flag 'xcode_serialize_all_test_runs' controls the forcing of all
- # tests serially. It defaults to True. To get serial runs this
- # little bit of python does the same as the linux flock utility to
- # make sure only one runs at a time.
- command_prefix = ''
- if serialize_all_tests:
- command_prefix = \
-"""python -c "import fcntl, subprocess, sys
-file = open('$TMPDIR/GYP_serialize_test_runs', 'a')
-fcntl.flock(file.fileno(), fcntl.LOCK_EX)
-sys.exit(subprocess.call(sys.argv[1:]))" """
-
- # If we were unable to exec for some reason, we want to exit
- # with an error, and fixup variable references to be shell
- # syntax instead of xcode syntax.
- script = script + 'exec ' + command_prefix + '%s\nexit 1\n' % \
- gyp.xcodeproj_file.ConvertVariablesToShellSyntax(
- gyp.common.EncodePOSIXShellList(command.get('action')))
-
- ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
- 'shellScript': script,
- 'showEnvVarsInLog': 0,
- })
- run_target.AppendProperty('buildPhases', ssbp)
-
- # Add the run target to the project file.
- targets.append(run_target)
- run_test_targets.append(run_target)
- xcode_target.test_runner = run_target
-
-
- # Make sure that the list of targets being replaced is the same length as
- # the one replacing it, but allow for the added test runner targets.
- assert len(self.project._properties['targets']) == \
- len(ordinary_targets) + len(support_targets)
-
- self.project._properties['targets'] = targets
-
- # Get rid of unnecessary levels of depth in groups like the Source group.
- self.project.RootGroupsTakeOverOnlyChildren(True)
-
- # Sort the groups nicely. Do this after sorting the targets, because the
- # Products group is sorted based on the order of the targets.
- self.project.SortGroups()
-
- # Create an "All" target if there's more than one target in this project
- # file and the project didn't define its own "All" target. Put a generated
- # "All" target first so that people opening up the project for the first
- # time will build everything by default.
- if len(targets_for_all) > 1 and not has_custom_all:
- xccl = CreateXCConfigurationList(configurations)
- all_target = gyp.xcodeproj_file.PBXAggregateTarget(
- {
- 'buildConfigurationList': xccl,
- 'name': 'All',
- },
- parent=self.project)
-
- for target in targets_for_all:
- all_target.AddDependency(target)
-
- # TODO(mark): This is evil because it relies on internal knowledge of
- # PBXProject._properties. It's important to get the "All" target first,
- # though.
- self.project._properties['targets'].insert(0, all_target)
-
- # The same, but for run_test_targets.
- if len(run_test_targets) > 1:
- xccl = CreateXCConfigurationList(configurations)
- run_all_tests_target = gyp.xcodeproj_file.PBXAggregateTarget(
- {
- 'buildConfigurationList': xccl,
- 'name': 'Run All Tests',
- },
- parent=self.project)
- for run_test_target in run_test_targets:
- run_all_tests_target.AddDependency(run_test_target)
-
- # Insert after the "All" target, which must exist if there is more than
- # one run_test_target.
- self.project._properties['targets'].insert(1, run_all_tests_target)
-
- def Finalize2(self, xcode_targets, xcode_target_to_target_dict):
- # Finalize2 needs to happen in a separate step because the process of
- # updating references to other projects depends on the ordering of targets
- # within remote project files. Finalize1 is responsible for sorting duty,
- # and once all project files are sorted, Finalize2 can come in and update
- # these references.
-
- # To support making a "test runner" target that will run all the tests
- # that are direct dependents of any given target, we look for
- # xcode_create_dependents_test_runner being set on an Aggregate target,
- # and generate a second target that will run the tests runners found under
- # the marked target.
- for bf_tgt in self.build_file_dict['targets']:
- if int(bf_tgt.get('xcode_create_dependents_test_runner', 0)):
- tgt_name = bf_tgt['target_name']
- toolset = bf_tgt['toolset']
- qualified_target = gyp.common.QualifiedTarget(self.gyp_path,
- tgt_name, toolset)
- xcode_target = xcode_targets[qualified_target]
- if isinstance(xcode_target, gyp.xcodeproj_file.PBXAggregateTarget):
- # Collect all the run test targets.
- all_run_tests = []
- pbxtds = xcode_target.GetProperty('dependencies')
- for pbxtd in pbxtds:
- pbxcip = pbxtd.GetProperty('targetProxy')
- dependency_xct = pbxcip.GetProperty('remoteGlobalIDString')
- if hasattr(dependency_xct, 'test_runner'):
- all_run_tests.append(dependency_xct.test_runner)
-
- # Directly depend on all the runners as they depend on the target
- # that builds them.
- if len(all_run_tests) > 0:
- run_all_target = gyp.xcodeproj_file.PBXAggregateTarget({
- 'name': 'Run %s Tests' % tgt_name,
- 'productName': tgt_name,
- },
- parent=self.project)
- for run_test_target in all_run_tests:
- run_all_target.AddDependency(run_test_target)
-
- # Insert the test runner after the related target.
- idx = self.project._properties['targets'].index(xcode_target)
- self.project._properties['targets'].insert(idx + 1, run_all_target)
-
- # Update all references to other projects, to make sure that the lists of
- # remote products are complete. Otherwise, Xcode will fill them in when
- # it opens the project file, which will result in unnecessary diffs.
- # TODO(mark): This is evil because it relies on internal knowledge of
- # PBXProject._other_pbxprojects.
- for other_pbxproject in self.project._other_pbxprojects.keys():
- self.project.AddOrGetProjectReference(other_pbxproject)
-
- self.project.SortRemoteProductReferences()
-
- # Give everything an ID.
- self.project_file.ComputeIDs()
-
- # Make sure that no two objects in the project file have the same ID. If
- # multiple objects wind up with the same ID, upon loading the file, Xcode
- # will only recognize one object (the last one in the file?) and the
- # results are unpredictable.
- self.project_file.EnsureNoIDCollisions()
-
- def Write(self):
- # Write the project file to a temporary location first. Xcode watches for
- # changes to the project file and presents a UI sheet offering to reload
- # the project when it does change. However, in some cases, especially when
- # multiple projects are open or when Xcode is busy, things don't work so
- # seamlessly. Sometimes, Xcode is able to detect that a project file has
- # changed but can't unload it because something else is referencing it.
- # To mitigate this problem, and to avoid even having Xcode present the UI
- # sheet when an open project is rewritten for inconsequential changes, the
- # project file is written to a temporary file in the xcodeproj directory
- # first. The new temporary file is then compared to the existing project
- # file, if any. If they differ, the new file replaces the old; otherwise,
- # the new project file is simply deleted. Xcode properly detects a file
- # being renamed over an open project file as a change and so it remains
- # able to present the "project file changed" sheet under this system.
- # Writing to a temporary file first also avoids the possible problem of
- # Xcode rereading an incomplete project file.
- (output_fd, new_pbxproj_path) = \
- tempfile.mkstemp(suffix='.tmp', prefix='project.pbxproj.gyp.',
- dir=self.path)
-
- try:
- output_file = os.fdopen(output_fd, 'wb')
-
- self.project_file.Print(output_file)
- output_file.close()
-
- pbxproj_path = os.path.join(self.path, 'project.pbxproj')
-
- same = False
- try:
- same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
- if same:
- # The new file is identical to the old one, just get rid of the new
- # one.
- os.unlink(new_pbxproj_path)
- else:
- # The new file is different from the old one, or there is no old one.
- # Rename the new file to the permanent name.
- #
- # tempfile.mkstemp uses an overly restrictive mode, resulting in a
- # file that can only be read by the owner, regardless of the umask.
- # There's no reason to not respect the umask here, which means that
- # an extra hoop is required to fetch it and reset the new file's mode.
- #
- # No way to get the umask without setting a new one? Set a safe one
- # and then set it back to the old value.
- umask = os.umask(0o77)
- os.umask(umask)
-
- os.chmod(new_pbxproj_path, 0o666 & ~umask)
- os.rename(new_pbxproj_path, pbxproj_path)
-
- except Exception:
- # Don't leave turds behind. In fact, if this code was responsible for
- # creating the xcodeproj directory, get rid of that too.
- os.unlink(new_pbxproj_path)
- if self.created_dir:
- shutil.rmtree(self.path, True)
- raise
-
-
-def AddSourceToTarget(source, type, pbxp, xct):
- # TODO(mark): Perhaps source_extensions and library_extensions can be made a
- # little bit fancier.
- source_extensions = ['c', 'cc', 'cpp', 'cxx', 'm', 'mm', 's', 'swift']
-
- # .o is conceptually more of a "source" than a "library," but Xcode thinks
- # of "sources" as things to compile and "libraries" (or "frameworks") as
- # things to link with. Adding an object file to an Xcode target's frameworks
- # phase works properly.
- library_extensions = ['a', 'dylib', 'framework', 'o']
-
- basename = posixpath.basename(source)
- (root, ext) = posixpath.splitext(basename)
- if ext:
- ext = ext[1:].lower()
-
- if ext in source_extensions and type != 'none':
- xct.SourcesPhase().AddFile(source)
- elif ext in library_extensions and type != 'none':
- xct.FrameworksPhase().AddFile(source)
- else:
- # Files that aren't added to a sources or frameworks build phase can still
- # go into the project file, just not as part of a build phase.
- pbxp.AddOrGetFileInRootGroup(source)
-
-
-def AddResourceToTarget(resource, pbxp, xct):
- # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call
- # where it's used.
- xct.ResourcesPhase().AddFile(resource)
-
-
-def AddHeaderToTarget(header, pbxp, xct, is_public):
- # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call
- # where it's used.
- settings = '{ATTRIBUTES = (%s, ); }' % ('Private', 'Public')[is_public]
- xct.HeadersPhase().AddFile(header, settings)
-
-
-_xcode_variable_re = re.compile(r'(\$\((.*?)\))')
-def ExpandXcodeVariables(string, expansions):
- """Expands Xcode-style $(VARIABLES) in string per the expansions dict.
-
- In some rare cases, it is appropriate to expand Xcode variables when a
- project file is generated. For any substring $(VAR) in string, if VAR is a
- key in the expansions dict, $(VAR) will be replaced with expansions[VAR].
- Any $(VAR) substring in string for which VAR is not a key in the expansions
- dict will remain in the returned string.
- """
-
- matches = _xcode_variable_re.findall(string)
- if matches is None:
- return string
-
- matches.reverse()
- for match in matches:
- (to_replace, variable) = match
- if not variable in expansions:
- continue
-
- replacement = expansions[variable]
- string = re.sub(re.escape(to_replace), replacement, string)
-
- return string
-
-
-_xcode_define_re = re.compile(r'([\\\"\' ])')
-def EscapeXcodeDefine(s):
- """We must escape the defines that we give to XCode so that it knows not to
- split on spaces and to respect backslash and quote literals. However, we
- must not quote the define, or Xcode will incorrectly intepret variables
- especially $(inherited)."""
- return re.sub(_xcode_define_re, r'\\\1', s)
-
-
-def PerformBuild(data, configurations, params):
- options = params['options']
-
- for build_file, build_file_dict in data.items():
- (build_file_root, build_file_ext) = os.path.splitext(build_file)
- if build_file_ext != '.gyp':
- continue
- xcodeproj_path = build_file_root + options.suffix + '.xcodeproj'
- if options.generator_output:
- xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path)
-
- for config in configurations:
- arguments = ['xcodebuild', '-project', xcodeproj_path]
- arguments += ['-configuration', config]
- print("Building [%s]: %s" % (config, arguments))
- subprocess.check_call(arguments)
-
-
-def CalculateGeneratorInputInfo(params):
- toplevel = params['options'].toplevel_dir
- if params.get('flavor') == 'ninja':
- generator_dir = os.path.relpath(params['options'].generator_output or '.')
- output_dir = params.get('generator_flags', {}).get('output_dir', 'out')
- output_dir = os.path.normpath(os.path.join(generator_dir, output_dir))
- qualified_out_dir = os.path.normpath(os.path.join(
- toplevel, output_dir, 'gypfiles-xcode-ninja'))
- else:
- output_dir = os.path.normpath(os.path.join(toplevel, 'xcodebuild'))
- qualified_out_dir = os.path.normpath(os.path.join(
- toplevel, output_dir, 'gypfiles'))
-
- global generator_filelist_paths
- generator_filelist_paths = {
- 'toplevel': toplevel,
- 'qualified_out_dir': qualified_out_dir,
- }
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
- # Optionally configure each spec to use ninja as the external builder.
- ninja_wrapper = params.get('flavor') == 'ninja'
- if ninja_wrapper:
- (target_list, target_dicts, data) = \
- gyp.xcode_ninja.CreateWrapper(target_list, target_dicts, data, params)
-
- options = params['options']
- generator_flags = params.get('generator_flags', {})
- parallel_builds = generator_flags.get('xcode_parallel_builds', True)
- serialize_all_tests = \
- generator_flags.get('xcode_serialize_all_test_runs', True)
- upgrade_check_project_version = \
- generator_flags.get('xcode_upgrade_check_project_version', None)
-
- # Format upgrade_check_project_version with leading zeros as needed.
- if upgrade_check_project_version:
- upgrade_check_project_version = str(upgrade_check_project_version)
- while len(upgrade_check_project_version) < 4:
- upgrade_check_project_version = '0' + upgrade_check_project_version
-
- skip_excluded_files = \
- not generator_flags.get('xcode_list_excluded_files', True)
- xcode_projects = {}
- for build_file, build_file_dict in data.items():
- (build_file_root, build_file_ext) = os.path.splitext(build_file)
- if build_file_ext != '.gyp':
- continue
- xcodeproj_path = build_file_root + options.suffix + '.xcodeproj'
- if options.generator_output:
- xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path)
- xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict)
- xcode_projects[build_file] = xcp
- pbxp = xcp.project
-
- # Set project-level attributes from multiple options
- project_attributes = {}
- if parallel_builds:
- project_attributes['BuildIndependentTargetsInParallel'] = 'YES'
- if upgrade_check_project_version:
- project_attributes['LastUpgradeCheck'] = upgrade_check_project_version
- project_attributes['LastTestingUpgradeCheck'] = \
- upgrade_check_project_version
- project_attributes['LastSwiftUpdateCheck'] = \
- upgrade_check_project_version
- pbxp.SetProperty('attributes', project_attributes)
-
- # Add gyp/gypi files to project
- if not generator_flags.get('standalone'):
- main_group = pbxp.GetProperty('mainGroup')
- build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'})
- main_group.AppendChild(build_group)
- for included_file in build_file_dict['included_files']:
- build_group.AddOrGetFileByPath(included_file, False)
-
- xcode_targets = {}
- xcode_target_to_target_dict = {}
- for qualified_target in target_list:
- [build_file, target_name, toolset] = \
- gyp.common.ParseQualifiedTarget(qualified_target)
-
- spec = target_dicts[qualified_target]
- if spec['toolset'] != 'target':
- raise Exception(
- 'Multiple toolsets not supported in xcode build (target %s)' %
- qualified_target)
- configuration_names = [spec['default_configuration']]
- for configuration_name in sorted(spec['configurations'].keys()):
- if configuration_name not in configuration_names:
- configuration_names.append(configuration_name)
- xcp = xcode_projects[build_file]
- pbxp = xcp.project
-
- # Set up the configurations for the target according to the list of names
- # supplied.
- xccl = CreateXCConfigurationList(configuration_names)
-
- # Create an XCTarget subclass object for the target. The type with
- # "+bundle" appended will be used if the target has "mac_bundle" set.
- # loadable_modules not in a mac_bundle are mapped to
- # com.googlecode.gyp.xcode.bundle, a pseudo-type that xcode.py interprets
- # to create a single-file mh_bundle.
- _types = {
- 'executable': 'com.apple.product-type.tool',
- 'loadable_module': 'com.googlecode.gyp.xcode.bundle',
- 'shared_library': 'com.apple.product-type.library.dynamic',
- 'static_library': 'com.apple.product-type.library.static',
- 'mac_kernel_extension': 'com.apple.product-type.kernel-extension',
- 'executable+bundle': 'com.apple.product-type.application',
- 'loadable_module+bundle': 'com.apple.product-type.bundle',
- 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test',
- 'shared_library+bundle': 'com.apple.product-type.framework',
- 'executable+extension+bundle': 'com.apple.product-type.app-extension',
- 'executable+watch+extension+bundle':
- 'com.apple.product-type.watchkit-extension',
- 'executable+watch+bundle':
- 'com.apple.product-type.application.watchapp',
- 'mac_kernel_extension+bundle': 'com.apple.product-type.kernel-extension',
- }
-
- target_properties = {
- 'buildConfigurationList': xccl,
- 'name': target_name,
- }
-
- type = spec['type']
- is_xctest = int(spec.get('mac_xctest_bundle', 0))
- is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest
- is_app_extension = int(spec.get('ios_app_extension', 0))
- is_watchkit_extension = int(spec.get('ios_watchkit_extension', 0))
- is_watch_app = int(spec.get('ios_watch_app', 0))
- if type != 'none':
- type_bundle_key = type
- if is_xctest:
- type_bundle_key += '+xctest'
- assert type == 'loadable_module', (
- 'mac_xctest_bundle targets must have type loadable_module '
- '(target %s)' % target_name)
- elif is_app_extension:
- assert is_bundle, ('ios_app_extension flag requires mac_bundle '
- '(target %s)' % target_name)
- type_bundle_key += '+extension+bundle'
- elif is_watchkit_extension:
- assert is_bundle, ('ios_watchkit_extension flag requires mac_bundle '
- '(target %s)' % target_name)
- type_bundle_key += '+watch+extension+bundle'
- elif is_watch_app:
- assert is_bundle, ('ios_watch_app flag requires mac_bundle '
- '(target %s)' % target_name)
- type_bundle_key += '+watch+bundle'
- elif is_bundle:
- type_bundle_key += '+bundle'
-
- xctarget_type = gyp.xcodeproj_file.PBXNativeTarget
- try:
- target_properties['productType'] = _types[type_bundle_key]
- except KeyError as e:
- gyp.common.ExceptionAppend(e, "-- unknown product type while "
- "writing target %s" % target_name)
- raise
- else:
- xctarget_type = gyp.xcodeproj_file.PBXAggregateTarget
- assert not is_bundle, (
- 'mac_bundle targets cannot have type none (target "%s")' %
- target_name)
- assert not is_xctest, (
- 'mac_xctest_bundle targets cannot have type none (target "%s")' %
- target_name)
-
- target_product_name = spec.get('product_name')
- if target_product_name is not None:
- target_properties['productName'] = target_product_name
-
- xct = xctarget_type(target_properties, parent=pbxp,
- force_outdir=spec.get('product_dir'),
- force_prefix=spec.get('product_prefix'),
- force_extension=spec.get('product_extension'))
- pbxp.AppendProperty('targets', xct)
- xcode_targets[qualified_target] = xct
- xcode_target_to_target_dict[xct] = spec
-
- spec_actions = spec.get('actions', [])
- spec_rules = spec.get('rules', [])
-
- # Xcode has some "issues" with checking dependencies for the "Compile
- # sources" step with any source files/headers generated by actions/rules.
- # To work around this, if a target is building anything directly (not
- # type "none"), then a second target is used to run the GYP actions/rules
- # and is made a dependency of this target. This way the work is done
- # before the dependency checks for what should be recompiled.
- support_xct = None
- # The Xcode "issues" don't affect xcode-ninja builds, since the dependency
- # logic all happens in ninja. Don't bother creating the extra targets in
- # that case.
- if type != 'none' and (spec_actions or spec_rules) and not ninja_wrapper:
- support_xccl = CreateXCConfigurationList(configuration_names)
- support_target_suffix = generator_flags.get(
- 'support_target_suffix', ' Support')
- support_target_properties = {
- 'buildConfigurationList': support_xccl,
- 'name': target_name + support_target_suffix,
- }
- if target_product_name:
- support_target_properties['productName'] = \
- target_product_name + ' Support'
- support_xct = \
- gyp.xcodeproj_file.PBXAggregateTarget(support_target_properties,
- parent=pbxp)
- pbxp.AppendProperty('targets', support_xct)
- xct.AddDependency(support_xct)
- # Hang the support target off the main target so it can be tested/found
- # by the generator during Finalize.
- xct.support_target = support_xct
-
- prebuild_index = 0
-
- # Add custom shell script phases for "actions" sections.
- for action in spec_actions:
- # There's no need to write anything into the script to ensure that the
- # output directories already exist, because Xcode will look at the
- # declared outputs and automatically ensure that they exist for us.
-
- # Do we have a message to print when this action runs?
- message = action.get('message')
- if message:
- message = 'echo note: ' + gyp.common.EncodePOSIXShellArgument(message)
- else:
- message = ''
-
- # Turn the list into a string that can be passed to a shell.
- action_string = gyp.common.EncodePOSIXShellList(action['action'])
-
- # Convert Xcode-type variable references to sh-compatible environment
- # variable references.
- message_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax(message)
- action_string_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax(
- action_string)
-
- script = ''
- # Include the optional message
- if message_sh:
- script += message_sh + '\n'
- # Be sure the script runs in exec, and that if exec fails, the script
- # exits signalling an error.
- script += 'exec ' + action_string_sh + '\nexit 1\n'
- ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
- 'inputPaths': action['inputs'],
- 'name': 'Action "' + action['action_name'] + '"',
- 'outputPaths': action['outputs'],
- 'shellScript': script,
- 'showEnvVarsInLog': 0,
- })
-
- if support_xct:
- support_xct.AppendProperty('buildPhases', ssbp)
- else:
- # TODO(mark): this assumes too much knowledge of the internals of
- # xcodeproj_file; some of these smarts should move into xcodeproj_file
- # itself.
- xct._properties['buildPhases'].insert(prebuild_index, ssbp)
- prebuild_index = prebuild_index + 1
-
- # TODO(mark): Should verify that at most one of these is specified.
- if int(action.get('process_outputs_as_sources', False)):
- for output in action['outputs']:
- AddSourceToTarget(output, type, pbxp, xct)
-
- if int(action.get('process_outputs_as_mac_bundle_resources', False)):
- for output in action['outputs']:
- AddResourceToTarget(output, pbxp, xct)
-
- # tgt_mac_bundle_resources holds the list of bundle resources so
- # the rule processing can check against it.
- if is_bundle:
- tgt_mac_bundle_resources = spec.get('mac_bundle_resources', [])
- else:
- tgt_mac_bundle_resources = []
-
- # Add custom shell script phases driving "make" for "rules" sections.
- #
- # Xcode's built-in rule support is almost powerful enough to use directly,
- # but there are a few significant deficiencies that render them unusable.
- # There are workarounds for some of its inadequacies, but in aggregate,
- # the workarounds added complexity to the generator, and some workarounds
- # actually require input files to be crafted more carefully than I'd like.
- # Consequently, until Xcode rules are made more capable, "rules" input
- # sections will be handled in Xcode output by shell script build phases
- # performed prior to the compilation phase.
- #
- # The following problems with Xcode rules were found. The numbers are
- # Apple radar IDs. I hope that these shortcomings are addressed, I really
- # liked having the rules handled directly in Xcode during the period that
- # I was prototyping this.
- #
- # 6588600 Xcode compiles custom script rule outputs too soon, compilation
- # fails. This occurs when rule outputs from distinct inputs are
- # interdependent. The only workaround is to put rules and their
- # inputs in a separate target from the one that compiles the rule
- # outputs. This requires input file cooperation and it means that
- # process_outputs_as_sources is unusable.
- # 6584932 Need to declare that custom rule outputs should be excluded from
- # compilation. A possible workaround is to lie to Xcode about a
- # rule's output, giving it a dummy file it doesn't know how to
- # compile. The rule action script would need to touch the dummy.
- # 6584839 I need a way to declare additional inputs to a custom rule.
- # A possible workaround is a shell script phase prior to
- # compilation that touches a rule's primary input files if any
- # would-be additional inputs are newer than the output. Modifying
- # the source tree - even just modification times - feels dirty.
- # 6564240 Xcode "custom script" build rules always dump all environment
- # variables. This is a low-prioroty problem and is not a
- # show-stopper.
- rules_by_ext = {}
- for rule in spec_rules:
- rules_by_ext[rule['extension']] = rule
-
- # First, some definitions:
- #
- # A "rule source" is a file that was listed in a target's "sources"
- # list and will have a rule applied to it on the basis of matching the
- # rule's "extensions" attribute. Rule sources are direct inputs to
- # rules.
- #
- # Rule definitions may specify additional inputs in their "inputs"
- # attribute. These additional inputs are used for dependency tracking
- # purposes.
- #
- # A "concrete output" is a rule output with input-dependent variables
- # resolved. For example, given a rule with:
- # 'extension': 'ext', 'outputs': ['$(INPUT_FILE_BASE).cc'],
- # if the target's "sources" list contained "one.ext" and "two.ext",
- # the "concrete output" for rule input "two.ext" would be "two.cc". If
- # a rule specifies multiple outputs, each input file that the rule is
- # applied to will have the same number of concrete outputs.
- #
- # If any concrete outputs are outdated or missing relative to their
- # corresponding rule_source or to any specified additional input, the
- # rule action must be performed to generate the concrete outputs.
-
- # concrete_outputs_by_rule_source will have an item at the same index
- # as the rule['rule_sources'] that it corresponds to. Each item is a
- # list of all of the concrete outputs for the rule_source.
- concrete_outputs_by_rule_source = []
-
- # concrete_outputs_all is a flat list of all concrete outputs that this
- # rule is able to produce, given the known set of input files
- # (rule_sources) that apply to it.
- concrete_outputs_all = []
-
- # messages & actions are keyed by the same indices as rule['rule_sources']
- # and concrete_outputs_by_rule_source. They contain the message and
- # action to perform after resolving input-dependent variables. The
- # message is optional, in which case None is stored for each rule source.
- messages = []
- actions = []
-
- for rule_source in rule.get('rule_sources', []):
- rule_source_dirname, rule_source_basename = \
- posixpath.split(rule_source)
- (rule_source_root, rule_source_ext) = \
- posixpath.splitext(rule_source_basename)
-
- # These are the same variable names that Xcode uses for its own native
- # rule support. Because Xcode's rule engine is not being used, they
- # need to be expanded as they are written to the makefile.
- rule_input_dict = {
- 'INPUT_FILE_BASE': rule_source_root,
- 'INPUT_FILE_SUFFIX': rule_source_ext,
- 'INPUT_FILE_NAME': rule_source_basename,
- 'INPUT_FILE_PATH': rule_source,
- 'INPUT_FILE_DIRNAME': rule_source_dirname,
- }
-
- concrete_outputs_for_this_rule_source = []
- for output in rule.get('outputs', []):
- # Fortunately, Xcode and make both use $(VAR) format for their
- # variables, so the expansion is the only transformation necessary.
- # Any remaning $(VAR)-type variables in the string can be given
- # directly to make, which will pick up the correct settings from
- # what Xcode puts into the environment.
- concrete_output = ExpandXcodeVariables(output, rule_input_dict)
- concrete_outputs_for_this_rule_source.append(concrete_output)
-
- # Add all concrete outputs to the project.
- pbxp.AddOrGetFileInRootGroup(concrete_output)
-
- concrete_outputs_by_rule_source.append( \
- concrete_outputs_for_this_rule_source)
- concrete_outputs_all.extend(concrete_outputs_for_this_rule_source)
-
- # TODO(mark): Should verify that at most one of these is specified.
- if int(rule.get('process_outputs_as_sources', False)):
- for output in concrete_outputs_for_this_rule_source:
- AddSourceToTarget(output, type, pbxp, xct)
-
- # If the file came from the mac_bundle_resources list or if the rule
- # is marked to process outputs as bundle resource, do so.
- was_mac_bundle_resource = rule_source in tgt_mac_bundle_resources
- if was_mac_bundle_resource or \
- int(rule.get('process_outputs_as_mac_bundle_resources', False)):
- for output in concrete_outputs_for_this_rule_source:
- AddResourceToTarget(output, pbxp, xct)
-
- # Do we have a message to print when this rule runs?
- message = rule.get('message')
- if message:
- message = gyp.common.EncodePOSIXShellArgument(message)
- message = ExpandXcodeVariables(message, rule_input_dict)
- messages.append(message)
-
- # Turn the list into a string that can be passed to a shell.
- action_string = gyp.common.EncodePOSIXShellList(rule['action'])
-
- action = ExpandXcodeVariables(action_string, rule_input_dict)
- actions.append(action)
-
- if len(concrete_outputs_all) > 0:
- # TODO(mark): There's a possibility for collision here. Consider
- # target "t" rule "A_r" and target "t_A" rule "r".
- makefile_name = '%s.make' % re.sub(
- '[^a-zA-Z0-9_]', '_' , '%s_%s' % (target_name, rule['rule_name']))
- makefile_path = os.path.join(xcode_projects[build_file].path,
- makefile_name)
- # TODO(mark): try/close? Write to a temporary file and swap it only
- # if it's got changes?
- makefile = open(makefile_path, 'wb')
-
- # make will build the first target in the makefile by default. By
- # convention, it's called "all". List all (or at least one)
- # concrete output for each rule source as a prerequisite of the "all"
- # target.
- makefile.write('all: \\\n')
- for concrete_output_index in \
- range(0, len(concrete_outputs_by_rule_source)):
- # Only list the first (index [0]) concrete output of each input
- # in the "all" target. Otherwise, a parallel make (-j > 1) would
- # attempt to process each input multiple times simultaneously.
- # Otherwise, "all" could just contain the entire list of
- # concrete_outputs_all.
- concrete_output = \
- concrete_outputs_by_rule_source[concrete_output_index][0]
- if concrete_output_index == len(concrete_outputs_by_rule_source) - 1:
- eol = ''
- else:
- eol = ' \\'
- makefile.write(' %s%s\n' % (concrete_output, eol))
-
- for (rule_source, concrete_outputs, message, action) in \
- zip(rule['rule_sources'], concrete_outputs_by_rule_source,
- messages, actions):
- makefile.write('\n')
-
- # Add a rule that declares it can build each concrete output of a
- # rule source. Collect the names of the directories that are
- # required.
- concrete_output_dirs = []
- for concrete_output_index in range(0, len(concrete_outputs)):
- concrete_output = concrete_outputs[concrete_output_index]
- if concrete_output_index == 0:
- bol = ''
- else:
- bol = ' '
- makefile.write('%s%s \\\n' % (bol, concrete_output))
-
- concrete_output_dir = posixpath.dirname(concrete_output)
- if (concrete_output_dir and
- concrete_output_dir not in concrete_output_dirs):
- concrete_output_dirs.append(concrete_output_dir)
-
- makefile.write(' : \\\n')
-
- # The prerequisites for this rule are the rule source itself and
- # the set of additional rule inputs, if any.
- prerequisites = [rule_source]
- prerequisites.extend(rule.get('inputs', []))
- for prerequisite_index in range(0, len(prerequisites)):
- prerequisite = prerequisites[prerequisite_index]
- if prerequisite_index == len(prerequisites) - 1:
- eol = ''
- else:
- eol = ' \\'
- makefile.write(' %s%s\n' % (prerequisite, eol))
-
- # Make sure that output directories exist before executing the rule
- # action.
- if len(concrete_output_dirs) > 0:
- makefile.write('\t@mkdir -p "%s"\n' %
- '" "'.join(concrete_output_dirs))
-
- # The rule message and action have already had the necessary variable
- # substitutions performed.
- if message:
- # Mark it with note: so Xcode picks it up in build output.
- makefile.write('\t@echo note: %s\n' % message)
- makefile.write('\t%s\n' % action)
-
- makefile.close()
-
- # It might be nice to ensure that needed output directories exist
- # here rather than in each target in the Makefile, but that wouldn't
- # work if there ever was a concrete output that had an input-dependent
- # variable anywhere other than in the leaf position.
-
- # Don't declare any inputPaths or outputPaths. If they're present,
- # Xcode will provide a slight optimization by only running the script
- # phase if any output is missing or outdated relative to any input.
- # Unfortunately, it will also assume that all outputs are touched by
- # the script, and if the outputs serve as files in a compilation
- # phase, they will be unconditionally rebuilt. Since make might not
- # rebuild everything that could be declared here as an output, this
- # extra compilation activity is unnecessary. With inputPaths and
- # outputPaths not supplied, make will always be called, but it knows
- # enough to not do anything when everything is up-to-date.
-
- # To help speed things up, pass -j COUNT to make so it does some work
- # in parallel. Don't use ncpus because Xcode will build ncpus targets
- # in parallel and if each target happens to have a rules step, there
- # would be ncpus^2 things going. With a machine that has 2 quad-core
- # Xeons, a build can quickly run out of processes based on
- # scheduling/other tasks, and randomly failing builds are no good.
- script = \
-"""JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)"
-if [ "${JOB_COUNT}" -gt 4 ]; then
- JOB_COUNT=4
-fi
-exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}"
-exit 1
-""" % makefile_name
- ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
- 'name': 'Rule "' + rule['rule_name'] + '"',
- 'shellScript': script,
- 'showEnvVarsInLog': 0,
- })
-
- if support_xct:
- support_xct.AppendProperty('buildPhases', ssbp)
- else:
- # TODO(mark): this assumes too much knowledge of the internals of
- # xcodeproj_file; some of these smarts should move into xcodeproj_file
- # itself.
- xct._properties['buildPhases'].insert(prebuild_index, ssbp)
- prebuild_index = prebuild_index + 1
-
- # Extra rule inputs also go into the project file. Concrete outputs were
- # already added when they were computed.
- groups = ['inputs', 'inputs_excluded']
- if skip_excluded_files:
- groups = [x for x in groups if not x.endswith('_excluded')]
- for group in groups:
- for item in rule.get(group, []):
- pbxp.AddOrGetFileInRootGroup(item)
-
- # Add "sources".
- for source in spec.get('sources', []):
- (source_root, source_extension) = posixpath.splitext(source)
- if source_extension[1:] not in rules_by_ext:
- # AddSourceToTarget will add the file to a root group if it's not
- # already there.
- AddSourceToTarget(source, type, pbxp, xct)
- else:
- pbxp.AddOrGetFileInRootGroup(source)
-
- # Add "mac_bundle_resources" and "mac_framework_private_headers" if
- # it's a bundle of any type.
- if is_bundle:
- for resource in tgt_mac_bundle_resources:
- (resource_root, resource_extension) = posixpath.splitext(resource)
- if resource_extension[1:] not in rules_by_ext:
- AddResourceToTarget(resource, pbxp, xct)
- else:
- pbxp.AddOrGetFileInRootGroup(resource)
-
- for header in spec.get('mac_framework_private_headers', []):
- AddHeaderToTarget(header, pbxp, xct, False)
-
- # Add "mac_framework_headers". These can be valid for both frameworks
- # and static libraries.
- if is_bundle or type == 'static_library':
- for header in spec.get('mac_framework_headers', []):
- AddHeaderToTarget(header, pbxp, xct, True)
-
- # Add "copies".
- pbxcp_dict = {}
- for copy_group in spec.get('copies', []):
- dest = copy_group['destination']
- if dest[0] not in ('/', '$'):
- # Relative paths are relative to $(SRCROOT).
- dest = '$(SRCROOT)/' + dest
-
- code_sign = int(copy_group.get('xcode_code_sign', 0))
- settings = (None, '{ATTRIBUTES = (CodeSignOnCopy, ); }')[code_sign]
-
- # Coalesce multiple "copies" sections in the same target with the same
- # "destination" property into the same PBXCopyFilesBuildPhase, otherwise
- # they'll wind up with ID collisions.
- pbxcp = pbxcp_dict.get(dest, None)
- if pbxcp is None:
- pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase({
- 'name': 'Copy to ' + copy_group['destination']
- },
- parent=xct)
- pbxcp.SetDestination(dest)
-
- # TODO(mark): The usual comment about this knowing too much about
- # gyp.xcodeproj_file internals applies.
- xct._properties['buildPhases'].insert(prebuild_index, pbxcp)
-
- pbxcp_dict[dest] = pbxcp
-
- for file in copy_group['files']:
- pbxcp.AddFile(file, settings)
-
- # Excluded files can also go into the project file.
- if not skip_excluded_files:
- for key in ['sources', 'mac_bundle_resources', 'mac_framework_headers',
- 'mac_framework_private_headers']:
- excluded_key = key + '_excluded'
- for item in spec.get(excluded_key, []):
- pbxp.AddOrGetFileInRootGroup(item)
-
- # So can "inputs" and "outputs" sections of "actions" groups.
- groups = ['inputs', 'inputs_excluded', 'outputs', 'outputs_excluded']
- if skip_excluded_files:
- groups = [x for x in groups if not x.endswith('_excluded')]
- for action in spec.get('actions', []):
- for group in groups:
- for item in action.get(group, []):
- # Exclude anything in BUILT_PRODUCTS_DIR. They're products, not
- # sources.
- if not item.startswith('$(BUILT_PRODUCTS_DIR)/'):
- pbxp.AddOrGetFileInRootGroup(item)
-
- for postbuild in spec.get('postbuilds', []):
- action_string_sh = gyp.common.EncodePOSIXShellList(postbuild['action'])
- script = 'exec ' + action_string_sh + '\nexit 1\n'
-
- # Make the postbuild step depend on the output of ld or ar from this
- # target. Apparently putting the script step after the link step isn't
- # sufficient to ensure proper ordering in all cases. With an input
- # declared but no outputs, the script step should run every time, as
- # desired.
- ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
- 'inputPaths': ['$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)'],
- 'name': 'Postbuild "' + postbuild['postbuild_name'] + '"',
- 'shellScript': script,
- 'showEnvVarsInLog': 0,
- })
- xct.AppendProperty('buildPhases', ssbp)
-
- # Add dependencies before libraries, because adding a dependency may imply
- # adding a library. It's preferable to keep dependencies listed first
- # during a link phase so that they can override symbols that would
- # otherwise be provided by libraries, which will usually include system
- # libraries. On some systems, ld is finicky and even requires the
- # libraries to be ordered in such a way that unresolved symbols in
- # earlier-listed libraries may only be resolved by later-listed libraries.
- # The Mac linker doesn't work that way, but other platforms do, and so
- # their linker invocations need to be constructed in this way. There's
- # no compelling reason for Xcode's linker invocations to differ.
-
- if 'dependencies' in spec:
- for dependency in spec['dependencies']:
- xct.AddDependency(xcode_targets[dependency])
- # The support project also gets the dependencies (in case they are
- # needed for the actions/rules to work).
- if support_xct:
- support_xct.AddDependency(xcode_targets[dependency])
-
- if 'libraries' in spec:
- for library in spec['libraries']:
- xct.FrameworksPhase().AddFile(library)
- # Add the library's directory to LIBRARY_SEARCH_PATHS if necessary.
- # I wish Xcode handled this automatically.
- library_dir = posixpath.dirname(library)
- if library_dir not in xcode_standard_library_dirs and (
- not xct.HasBuildSetting(_library_search_paths_var) or
- library_dir not in xct.GetBuildSetting(_library_search_paths_var)):
- xct.AppendBuildSetting(_library_search_paths_var, library_dir)
-
- for configuration_name in configuration_names:
- configuration = spec['configurations'][configuration_name]
- xcbc = xct.ConfigurationNamed(configuration_name)
- for include_dir in configuration.get('mac_framework_dirs', []):
- xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir)
- for include_dir in configuration.get('include_dirs', []):
- xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir)
- for library_dir in configuration.get('library_dirs', []):
- if library_dir not in xcode_standard_library_dirs and (
- not xcbc.HasBuildSetting(_library_search_paths_var) or
- library_dir not in xcbc.GetBuildSetting(_library_search_paths_var)):
- xcbc.AppendBuildSetting(_library_search_paths_var, library_dir)
-
- if 'defines' in configuration:
- for define in configuration['defines']:
- set_define = EscapeXcodeDefine(define)
- xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define)
- if 'xcode_settings' in configuration:
- for xck, xcv in configuration['xcode_settings'].items():
- xcbc.SetBuildSetting(xck, xcv)
- if 'xcode_config_file' in configuration:
- config_ref = pbxp.AddOrGetFileInRootGroup(
- configuration['xcode_config_file'])
- xcbc.SetBaseConfiguration(config_ref)
-
- build_files = []
- for build_file, build_file_dict in data.items():
- if build_file.endswith('.gyp'):
- build_files.append(build_file)
-
- for build_file in build_files:
- xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
-
- for build_file in build_files:
- xcode_projects[build_file].Finalize2(xcode_targets,
- xcode_target_to_target_dict)
-
- for build_file in build_files:
- xcode_projects[build_file].Write()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
deleted file mode 100644
index 260324a43..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Unit tests for the xcode.py file. """
-
-import gyp.generator.xcode as xcode
-import unittest
-import sys
-
-
-class TestEscapeXcodeDefine(unittest.TestCase):
- if sys.platform == 'darwin':
- def test_InheritedRemainsUnescaped(self):
- self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)')
-
- def test_Escaping(self):
- self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py
deleted file mode 100644
index d1742800a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ /dev/null
@@ -1,2902 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from __future__ import print_function
-
-import ast
-
-import gyp.common
-import gyp.simple_copy
-import multiprocessing
-import optparse
-import os.path
-import re
-import shlex
-import signal
-import subprocess
-import sys
-import threading
-import time
-import traceback
-from gyp.common import GypError
-from gyp.common import OrderedSet
-
-PY3 = bytes != str
-
-# A list of types that are treated as linkable.
-linkable_types = [
- 'executable',
- 'shared_library',
- 'loadable_module',
- 'mac_kernel_extension',
-]
-
-# A list of sections that contain links to other targets.
-dependency_sections = ['dependencies', 'export_dependent_settings']
-
-# base_path_sections is a list of sections defined by GYP that contain
-# pathnames. The generators can provide more keys, the two lists are merged
-# into path_sections, but you should call IsPathSection instead of using either
-# list directly.
-base_path_sections = [
- 'destination',
- 'files',
- 'include_dirs',
- 'inputs',
- 'libraries',
- 'outputs',
- 'sources',
-]
-path_sections = set()
-
-# These per-process dictionaries are used to cache build file data when loading
-# in parallel mode.
-per_process_data = {}
-per_process_aux_data = {}
-
-def IsPathSection(section):
- # If section ends in one of the '=+?!' characters, it's applied to a section
- # without the trailing characters. '/' is notably absent from this list,
- # because there's no way for a regular expression to be treated as a path.
- while section and section[-1:] in '=+?!':
- section = section[:-1]
-
- if section in path_sections:
- return True
-
- # Sections mathing the regexp '_(dir|file|path)s?$' are also
- # considered PathSections. Using manual string matching since that
- # is much faster than the regexp and this can be called hundreds of
- # thousands of times so micro performance matters.
- if "_" in section:
- tail = section[-6:]
- if tail[-1] == 's':
- tail = tail[:-1]
- if tail[-5:] in ('_file', '_path'):
- return True
- return tail[-4:] == '_dir'
-
- return False
-
-# base_non_configuration_keys is a list of key names that belong in the target
-# itself and should not be propagated into its configurations. It is merged
-# with a list that can come from the generator to
-# create non_configuration_keys.
-base_non_configuration_keys = [
- # Sections that must exist inside targets and not configurations.
- 'actions',
- 'configurations',
- 'copies',
- 'default_configuration',
- 'dependencies',
- 'dependencies_original',
- 'libraries',
- 'postbuilds',
- 'product_dir',
- 'product_extension',
- 'product_name',
- 'product_prefix',
- 'rules',
- 'run_as',
- 'sources',
- 'standalone_static_library',
- 'suppress_wildcard',
- 'target_name',
- 'toolset',
- 'toolsets',
- 'type',
-
- # Sections that can be found inside targets or configurations, but that
- # should not be propagated from targets into their configurations.
- 'variables',
-]
-non_configuration_keys = []
-
-# Keys that do not belong inside a configuration dictionary.
-invalid_configuration_keys = [
- 'actions',
- 'all_dependent_settings',
- 'configurations',
- 'dependencies',
- 'direct_dependent_settings',
- 'libraries',
- 'link_settings',
- 'sources',
- 'standalone_static_library',
- 'target_name',
- 'type',
-]
-
-# Controls whether or not the generator supports multiple toolsets.
-multiple_toolsets = False
-
-# Paths for converting filelist paths to output paths: {
-# toplevel,
-# qualified_output_dir,
-# }
-generator_filelist_paths = None
-
-def GetIncludedBuildFiles(build_file_path, aux_data, included=None):
- """Return a list of all build files included into build_file_path.
-
- The returned list will contain build_file_path as well as all other files
- that it included, either directly or indirectly. Note that the list may
- contain files that were included into a conditional section that evaluated
- to false and was not merged into build_file_path's dict.
-
- aux_data is a dict containing a key for each build file or included build
- file. Those keys provide access to dicts whose "included" keys contain
- lists of all other files included by the build file.
-
- included should be left at its default None value by external callers. It
- is used for recursion.
-
- The returned list will not contain any duplicate entries. Each build file
- in the list will be relative to the current directory.
- """
-
- if included is None:
- included = []
-
- if build_file_path in included:
- return included
-
- included.append(build_file_path)
-
- for included_build_file in aux_data[build_file_path].get('included', []):
- GetIncludedBuildFiles(included_build_file, aux_data, included)
-
- return included
-
-
-def CheckedEval(file_contents):
- """Return the eval of a gyp file.
-
- The gyp file is restricted to dictionaries and lists only, and
- repeated keys are not allowed.
-
- Note that this is slower than eval() is.
- """
-
- syntax_tree = ast.parse(file_contents)
- assert isinstance(syntax_tree, ast.Module)
- c1 = syntax_tree.body
- assert len(c1) == 1
- c2 = c1[0]
- assert isinstance(c2, ast.Expr)
- return CheckNode(c2.value, [])
-
-
-def CheckNode(node, keypath):
- if isinstance(node, ast.Dict):
- c = node.getChildren()
- dict = {}
- for key, value in zip(node.keys, node.values):
- assert isinstance(key, ast.Str)
- key = key.s
- if key in dict:
- raise GypError("Key '" + key + "' repeated at level " +
- repr(len(keypath) + 1) + " with key path '" +
- '.'.join(keypath) + "'")
- kp = list(keypath) # Make a copy of the list for descending this node.
- kp.append(key)
- dict[key] = CheckNode(value, kp)
- return dict
- elif isinstance(node, ast.List):
- children = []
- for index, child in enumerate(node.elts):
- kp = list(keypath) # Copy list.
- kp.append(repr(index))
- children.append(CheckNode(child, kp))
- return children
- elif isinstance(node, ast.Str):
- return node.s
- else:
- raise TypeError("Unknown AST node at key path '" + '.'.join(keypath) +
- "': " + repr(node))
-
-
-def LoadOneBuildFile(build_file_path, data, aux_data, includes,
- is_target, check):
- if build_file_path in data:
- return data[build_file_path]
-
- if os.path.exists(build_file_path):
- # Open the build file for read ('r') with universal-newlines mode ('U')
- # to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
- # which otherwise will fail eval()
- if sys.platform == 'zos':
- # On z/OS, universal-newlines mode treats the file as an ascii file. But since
- # node-gyp produces ebcdic files, do not use that mode.
- build_file_contents = open(build_file_path, 'r').read()
- else:
- build_file_contents = open(build_file_path, 'rU').read()
- else:
- raise GypError("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
-
- build_file_data = None
- try:
- if check:
- build_file_data = CheckedEval(build_file_contents)
- else:
- build_file_data = eval(build_file_contents, {'__builtins__': {}},
- None)
- except SyntaxError as e:
- e.filename = build_file_path
- raise
- except Exception as e:
- gyp.common.ExceptionAppend(e, 'while reading ' + build_file_path)
- raise
-
- if type(build_file_data) is not dict:
- raise GypError("%s does not evaluate to a dictionary." % build_file_path)
-
- data[build_file_path] = build_file_data
- aux_data[build_file_path] = {}
-
- # Scan for includes and merge them in.
- if ('skip_includes' not in build_file_data or
- not build_file_data['skip_includes']):
- try:
- if is_target:
- LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data,
- aux_data, includes, check)
- else:
- LoadBuildFileIncludesIntoDict(build_file_data, build_file_path, data,
- aux_data, None, check)
- except Exception as e:
- gyp.common.ExceptionAppend(e,
- 'while reading includes of ' + build_file_path)
- raise
-
- return build_file_data
-
-
-def LoadBuildFileIncludesIntoDict(subdict, subdict_path, data, aux_data,
- includes, check):
- includes_list = []
- if includes != None:
- includes_list.extend(includes)
- if 'includes' in subdict:
- for include in subdict['includes']:
- # "include" is specified relative to subdict_path, so compute the real
- # path to include by appending the provided "include" to the directory
- # in which subdict_path resides.
- relative_include = \
- os.path.normpath(os.path.join(os.path.dirname(subdict_path), include))
- includes_list.append(relative_include)
- # Unhook the includes list, it's no longer needed.
- del subdict['includes']
-
- # Merge in the included files.
- for include in includes_list:
- if not 'included' in aux_data[subdict_path]:
- aux_data[subdict_path]['included'] = []
- aux_data[subdict_path]['included'].append(include)
-
- gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Included File: '%s'", include)
-
- MergeDicts(subdict,
- LoadOneBuildFile(include, data, aux_data, None, False, check),
- subdict_path, include)
-
- # Recurse into subdictionaries.
- for k, v in subdict.items():
- if type(v) is dict:
- LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data,
- None, check)
- elif type(v) is list:
- LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data,
- check)
-
-
-# This recurses into lists so that it can look for dicts.
-def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data, check):
- for item in sublist:
- if type(item) is dict:
- LoadBuildFileIncludesIntoDict(item, sublist_path, data, aux_data,
- None, check)
- elif type(item) is list:
- LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data, check)
-
-# Processes toolsets in all the targets. This recurses into condition entries
-# since they can contain toolsets as well.
-def ProcessToolsetsInDict(data):
- if 'targets' in data:
- target_list = data['targets']
- new_target_list = []
- for target in target_list:
- # If this target already has an explicit 'toolset', and no 'toolsets'
- # list, don't modify it further.
- if 'toolset' in target and 'toolsets' not in target:
- new_target_list.append(target)
- continue
- if multiple_toolsets:
- toolsets = target.get('toolsets', ['target'])
- else:
- toolsets = ['target']
- # Make sure this 'toolsets' definition is only processed once.
- if 'toolsets' in target:
- del target['toolsets']
- if len(toolsets) > 0:
- # Optimization: only do copies if more than one toolset is specified.
- for build in toolsets[1:]:
- new_target = gyp.simple_copy.deepcopy(target)
- new_target['toolset'] = build
- new_target_list.append(new_target)
- target['toolset'] = toolsets[0]
- new_target_list.append(target)
- data['targets'] = new_target_list
- if 'conditions' in data:
- for condition in data['conditions']:
- if type(condition) is list:
- for condition_dict in condition[1:]:
- if type(condition_dict) is dict:
- ProcessToolsetsInDict(condition_dict)
-
-
-# TODO(mark): I don't love this name. It just means that it's going to load
-# a build file that contains targets and is expected to provide a targets dict
-# that contains the targets...
-def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes,
- depth, check, load_dependencies):
- # If depth is set, predefine the DEPTH variable to be a relative path from
- # this build file's directory to the directory identified by depth.
- if depth:
- # TODO(dglazkov) The backslash/forward-slash replacement at the end is a
- # temporary measure. This should really be addressed by keeping all paths
- # in POSIX until actual project generation.
- d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path))
- if d == '':
- variables['DEPTH'] = '.'
- else:
- variables['DEPTH'] = d.replace('\\', '/')
-
- # The 'target_build_files' key is only set when loading target build files in
- # the non-parallel code path, where LoadTargetBuildFile is called
- # recursively. In the parallel code path, we don't need to check whether the
- # |build_file_path| has already been loaded, because the 'scheduled' set in
- # ParallelState guarantees that we never load the same |build_file_path|
- # twice.
- if 'target_build_files' in data:
- if build_file_path in data['target_build_files']:
- # Already loaded.
- return False
- data['target_build_files'].add(build_file_path)
-
- gyp.DebugOutput(gyp.DEBUG_INCLUDES,
- "Loading Target Build File '%s'", build_file_path)
-
- build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
- includes, True, check)
-
- # Store DEPTH for later use in generators.
- build_file_data['_DEPTH'] = depth
-
- # Set up the included_files key indicating which .gyp files contributed to
- # this target dict.
- if 'included_files' in build_file_data:
- raise GypError(build_file_path + ' must not contain included_files key')
-
- included = GetIncludedBuildFiles(build_file_path, aux_data)
- build_file_data['included_files'] = []
- for included_file in included:
- # included_file is relative to the current directory, but it needs to
- # be made relative to build_file_path's directory.
- included_relative = \
- gyp.common.RelativePath(included_file,
- os.path.dirname(build_file_path))
- build_file_data['included_files'].append(included_relative)
-
- # Do a first round of toolsets expansion so that conditions can be defined
- # per toolset.
- ProcessToolsetsInDict(build_file_data)
-
- # Apply "pre"/"early" variable expansions and condition evaluations.
- ProcessVariablesAndConditionsInDict(
- build_file_data, PHASE_EARLY, variables, build_file_path)
-
- # Since some toolsets might have been defined conditionally, perform
- # a second round of toolsets expansion now.
- ProcessToolsetsInDict(build_file_data)
-
- # Look at each project's target_defaults dict, and merge settings into
- # targets.
- if 'target_defaults' in build_file_data:
- if 'targets' not in build_file_data:
- raise GypError("Unable to find targets in build file %s" %
- build_file_path)
-
- index = 0
- while index < len(build_file_data['targets']):
- # This procedure needs to give the impression that target_defaults is
- # used as defaults, and the individual targets inherit from that.
- # The individual targets need to be merged into the defaults. Make
- # a deep copy of the defaults for each target, merge the target dict
- # as found in the input file into that copy, and then hook up the
- # copy with the target-specific data merged into it as the replacement
- # target dict.
- old_target_dict = build_file_data['targets'][index]
- new_target_dict = gyp.simple_copy.deepcopy(
- build_file_data['target_defaults'])
- MergeDicts(new_target_dict, old_target_dict,
- build_file_path, build_file_path)
- build_file_data['targets'][index] = new_target_dict
- index += 1
-
- # No longer needed.
- del build_file_data['target_defaults']
-
- # Look for dependencies. This means that dependency resolution occurs
- # after "pre" conditionals and variable expansion, but before "post" -
- # in other words, you can't put a "dependencies" section inside a "post"
- # conditional within a target.
-
- dependencies = []
- if 'targets' in build_file_data:
- for target_dict in build_file_data['targets']:
- if 'dependencies' not in target_dict:
- continue
- for dependency in target_dict['dependencies']:
- dependencies.append(
- gyp.common.ResolveTarget(build_file_path, dependency, None)[0])
-
- if load_dependencies:
- for dependency in dependencies:
- try:
- LoadTargetBuildFile(dependency, data, aux_data, variables,
- includes, depth, check, load_dependencies)
- except Exception as e:
- gyp.common.ExceptionAppend(
- e, 'while loading dependencies of %s' % build_file_path)
- raise
- else:
- return (build_file_path, dependencies)
-
-def CallLoadTargetBuildFile(global_flags,
- build_file_path, variables,
- includes, depth, check,
- generator_input_info):
- """Wrapper around LoadTargetBuildFile for parallel processing.
-
- This wrapper is used when LoadTargetBuildFile is executed in
- a worker process.
- """
-
- try:
- signal.signal(signal.SIGINT, signal.SIG_IGN)
-
- # Apply globals so that the worker process behaves the same.
- for key, value in global_flags.items():
- globals()[key] = value
-
- SetGeneratorGlobals(generator_input_info)
- result = LoadTargetBuildFile(build_file_path, per_process_data,
- per_process_aux_data, variables,
- includes, depth, check, False)
- if not result:
- return result
-
- (build_file_path, dependencies) = result
-
- # We can safely pop the build_file_data from per_process_data because it
- # will never be referenced by this process again, so we don't need to keep
- # it in the cache.
- build_file_data = per_process_data.pop(build_file_path)
-
- # This gets serialized and sent back to the main process via a pipe.
- # It's handled in LoadTargetBuildFileCallback.
- return (build_file_path,
- build_file_data,
- dependencies)
- except GypError as e:
- sys.stderr.write("gyp: %s\n" % e)
- return None
- except Exception as e:
- print('Exception:', e, file=sys.stderr)
- print(traceback.format_exc(), file=sys.stderr)
- return None
-
-
-class ParallelProcessingError(Exception):
- pass
-
-
-class ParallelState(object):
- """Class to keep track of state when processing input files in parallel.
-
- If build files are loaded in parallel, use this to keep track of
- state during farming out and processing parallel jobs. It's stored
- in a global so that the callback function can have access to it.
- """
-
- def __init__(self):
- # The multiprocessing pool.
- self.pool = None
- # The condition variable used to protect this object and notify
- # the main loop when there might be more data to process.
- self.condition = None
- # The "data" dict that was passed to LoadTargetBuildFileParallel
- self.data = None
- # The number of parallel calls outstanding; decremented when a response
- # was received.
- self.pending = 0
- # The set of all build files that have been scheduled, so we don't
- # schedule the same one twice.
- self.scheduled = set()
- # A list of dependency build file paths that haven't been scheduled yet.
- self.dependencies = []
- # Flag to indicate if there was an error in a child process.
- self.error = False
-
- def LoadTargetBuildFileCallback(self, result):
- """Handle the results of running LoadTargetBuildFile in another process.
- """
- self.condition.acquire()
- if not result:
- self.error = True
- self.condition.notify()
- self.condition.release()
- return
- (build_file_path0, build_file_data0, dependencies0) = result
- self.data[build_file_path0] = build_file_data0
- self.data['target_build_files'].add(build_file_path0)
- for new_dependency in dependencies0:
- if new_dependency not in self.scheduled:
- self.scheduled.add(new_dependency)
- self.dependencies.append(new_dependency)
- self.pending -= 1
- self.condition.notify()
- self.condition.release()
-
-
-def LoadTargetBuildFilesParallel(build_files, data, variables, includes, depth,
- check, generator_input_info):
- parallel_state = ParallelState()
- parallel_state.condition = threading.Condition()
- # Make copies of the build_files argument that we can modify while working.
- parallel_state.dependencies = list(build_files)
- parallel_state.scheduled = set(build_files)
- parallel_state.pending = 0
- parallel_state.data = data
-
- try:
- parallel_state.condition.acquire()
- while parallel_state.dependencies or parallel_state.pending:
- if parallel_state.error:
- break
- if not parallel_state.dependencies:
- parallel_state.condition.wait()
- continue
-
- dependency = parallel_state.dependencies.pop()
-
- parallel_state.pending += 1
- global_flags = {
- 'path_sections': globals()['path_sections'],
- 'non_configuration_keys': globals()['non_configuration_keys'],
- 'multiple_toolsets': globals()['multiple_toolsets']}
-
- if not parallel_state.pool:
- parallel_state.pool = multiprocessing.Pool(multiprocessing.cpu_count())
- parallel_state.pool.apply_async(
- CallLoadTargetBuildFile,
- args = (global_flags, dependency,
- variables, includes, depth, check, generator_input_info),
- callback = parallel_state.LoadTargetBuildFileCallback)
- except KeyboardInterrupt as e:
- parallel_state.pool.terminate()
- raise e
-
- parallel_state.condition.release()
-
- parallel_state.pool.close()
- parallel_state.pool.join()
- parallel_state.pool = None
-
- if parallel_state.error:
- sys.exit(1)
-
-# Look for the bracket that matches the first bracket seen in a
-# string, and return the start and end as a tuple. For example, if
-# the input is something like "<(foo <(bar)) blah", then it would
-# return (1, 13), indicating the entire string except for the leading
-# "<" and trailing " blah".
-LBRACKETS= set('{[(')
-BRACKETS = {'}': '{', ']': '[', ')': '('}
-def FindEnclosingBracketGroup(input_str):
- stack = []
- start = -1
- for index, char in enumerate(input_str):
- if char in LBRACKETS:
- stack.append(char)
- if start == -1:
- start = index
- elif char in BRACKETS:
- if not stack:
- return (-1, -1)
- if stack.pop() != BRACKETS[char]:
- return (-1, -1)
- if not stack:
- return (start, index + 1)
- return (-1, -1)
-
-
-def IsStrCanonicalInt(string):
- """Returns True if |string| is in its canonical integer form.
-
- The canonical form is such that str(int(string)) == string.
- """
- if type(string) is str:
- # This function is called a lot so for maximum performance, avoid
- # involving regexps which would otherwise make the code much
- # shorter. Regexps would need twice the time of this function.
- if string:
- if string == "0":
- return True
- if string[0] == "-":
- string = string[1:]
- if not string:
- return False
- if '1' <= string[0] <= '9':
- return string.isdigit()
-
- return False
-
-
-# This matches things like "<(asdf)", "<!(cmd)", "<!@(cmd)", "<|(list)",
-# "<!interpreter(arguments)", "<([list])", and even "<([)" and "<(<())".
-# In the last case, the inner "<()" is captured in match['content'].
-early_variable_re = re.compile(
- r'(?P<replace>(?P<type><(?:(?:!?@?)|\|)?)'
- r'(?P<command_string>[-a-zA-Z0-9_.]+)?'
- r'\((?P<is_array>\s*\[?)'
- r'(?P<content>.*?)(\]?)\))')
-
-# This matches the same as early_variable_re, but with '>' instead of '<'.
-late_variable_re = re.compile(
- r'(?P<replace>(?P<type>>(?:(?:!?@?)|\|)?)'
- r'(?P<command_string>[-a-zA-Z0-9_.]+)?'
- r'\((?P<is_array>\s*\[?)'
- r'(?P<content>.*?)(\]?)\))')
-
-# This matches the same as early_variable_re, but with '^' instead of '<'.
-latelate_variable_re = re.compile(
- r'(?P<replace>(?P<type>[\^](?:(?:!?@?)|\|)?)'
- r'(?P<command_string>[-a-zA-Z0-9_.]+)?'
- r'\((?P<is_array>\s*\[?)'
- r'(?P<content>.*?)(\]?)\))')
-
-# Global cache of results from running commands so they don't have to be run
-# more then once.
-cached_command_results = {}
-
-
-def FixupPlatformCommand(cmd):
- if sys.platform == 'win32':
- if type(cmd) is list:
- cmd = [re.sub('^cat ', 'type ', cmd[0])] + cmd[1:]
- else:
- cmd = re.sub('^cat ', 'type ', cmd)
- return cmd
-
-
-PHASE_EARLY = 0
-PHASE_LATE = 1
-PHASE_LATELATE = 2
-
-
-def ExpandVariables(input, phase, variables, build_file):
- # Look for the pattern that gets expanded into variables
- if phase == PHASE_EARLY:
- variable_re = early_variable_re
- expansion_symbol = '<'
- elif phase == PHASE_LATE:
- variable_re = late_variable_re
- expansion_symbol = '>'
- elif phase == PHASE_LATELATE:
- variable_re = latelate_variable_re
- expansion_symbol = '^'
- else:
- assert False
-
- input_str = str(input)
- if IsStrCanonicalInt(input_str):
- return int(input_str)
-
- # Do a quick scan to determine if an expensive regex search is warranted.
- if expansion_symbol not in input_str:
- return input_str
-
- # Get the entire list of matches as a list of MatchObject instances.
- # (using findall here would return strings instead of MatchObjects).
- matches = list(variable_re.finditer(input_str))
- if not matches:
- return input_str
-
- output = input_str
- # Reverse the list of matches so that replacements are done right-to-left.
- # That ensures that earlier replacements won't mess up the string in a
- # way that causes later calls to find the earlier substituted text instead
- # of what's intended for replacement.
- matches.reverse()
- for match_group in matches:
- match = match_group.groupdict()
- gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Matches: %r", match)
- # match['replace'] is the substring to look for, match['type']
- # is the character code for the replacement type (< > <! >! <| >| <@
- # >@ <!@ >!@), match['is_array'] contains a '[' for command
- # arrays, and match['content'] is the name of the variable (< >)
- # or command to run (<! >!). match['command_string'] is an optional
- # command string. Currently, only 'pymod_do_main' is supported.
-
- # run_command is true if a ! variant is used.
- run_command = '!' in match['type']
- command_string = match['command_string']
-
- # file_list is true if a | variant is used.
- file_list = '|' in match['type']
-
- # Capture these now so we can adjust them later.
- replace_start = match_group.start('replace')
- replace_end = match_group.end('replace')
-
- # Find the ending paren, and re-evaluate the contained string.
- (c_start, c_end) = FindEnclosingBracketGroup(input_str[replace_start:])
-
- # Adjust the replacement range to match the entire command
- # found by FindEnclosingBracketGroup (since the variable_re
- # probably doesn't match the entire command if it contained
- # nested variables).
- replace_end = replace_start + c_end
-
- # Find the "real" replacement, matching the appropriate closing
- # paren, and adjust the replacement start and end.
- replacement = input_str[replace_start:replace_end]
-
- # Figure out what the contents of the variable parens are.
- contents_start = replace_start + c_start + 1
- contents_end = replace_end - 1
- contents = input_str[contents_start:contents_end]
-
- # Do filter substitution now for <|().
- # Admittedly, this is different than the evaluation order in other
- # contexts. However, since filtration has no chance to run on <|(),
- # this seems like the only obvious way to give them access to filters.
- if file_list:
- processed_variables = gyp.simple_copy.deepcopy(variables)
- ProcessListFiltersInDict(contents, processed_variables)
- # Recurse to expand variables in the contents
- contents = ExpandVariables(contents, phase,
- processed_variables, build_file)
- else:
- # Recurse to expand variables in the contents
- contents = ExpandVariables(contents, phase, variables, build_file)
-
- # Strip off leading/trailing whitespace so that variable matches are
- # simpler below (and because they are rarely needed).
- contents = contents.strip()
-
- # expand_to_list is true if an @ variant is used. In that case,
- # the expansion should result in a list. Note that the caller
- # is to be expecting a list in return, and not all callers do
- # because not all are working in list context. Also, for list
- # expansions, there can be no other text besides the variable
- # expansion in the input string.
- expand_to_list = '@' in match['type'] and input_str == replacement
-
- if run_command or file_list:
- # Find the build file's directory, so commands can be run or file lists
- # generated relative to it.
- build_file_dir = os.path.dirname(build_file)
- if build_file_dir == '' and not file_list:
- # If build_file is just a leaf filename indicating a file in the
- # current directory, build_file_dir might be an empty string. Set
- # it to None to signal to subprocess.Popen that it should run the
- # command in the current directory.
- build_file_dir = None
-
- # Support <|(listfile.txt ...) which generates a file
- # containing items from a gyp list, generated at gyp time.
- # This works around actions/rules which have more inputs than will
- # fit on the command line.
- if file_list:
- if type(contents) is list:
- contents_list = contents
- else:
- contents_list = contents.split(' ')
- replacement = contents_list[0]
- if os.path.isabs(replacement):
- raise GypError('| cannot handle absolute paths, got "%s"' % replacement)
-
- if not generator_filelist_paths:
- path = os.path.join(build_file_dir, replacement)
- else:
- if os.path.isabs(build_file_dir):
- toplevel = generator_filelist_paths['toplevel']
- rel_build_file_dir = gyp.common.RelativePath(build_file_dir, toplevel)
- else:
- rel_build_file_dir = build_file_dir
- qualified_out_dir = generator_filelist_paths['qualified_out_dir']
- path = os.path.join(qualified_out_dir, rel_build_file_dir, replacement)
- gyp.common.EnsureDirExists(path)
-
- replacement = gyp.common.RelativePath(path, build_file_dir)
- f = gyp.common.WriteOnDiff(path)
- for i in contents_list[1:]:
- f.write('%s\n' % i)
- f.close()
-
- elif run_command:
- use_shell = True
- if match['is_array']:
- contents = eval(contents)
- use_shell = False
-
- # Check for a cached value to avoid executing commands, or generating
- # file lists more than once. The cache key contains the command to be
- # run as well as the directory to run it from, to account for commands
- # that depend on their current directory.
- # TODO(http://code.google.com/p/gyp/issues/detail?id=111): In theory,
- # someone could author a set of GYP files where each time the command
- # is invoked it produces different output by design. When the need
- # arises, the syntax should be extended to support no caching off a
- # command's output so it is run every time.
- cache_key = (str(contents), build_file_dir)
- cached_value = cached_command_results.get(cache_key, None)
- if cached_value is None:
- gyp.DebugOutput(gyp.DEBUG_VARIABLES,
- "Executing command '%s' in directory '%s'",
- contents, build_file_dir)
-
- replacement = ''
-
- if command_string == 'pymod_do_main':
- # <!pymod_do_main(modulename param eters) loads |modulename| as a
- # python module and then calls that module's DoMain() function,
- # passing ["param", "eters"] as a single list argument. For modules
- # that don't load quickly, this can be faster than
- # <!(python modulename param eters). Do this in |build_file_dir|.
- oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
- if build_file_dir: # build_file_dir may be None (see above).
- os.chdir(build_file_dir)
- try:
-
- parsed_contents = shlex.split(contents)
- try:
- py_module = __import__(parsed_contents[0])
- except ImportError as e:
- raise GypError("Error importing pymod_do_main"
- "module (%s): %s" % (parsed_contents[0], e))
- replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
- finally:
- os.chdir(oldwd)
- assert replacement != None
- elif command_string:
- raise GypError("Unknown command string '%s' in '%s'." %
- (command_string, contents))
- else:
- # Fix up command with platform specific workarounds.
- contents = FixupPlatformCommand(contents)
- try:
- p = subprocess.Popen(contents, shell=use_shell,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- stdin=subprocess.PIPE,
- cwd=build_file_dir)
- except Exception as e:
- raise GypError("%s while executing command '%s' in %s" %
- (e, contents, build_file))
-
- p_stdout, p_stderr = p.communicate('')
- if PY3:
- p_stdout = p_stdout.decode('utf-8')
- p_stderr = p_stderr.decode('utf-8')
-
- if p.wait() != 0 or p_stderr:
- sys.stderr.write(p_stderr)
- # Simulate check_call behavior, since check_call only exists
- # in python 2.5 and later.
- raise GypError("Call to '%s' returned exit status %d while in %s." %
- (contents, p.returncode, build_file))
- replacement = p_stdout.rstrip()
-
- cached_command_results[cache_key] = replacement
- else:
- gyp.DebugOutput(gyp.DEBUG_VARIABLES,
- "Had cache value for command '%s' in directory '%s'",
- contents,build_file_dir)
- replacement = cached_value
-
- else:
- if not contents in variables:
- if contents[-1] in ['!', '/']:
- # In order to allow cross-compiles (nacl) to happen more naturally,
- # we will allow references to >(sources/) etc. to resolve to
- # and empty list if undefined. This allows actions to:
- # 'action!': [
- # '>@(_sources!)',
- # ],
- # 'action/': [
- # '>@(_sources/)',
- # ],
- replacement = []
- else:
- raise GypError('Undefined variable ' + contents +
- ' in ' + build_file)
- else:
- replacement = variables[contents]
-
- if isinstance(replacement, bytes) and not isinstance(replacement, str):
- replacement = replacement.decode("utf-8") # done on Python 3 only
- if type(replacement) is list:
- for item in replacement:
- if isinstance(item, bytes) and not isinstance(item, str):
- item = item.decode("utf-8") # done on Python 3 only
- if not contents[-1] == '/' and type(item) not in (str, int):
- raise GypError('Variable ' + contents +
- ' must expand to a string or list of strings; ' +
- 'list contains a ' +
- item.__class__.__name__)
- # Run through the list and handle variable expansions in it. Since
- # the list is guaranteed not to contain dicts, this won't do anything
- # with conditions sections.
- ProcessVariablesAndConditionsInList(replacement, phase, variables,
- build_file)
- elif type(replacement) not in (str, int):
- raise GypError('Variable ' + contents +
- ' must expand to a string or list of strings; ' +
- 'found a ' + replacement.__class__.__name__)
-
- if expand_to_list:
- # Expanding in list context. It's guaranteed that there's only one
- # replacement to do in |input_str| and that it's this replacement. See
- # above.
- if type(replacement) is list:
- # If it's already a list, make a copy.
- output = replacement[:]
- else:
- # Split it the same way sh would split arguments.
- output = shlex.split(str(replacement))
- else:
- # Expanding in string context.
- encoded_replacement = ''
- if type(replacement) is list:
- # When expanding a list into string context, turn the list items
- # into a string in a way that will work with a subprocess call.
- #
- # TODO(mark): This isn't completely correct. This should
- # call a generator-provided function that observes the
- # proper list-to-argument quoting rules on a specific
- # platform instead of just calling the POSIX encoding
- # routine.
- encoded_replacement = gyp.common.EncodePOSIXShellList(replacement)
- else:
- encoded_replacement = replacement
-
- output = output[:replace_start] + str(encoded_replacement) + \
- output[replace_end:]
- # Prepare for the next match iteration.
- input_str = output
-
- if output == input:
- gyp.DebugOutput(gyp.DEBUG_VARIABLES,
- "Found only identity matches on %r, avoiding infinite "
- "recursion.",
- output)
- else:
- # Look for more matches now that we've replaced some, to deal with
- # expanding local variables (variables defined in the same
- # variables block as this one).
- gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Found output %r, recursing.", output)
- if type(output) is list:
- if output and type(output[0]) is list:
- # Leave output alone if it's a list of lists.
- # We don't want such lists to be stringified.
- pass
- else:
- new_output = []
- for item in output:
- new_output.append(
- ExpandVariables(item, phase, variables, build_file))
- output = new_output
- else:
- output = ExpandVariables(output, phase, variables, build_file)
-
- # Convert all strings that are canonically-represented integers into integers.
- if type(output) is list:
- for index in range(0, len(output)):
- if IsStrCanonicalInt(output[index]):
- output[index] = int(output[index])
- elif IsStrCanonicalInt(output):
- output = int(output)
-
- return output
-
-# The same condition is often evaluated over and over again so it
-# makes sense to cache as much as possible between evaluations.
-cached_conditions_asts = {}
-
-def EvalCondition(condition, conditions_key, phase, variables, build_file):
- """Returns the dict that should be used or None if the result was
- that nothing should be used."""
- if type(condition) is not list:
- raise GypError(conditions_key + ' must be a list')
- if len(condition) < 2:
- # It's possible that condition[0] won't work in which case this
- # attempt will raise its own IndexError. That's probably fine.
- raise GypError(conditions_key + ' ' + condition[0] +
- ' must be at least length 2, not ' + str(len(condition)))
-
- i = 0
- result = None
- while i < len(condition):
- cond_expr = condition[i]
- true_dict = condition[i + 1]
- if type(true_dict) is not dict:
- raise GypError('{} {} must be followed by a dictionary, not {}'.format(
- conditions_key, cond_expr, type(true_dict)))
- if len(condition) > i + 2 and type(condition[i + 2]) is dict:
- false_dict = condition[i + 2]
- i = i + 3
- if i != len(condition):
- raise GypError('{} {} has {} unexpected trailing items'.format(
- conditions_key, cond_expr, len(condition) - i))
- else:
- false_dict = None
- i = i + 2
- if result is None:
- result = EvalSingleCondition(
- cond_expr, true_dict, false_dict, phase, variables, build_file)
-
- return result
-
-
-def EvalSingleCondition(
- cond_expr, true_dict, false_dict, phase, variables, build_file):
- """Returns true_dict if cond_expr evaluates to true, and false_dict
- otherwise."""
- # Do expansions on the condition itself. Since the condition can naturally
- # contain variable references without needing to resort to GYP expansion
- # syntax, this is of dubious value for variables, but someone might want to
- # use a command expansion directly inside a condition.
- cond_expr_expanded = ExpandVariables(cond_expr, phase, variables,
- build_file)
- if type(cond_expr_expanded) not in (str, int):
- raise ValueError(
- 'Variable expansion in this context permits str and int ' + \
- 'only, found ' + cond_expr_expanded.__class__.__name__)
-
- try:
- if cond_expr_expanded in cached_conditions_asts:
- ast_code = cached_conditions_asts[cond_expr_expanded]
- else:
- ast_code = compile(cond_expr_expanded, '<string>', 'eval')
- cached_conditions_asts[cond_expr_expanded] = ast_code
- if eval(ast_code, {'__builtins__': {}}, variables):
- return true_dict
- return false_dict
- except SyntaxError as e:
- syntax_error = SyntaxError('%s while evaluating condition \'%s\' in %s '
- 'at character %d.' %
- (str(e.args[0]), e.text, build_file, e.offset),
- e.filename, e.lineno, e.offset, e.text)
- raise syntax_error
- except NameError as e:
- gyp.common.ExceptionAppend(e, 'while evaluating condition \'%s\' in %s' %
- (cond_expr_expanded, build_file))
- raise GypError(e)
-
-
-def ProcessConditionsInDict(the_dict, phase, variables, build_file):
- # Process a 'conditions' or 'target_conditions' section in the_dict,
- # depending on phase.
- # early -> conditions
- # late -> target_conditions
- # latelate -> no conditions
- #
- # Each item in a conditions list consists of cond_expr, a string expression
- # evaluated as the condition, and true_dict, a dict that will be merged into
- # the_dict if cond_expr evaluates to true. Optionally, a third item,
- # false_dict, may be present. false_dict is merged into the_dict if
- # cond_expr evaluates to false.
- #
- # Any dict merged into the_dict will be recursively processed for nested
- # conditionals and other expansions, also according to phase, immediately
- # prior to being merged.
-
- if phase == PHASE_EARLY:
- conditions_key = 'conditions'
- elif phase == PHASE_LATE:
- conditions_key = 'target_conditions'
- elif phase == PHASE_LATELATE:
- return
- else:
- assert False
-
- if not conditions_key in the_dict:
- return
-
- conditions_list = the_dict[conditions_key]
- # Unhook the conditions list, it's no longer needed.
- del the_dict[conditions_key]
-
- for condition in conditions_list:
- merge_dict = EvalCondition(condition, conditions_key, phase, variables,
- build_file)
-
- if merge_dict != None:
- # Expand variables and nested conditinals in the merge_dict before
- # merging it.
- ProcessVariablesAndConditionsInDict(merge_dict, phase,
- variables, build_file)
-
- MergeDicts(the_dict, merge_dict, build_file, build_file)
-
-
-def LoadAutomaticVariablesFromDict(variables, the_dict):
- # Any keys with plain string values in the_dict become automatic variables.
- # The variable name is the key name with a "_" character prepended.
- for key, value in the_dict.items():
- if type(value) in (str, int, list):
- variables['_' + key] = value
-
-
-def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
- # Any keys in the_dict's "variables" dict, if it has one, becomes a
- # variable. The variable name is the key name in the "variables" dict.
- # Variables that end with the % character are set only if they are unset in
- # the variables dict. the_dict_key is the name of the key that accesses
- # the_dict in the_dict's parent dict. If the_dict's parent is not a dict
- # (it could be a list or it could be parentless because it is a root dict),
- # the_dict_key will be None.
- for key, value in the_dict.get('variables', {}).items():
- if type(value) not in (str, int, list):
- continue
-
- if key.endswith('%'):
- variable_name = key[:-1]
- if variable_name in variables:
- # If the variable is already set, don't set it.
- continue
- if the_dict_key == 'variables' and variable_name in the_dict:
- # If the variable is set without a % in the_dict, and the_dict is a
- # variables dict (making |variables| a variables sub-dict of a
- # variables dict), use the_dict's definition.
- value = the_dict[variable_name]
- else:
- variable_name = key
-
- variables[variable_name] = value
-
-
-def ProcessVariablesAndConditionsInDict(the_dict, phase, variables_in,
- build_file, the_dict_key=None):
- """Handle all variable and command expansion and conditional evaluation.
-
- This function is the public entry point for all variable expansions and
- conditional evaluations. The variables_in dictionary will not be modified
- by this function.
- """
-
- # Make a copy of the variables_in dict that can be modified during the
- # loading of automatics and the loading of the variables dict.
- variables = variables_in.copy()
- LoadAutomaticVariablesFromDict(variables, the_dict)
-
- if 'variables' in the_dict:
- # Make sure all the local variables are added to the variables
- # list before we process them so that you can reference one
- # variable from another. They will be fully expanded by recursion
- # in ExpandVariables.
- for key, value in the_dict['variables'].items():
- variables[key] = value
-
- # Handle the associated variables dict first, so that any variable
- # references within can be resolved prior to using them as variables.
- # Pass a copy of the variables dict to avoid having it be tainted.
- # Otherwise, it would have extra automatics added for everything that
- # should just be an ordinary variable in this scope.
- ProcessVariablesAndConditionsInDict(the_dict['variables'], phase,
- variables, build_file, 'variables')
-
- LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
-
- for key, value in the_dict.items():
- # Skip "variables", which was already processed if present.
- if key != 'variables' and type(value) is str:
- expanded = ExpandVariables(value, phase, variables, build_file)
- if type(expanded) not in (str, int):
- raise ValueError(
- 'Variable expansion in this context permits str and int ' + \
- 'only, found ' + expanded.__class__.__name__ + ' for ' + key)
- the_dict[key] = expanded
-
- # Variable expansion may have resulted in changes to automatics. Reload.
- # TODO(mark): Optimization: only reload if no changes were made.
- variables = variables_in.copy()
- LoadAutomaticVariablesFromDict(variables, the_dict)
- LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
-
- # Process conditions in this dict. This is done after variable expansion
- # so that conditions may take advantage of expanded variables. For example,
- # if the_dict contains:
- # {'type': '<(library_type)',
- # 'conditions': [['_type=="static_library"', { ... }]]},
- # _type, as used in the condition, will only be set to the value of
- # library_type if variable expansion is performed before condition
- # processing. However, condition processing should occur prior to recursion
- # so that variables (both automatic and "variables" dict type) may be
- # adjusted by conditions sections, merged into the_dict, and have the
- # intended impact on contained dicts.
- #
- # This arrangement means that a "conditions" section containing a "variables"
- # section will only have those variables effective in subdicts, not in
- # the_dict. The workaround is to put a "conditions" section within a
- # "variables" section. For example:
- # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]],
- # 'defines': ['<(define)'],
- # 'my_subdict': {'defines': ['<(define)']}},
- # will not result in "IS_MAC" being appended to the "defines" list in the
- # current scope but would result in it being appended to the "defines" list
- # within "my_subdict". By comparison:
- # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]},
- # 'defines': ['<(define)'],
- # 'my_subdict': {'defines': ['<(define)']}},
- # will append "IS_MAC" to both "defines" lists.
-
- # Evaluate conditions sections, allowing variable expansions within them
- # as well as nested conditionals. This will process a 'conditions' or
- # 'target_conditions' section, perform appropriate merging and recursive
- # conditional and variable processing, and then remove the conditions section
- # from the_dict if it is present.
- ProcessConditionsInDict(the_dict, phase, variables, build_file)
-
- # Conditional processing may have resulted in changes to automatics or the
- # variables dict. Reload.
- variables = variables_in.copy()
- LoadAutomaticVariablesFromDict(variables, the_dict)
- LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key)
-
- # Recurse into child dicts, or process child lists which may result in
- # further recursion into descendant dicts.
- for key, value in the_dict.items():
- # Skip "variables" and string values, which were already processed if
- # present.
- if key == 'variables' or type(value) is str:
- continue
- if type(value) is dict:
- # Pass a copy of the variables dict so that subdicts can't influence
- # parents.
- ProcessVariablesAndConditionsInDict(value, phase, variables,
- build_file, key)
- elif type(value) is list:
- # The list itself can't influence the variables dict, and
- # ProcessVariablesAndConditionsInList will make copies of the variables
- # dict if it needs to pass it to something that can influence it. No
- # copy is necessary here.
- ProcessVariablesAndConditionsInList(value, phase, variables,
- build_file)
- elif type(value) is not int:
- raise TypeError('Unknown type ' + value.__class__.__name__ + \
- ' for ' + key)
-
-
-def ProcessVariablesAndConditionsInList(the_list, phase, variables,
- build_file):
- # Iterate using an index so that new values can be assigned into the_list.
- index = 0
- while index < len(the_list):
- item = the_list[index]
- if type(item) is dict:
- # Make a copy of the variables dict so that it won't influence anything
- # outside of its own scope.
- ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
- elif type(item) is list:
- ProcessVariablesAndConditionsInList(item, phase, variables, build_file)
- elif type(item) is str:
- expanded = ExpandVariables(item, phase, variables, build_file)
- if type(expanded) in (str, int):
- the_list[index] = expanded
- elif type(expanded) is list:
- the_list[index:index+1] = expanded
- index += len(expanded)
-
- # index now identifies the next item to examine. Continue right now
- # without falling into the index increment below.
- continue
- else:
- raise ValueError(
- 'Variable expansion in this context permits strings and ' + \
- 'lists only, found ' + expanded.__class__.__name__ + ' at ' + \
- index)
- elif type(item) is not int:
- raise TypeError('Unknown type ' + item.__class__.__name__ + \
- ' at index ' + index)
- index = index + 1
-
-
-def BuildTargetsDict(data):
- """Builds a dict mapping fully-qualified target names to their target dicts.
-
- |data| is a dict mapping loaded build files by pathname relative to the
- current directory. Values in |data| are build file contents. For each
- |data| value with a "targets" key, the value of the "targets" key is taken
- as a list containing target dicts. Each target's fully-qualified name is
- constructed from the pathname of the build file (|data| key) and its
- "target_name" property. These fully-qualified names are used as the keys
- in the returned dict. These keys provide access to the target dicts,
- the dicts in the "targets" lists.
- """
-
- targets = {}
- for build_file in data['target_build_files']:
- for target in data[build_file].get('targets', []):
- target_name = gyp.common.QualifiedTarget(build_file,
- target['target_name'],
- target['toolset'])
- if target_name in targets:
- raise GypError('Duplicate target definitions for ' + target_name)
- targets[target_name] = target
-
- return targets
-
-
-def QualifyDependencies(targets):
- """Make dependency links fully-qualified relative to the current directory.
-
- |targets| is a dict mapping fully-qualified target names to their target
- dicts. For each target in this dict, keys known to contain dependency
- links are examined, and any dependencies referenced will be rewritten
- so that they are fully-qualified and relative to the current directory.
- All rewritten dependencies are suitable for use as keys to |targets| or a
- similar dict.
- """
-
- all_dependency_sections = [dep + op
- for dep in dependency_sections
- for op in ('', '!', '/')]
-
- for target, target_dict in targets.items():
- target_build_file = gyp.common.BuildFile(target)
- toolset = target_dict['toolset']
- for dependency_key in all_dependency_sections:
- dependencies = target_dict.get(dependency_key, [])
- for index in range(0, len(dependencies)):
- dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget(
- target_build_file, dependencies[index], toolset)
- if not multiple_toolsets:
- # Ignore toolset specification in the dependency if it is specified.
- dep_toolset = toolset
- dependency = gyp.common.QualifiedTarget(dep_file,
- dep_target,
- dep_toolset)
- dependencies[index] = dependency
-
- # Make sure anything appearing in a list other than "dependencies" also
- # appears in the "dependencies" list.
- if dependency_key != 'dependencies' and \
- dependency not in target_dict['dependencies']:
- raise GypError('Found ' + dependency + ' in ' + dependency_key +
- ' of ' + target + ', but not in dependencies')
-
-
-def ExpandWildcardDependencies(targets, data):
- """Expands dependencies specified as build_file:*.
-
- For each target in |targets|, examines sections containing links to other
- targets. If any such section contains a link of the form build_file:*, it
- is taken as a wildcard link, and is expanded to list each target in
- build_file. The |data| dict provides access to build file dicts.
-
- Any target that does not wish to be included by wildcard can provide an
- optional "suppress_wildcard" key in its target dict. When present and
- true, a wildcard dependency link will not include such targets.
-
- All dependency names, including the keys to |targets| and the values in each
- dependency list, must be qualified when this function is called.
- """
-
- for target, target_dict in targets.items():
- toolset = target_dict['toolset']
- target_build_file = gyp.common.BuildFile(target)
- for dependency_key in dependency_sections:
- dependencies = target_dict.get(dependency_key, [])
-
- # Loop this way instead of "for dependency in" or "for index in range"
- # because the dependencies list will be modified within the loop body.
- index = 0
- while index < len(dependencies):
- (dependency_build_file, dependency_target, dependency_toolset) = \
- gyp.common.ParseQualifiedTarget(dependencies[index])
- if dependency_target != '*' and dependency_toolset != '*':
- # Not a wildcard. Keep it moving.
- index = index + 1
- continue
-
- if dependency_build_file == target_build_file:
- # It's an error for a target to depend on all other targets in
- # the same file, because a target cannot depend on itself.
- raise GypError('Found wildcard in ' + dependency_key + ' of ' +
- target + ' referring to same build file')
-
- # Take the wildcard out and adjust the index so that the next
- # dependency in the list will be processed the next time through the
- # loop.
- del dependencies[index]
- index = index - 1
-
- # Loop through the targets in the other build file, adding them to
- # this target's list of dependencies in place of the removed
- # wildcard.
- dependency_target_dicts = data[dependency_build_file]['targets']
- for dependency_target_dict in dependency_target_dicts:
- if int(dependency_target_dict.get('suppress_wildcard', False)):
- continue
- dependency_target_name = dependency_target_dict['target_name']
- if (dependency_target != '*' and
- dependency_target != dependency_target_name):
- continue
- dependency_target_toolset = dependency_target_dict['toolset']
- if (dependency_toolset != '*' and
- dependency_toolset != dependency_target_toolset):
- continue
- dependency = gyp.common.QualifiedTarget(dependency_build_file,
- dependency_target_name,
- dependency_target_toolset)
- index = index + 1
- dependencies.insert(index, dependency)
-
- index = index + 1
-
-
-def Unify(l):
- """Removes duplicate elements from l, keeping the first element."""
- seen = {}
- return [seen.setdefault(e, e) for e in l if e not in seen]
-
-
-def RemoveDuplicateDependencies(targets):
- """Makes sure every dependency appears only once in all targets's dependency
- lists."""
- for target_name, target_dict in targets.items():
- for dependency_key in dependency_sections:
- dependencies = target_dict.get(dependency_key, [])
- if dependencies:
- target_dict[dependency_key] = Unify(dependencies)
-
-
-def Filter(l, item):
- """Removes item from l."""
- res = {}
- return [res.setdefault(e, e) for e in l if e != item]
-
-
-def RemoveSelfDependencies(targets):
- """Remove self dependencies from targets that have the prune_self_dependency
- variable set."""
- for target_name, target_dict in targets.items():
- for dependency_key in dependency_sections:
- dependencies = target_dict.get(dependency_key, [])
- if dependencies:
- for t in dependencies:
- if t == target_name:
- if targets[t].get('variables', {}).get('prune_self_dependency', 0):
- target_dict[dependency_key] = Filter(dependencies, target_name)
-
-
-def RemoveLinkDependenciesFromNoneTargets(targets):
- """Remove dependencies having the 'link_dependency' attribute from the 'none'
- targets."""
- for target_name, target_dict in targets.items():
- for dependency_key in dependency_sections:
- dependencies = target_dict.get(dependency_key, [])
- if dependencies:
- for t in dependencies:
- if target_dict.get('type', None) == 'none':
- if targets[t].get('variables', {}).get('link_dependency', 0):
- target_dict[dependency_key] = \
- Filter(target_dict[dependency_key], t)
-
-
-class DependencyGraphNode(object):
- """
-
- Attributes:
- ref: A reference to an object that this DependencyGraphNode represents.
- dependencies: List of DependencyGraphNodes on which this one depends.
- dependents: List of DependencyGraphNodes that depend on this one.
- """
-
- class CircularException(GypError):
- pass
-
- def __init__(self, ref):
- self.ref = ref
- self.dependencies = []
- self.dependents = []
-
- def __repr__(self):
- return '<DependencyGraphNode: %r>' % self.ref
-
- def FlattenToList(self):
- # flat_list is the sorted list of dependencies - actually, the list items
- # are the "ref" attributes of DependencyGraphNodes. Every target will
- # appear in flat_list after all of its dependencies, and before all of its
- # dependents.
- flat_list = OrderedSet()
-
- # in_degree_zeros is the list of DependencyGraphNodes that have no
- # dependencies not in flat_list. Initially, it is a copy of the children
- # of this node, because when the graph was built, nodes with no
- # dependencies were made implicit dependents of the root node.
- in_degree_zeros = set(self.dependents[:])
-
- while in_degree_zeros:
- # Nodes in in_degree_zeros have no dependencies not in flat_list, so they
- # can be appended to flat_list. Take these nodes out of in_degree_zeros
- # as work progresses, so that the next node to process from the list can
- # always be accessed at a consistent position.
- node = in_degree_zeros.pop()
- flat_list.add(node.ref)
-
- # Look at dependents of the node just added to flat_list. Some of them
- # may now belong in in_degree_zeros.
- for node_dependent in node.dependents:
- is_in_degree_zero = True
- # TODO: We want to check through the
- # node_dependent.dependencies list but if it's long and we
- # always start at the beginning, then we get O(n^2) behaviour.
- for node_dependent_dependency in node_dependent.dependencies:
- if not node_dependent_dependency.ref in flat_list:
- # The dependent one or more dependencies not in flat_list. There
- # will be more chances to add it to flat_list when examining
- # it again as a dependent of those other dependencies, provided
- # that there are no cycles.
- is_in_degree_zero = False
- break
-
- if is_in_degree_zero:
- # All of the dependent's dependencies are already in flat_list. Add
- # it to in_degree_zeros where it will be processed in a future
- # iteration of the outer loop.
- in_degree_zeros.add(node_dependent)
-
- return list(flat_list)
-
- def FindCycles(self):
- """
- Returns a list of cycles in the graph, where each cycle is its own list.
- """
- results = []
- visited = set()
-
- def Visit(node, path):
- for child in node.dependents:
- if child in path:
- results.append([child] + path[:path.index(child) + 1])
- elif not child in visited:
- visited.add(child)
- Visit(child, [child] + path)
-
- visited.add(self)
- Visit(self, [self])
-
- return results
-
- def DirectDependencies(self, dependencies=None):
- """Returns a list of just direct dependencies."""
- if dependencies is None:
- dependencies = []
-
- for dependency in self.dependencies:
- # Check for None, corresponding to the root node.
- if dependency.ref != None and dependency.ref not in dependencies:
- dependencies.append(dependency.ref)
-
- return dependencies
-
- def _AddImportedDependencies(self, targets, dependencies=None):
- """Given a list of direct dependencies, adds indirect dependencies that
- other dependencies have declared to export their settings.
-
- This method does not operate on self. Rather, it operates on the list
- of dependencies in the |dependencies| argument. For each dependency in
- that list, if any declares that it exports the settings of one of its
- own dependencies, those dependencies whose settings are "passed through"
- are added to the list. As new items are added to the list, they too will
- be processed, so it is possible to import settings through multiple levels
- of dependencies.
-
- This method is not terribly useful on its own, it depends on being
- "primed" with a list of direct dependencies such as one provided by
- DirectDependencies. DirectAndImportedDependencies is intended to be the
- public entry point.
- """
-
- if dependencies is None:
- dependencies = []
-
- index = 0
- while index < len(dependencies):
- dependency = dependencies[index]
- dependency_dict = targets[dependency]
- # Add any dependencies whose settings should be imported to the list
- # if not already present. Newly-added items will be checked for
- # their own imports when the list iteration reaches them.
- # Rather than simply appending new items, insert them after the
- # dependency that exported them. This is done to more closely match
- # the depth-first method used by DeepDependencies.
- add_index = 1
- for imported_dependency in \
- dependency_dict.get('export_dependent_settings', []):
- if imported_dependency not in dependencies:
- dependencies.insert(index + add_index, imported_dependency)
- add_index = add_index + 1
- index = index + 1
-
- return dependencies
-
- def DirectAndImportedDependencies(self, targets, dependencies=None):
- """Returns a list of a target's direct dependencies and all indirect
- dependencies that a dependency has advertised settings should be exported
- through the dependency for.
- """
-
- dependencies = self.DirectDependencies(dependencies)
- return self._AddImportedDependencies(targets, dependencies)
-
- def DeepDependencies(self, dependencies=None):
- """Returns an OrderedSet of all of a target's dependencies, recursively."""
- if dependencies is None:
- # Using a list to get ordered output and a set to do fast "is it
- # already added" checks.
- dependencies = OrderedSet()
-
- for dependency in self.dependencies:
- # Check for None, corresponding to the root node.
- if dependency.ref is None:
- continue
- if dependency.ref not in dependencies:
- dependency.DeepDependencies(dependencies)
- dependencies.add(dependency.ref)
-
- return dependencies
-
- def _LinkDependenciesInternal(self, targets, include_shared_libraries,
- dependencies=None, initial=True):
- """Returns an OrderedSet of dependency targets that are linked
- into this target.
-
- This function has a split personality, depending on the setting of
- |initial|. Outside callers should always leave |initial| at its default
- setting.
-
- When adding a target to the list of dependencies, this function will
- recurse into itself with |initial| set to False, to collect dependencies
- that are linked into the linkable target for which the list is being built.
-
- If |include_shared_libraries| is False, the resulting dependencies will not
- include shared_library targets that are linked into this target.
- """
- if dependencies is None:
- # Using a list to get ordered output and a set to do fast "is it
- # already added" checks.
- dependencies = OrderedSet()
-
- # Check for None, corresponding to the root node.
- if self.ref is None:
- return dependencies
-
- # It's kind of sucky that |targets| has to be passed into this function,
- # but that's presently the easiest way to access the target dicts so that
- # this function can find target types.
-
- if 'target_name' not in targets[self.ref]:
- raise GypError("Missing 'target_name' field in target.")
-
- if 'type' not in targets[self.ref]:
- raise GypError("Missing 'type' field in target %s" %
- targets[self.ref]['target_name'])
-
- target_type = targets[self.ref]['type']
-
- is_linkable = target_type in linkable_types
-
- if initial and not is_linkable:
- # If this is the first target being examined and it's not linkable,
- # return an empty list of link dependencies, because the link
- # dependencies are intended to apply to the target itself (initial is
- # True) and this target won't be linked.
- return dependencies
-
- # Don't traverse 'none' targets if explicitly excluded.
- if (target_type == 'none' and
- not targets[self.ref].get('dependencies_traverse', True)):
- dependencies.add(self.ref)
- return dependencies
-
- # Executables, mac kernel extensions and loadable modules are already fully
- # and finally linked. Nothing else can be a link dependency of them, there
- # can only be dependencies in the sense that a dependent target might run
- # an executable or load the loadable_module.
- if not initial and target_type in ('executable', 'loadable_module',
- 'mac_kernel_extension'):
- return dependencies
-
- # Shared libraries are already fully linked. They should only be included
- # in |dependencies| when adjusting static library dependencies (in order to
- # link against the shared_library's import lib), but should not be included
- # in |dependencies| when propagating link_settings.
- # The |include_shared_libraries| flag controls which of these two cases we
- # are handling.
- if (not initial and target_type == 'shared_library' and
- not include_shared_libraries):
- return dependencies
-
- # The target is linkable, add it to the list of link dependencies.
- if self.ref not in dependencies:
- dependencies.add(self.ref)
- if initial or not is_linkable:
- # If this is a subsequent target and it's linkable, don't look any
- # further for linkable dependencies, as they'll already be linked into
- # this target linkable. Always look at dependencies of the initial
- # target, and always look at dependencies of non-linkables.
- for dependency in self.dependencies:
- dependency._LinkDependenciesInternal(targets,
- include_shared_libraries,
- dependencies, False)
-
- return dependencies
-
- def DependenciesForLinkSettings(self, targets):
- """
- Returns a list of dependency targets whose link_settings should be merged
- into this target.
- """
-
- # TODO(sbaig) Currently, chrome depends on the bug that shared libraries'
- # link_settings are propagated. So for now, we will allow it, unless the
- # 'allow_sharedlib_linksettings_propagation' flag is explicitly set to
- # False. Once chrome is fixed, we can remove this flag.
- include_shared_libraries = \
- targets[self.ref].get('allow_sharedlib_linksettings_propagation', True)
- return self._LinkDependenciesInternal(targets, include_shared_libraries)
-
- def DependenciesToLinkAgainst(self, targets):
- """
- Returns a list of dependency targets that are linked into this target.
- """
- return self._LinkDependenciesInternal(targets, True)
-
-
-def BuildDependencyList(targets):
- # Create a DependencyGraphNode for each target. Put it into a dict for easy
- # access.
- dependency_nodes = {}
- for target, spec in targets.items():
- if target not in dependency_nodes:
- dependency_nodes[target] = DependencyGraphNode(target)
-
- # Set up the dependency links. Targets that have no dependencies are treated
- # as dependent on root_node.
- root_node = DependencyGraphNode(None)
- for target, spec in targets.items():
- target_node = dependency_nodes[target]
- target_build_file = gyp.common.BuildFile(target)
- dependencies = spec.get('dependencies')
- if not dependencies:
- target_node.dependencies = [root_node]
- root_node.dependents.append(target_node)
- else:
- for dependency in dependencies:
- dependency_node = dependency_nodes.get(dependency)
- if not dependency_node:
- raise GypError("Dependency '%s' not found while "
- "trying to load target %s" % (dependency, target))
- target_node.dependencies.append(dependency_node)
- dependency_node.dependents.append(target_node)
-
- flat_list = root_node.FlattenToList()
-
- # If there's anything left unvisited, there must be a circular dependency
- # (cycle).
- if len(flat_list) != len(targets):
- if not root_node.dependents:
- # If all targets have dependencies, add the first target as a dependent
- # of root_node so that the cycle can be discovered from root_node.
- target = targets.keys()[0]
- target_node = dependency_nodes[target]
- target_node.dependencies.append(root_node)
- root_node.dependents.append(target_node)
-
- cycles = []
- for cycle in root_node.FindCycles():
- paths = [node.ref for node in cycle]
- cycles.append('Cycle: %s' % ' -> '.join(paths))
- raise DependencyGraphNode.CircularException(
- 'Cycles in dependency graph detected:\n' + '\n'.join(cycles))
-
- return [dependency_nodes, flat_list]
-
-
-def VerifyNoGYPFileCircularDependencies(targets):
- # Create a DependencyGraphNode for each gyp file containing a target. Put
- # it into a dict for easy access.
- dependency_nodes = {}
- for target in targets:
- build_file = gyp.common.BuildFile(target)
- if not build_file in dependency_nodes:
- dependency_nodes[build_file] = DependencyGraphNode(build_file)
-
- # Set up the dependency links.
- for target, spec in targets.items():
- build_file = gyp.common.BuildFile(target)
- build_file_node = dependency_nodes[build_file]
- target_dependencies = spec.get('dependencies', [])
- for dependency in target_dependencies:
- try:
- dependency_build_file = gyp.common.BuildFile(dependency)
- except GypError as e:
- gyp.common.ExceptionAppend(
- e, 'while computing dependencies of .gyp file %s' % build_file)
- raise
-
- if dependency_build_file == build_file:
- # A .gyp file is allowed to refer back to itself.
- continue
- dependency_node = dependency_nodes.get(dependency_build_file)
- if not dependency_node:
- raise GypError("Dependency '%s' not found" % dependency_build_file)
- if dependency_node not in build_file_node.dependencies:
- build_file_node.dependencies.append(dependency_node)
- dependency_node.dependents.append(build_file_node)
-
-
- # Files that have no dependencies are treated as dependent on root_node.
- root_node = DependencyGraphNode(None)
- for build_file_node in dependency_nodes.values():
- if len(build_file_node.dependencies) == 0:
- build_file_node.dependencies.append(root_node)
- root_node.dependents.append(build_file_node)
-
- flat_list = root_node.FlattenToList()
-
- # If there's anything left unvisited, there must be a circular dependency
- # (cycle).
- if len(flat_list) != len(dependency_nodes):
- if not root_node.dependents:
- # If all files have dependencies, add the first file as a dependent
- # of root_node so that the cycle can be discovered from root_node.
- file_node = dependency_nodes.values()[0]
- file_node.dependencies.append(root_node)
- root_node.dependents.append(file_node)
- cycles = []
- for cycle in root_node.FindCycles():
- paths = [node.ref for node in cycle]
- cycles.append('Cycle: %s' % ' -> '.join(paths))
- raise DependencyGraphNode.CircularException(
- 'Cycles in .gyp file dependency graph detected:\n' + '\n'.join(cycles))
-
-
-def DoDependentSettings(key, flat_list, targets, dependency_nodes):
- # key should be one of all_dependent_settings, direct_dependent_settings,
- # or link_settings.
-
- for target in flat_list:
- target_dict = targets[target]
- build_file = gyp.common.BuildFile(target)
-
- if key == 'all_dependent_settings':
- dependencies = dependency_nodes[target].DeepDependencies()
- elif key == 'direct_dependent_settings':
- dependencies = \
- dependency_nodes[target].DirectAndImportedDependencies(targets)
- elif key == 'link_settings':
- dependencies = \
- dependency_nodes[target].DependenciesForLinkSettings(targets)
- else:
- raise GypError("DoDependentSettings doesn't know how to determine "
- 'dependencies for ' + key)
-
- for dependency in dependencies:
- dependency_dict = targets[dependency]
- if not key in dependency_dict:
- continue
- dependency_build_file = gyp.common.BuildFile(dependency)
- MergeDicts(target_dict, dependency_dict[key],
- build_file, dependency_build_file)
-
-
-def AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes,
- sort_dependencies):
- # Recompute target "dependencies" properties. For each static library
- # target, remove "dependencies" entries referring to other static libraries,
- # unless the dependency has the "hard_dependency" attribute set. For each
- # linkable target, add a "dependencies" entry referring to all of the
- # target's computed list of link dependencies (including static libraries
- # if no such entry is already present.
- for target in flat_list:
- target_dict = targets[target]
- target_type = target_dict['type']
-
- if target_type == 'static_library':
- if not 'dependencies' in target_dict:
- continue
-
- target_dict['dependencies_original'] = target_dict.get(
- 'dependencies', [])[:]
-
- # A static library should not depend on another static library unless
- # the dependency relationship is "hard," which should only be done when
- # a dependent relies on some side effect other than just the build
- # product, like a rule or action output. Further, if a target has a
- # non-hard dependency, but that dependency exports a hard dependency,
- # the non-hard dependency can safely be removed, but the exported hard
- # dependency must be added to the target to keep the same dependency
- # ordering.
- dependencies = \
- dependency_nodes[target].DirectAndImportedDependencies(targets)
- index = 0
- while index < len(dependencies):
- dependency = dependencies[index]
- dependency_dict = targets[dependency]
-
- # Remove every non-hard static library dependency and remove every
- # non-static library dependency that isn't a direct dependency.
- if (dependency_dict['type'] == 'static_library' and \
- not dependency_dict.get('hard_dependency', False)) or \
- (dependency_dict['type'] != 'static_library' and \
- not dependency in target_dict['dependencies']):
- # Take the dependency out of the list, and don't increment index
- # because the next dependency to analyze will shift into the index
- # formerly occupied by the one being removed.
- del dependencies[index]
- else:
- index = index + 1
-
- # Update the dependencies. If the dependencies list is empty, it's not
- # needed, so unhook it.
- if len(dependencies) > 0:
- target_dict['dependencies'] = dependencies
- else:
- del target_dict['dependencies']
-
- elif target_type in linkable_types:
- # Get a list of dependency targets that should be linked into this
- # target. Add them to the dependencies list if they're not already
- # present.
-
- link_dependencies = \
- dependency_nodes[target].DependenciesToLinkAgainst(targets)
- for dependency in link_dependencies:
- if dependency == target:
- continue
- if not 'dependencies' in target_dict:
- target_dict['dependencies'] = []
- if not dependency in target_dict['dependencies']:
- target_dict['dependencies'].append(dependency)
- # Sort the dependencies list in the order from dependents to dependencies.
- # e.g. If A and B depend on C and C depends on D, sort them in A, B, C, D.
- # Note: flat_list is already sorted in the order from dependencies to
- # dependents.
- if sort_dependencies and 'dependencies' in target_dict:
- target_dict['dependencies'] = [dep for dep in reversed(flat_list)
- if dep in target_dict['dependencies']]
-
-
-# Initialize this here to speed up MakePathRelative.
-exception_re = re.compile(r'''["']?[-/$<>^]''')
-
-
-def MakePathRelative(to_file, fro_file, item):
- # If item is a relative path, it's relative to the build file dict that it's
- # coming from. Fix it up to make it relative to the build file dict that
- # it's going into.
- # Exception: any |item| that begins with these special characters is
- # returned without modification.
- # / Used when a path is already absolute (shortcut optimization;
- # such paths would be returned as absolute anyway)
- # $ Used for build environment variables
- # - Used for some build environment flags (such as -lapr-1 in a
- # "libraries" section)
- # < Used for our own variable and command expansions (see ExpandVariables)
- # > Used for our own variable and command expansions (see ExpandVariables)
- # ^ Used for our own variable and command expansions (see ExpandVariables)
- #
- # "/' Used when a value is quoted. If these are present, then we
- # check the second character instead.
- #
- if to_file == fro_file or exception_re.match(item):
- return item
- else:
- # TODO(dglazkov) The backslash/forward-slash replacement at the end is a
- # temporary measure. This should really be addressed by keeping all paths
- # in POSIX until actual project generation.
- ret = os.path.normpath(os.path.join(
- gyp.common.RelativePath(os.path.dirname(fro_file),
- os.path.dirname(to_file)),
- item)).replace('\\', '/')
- if item[-1:] == '/':
- ret += '/'
- return ret
-
-def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True):
- # Python documentation recommends objects which do not support hash
- # set this value to None. Python library objects follow this rule.
- is_hashable = lambda val: val.__hash__
-
- # If x is hashable, returns whether x is in s. Else returns whether x is in l.
- def is_in_set_or_list(x, s, l):
- if is_hashable(x):
- return x in s
- return x in l
-
- prepend_index = 0
-
- # Make membership testing of hashables in |to| (in particular, strings)
- # faster.
- hashable_to_set = set(x for x in to if is_hashable(x))
- for item in fro:
- singleton = False
- if type(item) in (str, int):
- # The cheap and easy case.
- if is_paths:
- to_item = MakePathRelative(to_file, fro_file, item)
- else:
- to_item = item
-
- if not (type(item) is str and item.startswith('-')):
- # Any string that doesn't begin with a "-" is a singleton - it can
- # only appear once in a list, to be enforced by the list merge append
- # or prepend.
- singleton = True
- elif type(item) is dict:
- # Make a copy of the dictionary, continuing to look for paths to fix.
- # The other intelligent aspects of merge processing won't apply because
- # item is being merged into an empty dict.
- to_item = {}
- MergeDicts(to_item, item, to_file, fro_file)
- elif type(item) is list:
- # Recurse, making a copy of the list. If the list contains any
- # descendant dicts, path fixing will occur. Note that here, custom
- # values for is_paths and append are dropped; those are only to be
- # applied to |to| and |fro|, not sublists of |fro|. append shouldn't
- # matter anyway because the new |to_item| list is empty.
- to_item = []
- MergeLists(to_item, item, to_file, fro_file)
- else:
- raise TypeError(
- 'Attempt to merge list item of unsupported type ' + \
- item.__class__.__name__)
-
- if append:
- # If appending a singleton that's already in the list, don't append.
- # This ensures that the earliest occurrence of the item will stay put.
- if not singleton or not is_in_set_or_list(to_item, hashable_to_set, to):
- to.append(to_item)
- if is_hashable(to_item):
- hashable_to_set.add(to_item)
- else:
- # If prepending a singleton that's already in the list, remove the
- # existing instance and proceed with the prepend. This ensures that the
- # item appears at the earliest possible position in the list.
- while singleton and to_item in to:
- to.remove(to_item)
-
- # Don't just insert everything at index 0. That would prepend the new
- # items to the list in reverse order, which would be an unwelcome
- # surprise.
- to.insert(prepend_index, to_item)
- if is_hashable(to_item):
- hashable_to_set.add(to_item)
- prepend_index = prepend_index + 1
-
-
-def MergeDicts(to, fro, to_file, fro_file):
- # I wanted to name the parameter "from" but it's a Python keyword...
- for k, v in fro.items():
- # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give
- # copy semantics. Something else may want to merge from the |fro| dict
- # later, and having the same dict ref pointed to twice in the tree isn't
- # what anyone wants considering that the dicts may subsequently be
- # modified.
- if k in to:
- bad_merge = False
- if type(v) in (str, int):
- if type(to[k]) not in (str, int):
- bad_merge = True
- elif type(v) is not type(to[k]):
- bad_merge = True
-
- if bad_merge:
- raise TypeError(
- 'Attempt to merge dict value of type ' + v.__class__.__name__ + \
- ' into incompatible type ' + to[k].__class__.__name__ + \
- ' for key ' + k)
- if type(v) in (str, int):
- # Overwrite the existing value, if any. Cheap and easy.
- is_path = IsPathSection(k)
- if is_path:
- to[k] = MakePathRelative(to_file, fro_file, v)
- else:
- to[k] = v
- elif type(v) is dict:
- # Recurse, guaranteeing copies will be made of objects that require it.
- if not k in to:
- to[k] = {}
- MergeDicts(to[k], v, to_file, fro_file)
- elif type(v) is list:
- # Lists in dicts can be merged with different policies, depending on
- # how the key in the "from" dict (k, the from-key) is written.
- #
- # If the from-key has ...the to-list will have this action
- # this character appended:... applied when receiving the from-list:
- # = replace
- # + prepend
- # ? set, only if to-list does not yet exist
- # (none) append
- #
- # This logic is list-specific, but since it relies on the associated
- # dict key, it's checked in this dict-oriented function.
- ext = k[-1]
- append = True
- if ext == '=':
- list_base = k[:-1]
- lists_incompatible = [list_base, list_base + '?']
- to[list_base] = []
- elif ext == '+':
- list_base = k[:-1]
- lists_incompatible = [list_base + '=', list_base + '?']
- append = False
- elif ext == '?':
- list_base = k[:-1]
- lists_incompatible = [list_base, list_base + '=', list_base + '+']
- else:
- list_base = k
- lists_incompatible = [list_base + '=', list_base + '?']
-
- # Some combinations of merge policies appearing together are meaningless.
- # It's stupid to replace and append simultaneously, for example. Append
- # and prepend are the only policies that can coexist.
- for list_incompatible in lists_incompatible:
- if list_incompatible in fro:
- raise GypError('Incompatible list policies ' + k + ' and ' +
- list_incompatible)
-
- if list_base in to:
- if ext == '?':
- # If the key ends in "?", the list will only be merged if it doesn't
- # already exist.
- continue
- elif type(to[list_base]) is not list:
- # This may not have been checked above if merging in a list with an
- # extension character.
- raise TypeError(
- 'Attempt to merge dict value of type ' + v.__class__.__name__ + \
- ' into incompatible type ' + to[list_base].__class__.__name__ + \
- ' for key ' + list_base + '(' + k + ')')
- else:
- to[list_base] = []
-
- # Call MergeLists, which will make copies of objects that require it.
- # MergeLists can recurse back into MergeDicts, although this will be
- # to make copies of dicts (with paths fixed), there will be no
- # subsequent dict "merging" once entering a list because lists are
- # always replaced, appended to, or prepended to.
- is_paths = IsPathSection(list_base)
- MergeLists(to[list_base], v, to_file, fro_file, is_paths, append)
- else:
- raise TypeError(
- 'Attempt to merge dict value of unsupported type ' + \
- v.__class__.__name__ + ' for key ' + k)
-
-
-def MergeConfigWithInheritance(new_configuration_dict, build_file,
- target_dict, configuration, visited):
- # Skip if previously visted.
- if configuration in visited:
- return
-
- # Look at this configuration.
- configuration_dict = target_dict['configurations'][configuration]
-
- # Merge in parents.
- for parent in configuration_dict.get('inherit_from', []):
- MergeConfigWithInheritance(new_configuration_dict, build_file,
- target_dict, parent, visited + [configuration])
-
- # Merge it into the new config.
- MergeDicts(new_configuration_dict, configuration_dict,
- build_file, build_file)
-
- # Drop abstract.
- if 'abstract' in new_configuration_dict:
- del new_configuration_dict['abstract']
-
-
-def SetUpConfigurations(target, target_dict):
- # key_suffixes is a list of key suffixes that might appear on key names.
- # These suffixes are handled in conditional evaluations (for =, +, and ?)
- # and rules/exclude processing (for ! and /). Keys with these suffixes
- # should be treated the same as keys without.
- key_suffixes = ['=', '+', '?', '!', '/']
-
- build_file = gyp.common.BuildFile(target)
-
- # Provide a single configuration by default if none exists.
- # TODO(mark): Signal an error if default_configurations exists but
- # configurations does not.
- if not 'configurations' in target_dict:
- target_dict['configurations'] = {'Default': {}}
- if not 'default_configuration' in target_dict:
- concrete = [i for (i, config) in target_dict['configurations'].items()
- if not config.get('abstract')]
- target_dict['default_configuration'] = sorted(concrete)[0]
-
- merged_configurations = {}
- configs = target_dict['configurations']
- for (configuration, old_configuration_dict) in configs.items():
- # Skip abstract configurations (saves work only).
- if old_configuration_dict.get('abstract'):
- continue
- # Configurations inherit (most) settings from the enclosing target scope.
- # Get the inheritance relationship right by making a copy of the target
- # dict.
- new_configuration_dict = {}
- for (key, target_val) in target_dict.items():
- key_ext = key[-1:]
- if key_ext in key_suffixes:
- key_base = key[:-1]
- else:
- key_base = key
- if not key_base in non_configuration_keys:
- new_configuration_dict[key] = gyp.simple_copy.deepcopy(target_val)
-
- # Merge in configuration (with all its parents first).
- MergeConfigWithInheritance(new_configuration_dict, build_file,
- target_dict, configuration, [])
-
- merged_configurations[configuration] = new_configuration_dict
-
- # Put the new configurations back into the target dict as a configuration.
- for configuration in merged_configurations.keys():
- target_dict['configurations'][configuration] = (
- merged_configurations[configuration])
-
- # Now drop all the abstract ones.
- for configuration in list(target_dict['configurations']):
- old_configuration_dict = target_dict['configurations'][configuration]
- if old_configuration_dict.get('abstract'):
- del target_dict['configurations'][configuration]
-
- # Now that all of the target's configurations have been built, go through
- # the target dict's keys and remove everything that's been moved into a
- # "configurations" section.
- delete_keys = []
- for key in target_dict:
- key_ext = key[-1:]
- if key_ext in key_suffixes:
- key_base = key[:-1]
- else:
- key_base = key
- if not key_base in non_configuration_keys:
- delete_keys.append(key)
- for key in delete_keys:
- del target_dict[key]
-
- # Check the configurations to see if they contain invalid keys.
- for configuration in target_dict['configurations'].keys():
- configuration_dict = target_dict['configurations'][configuration]
- for key in configuration_dict.keys():
- if key in invalid_configuration_keys:
- raise GypError('%s not allowed in the %s configuration, found in '
- 'target %s' % (key, configuration, target))
-
-
-
-def ProcessListFiltersInDict(name, the_dict):
- """Process regular expression and exclusion-based filters on lists.
-
- An exclusion list is in a dict key named with a trailing "!", like
- "sources!". Every item in such a list is removed from the associated
- main list, which in this example, would be "sources". Removed items are
- placed into a "sources_excluded" list in the dict.
-
- Regular expression (regex) filters are contained in dict keys named with a
- trailing "/", such as "sources/" to operate on the "sources" list. Regex
- filters in a dict take the form:
- 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'],
- ['include', '_mac\\.cc$'] ],
- The first filter says to exclude all files ending in _linux.cc, _mac.cc, and
- _win.cc. The second filter then includes all files ending in _mac.cc that
- are now or were once in the "sources" list. Items matching an "exclude"
- filter are subject to the same processing as would occur if they were listed
- by name in an exclusion list (ending in "!"). Items matching an "include"
- filter are brought back into the main list if previously excluded by an
- exclusion list or exclusion regex filter. Subsequent matching "exclude"
- patterns can still cause items to be excluded after matching an "include".
- """
-
- # Look through the dictionary for any lists whose keys end in "!" or "/".
- # These are lists that will be treated as exclude lists and regular
- # expression-based exclude/include lists. Collect the lists that are
- # needed first, looking for the lists that they operate on, and assemble
- # then into |lists|. This is done in a separate loop up front, because
- # the _included and _excluded keys need to be added to the_dict, and that
- # can't be done while iterating through it.
-
- lists = []
- del_lists = []
- for key, value in the_dict.items():
- operation = key[-1]
- if operation != '!' and operation != '/':
- continue
-
- if type(value) is not list:
- raise ValueError(name + ' key ' + key + ' must be list, not ' + \
- value.__class__.__name__)
-
- list_key = key[:-1]
- if list_key not in the_dict:
- # This happens when there's a list like "sources!" but no corresponding
- # "sources" list. Since there's nothing for it to operate on, queue up
- # the "sources!" list for deletion now.
- del_lists.append(key)
- continue
-
- if type(the_dict[list_key]) is not list:
- value = the_dict[list_key]
- raise ValueError(name + ' key ' + list_key + \
- ' must be list, not ' + \
- value.__class__.__name__ + ' when applying ' + \
- {'!': 'exclusion', '/': 'regex'}[operation])
-
- if not list_key in lists:
- lists.append(list_key)
-
- # Delete the lists that are known to be unneeded at this point.
- for del_list in del_lists:
- del the_dict[del_list]
-
- for list_key in lists:
- the_list = the_dict[list_key]
-
- # Initialize the list_actions list, which is parallel to the_list. Each
- # item in list_actions identifies whether the corresponding item in
- # the_list should be excluded, unconditionally preserved (included), or
- # whether no exclusion or inclusion has been applied. Items for which
- # no exclusion or inclusion has been applied (yet) have value -1, items
- # excluded have value 0, and items included have value 1. Includes and
- # excludes override previous actions. All items in list_actions are
- # initialized to -1 because no excludes or includes have been processed
- # yet.
- list_actions = list((-1,) * len(the_list))
-
- exclude_key = list_key + '!'
- if exclude_key in the_dict:
- for exclude_item in the_dict[exclude_key]:
- for index in range(0, len(the_list)):
- if exclude_item == the_list[index]:
- # This item matches the exclude_item, so set its action to 0
- # (exclude).
- list_actions[index] = 0
-
- # The "whatever!" list is no longer needed, dump it.
- del the_dict[exclude_key]
-
- regex_key = list_key + '/'
- if regex_key in the_dict:
- for regex_item in the_dict[regex_key]:
- [action, pattern] = regex_item
- pattern_re = re.compile(pattern)
-
- if action == 'exclude':
- # This item matches an exclude regex, so set its value to 0 (exclude).
- action_value = 0
- elif action == 'include':
- # This item matches an include regex, so set its value to 1 (include).
- action_value = 1
- else:
- # This is an action that doesn't make any sense.
- raise ValueError('Unrecognized action ' + action + ' in ' + name + \
- ' key ' + regex_key)
-
- for index in range(0, len(the_list)):
- list_item = the_list[index]
- if list_actions[index] == action_value:
- # Even if the regex matches, nothing will change so continue (regex
- # searches are expensive).
- continue
- if pattern_re.search(list_item):
- # Regular expression match.
- list_actions[index] = action_value
-
- # The "whatever/" list is no longer needed, dump it.
- del the_dict[regex_key]
-
- # Add excluded items to the excluded list.
- #
- # Note that exclude_key ("sources!") is different from excluded_key
- # ("sources_excluded"). The exclude_key list is input and it was already
- # processed and deleted; the excluded_key list is output and it's about
- # to be created.
- excluded_key = list_key + '_excluded'
- if excluded_key in the_dict:
- raise GypError(name + ' key ' + excluded_key +
- ' must not be present prior '
- ' to applying exclusion/regex filters for ' + list_key)
-
- excluded_list = []
-
- # Go backwards through the list_actions list so that as items are deleted,
- # the indices of items that haven't been seen yet don't shift. That means
- # that things need to be prepended to excluded_list to maintain them in the
- # same order that they existed in the_list.
- for index in range(len(list_actions) - 1, -1, -1):
- if list_actions[index] == 0:
- # Dump anything with action 0 (exclude). Keep anything with action 1
- # (include) or -1 (no include or exclude seen for the item).
- excluded_list.insert(0, the_list[index])
- del the_list[index]
-
- # If anything was excluded, put the excluded list into the_dict at
- # excluded_key.
- if len(excluded_list) > 0:
- the_dict[excluded_key] = excluded_list
-
- # Now recurse into subdicts and lists that may contain dicts.
- for key, value in the_dict.items():
- if type(value) is dict:
- ProcessListFiltersInDict(key, value)
- elif type(value) is list:
- ProcessListFiltersInList(key, value)
-
-
-def ProcessListFiltersInList(name, the_list):
- for item in the_list:
- if type(item) is dict:
- ProcessListFiltersInDict(name, item)
- elif type(item) is list:
- ProcessListFiltersInList(name, item)
-
-
-def ValidateTargetType(target, target_dict):
- """Ensures the 'type' field on the target is one of the known types.
-
- Arguments:
- target: string, name of target.
- target_dict: dict, target spec.
-
- Raises an exception on error.
- """
- VALID_TARGET_TYPES = ('executable', 'loadable_module',
- 'static_library', 'shared_library',
- 'mac_kernel_extension', 'none')
- target_type = target_dict.get('type', None)
- if target_type not in VALID_TARGET_TYPES:
- raise GypError("Target %s has an invalid target type '%s'. "
- "Must be one of %s." %
- (target, target_type, '/'.join(VALID_TARGET_TYPES)))
- if (target_dict.get('standalone_static_library', 0) and
- not target_type == 'static_library'):
- raise GypError('Target %s has type %s but standalone_static_library flag is'
- ' only valid for static_library type.' % (target,
- target_type))
-
-
-def ValidateSourcesInTarget(target, target_dict, build_file,
- duplicate_basename_check):
- if not duplicate_basename_check:
- return
- if target_dict.get('type', None) != 'static_library':
- return
- sources = target_dict.get('sources', [])
- basenames = {}
- for source in sources:
- name, ext = os.path.splitext(source)
- is_compiled_file = ext in [
- '.c', '.cc', '.cpp', '.cxx', '.m', '.mm', '.s', '.S']
- if not is_compiled_file:
- continue
- basename = os.path.basename(name) # Don't include extension.
- basenames.setdefault(basename, []).append(source)
-
- error = ''
- for basename, files in basenames.items():
- if len(files) > 1:
- error += ' %s: %s\n' % (basename, ' '.join(files))
-
- if error:
- print('static library %s has several files with the same basename:\n' % target
- + error + 'libtool on Mac cannot handle that. Use '
- '--no-duplicate-basename-check to disable this validation.')
- raise GypError('Duplicate basenames in sources section, see list above')
-
-
-def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules):
- """Ensures that the rules sections in target_dict are valid and consistent,
- and determines which sources they apply to.
-
- Arguments:
- target: string, name of target.
- target_dict: dict, target spec containing "rules" and "sources" lists.
- extra_sources_for_rules: a list of keys to scan for rule matches in
- addition to 'sources'.
- """
-
- # Dicts to map between values found in rules' 'rule_name' and 'extension'
- # keys and the rule dicts themselves.
- rule_names = {}
- rule_extensions = {}
-
- rules = target_dict.get('rules', [])
- for rule in rules:
- # Make sure that there's no conflict among rule names and extensions.
- rule_name = rule['rule_name']
- if rule_name in rule_names:
- raise GypError('rule %s exists in duplicate, target %s' %
- (rule_name, target))
- rule_names[rule_name] = rule
-
- rule_extension = rule['extension']
- if rule_extension.startswith('.'):
- rule_extension = rule_extension[1:]
- if rule_extension in rule_extensions:
- raise GypError(('extension %s associated with multiple rules, ' +
- 'target %s rules %s and %s') %
- (rule_extension, target,
- rule_extensions[rule_extension]['rule_name'],
- rule_name))
- rule_extensions[rule_extension] = rule
-
- # Make sure rule_sources isn't already there. It's going to be
- # created below if needed.
- if 'rule_sources' in rule:
- raise GypError(
- 'rule_sources must not exist in input, target %s rule %s' %
- (target, rule_name))
-
- rule_sources = []
- source_keys = ['sources']
- source_keys.extend(extra_sources_for_rules)
- for source_key in source_keys:
- for source in target_dict.get(source_key, []):
- (source_root, source_extension) = os.path.splitext(source)
- if source_extension.startswith('.'):
- source_extension = source_extension[1:]
- if source_extension == rule_extension:
- rule_sources.append(source)
-
- if len(rule_sources) > 0:
- rule['rule_sources'] = rule_sources
-
-
-def ValidateRunAsInTarget(target, target_dict, build_file):
- target_name = target_dict.get('target_name')
- run_as = target_dict.get('run_as')
- if not run_as:
- return
- if type(run_as) is not dict:
- raise GypError("The 'run_as' in target %s from file %s should be a "
- "dictionary." %
- (target_name, build_file))
- action = run_as.get('action')
- if not action:
- raise GypError("The 'run_as' in target %s from file %s must have an "
- "'action' section." %
- (target_name, build_file))
- if type(action) is not list:
- raise GypError("The 'action' for 'run_as' in target %s from file %s "
- "must be a list." %
- (target_name, build_file))
- working_directory = run_as.get('working_directory')
- if working_directory and type(working_directory) is not str:
- raise GypError("The 'working_directory' for 'run_as' in target %s "
- "in file %s should be a string." %
- (target_name, build_file))
- environment = run_as.get('environment')
- if environment and type(environment) is not dict:
- raise GypError("The 'environment' for 'run_as' in target %s "
- "in file %s should be a dictionary." %
- (target_name, build_file))
-
-
-def ValidateActionsInTarget(target, target_dict, build_file):
- '''Validates the inputs to the actions in a target.'''
- target_name = target_dict.get('target_name')
- actions = target_dict.get('actions', [])
- for action in actions:
- action_name = action.get('action_name')
- if not action_name:
- raise GypError("Anonymous action in target %s. "
- "An action must have an 'action_name' field." %
- target_name)
- inputs = action.get('inputs', None)
- if inputs is None:
- raise GypError('Action in target %s has no inputs.' % target_name)
- action_command = action.get('action')
- if action_command and not action_command[0]:
- raise GypError("Empty action as command in target %s." % target_name)
-
-
-def TurnIntIntoStrInDict(the_dict):
- """Given dict the_dict, recursively converts all integers into strings.
- """
- # Use items instead of items because there's no need to try to look at
- # reinserted keys and their associated values.
- for k, v in the_dict.items():
- if type(v) is int:
- v = str(v)
- the_dict[k] = v
- elif type(v) is dict:
- TurnIntIntoStrInDict(v)
- elif type(v) is list:
- TurnIntIntoStrInList(v)
-
- if type(k) is int:
- del the_dict[k]
- the_dict[str(k)] = v
-
-
-def TurnIntIntoStrInList(the_list):
- """Given list the_list, recursively converts all integers into strings.
- """
- for index in range(0, len(the_list)):
- item = the_list[index]
- if type(item) is int:
- the_list[index] = str(item)
- elif type(item) is dict:
- TurnIntIntoStrInDict(item)
- elif type(item) is list:
- TurnIntIntoStrInList(item)
-
-
-def PruneUnwantedTargets(targets, flat_list, dependency_nodes, root_targets,
- data):
- """Return only the targets that are deep dependencies of |root_targets|."""
- qualified_root_targets = []
- for target in root_targets:
- target = target.strip()
- qualified_targets = gyp.common.FindQualifiedTargets(target, flat_list)
- if not qualified_targets:
- raise GypError("Could not find target %s" % target)
- qualified_root_targets.extend(qualified_targets)
-
- wanted_targets = {}
- for target in qualified_root_targets:
- wanted_targets[target] = targets[target]
- for dependency in dependency_nodes[target].DeepDependencies():
- wanted_targets[dependency] = targets[dependency]
-
- wanted_flat_list = [t for t in flat_list if t in wanted_targets]
-
- # Prune unwanted targets from each build_file's data dict.
- for build_file in data['target_build_files']:
- if not 'targets' in data[build_file]:
- continue
- new_targets = []
- for target in data[build_file]['targets']:
- qualified_name = gyp.common.QualifiedTarget(build_file,
- target['target_name'],
- target['toolset'])
- if qualified_name in wanted_targets:
- new_targets.append(target)
- data[build_file]['targets'] = new_targets
-
- return wanted_targets, wanted_flat_list
-
-
-def VerifyNoCollidingTargets(targets):
- """Verify that no two targets in the same directory share the same name.
-
- Arguments:
- targets: A list of targets in the form 'path/to/file.gyp:target_name'.
- """
- # Keep a dict going from 'subdirectory:target_name' to 'foo.gyp'.
- used = {}
- for target in targets:
- # Separate out 'path/to/file.gyp, 'target_name' from
- # 'path/to/file.gyp:target_name'.
- path, name = target.rsplit(':', 1)
- # Separate out 'path/to', 'file.gyp' from 'path/to/file.gyp'.
- subdir, gyp = os.path.split(path)
- # Use '.' for the current directory '', so that the error messages make
- # more sense.
- if not subdir:
- subdir = '.'
- # Prepare a key like 'path/to:target_name'.
- key = subdir + ':' + name
- if key in used:
- # Complain if this target is already used.
- raise GypError('Duplicate target name "%s" in directory "%s" used both '
- 'in "%s" and "%s".' % (name, subdir, gyp, used[key]))
- used[key] = gyp
-
-
-def SetGeneratorGlobals(generator_input_info):
- # Set up path_sections and non_configuration_keys with the default data plus
- # the generator-specific data.
- global path_sections
- path_sections = set(base_path_sections)
- path_sections.update(generator_input_info['path_sections'])
-
- global non_configuration_keys
- non_configuration_keys = base_non_configuration_keys[:]
- non_configuration_keys.extend(generator_input_info['non_configuration_keys'])
-
- global multiple_toolsets
- multiple_toolsets = generator_input_info[
- 'generator_supports_multiple_toolsets']
-
- global generator_filelist_paths
- generator_filelist_paths = generator_input_info['generator_filelist_paths']
-
-
-def Load(build_files, variables, includes, depth, generator_input_info, check,
- circular_check, duplicate_basename_check, parallel, root_targets):
- SetGeneratorGlobals(generator_input_info)
- # A generator can have other lists (in addition to sources) be processed
- # for rules.
- extra_sources_for_rules = generator_input_info['extra_sources_for_rules']
-
- # Load build files. This loads every target-containing build file into
- # the |data| dictionary such that the keys to |data| are build file names,
- # and the values are the entire build file contents after "early" or "pre"
- # processing has been done and includes have been resolved.
- # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as
- # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps
- # track of the keys corresponding to "target" files.
- data = {'target_build_files': set()}
- # Normalize paths everywhere. This is important because paths will be
- # used as keys to the data dict and for references between input files.
- build_files = set(map(os.path.normpath, build_files))
- if parallel:
- LoadTargetBuildFilesParallel(build_files, data, variables, includes, depth,
- check, generator_input_info)
- else:
- aux_data = {}
- for build_file in build_files:
- try:
- LoadTargetBuildFile(build_file, data, aux_data,
- variables, includes, depth, check, True)
- except Exception as e:
- gyp.common.ExceptionAppend(e, 'while trying to load %s' % build_file)
- raise
-
- # Build a dict to access each target's subdict by qualified name.
- targets = BuildTargetsDict(data)
-
- # Fully qualify all dependency links.
- QualifyDependencies(targets)
-
- # Remove self-dependencies from targets that have 'prune_self_dependencies'
- # set to 1.
- RemoveSelfDependencies(targets)
-
- # Expand dependencies specified as build_file:*.
- ExpandWildcardDependencies(targets, data)
-
- # Remove all dependencies marked as 'link_dependency' from the targets of
- # type 'none'.
- RemoveLinkDependenciesFromNoneTargets(targets)
-
- # Apply exclude (!) and regex (/) list filters only for dependency_sections.
- for target_name, target_dict in targets.items():
- tmp_dict = {}
- for key_base in dependency_sections:
- for op in ('', '!', '/'):
- key = key_base + op
- if key in target_dict:
- tmp_dict[key] = target_dict[key]
- del target_dict[key]
- ProcessListFiltersInDict(target_name, tmp_dict)
- # Write the results back to |target_dict|.
- for key in tmp_dict:
- target_dict[key] = tmp_dict[key]
-
- # Make sure every dependency appears at most once.
- RemoveDuplicateDependencies(targets)
-
- if circular_check:
- # Make sure that any targets in a.gyp don't contain dependencies in other
- # .gyp files that further depend on a.gyp.
- VerifyNoGYPFileCircularDependencies(targets)
-
- [dependency_nodes, flat_list] = BuildDependencyList(targets)
-
- if root_targets:
- # Remove, from |targets| and |flat_list|, the targets that are not deep
- # dependencies of the targets specified in |root_targets|.
- targets, flat_list = PruneUnwantedTargets(
- targets, flat_list, dependency_nodes, root_targets, data)
-
- # Check that no two targets in the same directory have the same name.
- VerifyNoCollidingTargets(flat_list)
-
- # Handle dependent settings of various types.
- for settings_type in ['all_dependent_settings',
- 'direct_dependent_settings',
- 'link_settings']:
- DoDependentSettings(settings_type, flat_list, targets, dependency_nodes)
-
- # Take out the dependent settings now that they've been published to all
- # of the targets that require them.
- for target in flat_list:
- if settings_type in targets[target]:
- del targets[target][settings_type]
-
- # Make sure static libraries don't declare dependencies on other static
- # libraries, but that linkables depend on all unlinked static libraries
- # that they need so that their link steps will be correct.
- gii = generator_input_info
- if gii['generator_wants_static_library_dependencies_adjusted']:
- AdjustStaticLibraryDependencies(flat_list, targets, dependency_nodes,
- gii['generator_wants_sorted_dependencies'])
-
- # Apply "post"/"late"/"target" variable expansions and condition evaluations.
- for target in flat_list:
- target_dict = targets[target]
- build_file = gyp.common.BuildFile(target)
- ProcessVariablesAndConditionsInDict(
- target_dict, PHASE_LATE, variables, build_file)
-
- # Move everything that can go into a "configurations" section into one.
- for target in flat_list:
- target_dict = targets[target]
- SetUpConfigurations(target, target_dict)
-
- # Apply exclude (!) and regex (/) list filters.
- for target in flat_list:
- target_dict = targets[target]
- ProcessListFiltersInDict(target, target_dict)
-
- # Apply "latelate" variable expansions and condition evaluations.
- for target in flat_list:
- target_dict = targets[target]
- build_file = gyp.common.BuildFile(target)
- ProcessVariablesAndConditionsInDict(
- target_dict, PHASE_LATELATE, variables, build_file)
-
- # Make sure that the rules make sense, and build up rule_sources lists as
- # needed. Not all generators will need to use the rule_sources lists, but
- # some may, and it seems best to build the list in a common spot.
- # Also validate actions and run_as elements in targets.
- for target in flat_list:
- target_dict = targets[target]
- build_file = gyp.common.BuildFile(target)
- ValidateTargetType(target, target_dict)
- ValidateSourcesInTarget(target, target_dict, build_file,
- duplicate_basename_check)
- ValidateRulesInTarget(target, target_dict, extra_sources_for_rules)
- ValidateRunAsInTarget(target, target_dict, build_file)
- ValidateActionsInTarget(target, target_dict, build_file)
-
- # Generators might not expect ints. Turn them into strs.
- TurnIntIntoStrInDict(data)
-
- # TODO(mark): Return |data| for now because the generator needs a list of
- # build files that came in. In the future, maybe it should just accept
- # a list, and not the whole data dict.
- return [flat_list, targets, data]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
deleted file mode 100755
index 1bc5e3d30..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for the input.py file."""
-
-import gyp.input
-import unittest
-import sys
-
-
-class TestFindCycles(unittest.TestCase):
- def setUp(self):
- self.nodes = {}
- for x in ('a', 'b', 'c', 'd', 'e'):
- self.nodes[x] = gyp.input.DependencyGraphNode(x)
-
- def _create_dependency(self, dependent, dependency):
- dependent.dependencies.append(dependency)
- dependency.dependents.append(dependent)
-
- def test_no_cycle_empty_graph(self):
- for label, node in self.nodes.items():
- self.assertEqual([], node.FindCycles())
-
- def test_no_cycle_line(self):
- self._create_dependency(self.nodes['a'], self.nodes['b'])
- self._create_dependency(self.nodes['b'], self.nodes['c'])
- self._create_dependency(self.nodes['c'], self.nodes['d'])
-
- for label, node in self.nodes.items():
- self.assertEqual([], node.FindCycles())
-
- def test_no_cycle_dag(self):
- self._create_dependency(self.nodes['a'], self.nodes['b'])
- self._create_dependency(self.nodes['a'], self.nodes['c'])
- self._create_dependency(self.nodes['b'], self.nodes['c'])
-
- for label, node in self.nodes.items():
- self.assertEqual([], node.FindCycles())
-
- def test_cycle_self_reference(self):
- self._create_dependency(self.nodes['a'], self.nodes['a'])
-
- self.assertEqual([[self.nodes['a'], self.nodes['a']]],
- self.nodes['a'].FindCycles())
-
- def test_cycle_two_nodes(self):
- self._create_dependency(self.nodes['a'], self.nodes['b'])
- self._create_dependency(self.nodes['b'], self.nodes['a'])
-
- self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['a']]],
- self.nodes['a'].FindCycles())
- self.assertEqual([[self.nodes['b'], self.nodes['a'], self.nodes['b']]],
- self.nodes['b'].FindCycles())
-
- def test_two_cycles(self):
- self._create_dependency(self.nodes['a'], self.nodes['b'])
- self._create_dependency(self.nodes['b'], self.nodes['a'])
-
- self._create_dependency(self.nodes['b'], self.nodes['c'])
- self._create_dependency(self.nodes['c'], self.nodes['b'])
-
- cycles = self.nodes['a'].FindCycles()
- self.assertTrue(
- [self.nodes['a'], self.nodes['b'], self.nodes['a']] in cycles)
- self.assertTrue(
- [self.nodes['b'], self.nodes['c'], self.nodes['b']] in cycles)
- self.assertEqual(2, len(cycles))
-
- def test_big_cycle(self):
- self._create_dependency(self.nodes['a'], self.nodes['b'])
- self._create_dependency(self.nodes['b'], self.nodes['c'])
- self._create_dependency(self.nodes['c'], self.nodes['d'])
- self._create_dependency(self.nodes['d'], self.nodes['e'])
- self._create_dependency(self.nodes['e'], self.nodes['a'])
-
- self.assertEqual([[self.nodes['a'],
- self.nodes['b'],
- self.nodes['c'],
- self.nodes['d'],
- self.nodes['e'],
- self.nodes['a']]],
- self.nodes['a'].FindCycles())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
deleted file mode 100755
index 222befb98..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
+++ /dev/null
@@ -1,614 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Utility functions to perform Xcode-style build steps.
-
-These functions are executed via gyp-mac-tool when using the Makefile generator.
-"""
-
-from __future__ import print_function
-
-import fcntl
-import fnmatch
-import glob
-import json
-import os
-import plistlib
-import re
-import shutil
-import string
-import subprocess
-import sys
-import tempfile
-
-PY3 = bytes != str
-
-
-def main(args):
- executor = MacTool()
- exit_code = executor.Dispatch(args)
- if exit_code is not None:
- sys.exit(exit_code)
-
-
-class MacTool(object):
- """This class performs all the Mac tooling steps. The methods can either be
- executed directly, or dispatched from an argument list."""
-
- def Dispatch(self, args):
- """Dispatches a string command to a method."""
- if len(args) < 1:
- raise Exception("Not enough arguments")
-
- method = "Exec%s" % self._CommandifyName(args[0])
- return getattr(self, method)(*args[1:])
-
- def _CommandifyName(self, name_string):
- """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
- return name_string.title().replace('-', '')
-
- def ExecCopyBundleResource(self, source, dest, convert_to_binary):
- """Copies a resource file to the bundle/Resources directory, performing any
- necessary compilation on each resource."""
- extension = os.path.splitext(source)[1].lower()
- if os.path.isdir(source):
- # Copy tree.
- # TODO(thakis): This copies file attributes like mtime, while the
- # single-file branch below doesn't. This should probably be changed to
- # be consistent with the single-file branch.
- if os.path.exists(dest):
- shutil.rmtree(dest)
- shutil.copytree(source, dest)
- elif extension == '.xib':
- return self._CopyXIBFile(source, dest)
- elif extension == '.storyboard':
- return self._CopyXIBFile(source, dest)
- elif extension == '.strings':
- self._CopyStringsFile(source, dest, convert_to_binary)
- else:
- shutil.copy(source, dest)
-
- def _CopyXIBFile(self, source, dest):
- """Compiles a XIB file with ibtool into a binary plist in the bundle."""
-
- # ibtool sometimes crashes with relative paths. See crbug.com/314728.
- base = os.path.dirname(os.path.realpath(__file__))
- if os.path.relpath(source):
- source = os.path.join(base, source)
- if os.path.relpath(dest):
- dest = os.path.join(base, dest)
-
- args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
- '--output-format', 'human-readable-text', '--compile', dest, source]
- ibtool_section_re = re.compile(r'/\*.*\*/')
- ibtool_re = re.compile(r'.*note:.*is clipping its content')
- ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
- current_section_header = None
- for line in ibtoolout.stdout:
- if ibtool_section_re.match(line):
- current_section_header = line
- elif not ibtool_re.match(line):
- if current_section_header:
- sys.stdout.write(current_section_header)
- current_section_header = None
- sys.stdout.write(line)
- return ibtoolout.returncode
-
- def _ConvertToBinary(self, dest):
- subprocess.check_call([
- 'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
-
- def _CopyStringsFile(self, source, dest, convert_to_binary):
- """Copies a .strings file using iconv to reconvert the input into UTF-16."""
- input_code = self._DetectInputEncoding(source) or "UTF-8"
-
- # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
- # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
- # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
- # semicolon in dictionary.
- # on invalid files. Do the same kind of validation.
- import CoreFoundation
- s = open(source, 'rb').read()
- d = CoreFoundation.CFDataCreate(None, s, len(s))
- _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
- if error:
- return
-
- fp = open(dest, 'wb')
- fp.write(s.decode(input_code).encode('UTF-16'))
- fp.close()
-
- if convert_to_binary == 'True':
- self._ConvertToBinary(dest)
-
- def _DetectInputEncoding(self, file_name):
- """Reads the first few bytes from file_name and tries to guess the text
- encoding. Returns None as a guess if it can't detect it."""
- fp = open(file_name, 'rb')
- try:
- header = fp.read(3)
- except Exception:
- fp.close()
- return None
- fp.close()
- if header.startswith("\xFE\xFF"):
- return "UTF-16"
- elif header.startswith("\xFF\xFE"):
- return "UTF-16"
- elif header.startswith("\xEF\xBB\xBF"):
- return "UTF-8"
- else:
- return None
-
- def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
- """Copies the |source| Info.plist to the destination directory |dest|."""
- # Read the source Info.plist into memory.
- fd = open(source, 'r')
- lines = fd.read()
- fd.close()
-
- # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild).
- plist = plistlib.readPlistFromString(lines)
- if keys:
- plist = dict(plist.items() + json.loads(keys[0]).items())
- lines = plistlib.writePlistToString(plist)
-
- # Go through all the environment variables and replace them as variables in
- # the file.
- IDENT_RE = re.compile(r'[/\s]')
- for key in os.environ:
- if key.startswith('_'):
- continue
- evar = '${%s}' % key
- evalue = os.environ[key]
- lines = string.replace(lines, evar, evalue)
-
- # Xcode supports various suffices on environment variables, which are
- # all undocumented. :rfc1034identifier is used in the standard project
- # template these days, and :identifier was used earlier. They are used to
- # convert non-url characters into things that look like valid urls --
- # except that the replacement character for :identifier, '_' isn't valid
- # in a URL either -- oops, hence :rfc1034identifier was born.
- evar = '${%s:identifier}' % key
- evalue = IDENT_RE.sub('_', os.environ[key])
- lines = string.replace(lines, evar, evalue)
-
- evar = '${%s:rfc1034identifier}' % key
- evalue = IDENT_RE.sub('-', os.environ[key])
- lines = string.replace(lines, evar, evalue)
-
- # Remove any keys with values that haven't been replaced.
- lines = lines.split('\n')
- for i in range(len(lines)):
- if lines[i].strip().startswith("<string>${"):
- lines[i] = None
- lines[i - 1] = None
- lines = '\n'.join(filter(lambda x: x is not None, lines))
-
- # Write out the file with variables replaced.
- fd = open(dest, 'w')
- fd.write(lines)
- fd.close()
-
- # Now write out PkgInfo file now that the Info.plist file has been
- # "compiled".
- self._WritePkgInfo(dest)
-
- if convert_to_binary == 'True':
- self._ConvertToBinary(dest)
-
- def _WritePkgInfo(self, info_plist):
- """This writes the PkgInfo file from the data stored in Info.plist."""
- plist = plistlib.readPlist(info_plist)
- if not plist:
- return
-
- # Only create PkgInfo for executable types.
- package_type = plist['CFBundlePackageType']
- if package_type != 'APPL':
- return
-
- # The format of PkgInfo is eight characters, representing the bundle type
- # and bundle signature, each four characters. If that is missing, four
- # '?' characters are used instead.
- signature_code = plist.get('CFBundleSignature', '????')
- if len(signature_code) != 4: # Wrong length resets everything, too.
- signature_code = '?' * 4
-
- dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
- fp = open(dest, 'w')
- fp.write('%s%s' % (package_type, signature_code))
- fp.close()
-
- def ExecFlock(self, lockfile, *cmd_list):
- """Emulates the most basic behavior of Linux's flock(1)."""
- # Rely on exception handling to report errors.
- fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
- fcntl.flock(fd, fcntl.LOCK_EX)
- return subprocess.call(cmd_list)
-
- def ExecFilterLibtool(self, *cmd_list):
- """Calls libtool and filters out '/path/to/libtool: file: foo.o has no
- symbols'."""
- libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
- libtool_re5 = re.compile(
- r'^.*libtool: warning for library: ' +
- r'.* the table of contents is empty ' +
- r'\(no object file members in the library define global symbols\)$')
- env = os.environ.copy()
- # Ref:
- # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
- # The problem with this flag is that it resets the file mtime on the file to
- # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
- env['ZERO_AR_DATE'] = '1'
- libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
- _, err = libtoolout.communicate()
- if PY3:
- err = err.decode('utf-8')
- for line in err.splitlines():
- if not libtool_re.match(line) and not libtool_re5.match(line):
- print(line, file=sys.stderr)
- # Unconditionally touch the output .a file on the command line if present
- # and the command succeeded. A bit hacky.
- if not libtoolout.returncode:
- for i in range(len(cmd_list) - 1):
- if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
- os.utime(cmd_list[i+1], None)
- break
- return libtoolout.returncode
-
- def ExecPackageFramework(self, framework, version):
- """Takes a path to Something.framework and the Current version of that and
- sets up all the symlinks."""
- # Find the name of the binary based on the part before the ".framework".
- binary = os.path.basename(framework).split('.')[0]
-
- CURRENT = 'Current'
- RESOURCES = 'Resources'
- VERSIONS = 'Versions'
-
- if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
- # Binary-less frameworks don't seem to contain symlinks (see e.g.
- # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
- return
-
- # Move into the framework directory to set the symlinks correctly.
- pwd = os.getcwd()
- os.chdir(framework)
-
- # Set up the Current version.
- self._Relink(version, os.path.join(VERSIONS, CURRENT))
-
- # Set up the root symlinks.
- self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
- self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
-
- # Back to where we were before!
- os.chdir(pwd)
-
- def _Relink(self, dest, link):
- """Creates a symlink to |dest| named |link|. If |link| already exists,
- it is overwritten."""
- if os.path.lexists(link):
- os.remove(link)
- os.symlink(dest, link)
-
- def ExecCompileXcassets(self, keys, *inputs):
- """Compiles multiple .xcassets files into a single .car file.
-
- This invokes 'actool' to compile all the inputs .xcassets files. The
- |keys| arguments is a json-encoded dictionary of extra arguments to
- pass to 'actool' when the asset catalogs contains an application icon
- or a launch image.
-
- Note that 'actool' does not create the Assets.car file if the asset
- catalogs does not contains imageset.
- """
- command_line = [
- 'xcrun', 'actool', '--output-format', 'human-readable-text',
- '--compress-pngs', '--notices', '--warnings', '--errors',
- ]
- is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
- if is_iphone_target:
- platform = os.environ['CONFIGURATION'].split('-')[-1]
- if platform not in ('iphoneos', 'iphonesimulator'):
- platform = 'iphonesimulator'
- command_line.extend([
- '--platform', platform, '--target-device', 'iphone',
- '--target-device', 'ipad', '--minimum-deployment-target',
- os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
- os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
- ])
- else:
- command_line.extend([
- '--platform', 'macosx', '--target-device', 'mac',
- '--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
- '--compile',
- os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
- ])
- if keys:
- keys = json.loads(keys)
- for key, value in keys.items():
- arg_name = '--' + key
- if isinstance(value, bool):
- if value:
- command_line.append(arg_name)
- elif isinstance(value, list):
- for v in value:
- command_line.append(arg_name)
- command_line.append(str(v))
- else:
- command_line.append(arg_name)
- command_line.append(str(value))
- # Note: actool crashes if inputs path are relative, so use os.path.abspath
- # to get absolute path name for inputs.
- command_line.extend(map(os.path.abspath, inputs))
- subprocess.check_call(command_line)
-
- def ExecMergeInfoPlist(self, output, *inputs):
- """Merge multiple .plist files into a single .plist file."""
- merged_plist = {}
- for path in inputs:
- plist = self._LoadPlistMaybeBinary(path)
- self._MergePlist(merged_plist, plist)
- plistlib.writePlist(merged_plist, output)
-
- def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
- """Code sign a bundle.
-
- This function tries to code sign an iOS bundle, following the same
- algorithm as Xcode:
- 1. copy ResourceRules.plist from the user or the SDK into the bundle,
- 2. pick the provisioning profile that best match the bundle identifier,
- and copy it into the bundle as embedded.mobileprovision,
- 3. copy Entitlements.plist from user or SDK next to the bundle,
- 4. code sign the bundle.
- """
- resource_rules_path = self._InstallResourceRules(resource_rules)
- substitutions, overrides = self._InstallProvisioningProfile(
- provisioning, self._GetCFBundleIdentifier())
- entitlements_path = self._InstallEntitlements(
- entitlements, substitutions, overrides)
- subprocess.check_call([
- 'codesign', '--force', '--sign', key, '--resource-rules',
- resource_rules_path, '--entitlements', entitlements_path,
- os.path.join(
- os.environ['TARGET_BUILD_DIR'],
- os.environ['FULL_PRODUCT_NAME'])])
-
- def _InstallResourceRules(self, resource_rules):
- """Installs ResourceRules.plist from user or SDK into the bundle.
-
- Args:
- resource_rules: string, optional, path to the ResourceRules.plist file
- to use, default to "${SDKROOT}/ResourceRules.plist"
-
- Returns:
- Path to the copy of ResourceRules.plist into the bundle.
- """
- source_path = resource_rules
- target_path = os.path.join(
- os.environ['BUILT_PRODUCTS_DIR'],
- os.environ['CONTENTS_FOLDER_PATH'],
- 'ResourceRules.plist')
- if not source_path:
- source_path = os.path.join(
- os.environ['SDKROOT'], 'ResourceRules.plist')
- shutil.copy2(source_path, target_path)
- return target_path
-
- def _InstallProvisioningProfile(self, profile, bundle_identifier):
- """Installs embedded.mobileprovision into the bundle.
-
- Args:
- profile: string, optional, short name of the .mobileprovision file
- to use, if empty or the file is missing, the best file installed
- will be used
- bundle_identifier: string, value of CFBundleIdentifier from Info.plist
-
- Returns:
- A tuple containing two dictionary: variables substitutions and values
- to overrides when generating the entitlements file.
- """
- source_path, provisioning_data, team_id = self._FindProvisioningProfile(
- profile, bundle_identifier)
- target_path = os.path.join(
- os.environ['BUILT_PRODUCTS_DIR'],
- os.environ['CONTENTS_FOLDER_PATH'],
- 'embedded.mobileprovision')
- shutil.copy2(source_path, target_path)
- substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.')
- return substitutions, provisioning_data['Entitlements']
-
- def _FindProvisioningProfile(self, profile, bundle_identifier):
- """Finds the .mobileprovision file to use for signing the bundle.
-
- Checks all the installed provisioning profiles (or if the user specified
- the PROVISIONING_PROFILE variable, only consult it) and select the most
- specific that correspond to the bundle identifier.
-
- Args:
- profile: string, optional, short name of the .mobileprovision file
- to use, if empty or the file is missing, the best file installed
- will be used
- bundle_identifier: string, value of CFBundleIdentifier from Info.plist
-
- Returns:
- A tuple of the path to the selected provisioning profile, the data of
- the embedded plist in the provisioning profile and the team identifier
- to use for code signing.
-
- Raises:
- SystemExit: if no .mobileprovision can be used to sign the bundle.
- """
- profiles_dir = os.path.join(
- os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles')
- if not os.path.isdir(profiles_dir):
- print('cannot find mobile provisioning for %s' % (bundle_identifier), file=sys.stderr)
- sys.exit(1)
- provisioning_profiles = None
- if profile:
- profile_path = os.path.join(profiles_dir, profile + '.mobileprovision')
- if os.path.exists(profile_path):
- provisioning_profiles = [profile_path]
- if not provisioning_profiles:
- provisioning_profiles = glob.glob(
- os.path.join(profiles_dir, '*.mobileprovision'))
- valid_provisioning_profiles = {}
- for profile_path in provisioning_profiles:
- profile_data = self._LoadProvisioningProfile(profile_path)
- app_id_pattern = profile_data.get(
- 'Entitlements', {}).get('application-identifier', '')
- for team_identifier in profile_data.get('TeamIdentifier', []):
- app_id = '%s.%s' % (team_identifier, bundle_identifier)
- if fnmatch.fnmatch(app_id, app_id_pattern):
- valid_provisioning_profiles[app_id_pattern] = (
- profile_path, profile_data, team_identifier)
- if not valid_provisioning_profiles:
- print('cannot find mobile provisioning for %s' % (bundle_identifier), file=sys.stderr)
- sys.exit(1)
- # If the user has multiple provisioning profiles installed that can be
- # used for ${bundle_identifier}, pick the most specific one (ie. the
- # provisioning profile whose pattern is the longest).
- selected_key = max(valid_provisioning_profiles, key=lambda v: len(v))
- return valid_provisioning_profiles[selected_key]
-
- def _LoadProvisioningProfile(self, profile_path):
- """Extracts the plist embedded in a provisioning profile.
-
- Args:
- profile_path: string, path to the .mobileprovision file
-
- Returns:
- Content of the plist embedded in the provisioning profile as a dictionary.
- """
- with tempfile.NamedTemporaryFile() as temp:
- subprocess.check_call([
- 'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
- return self._LoadPlistMaybeBinary(temp.name)
-
- def _MergePlist(self, merged_plist, plist):
- """Merge |plist| into |merged_plist|."""
- for key, value in plist.items():
- if isinstance(value, dict):
- merged_value = merged_plist.get(key, {})
- if isinstance(merged_value, dict):
- self._MergePlist(merged_value, value)
- merged_plist[key] = merged_value
- else:
- merged_plist[key] = value
- else:
- merged_plist[key] = value
-
- def _LoadPlistMaybeBinary(self, plist_path):
- """Loads into a memory a plist possibly encoded in binary format.
-
- This is a wrapper around plistlib.readPlist that tries to convert the
- plist to the XML format if it can't be parsed (assuming that it is in
- the binary format).
-
- Args:
- plist_path: string, path to a plist file, in XML or binary format
-
- Returns:
- Content of the plist as a dictionary.
- """
- try:
- # First, try to read the file using plistlib that only supports XML,
- # and if an exception is raised, convert a temporary copy to XML and
- # load that copy.
- return plistlib.readPlist(plist_path)
- except:
- pass
- with tempfile.NamedTemporaryFile() as temp:
- shutil.copy2(plist_path, temp.name)
- subprocess.check_call(['plutil', '-convert', 'xml1', temp.name])
- return plistlib.readPlist(temp.name)
-
- def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
- """Constructs a dictionary of variable substitutions for Entitlements.plist.
-
- Args:
- bundle_identifier: string, value of CFBundleIdentifier from Info.plist
- app_identifier_prefix: string, value for AppIdentifierPrefix
-
- Returns:
- Dictionary of substitutions to apply when generating Entitlements.plist.
- """
- return {
- 'CFBundleIdentifier': bundle_identifier,
- 'AppIdentifierPrefix': app_identifier_prefix,
- }
-
- def _GetCFBundleIdentifier(self):
- """Extracts CFBundleIdentifier value from Info.plist in the bundle.
-
- Returns:
- Value of CFBundleIdentifier in the Info.plist located in the bundle.
- """
- info_plist_path = os.path.join(
- os.environ['TARGET_BUILD_DIR'],
- os.environ['INFOPLIST_PATH'])
- info_plist_data = self._LoadPlistMaybeBinary(info_plist_path)
- return info_plist_data['CFBundleIdentifier']
-
- def _InstallEntitlements(self, entitlements, substitutions, overrides):
- """Generates and install the ${BundleName}.xcent entitlements file.
-
- Expands variables "$(variable)" pattern in the source entitlements file,
- add extra entitlements defined in the .mobileprovision file and the copy
- the generated plist to "${BundlePath}.xcent".
-
- Args:
- entitlements: string, optional, path to the Entitlements.plist template
- to use, defaults to "${SDKROOT}/Entitlements.plist"
- substitutions: dictionary, variable substitutions
- overrides: dictionary, values to add to the entitlements
-
- Returns:
- Path to the generated entitlements file.
- """
- source_path = entitlements
- target_path = os.path.join(
- os.environ['BUILT_PRODUCTS_DIR'],
- os.environ['PRODUCT_NAME'] + '.xcent')
- if not source_path:
- source_path = os.path.join(
- os.environ['SDKROOT'],
- 'Entitlements.plist')
- shutil.copy2(source_path, target_path)
- data = self._LoadPlistMaybeBinary(target_path)
- data = self._ExpandVariables(data, substitutions)
- if overrides:
- for key in overrides:
- if key not in data:
- data[key] = overrides[key]
- plistlib.writePlist(data, target_path)
- return target_path
-
- def _ExpandVariables(self, data, substitutions):
- """Expands variables "$(variable)" in data.
-
- Args:
- data: object, can be either string, list or dictionary
- substitutions: dictionary, variable substitutions to perform
-
- Returns:
- Copy of data where each references to "$(variable)" has been replaced
- by the corresponding value found in substitutions, or left intact if
- the key was not found.
- """
- if isinstance(data, str):
- for key, value in substitutions.items():
- data = data.replace('$(%s)' % key, value)
- return data
- if isinstance(data, list):
- return [self._ExpandVariables(v, substitutions) for v in data]
- if isinstance(data, dict):
- return {k: self._ExpandVariables(data[k], substitutions) for k in data}
- return data
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
deleted file mode 100644
index 9f1f547b9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
+++ /dev/null
@@ -1,1104 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This module helps emulate Visual Studio 2008 behavior on top of other
-build systems, primarily ninja.
-"""
-
-import os
-import re
-import subprocess
-import sys
-
-from gyp.common import OrderedSet
-import gyp.MSVSUtil
-import gyp.MSVSVersion
-
-PY3 = bytes != str
-
-windows_quoter_regex = re.compile(r'(\\*)"')
-
-
-def QuoteForRspFile(arg):
- """Quote a command line argument so that it appears as one argument when
- processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for
- Windows programs)."""
- # See http://goo.gl/cuFbX and http://goo.gl/dhPnp including the comment
- # threads. This is actually the quoting rules for CommandLineToArgvW, not
- # for the shell, because the shell doesn't do anything in Windows. This
- # works more or less because most programs (including the compiler, etc.)
- # use that function to handle command line arguments.
-
- # For a literal quote, CommandLineToArgvW requires 2n+1 backslashes
- # preceding it, and results in n backslashes + the quote. So we substitute
- # in 2* what we match, +1 more, plus the quote.
- arg = windows_quoter_regex.sub(lambda mo: 2 * mo.group(1) + '\\"', arg)
-
- # %'s also need to be doubled otherwise they're interpreted as batch
- # positional arguments. Also make sure to escape the % so that they're
- # passed literally through escaping so they can be singled to just the
- # original %. Otherwise, trying to pass the literal representation that
- # looks like an environment variable to the shell (e.g. %PATH%) would fail.
- arg = arg.replace('%', '%%')
-
- # These commands are used in rsp files, so no escaping for the shell (via ^)
- # is necessary.
-
- # Finally, wrap the whole thing in quotes so that the above quote rule
- # applies and whitespace isn't a word break.
- return '"' + arg + '"'
-
-
-def EncodeRspFileList(args):
- """Process a list of arguments using QuoteCmdExeArgument."""
- # Note that the first argument is assumed to be the command. Don't add
- # quotes around it because then built-ins like 'echo', etc. won't work.
- # Take care to normpath only the path in the case of 'call ../x.bat' because
- # otherwise the whole thing is incorrectly interpreted as a path and not
- # normalized correctly.
- if not args: return ''
- if args[0].startswith('call '):
- call, program = args[0].split(' ', 1)
- program = call + ' ' + os.path.normpath(program)
- else:
- program = os.path.normpath(args[0])
- return program + ' ' + ' '.join(QuoteForRspFile(arg) for arg in args[1:])
-
-
-def _GenericRetrieve(root, default, path):
- """Given a list of dictionary keys |path| and a tree of dicts |root|, find
- value at path, or return |default| if any of the path doesn't exist."""
- if not root:
- return default
- if not path:
- return root
- return _GenericRetrieve(root.get(path[0]), default, path[1:])
-
-
-def _AddPrefix(element, prefix):
- """Add |prefix| to |element| or each subelement if element is iterable."""
- if element is None:
- return element
- # Note, not Iterable because we don't want to handle strings like that.
- if isinstance(element, list) or isinstance(element, tuple):
- return [prefix + e for e in element]
- else:
- return prefix + element
-
-
-def _DoRemapping(element, map):
- """If |element| then remap it through |map|. If |element| is iterable then
- each item will be remapped. Any elements not found will be removed."""
- if map is not None and element is not None:
- if not callable(map):
- map = map.get # Assume it's a dict, otherwise a callable to do the remap.
- if isinstance(element, list) or isinstance(element, tuple):
- element = filter(None, [map(elem) for elem in element])
- else:
- element = map(element)
- return element
-
-
-def _AppendOrReturn(append, element):
- """If |append| is None, simply return |element|. If |append| is not None,
- then add |element| to it, adding each item in |element| if it's a list or
- tuple."""
- if append is not None and element is not None:
- if isinstance(element, list) or isinstance(element, tuple):
- append.extend(element)
- else:
- append.append(element)
- else:
- return element
-
-
-def _FindDirectXInstallation():
- """Try to find an installation location for the DirectX SDK. Check for the
- standard environment variable, and if that doesn't exist, try to find
- via the registry. May return None if not found in either location."""
- # Return previously calculated value, if there is one
- if hasattr(_FindDirectXInstallation, 'dxsdk_dir'):
- return _FindDirectXInstallation.dxsdk_dir
-
- dxsdk_dir = os.environ.get('DXSDK_DIR')
- if not dxsdk_dir:
- # Setup params to pass to and attempt to launch reg.exe.
- cmd = ['reg.exe', 'query', r'HKLM\Software\Microsoft\DirectX', '/s']
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout = p.communicate()[0]
- if PY3:
- stdout = stdout.decode('utf-8')
- for line in stdout.splitlines():
- if 'InstallPath' in line:
- dxsdk_dir = line.split(' ')[3] + "\\"
-
- # Cache return value
- _FindDirectXInstallation.dxsdk_dir = dxsdk_dir
- return dxsdk_dir
-
-
-def GetGlobalVSMacroEnv(vs_version):
- """Get a dict of variables mapping internal VS macro names to their gyp
- equivalents. Returns all variables that are independent of the target."""
- env = {}
- # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when
- # Visual Studio is actually installed.
- if vs_version.Path():
- env['$(VSInstallDir)'] = vs_version.Path()
- env['$(VCInstallDir)'] = os.path.join(vs_version.Path(), 'VC') + '\\'
- # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be
- # set. This happens when the SDK is sync'd via src-internal, rather than
- # by typical end-user installation of the SDK. If it's not set, we don't
- # want to leave the unexpanded variable in the path, so simply strip it.
- dxsdk_dir = _FindDirectXInstallation()
- env['$(DXSDK_DIR)'] = dxsdk_dir if dxsdk_dir else ''
- # Try to find an installation location for the Windows DDK by checking
- # the WDK_DIR environment variable, may be None.
- env['$(WDK_DIR)'] = os.environ.get('WDK_DIR', '')
- return env
-
-def ExtractSharedMSVSSystemIncludes(configs, generator_flags):
- """Finds msvs_system_include_dirs that are common to all targets, removes
- them from all targets, and returns an OrderedSet containing them."""
- all_system_includes = OrderedSet(
- configs[0].get('msvs_system_include_dirs', []))
- for config in configs[1:]:
- system_includes = config.get('msvs_system_include_dirs', [])
- all_system_includes = all_system_includes & OrderedSet(system_includes)
- if not all_system_includes:
- return None
- # Expand macros in all_system_includes.
- env = GetGlobalVSMacroEnv(GetVSVersion(generator_flags))
- expanded_system_includes = OrderedSet([ExpandMacros(include, env)
- for include in all_system_includes])
- if any(['$' in include for include in expanded_system_includes]):
- # Some path relies on target-specific variables, bail.
- return None
-
- # Remove system includes shared by all targets from the targets.
- for config in configs:
- includes = config.get('msvs_system_include_dirs', [])
- if includes: # Don't insert a msvs_system_include_dirs key if not needed.
- # This must check the unexpanded includes list:
- new_includes = [i for i in includes if i not in all_system_includes]
- config['msvs_system_include_dirs'] = new_includes
- return expanded_system_includes
-
-
-class MsvsSettings(object):
- """A class that understands the gyp 'msvs_...' values (especially the
- msvs_settings field). They largely correpond to the VS2008 IDE DOM. This
- class helps map those settings to command line options."""
-
- def __init__(self, spec, generator_flags):
- self.spec = spec
- self.vs_version = GetVSVersion(generator_flags)
-
- supported_fields = [
- ('msvs_configuration_attributes', dict),
- ('msvs_settings', dict),
- ('msvs_system_include_dirs', list),
- ('msvs_disabled_warnings', list),
- ('msvs_precompiled_header', str),
- ('msvs_precompiled_source', str),
- ('msvs_configuration_platform', str),
- ('msvs_target_platform', str),
- ]
- configs = spec['configurations']
- for field, default in supported_fields:
- setattr(self, field, {})
- for configname, config in configs.items():
- getattr(self, field)[configname] = config.get(field, default())
-
- self.msvs_cygwin_dirs = spec.get('msvs_cygwin_dirs', ['.'])
-
- unsupported_fields = [
- 'msvs_prebuild',
- 'msvs_postbuild',
- ]
- unsupported = []
- for field in unsupported_fields:
- for config in configs.values():
- if field in config:
- unsupported += ["%s not supported (target %s)." %
- (field, spec['target_name'])]
- if unsupported:
- raise Exception('\n'.join(unsupported))
-
- def GetExtension(self):
- """Returns the extension for the target, with no leading dot.
-
- Uses 'product_extension' if specified, otherwise uses MSVS defaults based on
- the target type.
- """
- ext = self.spec.get('product_extension', None)
- if ext:
- return ext
- return gyp.MSVSUtil.TARGET_TYPE_EXT.get(self.spec['type'], '')
-
- def GetVSMacroEnv(self, base_to_build=None, config=None):
- """Get a dict of variables mapping internal VS macro names to their gyp
- equivalents."""
- target_arch = self.GetArch(config)
- if target_arch == 'x86':
- target_platform = 'Win32'
- else:
- target_platform = target_arch
- target_name = self.spec.get('product_prefix', '') + \
- self.spec.get('product_name', self.spec['target_name'])
- target_dir = base_to_build + '\\' if base_to_build else ''
- target_ext = '.' + self.GetExtension()
- target_file_name = target_name + target_ext
-
- replacements = {
- '$(InputName)': '${root}',
- '$(InputPath)': '${source}',
- '$(IntDir)': '$!INTERMEDIATE_DIR',
- '$(OutDir)\\': target_dir,
- '$(PlatformName)': target_platform,
- '$(ProjectDir)\\': '',
- '$(ProjectName)': self.spec['target_name'],
- '$(TargetDir)\\': target_dir,
- '$(TargetExt)': target_ext,
- '$(TargetFileName)': target_file_name,
- '$(TargetName)': target_name,
- '$(TargetPath)': os.path.join(target_dir, target_file_name),
- }
- replacements.update(GetGlobalVSMacroEnv(self.vs_version))
- return replacements
-
- def ConvertVSMacros(self, s, base_to_build=None, config=None):
- """Convert from VS macro names to something equivalent."""
- env = self.GetVSMacroEnv(base_to_build, config=config)
- return ExpandMacros(s, env)
-
- def AdjustLibraries(self, libraries):
- """Strip -l from library if it's specified with that."""
- libs = [lib[2:] if lib.startswith('-l') else lib for lib in libraries]
- return [lib + '.lib' if not lib.endswith('.lib') else lib for lib in libs]
-
- def _GetAndMunge(self, field, path, default, prefix, append, map):
- """Retrieve a value from |field| at |path| or return |default|. If
- |append| is specified, and the item is found, it will be appended to that
- object instead of returned. If |map| is specified, results will be
- remapped through |map| before being returned or appended."""
- result = _GenericRetrieve(field, default, path)
- result = _DoRemapping(result, map)
- result = _AddPrefix(result, prefix)
- return _AppendOrReturn(append, result)
-
- class _GetWrapper(object):
- def __init__(self, parent, field, base_path, append=None):
- self.parent = parent
- self.field = field
- self.base_path = [base_path]
- self.append = append
- def __call__(self, name, map=None, prefix='', default=None):
- return self.parent._GetAndMunge(self.field, self.base_path + [name],
- default=default, prefix=prefix, append=self.append, map=map)
-
- def GetArch(self, config):
- """Get architecture based on msvs_configuration_platform and
- msvs_target_platform. Returns either 'x86' or 'x64'."""
- configuration_platform = self.msvs_configuration_platform.get(config, '')
- platform = self.msvs_target_platform.get(config, '')
- if not platform: # If no specific override, use the configuration's.
- platform = configuration_platform
- # Map from platform to architecture.
- return {'Win32': 'x86', 'x64': 'x64', 'ARM64': 'arm64'}.get(platform, 'x86')
-
- def _TargetConfig(self, config):
- """Returns the target-specific configuration."""
- # There's two levels of architecture/platform specification in VS. The
- # first level is globally for the configuration (this is what we consider
- # "the" config at the gyp level, which will be something like 'Debug' or
- # 'Release_x64'), and a second target-specific configuration, which is an
- # override for the global one. |config| is remapped here to take into
- # account the local target-specific overrides to the global configuration.
- arch = self.GetArch(config)
- if arch == 'x64' and not config.endswith('_x64'):
- config += '_x64'
- if arch == 'x86' and config.endswith('_x64'):
- config = config.rsplit('_', 1)[0]
- return config
-
- def _Setting(self, path, config,
- default=None, prefix='', append=None, map=None):
- """_GetAndMunge for msvs_settings."""
- return self._GetAndMunge(
- self.msvs_settings[config], path, default, prefix, append, map)
-
- def _ConfigAttrib(self, path, config,
- default=None, prefix='', append=None, map=None):
- """_GetAndMunge for msvs_configuration_attributes."""
- return self._GetAndMunge(
- self.msvs_configuration_attributes[config],
- path, default, prefix, append, map)
-
- def AdjustIncludeDirs(self, include_dirs, config):
- """Updates include_dirs to expand VS specific paths, and adds the system
- include dirs used for platform SDK and similar."""
- config = self._TargetConfig(config)
- includes = include_dirs + self.msvs_system_include_dirs[config]
- includes.extend(self._Setting(
- ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[]))
- return [self.ConvertVSMacros(p, config=config) for p in includes]
-
- def AdjustMidlIncludeDirs(self, midl_include_dirs, config):
- """Updates midl_include_dirs to expand VS specific paths, and adds the
- system include dirs used for platform SDK and similar."""
- config = self._TargetConfig(config)
- includes = midl_include_dirs + self.msvs_system_include_dirs[config]
- includes.extend(self._Setting(
- ('VCMIDLTool', 'AdditionalIncludeDirectories'), config, default=[]))
- return [self.ConvertVSMacros(p, config=config) for p in includes]
-
- def GetComputedDefines(self, config):
- """Returns the set of defines that are injected to the defines list based
- on other VS settings."""
- config = self._TargetConfig(config)
- defines = []
- if self._ConfigAttrib(['CharacterSet'], config) == '1':
- defines.extend(('_UNICODE', 'UNICODE'))
- if self._ConfigAttrib(['CharacterSet'], config) == '2':
- defines.append('_MBCS')
- defines.extend(self._Setting(
- ('VCCLCompilerTool', 'PreprocessorDefinitions'), config, default=[]))
- return defines
-
- def GetCompilerPdbName(self, config, expand_special):
- """Get the pdb file name that should be used for compiler invocations, or
- None if there's no explicit name specified."""
- config = self._TargetConfig(config)
- pdbname = self._Setting(
- ('VCCLCompilerTool', 'ProgramDataBaseFileName'), config)
- if pdbname:
- pdbname = expand_special(self.ConvertVSMacros(pdbname))
- return pdbname
-
- def GetMapFileName(self, config, expand_special):
- """Gets the explicitly overridden map file name for a target or returns None
- if it's not set."""
- config = self._TargetConfig(config)
- map_file = self._Setting(('VCLinkerTool', 'MapFileName'), config)
- if map_file:
- map_file = expand_special(self.ConvertVSMacros(map_file, config=config))
- return map_file
-
- def GetOutputName(self, config, expand_special):
- """Gets the explicitly overridden output name for a target or returns None
- if it's not overridden."""
- config = self._TargetConfig(config)
- type = self.spec['type']
- root = 'VCLibrarianTool' if type == 'static_library' else 'VCLinkerTool'
- # TODO(scottmg): Handle OutputDirectory without OutputFile.
- output_file = self._Setting((root, 'OutputFile'), config)
- if output_file:
- output_file = expand_special(self.ConvertVSMacros(
- output_file, config=config))
- return output_file
-
- def GetPDBName(self, config, expand_special, default):
- """Gets the explicitly overridden pdb name for a target or returns
- default if it's not overridden, or if no pdb will be generated."""
- config = self._TargetConfig(config)
- output_file = self._Setting(('VCLinkerTool', 'ProgramDatabaseFile'), config)
- generate_debug_info = self._Setting(
- ('VCLinkerTool', 'GenerateDebugInformation'), config)
- if generate_debug_info == 'true':
- if output_file:
- return expand_special(self.ConvertVSMacros(output_file, config=config))
- else:
- return default
- else:
- return None
-
- def GetNoImportLibrary(self, config):
- """If NoImportLibrary: true, ninja will not expect the output to include
- an import library."""
- config = self._TargetConfig(config)
- noimplib = self._Setting(('NoImportLibrary',), config)
- return noimplib == 'true'
-
- def GetAsmflags(self, config):
- """Returns the flags that need to be added to ml invocations."""
- config = self._TargetConfig(config)
- asmflags = []
- safeseh = self._Setting(('MASM', 'UseSafeExceptionHandlers'), config)
- if safeseh == 'true':
- asmflags.append('/safeseh')
- return asmflags
-
- def GetCflags(self, config):
- """Returns the flags that need to be added to .c and .cc compilations."""
- config = self._TargetConfig(config)
- cflags = []
- cflags.extend(['/wd' + w for w in self.msvs_disabled_warnings[config]])
- cl = self._GetWrapper(self, self.msvs_settings[config],
- 'VCCLCompilerTool', append=cflags)
- cl('Optimization',
- map={'0': 'd', '1': '1', '2': '2', '3': 'x'}, prefix='/O', default='2')
- cl('InlineFunctionExpansion', prefix='/Ob')
- cl('DisableSpecificWarnings', prefix='/wd')
- cl('StringPooling', map={'true': '/GF'})
- cl('EnableFiberSafeOptimizations', map={'true': '/GT'})
- cl('OmitFramePointers', map={'false': '-', 'true': ''}, prefix='/Oy')
- cl('EnableIntrinsicFunctions', map={'false': '-', 'true': ''}, prefix='/Oi')
- cl('FavorSizeOrSpeed', map={'1': 't', '2': 's'}, prefix='/O')
- cl('FloatingPointModel',
- map={'0': 'precise', '1': 'strict', '2': 'fast'}, prefix='/fp:',
- default='0')
- cl('CompileAsManaged', map={'false': '', 'true': '/clr'})
- cl('WholeProgramOptimization', map={'true': '/GL'})
- cl('WarningLevel', prefix='/W')
- cl('WarnAsError', map={'true': '/WX'})
- cl('CallingConvention',
- map={'0': 'd', '1': 'r', '2': 'z', '3': 'v'}, prefix='/G')
- cl('DebugInformationFormat',
- map={'1': '7', '3': 'i', '4': 'I'}, prefix='/Z')
- cl('RuntimeTypeInfo', map={'true': '/GR', 'false': '/GR-'})
- cl('EnableFunctionLevelLinking', map={'true': '/Gy', 'false': '/Gy-'})
- cl('MinimalRebuild', map={'true': '/Gm'})
- cl('BufferSecurityCheck', map={'true': '/GS', 'false': '/GS-'})
- cl('BasicRuntimeChecks', map={'1': 's', '2': 'u', '3': '1'}, prefix='/RTC')
- cl('RuntimeLibrary',
- map={'0': 'T', '1': 'Td', '2': 'D', '3': 'Dd'}, prefix='/M')
- cl('ExceptionHandling', map={'1': 'sc','2': 'a'}, prefix='/EH')
- cl('DefaultCharIsUnsigned', map={'true': '/J'})
- cl('TreatWChar_tAsBuiltInType',
- map={'false': '-', 'true': ''}, prefix='/Zc:wchar_t')
- cl('EnablePREfast', map={'true': '/analyze'})
- cl('AdditionalOptions', prefix='')
- cl('EnableEnhancedInstructionSet',
- map={'1': 'SSE', '2': 'SSE2', '3': 'AVX', '4': 'IA32', '5': 'AVX2'},
- prefix='/arch:')
- cflags.extend(['/FI' + f for f in self._Setting(
- ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])])
- if self.vs_version.short_name in ('2013', '2013e', '2015'):
- # New flag required in 2013 to maintain previous PDB behavior.
- cflags.append('/FS')
- # ninja handles parallelism by itself, don't have the compiler do it too.
- cflags = filter(lambda x: not x.startswith('/MP'), cflags)
- return cflags
-
- def _GetPchFlags(self, config, extension):
- """Get the flags to be added to the cflags for precompiled header support.
- """
- config = self._TargetConfig(config)
- # The PCH is only built once by a particular source file. Usage of PCH must
- # only be for the same language (i.e. C vs. C++), so only include the pch
- # flags when the language matches.
- if self.msvs_precompiled_header[config]:
- source_ext = os.path.splitext(self.msvs_precompiled_source[config])[1]
- if _LanguageMatchesForPch(source_ext, extension):
- pch = os.path.split(self.msvs_precompiled_header[config])[1]
- return ['/Yu' + pch, '/FI' + pch, '/Fp${pchprefix}.' + pch + '.pch']
- return []
-
- def GetCflagsC(self, config):
- """Returns the flags that need to be added to .c compilations."""
- config = self._TargetConfig(config)
- return self._GetPchFlags(config, '.c')
-
- def GetCflagsCC(self, config):
- """Returns the flags that need to be added to .cc compilations."""
- config = self._TargetConfig(config)
- return ['/TP'] + self._GetPchFlags(config, '.cc')
-
- def _GetAdditionalLibraryDirectories(self, root, config, gyp_to_build_path):
- """Get and normalize the list of paths in AdditionalLibraryDirectories
- setting."""
- config = self._TargetConfig(config)
- libpaths = self._Setting((root, 'AdditionalLibraryDirectories'),
- config, default=[])
- libpaths = [os.path.normpath(
- gyp_to_build_path(self.ConvertVSMacros(p, config=config)))
- for p in libpaths]
- return ['/LIBPATH:"' + p + '"' for p in libpaths]
-
- def GetLibFlags(self, config, gyp_to_build_path):
- """Returns the flags that need to be added to lib commands."""
- config = self._TargetConfig(config)
- libflags = []
- lib = self._GetWrapper(self, self.msvs_settings[config],
- 'VCLibrarianTool', append=libflags)
- libflags.extend(self._GetAdditionalLibraryDirectories(
- 'VCLibrarianTool', config, gyp_to_build_path))
- lib('LinkTimeCodeGeneration', map={'true': '/LTCG'})
- lib('TargetMachine', map={'1': 'X86', '17': 'X64', '3': 'ARM'},
- prefix='/MACHINE:')
- lib('AdditionalOptions')
- return libflags
-
- def GetDefFile(self, gyp_to_build_path):
- """Returns the .def file from sources, if any. Otherwise returns None."""
- spec = self.spec
- if spec['type'] in ('shared_library', 'loadable_module', 'executable'):
- def_files = [s for s in spec.get('sources', []) if s.endswith('.def')]
- if len(def_files) == 1:
- return gyp_to_build_path(def_files[0])
- elif len(def_files) > 1:
- raise Exception("Multiple .def files")
- return None
-
- def _GetDefFileAsLdflags(self, ldflags, gyp_to_build_path):
- """.def files get implicitly converted to a ModuleDefinitionFile for the
- linker in the VS generator. Emulate that behaviour here."""
- def_file = self.GetDefFile(gyp_to_build_path)
- if def_file:
- ldflags.append('/DEF:"%s"' % def_file)
-
- def GetPGDName(self, config, expand_special):
- """Gets the explicitly overridden pgd name for a target or returns None
- if it's not overridden."""
- config = self._TargetConfig(config)
- output_file = self._Setting(
- ('VCLinkerTool', 'ProfileGuidedDatabase'), config)
- if output_file:
- output_file = expand_special(self.ConvertVSMacros(
- output_file, config=config))
- return output_file
-
- def GetLdflags(self, config, gyp_to_build_path, expand_special,
- manifest_base_name, output_name, is_executable, build_dir):
- """Returns the flags that need to be added to link commands, and the
- manifest files."""
- config = self._TargetConfig(config)
- ldflags = []
- ld = self._GetWrapper(self, self.msvs_settings[config],
- 'VCLinkerTool', append=ldflags)
- self._GetDefFileAsLdflags(ldflags, gyp_to_build_path)
- ld('GenerateDebugInformation', map={'true': '/DEBUG'})
- # TODO: These 'map' values come from machineTypeOption enum,
- # and does not have an official value for ARM64 in VS2017 (yet).
- # It needs to verify the ARM64 value when machineTypeOption is updated.
- ld('TargetMachine', map={'1': 'X86', '17': 'X64', '3': 'ARM', '18': 'ARM64'},
- prefix='/MACHINE:')
- ldflags.extend(self._GetAdditionalLibraryDirectories(
- 'VCLinkerTool', config, gyp_to_build_path))
- ld('DelayLoadDLLs', prefix='/DELAYLOAD:')
- ld('TreatLinkerWarningAsErrors', prefix='/WX',
- map={'true': '', 'false': ':NO'})
- out = self.GetOutputName(config, expand_special)
- if out:
- ldflags.append('/OUT:' + out)
- pdb = self.GetPDBName(config, expand_special, output_name + '.pdb')
- if pdb:
- ldflags.append('/PDB:' + pdb)
- pgd = self.GetPGDName(config, expand_special)
- if pgd:
- ldflags.append('/PGD:' + pgd)
- map_file = self.GetMapFileName(config, expand_special)
- ld('GenerateMapFile', map={'true': '/MAP:' + map_file if map_file
- else '/MAP'})
- ld('MapExports', map={'true': '/MAPINFO:EXPORTS'})
- ld('AdditionalOptions', prefix='')
-
- minimum_required_version = self._Setting(
- ('VCLinkerTool', 'MinimumRequiredVersion'), config, default='')
- if minimum_required_version:
- minimum_required_version = ',' + minimum_required_version
- ld('SubSystem',
- map={'1': 'CONSOLE%s' % minimum_required_version,
- '2': 'WINDOWS%s' % minimum_required_version},
- prefix='/SUBSYSTEM:')
-
- stack_reserve_size = self._Setting(
- ('VCLinkerTool', 'StackReserveSize'), config, default='')
- if stack_reserve_size:
- stack_commit_size = self._Setting(
- ('VCLinkerTool', 'StackCommitSize'), config, default='')
- if stack_commit_size:
- stack_commit_size = ',' + stack_commit_size
- ldflags.append('/STACK:%s%s' % (stack_reserve_size, stack_commit_size))
-
- ld('TerminalServerAware', map={'1': ':NO', '2': ''}, prefix='/TSAWARE')
- ld('LinkIncremental', map={'1': ':NO', '2': ''}, prefix='/INCREMENTAL')
- ld('BaseAddress', prefix='/BASE:')
- ld('FixedBaseAddress', map={'1': ':NO', '2': ''}, prefix='/FIXED')
- ld('RandomizedBaseAddress',
- map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE')
- ld('DataExecutionPrevention',
- map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT')
- ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:')
- ld('ForceSymbolReferences', prefix='/INCLUDE:')
- ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:')
- ld('LinkTimeCodeGeneration',
- map={'1': '', '2': ':PGINSTRUMENT', '3': ':PGOPTIMIZE',
- '4': ':PGUPDATE'},
- prefix='/LTCG')
- ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:')
- ld('ResourceOnlyDLL', map={'true': '/NOENTRY'})
- ld('EntryPointSymbol', prefix='/ENTRY:')
- ld('Profile', map={'true': '/PROFILE'})
- ld('LargeAddressAware',
- map={'1': ':NO', '2': ''}, prefix='/LARGEADDRESSAWARE')
- # TODO(scottmg): This should sort of be somewhere else (not really a flag).
- ld('AdditionalDependencies', prefix='')
-
- if self.GetArch(config) == 'x86':
- safeseh_default = 'true'
- else:
- safeseh_default = None
- ld('ImageHasSafeExceptionHandlers',
- map={'false': ':NO', 'true': ''}, prefix='/SAFESEH',
- default=safeseh_default)
-
- # If the base address is not specifically controlled, DYNAMICBASE should
- # be on by default.
- base_flags = filter(lambda x: 'DYNAMICBASE' in x or x == '/FIXED',
- ldflags)
- if not base_flags:
- ldflags.append('/DYNAMICBASE')
-
- # If the NXCOMPAT flag has not been specified, default to on. Despite the
- # documentation that says this only defaults to on when the subsystem is
- # Vista or greater (which applies to the linker), the IDE defaults it on
- # unless it's explicitly off.
- if not filter(lambda x: 'NXCOMPAT' in x, ldflags):
- ldflags.append('/NXCOMPAT')
-
- have_def_file = filter(lambda x: x.startswith('/DEF:'), ldflags)
- manifest_flags, intermediate_manifest, manifest_files = \
- self._GetLdManifestFlags(config, manifest_base_name, gyp_to_build_path,
- is_executable and not have_def_file, build_dir)
- ldflags.extend(manifest_flags)
- return ldflags, intermediate_manifest, manifest_files
-
- def _GetLdManifestFlags(self, config, name, gyp_to_build_path,
- allow_isolation, build_dir):
- """Returns a 3-tuple:
- - the set of flags that need to be added to the link to generate
- a default manifest
- - the intermediate manifest that the linker will generate that should be
- used to assert it doesn't add anything to the merged one.
- - the list of all the manifest files to be merged by the manifest tool and
- included into the link."""
- generate_manifest = self._Setting(('VCLinkerTool', 'GenerateManifest'),
- config,
- default='true')
- if generate_manifest != 'true':
- # This means not only that the linker should not generate the intermediate
- # manifest but also that the manifest tool should do nothing even when
- # additional manifests are specified.
- return ['/MANIFEST:NO'], [], []
-
- output_name = name + '.intermediate.manifest'
- flags = [
- '/MANIFEST',
- '/ManifestFile:' + output_name,
- ]
-
- # Instead of using the MANIFESTUAC flags, we generate a .manifest to
- # include into the list of manifests. This allows us to avoid the need to
- # do two passes during linking. The /MANIFEST flag and /ManifestFile are
- # still used, and the intermediate manifest is used to assert that the
- # final manifest we get from merging all the additional manifest files
- # (plus the one we generate here) isn't modified by merging the
- # intermediate into it.
-
- # Always NO, because we generate a manifest file that has what we want.
- flags.append('/MANIFESTUAC:NO')
-
- config = self._TargetConfig(config)
- enable_uac = self._Setting(('VCLinkerTool', 'EnableUAC'), config,
- default='true')
- manifest_files = []
- generated_manifest_outer = \
-"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" \
-"<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>%s" \
-"</assembly>"
- if enable_uac == 'true':
- execution_level = self._Setting(('VCLinkerTool', 'UACExecutionLevel'),
- config, default='0')
- execution_level_map = {
- '0': 'asInvoker',
- '1': 'highestAvailable',
- '2': 'requireAdministrator'
- }
-
- ui_access = self._Setting(('VCLinkerTool', 'UACUIAccess'), config,
- default='false')
-
- inner = '''
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level='%s' uiAccess='%s' />
- </requestedPrivileges>
- </security>
-</trustInfo>''' % (execution_level_map[execution_level], ui_access)
- else:
- inner = ''
-
- generated_manifest_contents = generated_manifest_outer % inner
- generated_name = name + '.generated.manifest'
- # Need to join with the build_dir here as we're writing it during
- # generation time, but we return the un-joined version because the build
- # will occur in that directory. We only write the file if the contents
- # have changed so that simply regenerating the project files doesn't
- # cause a relink.
- build_dir_generated_name = os.path.join(build_dir, generated_name)
- gyp.common.EnsureDirExists(build_dir_generated_name)
- f = gyp.common.WriteOnDiff(build_dir_generated_name)
- f.write(generated_manifest_contents)
- f.close()
- manifest_files = [generated_name]
-
- if allow_isolation:
- flags.append('/ALLOWISOLATION')
-
- manifest_files += self._GetAdditionalManifestFiles(config,
- gyp_to_build_path)
- return flags, output_name, manifest_files
-
- def _GetAdditionalManifestFiles(self, config, gyp_to_build_path):
- """Gets additional manifest files that are added to the default one
- generated by the linker."""
- files = self._Setting(('VCManifestTool', 'AdditionalManifestFiles'), config,
- default=[])
- if isinstance(files, str):
- files = files.split(';')
- return [os.path.normpath(
- gyp_to_build_path(self.ConvertVSMacros(f, config=config)))
- for f in files]
-
- def IsUseLibraryDependencyInputs(self, config):
- """Returns whether the target should be linked via Use Library Dependency
- Inputs (using component .objs of a given .lib)."""
- config = self._TargetConfig(config)
- uldi = self._Setting(('VCLinkerTool', 'UseLibraryDependencyInputs'), config)
- return uldi == 'true'
-
- def IsEmbedManifest(self, config):
- """Returns whether manifest should be linked into binary."""
- config = self._TargetConfig(config)
- embed = self._Setting(('VCManifestTool', 'EmbedManifest'), config,
- default='true')
- return embed == 'true'
-
- def IsLinkIncremental(self, config):
- """Returns whether the target should be linked incrementally."""
- config = self._TargetConfig(config)
- link_inc = self._Setting(('VCLinkerTool', 'LinkIncremental'), config)
- return link_inc != '1'
-
- def GetRcflags(self, config, gyp_to_ninja_path):
- """Returns the flags that need to be added to invocations of the resource
- compiler."""
- config = self._TargetConfig(config)
- rcflags = []
- rc = self._GetWrapper(self, self.msvs_settings[config],
- 'VCResourceCompilerTool', append=rcflags)
- rc('AdditionalIncludeDirectories', map=gyp_to_ninja_path, prefix='/I')
- rcflags.append('/I' + gyp_to_ninja_path('.'))
- rc('PreprocessorDefinitions', prefix='/d')
- # /l arg must be in hex without leading '0x'
- rc('Culture', prefix='/l', map=lambda x: hex(int(x))[2:])
- return rcflags
-
- def BuildCygwinBashCommandLine(self, args, path_to_base):
- """Build a command line that runs args via cygwin bash. We assume that all
- incoming paths are in Windows normpath'd form, so they need to be
- converted to posix style for the part of the command line that's passed to
- bash. We also have to do some Visual Studio macro emulation here because
- various rules use magic VS names for things. Also note that rules that
- contain ninja variables cannot be fixed here (for example ${source}), so
- the outer generator needs to make sure that the paths that are written out
- are in posix style, if the command line will be used here."""
- cygwin_dir = os.path.normpath(
- os.path.join(path_to_base, self.msvs_cygwin_dirs[0]))
- cd = ('cd %s' % path_to_base).replace('\\', '/')
- args = [a.replace('\\', '/').replace('"', '\\"') for a in args]
- args = ["'%s'" % a.replace("'", "'\\''") for a in args]
- bash_cmd = ' '.join(args)
- cmd = (
- 'call "%s\\setup_env.bat" && set CYGWIN=nontsec && ' % cygwin_dir +
- 'bash -c "%s ; %s"' % (cd, bash_cmd))
- return cmd
-
- def IsRuleRunUnderCygwin(self, rule):
- """Determine if an action should be run under cygwin. If the variable is
- unset, or set to 1 we use cygwin."""
- return int(rule.get('msvs_cygwin_shell',
- self.spec.get('msvs_cygwin_shell', 1))) != 0
-
- def _HasExplicitRuleForExtension(self, spec, extension):
- """Determine if there's an explicit rule for a particular extension."""
- for rule in spec.get('rules', []):
- if rule['extension'] == extension:
- return True
- return False
-
- def _HasExplicitIdlActions(self, spec):
- """Determine if an action should not run midl for .idl files."""
- return any([action.get('explicit_idl_action', 0)
- for action in spec.get('actions', [])])
-
- def HasExplicitIdlRulesOrActions(self, spec):
- """Determine if there's an explicit rule or action for idl files. When
- there isn't we need to generate implicit rules to build MIDL .idl files."""
- return (self._HasExplicitRuleForExtension(spec, 'idl') or
- self._HasExplicitIdlActions(spec))
-
- def HasExplicitAsmRules(self, spec):
- """Determine if there's an explicit rule for asm files. When there isn't we
- need to generate implicit rules to assemble .asm files."""
- return self._HasExplicitRuleForExtension(spec, 'asm')
-
- def GetIdlBuildData(self, source, config):
- """Determine the implicit outputs for an idl file. Returns output
- directory, outputs, and variables and flags that are required."""
- config = self._TargetConfig(config)
- midl_get = self._GetWrapper(self, self.msvs_settings[config], 'VCMIDLTool')
- def midl(name, default=None):
- return self.ConvertVSMacros(midl_get(name, default=default),
- config=config)
- tlb = midl('TypeLibraryName', default='${root}.tlb')
- header = midl('HeaderFileName', default='${root}.h')
- dlldata = midl('DLLDataFileName', default='dlldata.c')
- iid = midl('InterfaceIdentifierFileName', default='${root}_i.c')
- proxy = midl('ProxyFileName', default='${root}_p.c')
- # Note that .tlb is not included in the outputs as it is not always
- # generated depending on the content of the input idl file.
- outdir = midl('OutputDirectory', default='')
- output = [header, dlldata, iid, proxy]
- variables = [('tlb', tlb),
- ('h', header),
- ('dlldata', dlldata),
- ('iid', iid),
- ('proxy', proxy)]
- # TODO(scottmg): Are there configuration settings to set these flags?
- target_platform = self.GetArch(config)
- if target_platform == 'x86':
- target_platform = 'win32'
- flags = ['/char', 'signed', '/env', target_platform, '/Oicf']
- return outdir, output, variables, flags
-
-
-def _LanguageMatchesForPch(source_ext, pch_source_ext):
- c_exts = ('.c',)
- cc_exts = ('.cc', '.cxx', '.cpp')
- return ((source_ext in c_exts and pch_source_ext in c_exts) or
- (source_ext in cc_exts and pch_source_ext in cc_exts))
-
-
-class PrecompiledHeader(object):
- """Helper to generate dependencies and build rules to handle generation of
- precompiled headers. Interface matches the GCH handler in xcode_emulation.py.
- """
- def __init__(
- self, settings, config, gyp_to_build_path, gyp_to_unique_output, obj_ext):
- self.settings = settings
- self.config = config
- pch_source = self.settings.msvs_precompiled_source[self.config]
- self.pch_source = gyp_to_build_path(pch_source)
- filename, _ = os.path.splitext(pch_source)
- self.output_obj = gyp_to_unique_output(filename + obj_ext).lower()
-
- def _PchHeader(self):
- """Get the header that will appear in an #include line for all source
- files."""
- return os.path.split(self.settings.msvs_precompiled_header[self.config])[1]
-
- def GetObjDependencies(self, sources, objs, arch):
- """Given a list of sources files and the corresponding object files,
- returns a list of the pch files that should be depended upon. The
- additional wrapping in the return value is for interface compatibility
- with make.py on Mac, and xcode_emulation.py."""
- assert arch is None
- if not self._PchHeader():
- return []
- pch_ext = os.path.splitext(self.pch_source)[1]
- for source in sources:
- if _LanguageMatchesForPch(os.path.splitext(source)[1], pch_ext):
- return [(None, None, self.output_obj)]
- return []
-
- def GetPchBuildCommands(self, arch):
- """Not used on Windows as there are no additional build steps required
- (instead, existing steps are modified in GetFlagsModifications below)."""
- return []
-
- def GetFlagsModifications(self, input, output, implicit, command,
- cflags_c, cflags_cc, expand_special):
- """Get the modified cflags and implicit dependencies that should be used
- for the pch compilation step."""
- if input == self.pch_source:
- pch_output = ['/Yc' + self._PchHeader()]
- if command == 'cxx':
- return ([('cflags_cc', map(expand_special, cflags_cc + pch_output))],
- self.output_obj, [])
- elif command == 'cc':
- return ([('cflags_c', map(expand_special, cflags_c + pch_output))],
- self.output_obj, [])
- return [], output, implicit
-
-
-vs_version = None
-def GetVSVersion(generator_flags):
- global vs_version
- if not vs_version:
- vs_version = gyp.MSVSVersion.SelectVisualStudioVersion(
- generator_flags.get('msvs_version', 'auto'),
- allow_fallback=False)
- return vs_version
-
-def _GetVsvarsSetupArgs(generator_flags, arch):
- vs = GetVSVersion(generator_flags)
- return vs.SetupScript()
-
-def ExpandMacros(string, expansions):
- """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
- for the canonical way to retrieve a suitable dict."""
- if '$' in string:
- for old, new in expansions.items():
- assert '$(' not in new, new
- string = string.replace(old, new)
- return string
-
-def _ExtractImportantEnvironment(output_of_set):
- """Extracts environment variables required for the toolchain to run from
- a textual dump output by the cmd.exe 'set' command."""
- envvars_to_save = (
- 'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
- 'include',
- 'lib',
- 'libpath',
- 'path',
- 'pathext',
- 'systemroot',
- 'temp',
- 'tmp',
- )
- env = {}
- for line in output_of_set.splitlines():
- for envvar in envvars_to_save:
- if re.match(envvar + '=', line.lower()):
- var, setting = line.split('=', 1)
- if envvar == 'path':
- # Our own rules (for running gyp-win-tool) and other actions in
- # Chromium rely on python being in the path. Add the path to this
- # python here so that if it's not in the path when ninja is run
- # later, python will still be found.
- setting = os.path.dirname(sys.executable) + os.pathsep + setting
- env[var.upper()] = setting
- break
- for required in ('SYSTEMROOT', 'TEMP', 'TMP'):
- if required not in env:
- raise Exception('Environment variable "%s" '
- 'required to be set to valid path' % required)
- return env
-
-def _FormatAsEnvironmentBlock(envvar_dict):
- """Format as an 'environment block' directly suitable for CreateProcess.
- Briefly this is a list of key=value\0, terminated by an additional \0. See
- CreateProcess documentation for more details."""
- block = ''
- nul = '\0'
- for key, value in envvar_dict.items():
- block += key + '=' + value + nul
- block += nul
- return block
-
-def _ExtractCLPath(output_of_where):
- """Gets the path to cl.exe based on the output of calling the environment
- setup batch file, followed by the equivalent of `where`."""
- # Take the first line, as that's the first found in the PATH.
- for line in output_of_where.strip().splitlines():
- if line.startswith('LOC:'):
- return line[len('LOC:'):].strip()
-
-def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags,
- system_includes, open_out):
- """It's not sufficient to have the absolute path to the compiler, linker,
- etc. on Windows, as those tools rely on .dlls being in the PATH. We also
- need to support both x86 and x64 compilers within the same build (to support
- msvs_target_platform hackery). Different architectures require a different
- compiler binary, and different supporting environment variables (INCLUDE,
- LIB, LIBPATH). So, we extract the environment here, wrap all invocations
- of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which
- sets up the environment, and then we do not prefix the compiler with
- an absolute path, instead preferring something like "cl.exe" in the rule
- which will then run whichever the environment setup has put in the path.
- When the following procedure to generate environment files does not
- meet your requirement (e.g. for custom toolchains), you can pass
- "-G ninja_use_custom_environment_files" to the gyp to suppress file
- generation and use custom environment files prepared by yourself."""
- archs = ('x86', 'x64')
- if generator_flags.get('ninja_use_custom_environment_files', 0):
- cl_paths = {}
- for arch in archs:
- cl_paths[arch] = 'cl.exe'
- return cl_paths
- vs = GetVSVersion(generator_flags)
- cl_paths = {}
- for arch in archs:
- # Extract environment variables for subprocesses.
- args = vs.SetupScript(arch)
- args.extend(('&&', 'set'))
- popen = subprocess.Popen(
- args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- variables, _ = popen.communicate()
- if PY3:
- variables = variables.decode('utf-8')
- env = _ExtractImportantEnvironment(variables)
-
- # Inject system includes from gyp files into INCLUDE.
- if system_includes:
- system_includes = system_includes | OrderedSet(
- env.get('INCLUDE', '').split(';'))
- env['INCLUDE'] = ';'.join(system_includes)
-
- env_block = _FormatAsEnvironmentBlock(env)
- f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb')
- f.write(env_block)
- f.close()
-
- # Find cl.exe location for this architecture.
- args = vs.SetupScript(arch)
- args.extend(('&&',
- 'for', '%i', 'in', '(cl.exe)', 'do', '@echo', 'LOC:%~$PATH:i'))
- popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE)
- output, _ = popen.communicate()
- if PY3:
- output = output.decode('utf-8')
- cl_paths[arch] = _ExtractCLPath(output)
- return cl_paths
-
-def VerifyMissingSources(sources, build_dir, generator_flags, gyp_to_ninja):
- """Emulate behavior of msvs_error_on_missing_sources present in the msvs
- generator: Check that all regular source files, i.e. not created at run time,
- exist on disk. Missing files cause needless recompilation when building via
- VS, and we want this check to match for people/bots that build using ninja,
- so they're not surprised when the VS build fails."""
- if int(generator_flags.get('msvs_error_on_missing_sources', 0)):
- no_specials = filter(lambda x: '$' not in x, sources)
- relative = [os.path.join(build_dir, gyp_to_ninja(s)) for s in no_specials]
- missing = filter(lambda x: not os.path.exists(x), relative)
- if missing:
- # They'll look like out\Release\..\..\stuff\things.cc, so normalize the
- # path for a slightly less crazy looking output.
- cleaned_up = [os.path.normpath(x) for x in missing]
- raise Exception('Missing input files:\n%s' % '\n'.join(cleaned_up))
-
-# Sets some values in default_variables, which are required for many
-# generators, run on Windows.
-def CalculateCommonVariables(default_variables, params):
- generator_flags = params.get('generator_flags', {})
-
- # Set a variable so conditions can be based on msvs_version.
- msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags)
- default_variables['MSVS_VERSION'] = msvs_version.ShortName()
-
- # To determine processor word size on Windows, in addition to checking
- # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
- # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which
- # contains the actual word size of the system when running thru WOW64).
- if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
- '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')):
- default_variables['MSVS_OS_BITS'] = 64
- else:
- default_variables['MSVS_OS_BITS'] = 32
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
deleted file mode 100644
index d2948f06c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
+++ /dev/null
@@ -1,160 +0,0 @@
-# This file comes from
-# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
-# Do not edit! Edit the upstream one instead.
-
-"""Python module for generating .ninja files.
-
-Note that this is emphatically not a required piece of Ninja; it's
-just a helpful utility for build-file-generation systems that already
-use Python.
-"""
-
-import textwrap
-import re
-
-def escape_path(word):
- return word.replace('$ ','$$ ').replace(' ','$ ').replace(':', '$:')
-
-class Writer(object):
- def __init__(self, output, width=78):
- self.output = output
- self.width = width
-
- def newline(self):
- self.output.write('\n')
-
- def comment(self, text):
- for line in textwrap.wrap(text, self.width - 2):
- self.output.write('# ' + line + '\n')
-
- def variable(self, key, value, indent=0):
- if value is None:
- return
- if isinstance(value, list):
- value = ' '.join(filter(None, value)) # Filter out empty strings.
- self._line('%s = %s' % (key, value), indent)
-
- def pool(self, name, depth):
- self._line('pool %s' % name)
- self.variable('depth', depth, indent=1)
-
- def rule(self, name, command, description=None, depfile=None,
- generator=False, pool=None, restat=False, rspfile=None,
- rspfile_content=None, deps=None):
- self._line('rule %s' % name)
- self.variable('command', command, indent=1)
- if description:
- self.variable('description', description, indent=1)
- if depfile:
- self.variable('depfile', depfile, indent=1)
- if generator:
- self.variable('generator', '1', indent=1)
- if pool:
- self.variable('pool', pool, indent=1)
- if restat:
- self.variable('restat', '1', indent=1)
- if rspfile:
- self.variable('rspfile', rspfile, indent=1)
- if rspfile_content:
- self.variable('rspfile_content', rspfile_content, indent=1)
- if deps:
- self.variable('deps', deps, indent=1)
-
- def build(self, outputs, rule, inputs=None, implicit=None, order_only=None,
- variables=None):
- outputs = self._as_list(outputs)
- all_inputs = self._as_list(inputs)[:]
- out_outputs = list(map(escape_path, outputs))
- all_inputs = list(map(escape_path, all_inputs))
-
- if implicit:
- implicit = map(escape_path, self._as_list(implicit))
- all_inputs.append('|')
- all_inputs.extend(implicit)
- if order_only:
- order_only = map(escape_path, self._as_list(order_only))
- all_inputs.append('||')
- all_inputs.extend(order_only)
-
- self._line('build %s: %s' % (' '.join(out_outputs),
- ' '.join([rule] + all_inputs)))
-
- if variables:
- if isinstance(variables, dict):
- iterator = iter(variables.items())
- else:
- iterator = iter(variables)
-
- for key, val in iterator:
- self.variable(key, val, indent=1)
-
- return outputs
-
- def include(self, path):
- self._line('include %s' % path)
-
- def subninja(self, path):
- self._line('subninja %s' % path)
-
- def default(self, paths):
- self._line('default %s' % ' '.join(self._as_list(paths)))
-
- def _count_dollars_before_index(self, s, i):
- """Returns the number of '$' characters right in front of s[i]."""
- dollar_count = 0
- dollar_index = i - 1
- while dollar_index > 0 and s[dollar_index] == '$':
- dollar_count += 1
- dollar_index -= 1
- return dollar_count
-
- def _line(self, text, indent=0):
- """Write 'text' word-wrapped at self.width characters."""
- leading_space = ' ' * indent
- while len(leading_space) + len(text) > self.width:
- # The text is too wide; wrap if possible.
-
- # Find the rightmost space that would obey our width constraint and
- # that's not an escaped space.
- available_space = self.width - len(leading_space) - len(' $')
- space = available_space
- while True:
- space = text.rfind(' ', 0, space)
- if space < 0 or \
- self._count_dollars_before_index(text, space) % 2 == 0:
- break
-
- if space < 0:
- # No such space; just use the first unescaped space we can find.
- space = available_space - 1
- while True:
- space = text.find(' ', space + 1)
- if space < 0 or \
- self._count_dollars_before_index(text, space) % 2 == 0:
- break
- if space < 0:
- # Give up on breaking.
- break
-
- self.output.write(leading_space + text[0:space] + ' $\n')
- text = text[space+1:]
-
- # Subsequent lines are continuations, so indent them.
- leading_space = ' ' * (indent+2)
-
- self.output.write(leading_space + text + '\n')
-
- def _as_list(self, input):
- if input is None:
- return []
- if isinstance(input, list):
- return input
- return [input]
-
-
-def escape(string):
- """Escape a string such that it can be embedded into a Ninja file without
- further interpretation."""
- assert '\n' not in string, 'Ninja syntax does not allow newlines'
- # We only have one special metacharacter: '$'.
- return string.replace('$', '$$')
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
deleted file mode 100644
index 94a6f17da..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2014 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""A clone of the default copy.deepcopy that doesn't handle cyclic
-structures or complex types except for dicts and lists. This is
-because gyp copies so large structure that small copy overhead ends up
-taking seconds in a project the size of Chromium."""
-
-class Error(Exception):
- pass
-
-__all__ = ["Error", "deepcopy"]
-
-def deepcopy(x):
- """Deep copy operation on gyp objects such as strings, ints, dicts
- and lists. More than twice as fast as copy.deepcopy but much less
- generic."""
-
- try:
- return _deepcopy_dispatch[type(x)](x)
- except KeyError:
- raise Error('Unsupported type %s for deepcopy. Use copy.deepcopy ' +
- 'or expand simple_copy support.' % type(x))
-
-_deepcopy_dispatch = d = {}
-
-def _deepcopy_atomic(x):
- return x
-
-try:
- types = bool, float, int, str, type, type(None), long, unicode
-except NameError: # Python 3
- types = bool, float, int, str, type, type(None)
-
-for x in types:
- d[x] = _deepcopy_atomic
-
-def _deepcopy_list(x):
- return [deepcopy(a) for a in x]
-d[list] = _deepcopy_list
-
-def _deepcopy_dict(x):
- y = {}
- for key, value in x.items():
- y[deepcopy(key)] = deepcopy(value)
- return y
-d[dict] = _deepcopy_dict
-
-del d
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
deleted file mode 100755
index 0a6daf203..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
+++ /dev/null
@@ -1,327 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Utility functions for Windows builds.
-
-These functions are executed via gyp-win-tool when using the ninja generator.
-"""
-
-from __future__ import print_function
-
-import os
-import re
-import shutil
-import subprocess
-import stat
-import string
-import sys
-
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-PY3 = bytes != str
-
-# A regex matching an argument corresponding to the output filename passed to
-# link.exe.
-_LINK_EXE_OUT_ARG = re.compile('/OUT:(?P<out>.+)$', re.IGNORECASE)
-
-def main(args):
- executor = WinTool()
- exit_code = executor.Dispatch(args)
- if exit_code is not None:
- sys.exit(exit_code)
-
-
-class WinTool(object):
- """This class performs all the Windows tooling steps. The methods can either
- be executed directly, or dispatched from an argument list."""
-
- def _UseSeparateMspdbsrv(self, env, args):
- """Allows to use a unique instance of mspdbsrv.exe per linker instead of a
- shared one."""
- if len(args) < 1:
- raise Exception("Not enough arguments")
-
- if args[0] != 'link.exe':
- return
-
- # Use the output filename passed to the linker to generate an endpoint name
- # for mspdbsrv.exe.
- endpoint_name = None
- for arg in args:
- m = _LINK_EXE_OUT_ARG.match(arg)
- if m:
- endpoint_name = re.sub(r'\W+', '',
- '%s_%d' % (m.group('out'), os.getpid()))
- break
-
- if endpoint_name is None:
- return
-
- # Adds the appropriate environment variable. This will be read by link.exe
- # to know which instance of mspdbsrv.exe it should connect to (if it's
- # not set then the default endpoint is used).
- env['_MSPDBSRV_ENDPOINT_'] = endpoint_name
-
- def Dispatch(self, args):
- """Dispatches a string command to a method."""
- if len(args) < 1:
- raise Exception("Not enough arguments")
-
- method = "Exec%s" % self._CommandifyName(args[0])
- return getattr(self, method)(*args[1:])
-
- def _CommandifyName(self, name_string):
- """Transforms a tool name like recursive-mirror to RecursiveMirror."""
- return name_string.title().replace('-', '')
-
- def _GetEnv(self, arch):
- """Gets the saved environment from a file for a given architecture."""
- # The environment is saved as an "environment block" (see CreateProcess
- # and msvs_emulation for details). We convert to a dict here.
- # Drop last 2 NULs, one for list terminator, one for trailing vs. separator.
- pairs = open(arch).read()[:-2].split('\0')
- kvs = [item.split('=', 1) for item in pairs]
- return dict(kvs)
-
- def ExecStamp(self, path):
- """Simple stamp command."""
- open(path, 'w').close()
-
- def ExecRecursiveMirror(self, source, dest):
- """Emulation of rm -rf out && cp -af in out."""
- if os.path.exists(dest):
- if os.path.isdir(dest):
- def _on_error(fn, path, excinfo):
- # The operation failed, possibly because the file is set to
- # read-only. If that's why, make it writable and try the op again.
- if not os.access(path, os.W_OK):
- os.chmod(path, stat.S_IWRITE)
- fn(path)
- shutil.rmtree(dest, onerror=_on_error)
- else:
- if not os.access(dest, os.W_OK):
- # Attempt to make the file writable before deleting it.
- os.chmod(dest, stat.S_IWRITE)
- os.unlink(dest)
-
- if os.path.isdir(source):
- shutil.copytree(source, dest)
- else:
- shutil.copy2(source, dest)
-
- def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args):
- """Filter diagnostic output from link that looks like:
- ' Creating library ui.dll.lib and object ui.dll.exp'
- This happens when there are exports from the dll or exe.
- """
- env = self._GetEnv(arch)
- if use_separate_mspdbsrv == 'True':
- self._UseSeparateMspdbsrv(env, args)
- link = subprocess.Popen([args[0].replace('/', '\\')] + list(args[1:]),
- shell=True,
- env=env,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- out, _ = link.communicate()
- if PY3:
- out = out.decode('utf-8')
- for line in out.splitlines():
- if (not line.startswith(' Creating library ') and
- not line.startswith('Generating code') and
- not line.startswith('Finished generating code')):
- print(line)
- return link.returncode
-
- def ExecLinkWithManifests(self, arch, embed_manifest, out, ldcmd, resname,
- mt, rc, intermediate_manifest, *manifests):
- """A wrapper for handling creating a manifest resource and then executing
- a link command."""
- # The 'normal' way to do manifests is to have link generate a manifest
- # based on gathering dependencies from the object files, then merge that
- # manifest with other manifests supplied as sources, convert the merged
- # manifest to a resource, and then *relink*, including the compiled
- # version of the manifest resource. This breaks incremental linking, and
- # is generally overly complicated. Instead, we merge all the manifests
- # provided (along with one that includes what would normally be in the
- # linker-generated one, see msvs_emulation.py), and include that into the
- # first and only link. We still tell link to generate a manifest, but we
- # only use that to assert that our simpler process did not miss anything.
- variables = {
- 'python': sys.executable,
- 'arch': arch,
- 'out': out,
- 'ldcmd': ldcmd,
- 'resname': resname,
- 'mt': mt,
- 'rc': rc,
- 'intermediate_manifest': intermediate_manifest,
- 'manifests': ' '.join(manifests),
- }
- add_to_ld = ''
- if manifests:
- subprocess.check_call(
- '%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo '
- '-manifest %(manifests)s -out:%(out)s.manifest' % variables)
- if embed_manifest == 'True':
- subprocess.check_call(
- '%(python)s gyp-win-tool manifest-to-rc %(arch)s %(out)s.manifest'
- ' %(out)s.manifest.rc %(resname)s' % variables)
- subprocess.check_call(
- '%(python)s gyp-win-tool rc-wrapper %(arch)s %(rc)s '
- '%(out)s.manifest.rc' % variables)
- add_to_ld = ' %(out)s.manifest.res' % variables
- subprocess.check_call(ldcmd + add_to_ld)
-
- # Run mt.exe on the theoretically complete manifest we generated, merging
- # it with the one the linker generated to confirm that the linker
- # generated one does not add anything. This is strictly unnecessary for
- # correctness, it's only to verify that e.g. /MANIFESTDEPENDENCY was not
- # used in a #pragma comment.
- if manifests:
- # Merge the intermediate one with ours to .assert.manifest, then check
- # that .assert.manifest is identical to ours.
- subprocess.check_call(
- '%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo '
- '-manifest %(out)s.manifest %(intermediate_manifest)s '
- '-out:%(out)s.assert.manifest' % variables)
- assert_manifest = '%(out)s.assert.manifest' % variables
- our_manifest = '%(out)s.manifest' % variables
- # Load and normalize the manifests. mt.exe sometimes removes whitespace,
- # and sometimes doesn't unfortunately.
- with open(our_manifest, 'rb') as our_f:
- with open(assert_manifest, 'rb') as assert_f:
- our_data = our_f.read().translate(None, string.whitespace)
- assert_data = assert_f.read().translate(None, string.whitespace)
- if our_data != assert_data:
- os.unlink(out)
- def dump(filename):
- sys.stderr.write('%s\n-----\n' % filename)
- with open(filename, 'rb') as f:
- sys.stderr.write(f.read() + '\n-----\n')
- dump(intermediate_manifest)
- dump(our_manifest)
- dump(assert_manifest)
- sys.stderr.write(
- 'Linker generated manifest "%s" added to final manifest "%s" '
- '(result in "%s"). '
- 'Were /MANIFEST switches used in #pragma statements? ' % (
- intermediate_manifest, our_manifest, assert_manifest))
- return 1
-
- def ExecManifestWrapper(self, arch, *args):
- """Run manifest tool with environment set. Strip out undesirable warning
- (some XML blocks are recognized by the OS loader, but not the manifest
- tool)."""
- env = self._GetEnv(arch)
- popen = subprocess.Popen(args, shell=True, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- out, _ = popen.communicate()
- if PY3:
- out = out.decode('utf-8')
- for line in out.splitlines():
- if line and 'manifest authoring warning 81010002' not in line:
- print(line)
- return popen.returncode
-
- def ExecManifestToRc(self, arch, *args):
- """Creates a resource file pointing a SxS assembly manifest.
- |args| is tuple containing path to resource file, path to manifest file
- and resource name which can be "1" (for executables) or "2" (for DLLs)."""
- manifest_path, resource_path, resource_name = args
- with open(resource_path, 'wb') as output:
- output.write('#include <windows.h>\n%s RT_MANIFEST "%s"' % (
- resource_name,
- os.path.abspath(manifest_path).replace('\\', '/')))
-
- def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl,
- *flags):
- """Filter noisy filenames output from MIDL compile step that isn't
- quietable via command line flags.
- """
- args = ['midl', '/nologo'] + list(flags) + [
- '/out', outdir,
- '/tlb', tlb,
- '/h', h,
- '/dlldata', dlldata,
- '/iid', iid,
- '/proxy', proxy,
- idl]
- env = self._GetEnv(arch)
- popen = subprocess.Popen(args, shell=True, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- out, _ = popen.communicate()
- if PY3:
- out = out.decode('utf-8')
- # Filter junk out of stdout, and write filtered versions. Output we want
- # to filter is pairs of lines that look like this:
- # Processing C:\Program Files (x86)\Microsoft SDKs\...\include\objidl.idl
- # objidl.idl
- lines = out.splitlines()
- prefixes = ('Processing ', '64 bit Processing ')
- processing = set(os.path.basename(x)
- for x in lines if x.startswith(prefixes))
- for line in lines:
- if not line.startswith(prefixes) and line not in processing:
- print(line)
- return popen.returncode
-
- def ExecAsmWrapper(self, arch, *args):
- """Filter logo banner from invocations of asm.exe."""
- env = self._GetEnv(arch)
- popen = subprocess.Popen(args, shell=True, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- out, _ = popen.communicate()
- if PY3:
- out = out.decode('utf-8')
- for line in out.splitlines():
- if (not line.startswith('Copyright (C) Microsoft Corporation') and
- not line.startswith('Microsoft (R) Macro Assembler') and
- not line.startswith(' Assembling: ') and
- line):
- print(line)
- return popen.returncode
-
- def ExecRcWrapper(self, arch, *args):
- """Filter logo banner from invocations of rc.exe. Older versions of RC
- don't support the /nologo flag."""
- env = self._GetEnv(arch)
- popen = subprocess.Popen(args, shell=True, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- out, _ = popen.communicate()
- if PY3:
- out = out.decode('utf-8')
- for line in out.splitlines():
- if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and
- not line.startswith('Copyright (C) Microsoft Corporation') and
- line):
- print(line)
- return popen.returncode
-
- def ExecActionWrapper(self, arch, rspfile, *dir):
- """Runs an action command line from a response file using the environment
- for |arch|. If |dir| is supplied, use that as the working directory."""
- env = self._GetEnv(arch)
- # TODO(scottmg): This is a temporary hack to get some specific variables
- # through to actions that are set after gyp-time. http://crbug.com/333738.
- for k, v in os.environ.items():
- if k not in env:
- env[k] = v
- args = open(rspfile).read()
- dir = dir[0] if dir else None
- return subprocess.call(args, shell=True, env=env, cwd=dir)
-
- def ExecClCompile(self, project_dir, selected_files):
- """Executed by msvs-ninja projects when the 'ClCompile' target is used to
- build selected C/C++ files."""
- project_dir = os.path.relpath(project_dir, BASE_DIR)
- selected_files = selected_files.split(';')
- ninja_targets = [os.path.join(project_dir, filename) + '^^'
- for filename in selected_files]
- cmd = ['ninja.exe']
- cmd.extend(ninja_targets)
- return subprocess.call(cmd, shell=True, cwd=BASE_DIR)
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
deleted file mode 100644
index 601716499..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
+++ /dev/null
@@ -1,1660 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This module contains classes that help to emulate xcodebuild behavior on top of
-other build systems, such as make and ninja.
-"""
-
-from __future__ import print_function
-
-import copy
-import gyp.common
-import os
-import os.path
-import re
-import shlex
-import subprocess
-import sys
-import tempfile
-from gyp.common import GypError
-
-PY3 = bytes != str
-
-# Populated lazily by XcodeVersion, for efficiency, and to fix an issue when
-# "xcodebuild" is called too quickly (it has been found to return incorrect
-# version number).
-XCODE_VERSION_CACHE = None
-
-# Populated lazily by GetXcodeArchsDefault, to an |XcodeArchsDefault| instance
-# corresponding to the installed version of Xcode.
-XCODE_ARCHS_DEFAULT_CACHE = None
-
-
-def XcodeArchsVariableMapping(archs, archs_including_64_bit=None):
- """Constructs a dictionary with expansion for $(ARCHS_STANDARD) variable,
- and optionally for $(ARCHS_STANDARD_INCLUDING_64_BIT)."""
- mapping = {'$(ARCHS_STANDARD)': archs}
- if archs_including_64_bit:
- mapping['$(ARCHS_STANDARD_INCLUDING_64_BIT)'] = archs_including_64_bit
- return mapping
-
-class XcodeArchsDefault(object):
- """A class to resolve ARCHS variable from xcode_settings, resolving Xcode
- macros and implementing filtering by VALID_ARCHS. The expansion of macros
- depends on the SDKROOT used ("macosx", "iphoneos", "iphonesimulator") and
- on the version of Xcode.
- """
-
- # Match variable like $(ARCHS_STANDARD).
- variable_pattern = re.compile(r'\$\([a-zA-Z_][a-zA-Z0-9_]*\)$')
-
- def __init__(self, default, mac, iphonesimulator, iphoneos):
- self._default = (default,)
- self._archs = {'mac': mac, 'ios': iphoneos, 'iossim': iphonesimulator}
-
- def _VariableMapping(self, sdkroot):
- """Returns the dictionary of variable mapping depending on the SDKROOT."""
- sdkroot = sdkroot.lower()
- if 'iphoneos' in sdkroot:
- return self._archs['ios']
- elif 'iphonesimulator' in sdkroot:
- return self._archs['iossim']
- else:
- return self._archs['mac']
-
- def _ExpandArchs(self, archs, sdkroot):
- """Expands variables references in ARCHS, and remove duplicates."""
- variable_mapping = self._VariableMapping(sdkroot)
- expanded_archs = []
- for arch in archs:
- if self.variable_pattern.match(arch):
- variable = arch
- try:
- variable_expansion = variable_mapping[variable]
- for arch in variable_expansion:
- if arch not in expanded_archs:
- expanded_archs.append(arch)
- except KeyError as e:
- print('Warning: Ignoring unsupported variable "%s".' % variable)
- elif arch not in expanded_archs:
- expanded_archs.append(arch)
- return expanded_archs
-
- def ActiveArchs(self, archs, valid_archs, sdkroot):
- """Expands variables references in ARCHS, and filter by VALID_ARCHS if it
- is defined (if not set, Xcode accept any value in ARCHS, otherwise, only
- values present in VALID_ARCHS are kept)."""
- expanded_archs = self._ExpandArchs(archs or self._default, sdkroot or '')
- if valid_archs:
- filtered_archs = []
- for arch in expanded_archs:
- if arch in valid_archs:
- filtered_archs.append(arch)
- expanded_archs = filtered_archs
- return expanded_archs
-
-
-def GetXcodeArchsDefault():
- """Returns the |XcodeArchsDefault| object to use to expand ARCHS for the
- installed version of Xcode. The default values used by Xcode for ARCHS
- and the expansion of the variables depends on the version of Xcode used.
-
- For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included
- uses $(ARCHS_STANDARD) if ARCHS is unset, while Xcode 5.0 to 5.0.2 uses
- $(ARCHS_STANDARD_INCLUDING_64_BIT). This variable was added to Xcode 5.0
- and deprecated with Xcode 5.1.
-
- For "macosx" SDKROOT, all version starting with Xcode 5.0 includes 64-bit
- architecture as part of $(ARCHS_STANDARD) and default to only building it.
-
- For "iphoneos" and "iphonesimulator" SDKROOT, 64-bit architectures are part
- of $(ARCHS_STANDARD_INCLUDING_64_BIT) from Xcode 5.0. From Xcode 5.1, they
- are also part of $(ARCHS_STANDARD).
-
- All thoses rules are coded in the construction of the |XcodeArchsDefault|
- object to use depending on the version of Xcode detected. The object is
- for performance reason."""
- global XCODE_ARCHS_DEFAULT_CACHE
- if XCODE_ARCHS_DEFAULT_CACHE:
- return XCODE_ARCHS_DEFAULT_CACHE
- xcode_version, _ = XcodeVersion()
- if xcode_version < '0500':
- XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
- '$(ARCHS_STANDARD)',
- XcodeArchsVariableMapping(['i386']),
- XcodeArchsVariableMapping(['i386']),
- XcodeArchsVariableMapping(['armv7']))
- elif xcode_version < '0510':
- XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
- '$(ARCHS_STANDARD_INCLUDING_64_BIT)',
- XcodeArchsVariableMapping(['x86_64'], ['x86_64']),
- XcodeArchsVariableMapping(['i386'], ['i386', 'x86_64']),
- XcodeArchsVariableMapping(
- ['armv7', 'armv7s'],
- ['armv7', 'armv7s', 'arm64']))
- else:
- XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault(
- '$(ARCHS_STANDARD)',
- XcodeArchsVariableMapping(['x86_64'], ['x86_64']),
- XcodeArchsVariableMapping(['i386', 'x86_64'], ['i386', 'x86_64']),
- XcodeArchsVariableMapping(
- ['armv7', 'armv7s', 'arm64'],
- ['armv7', 'armv7s', 'arm64']))
- return XCODE_ARCHS_DEFAULT_CACHE
-
-
-class XcodeSettings(object):
- """A class that understands the gyp 'xcode_settings' object."""
-
- # Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached
- # at class-level for efficiency.
- _sdk_path_cache = {}
- _sdk_root_cache = {}
-
- # Populated lazily by GetExtraPlistItems(). Shared by all XcodeSettings, so
- # cached at class-level for efficiency.
- _plist_cache = {}
-
- # Populated lazily by GetIOSPostbuilds. Shared by all XcodeSettings, so
- # cached at class-level for efficiency.
- _codesigning_key_cache = {}
-
- def __init__(self, spec):
- self.spec = spec
-
- self.isIOS = False
-
- # Per-target 'xcode_settings' are pushed down into configs earlier by gyp.
- # This means self.xcode_settings[config] always contains all settings
- # for that config -- the per-target settings as well. Settings that are
- # the same for all configs are implicitly per-target settings.
- self.xcode_settings = {}
- configs = spec['configurations']
- for configname, config in configs.items():
- self.xcode_settings[configname] = config.get('xcode_settings', {})
- self._ConvertConditionalKeys(configname)
- if self.xcode_settings[configname].get('IPHONEOS_DEPLOYMENT_TARGET',
- None):
- self.isIOS = True
-
- # This is only non-None temporarily during the execution of some methods.
- self.configname = None
-
- # Used by _AdjustLibrary to match .a and .dylib entries in libraries.
- self.library_re = re.compile(r'^lib([^/]+)\.(a|dylib)$')
-
- def _ConvertConditionalKeys(self, configname):
- """Converts or warns on conditional keys. Xcode supports conditional keys,
- such as CODE_SIGN_IDENTITY[sdk=iphoneos*]. This is a partial implementation
- with some keys converted while the rest force a warning."""
- settings = self.xcode_settings[configname]
- conditional_keys = [key for key in settings if key.endswith(']')]
- for key in conditional_keys:
- # If you need more, speak up at http://crbug.com/122592
- if key.endswith("[sdk=iphoneos*]"):
- if configname.endswith("iphoneos"):
- new_key = key.split("[")[0]
- settings[new_key] = settings[key]
- else:
- print('Warning: Conditional keys not implemented, ignoring:', \
- ' '.join(conditional_keys))
- del settings[key]
-
- def _Settings(self):
- assert self.configname
- return self.xcode_settings[self.configname]
-
- def _Test(self, test_key, cond_key, default):
- return self._Settings().get(test_key, default) == cond_key
-
- def _Appendf(self, lst, test_key, format_str, default=None):
- if test_key in self._Settings():
- lst.append(format_str % str(self._Settings()[test_key]))
- elif default:
- lst.append(format_str % str(default))
-
- def _WarnUnimplemented(self, test_key):
- if test_key in self._Settings():
- print('Warning: Ignoring not yet implemented key "%s".' % test_key)
-
- def IsBinaryOutputFormat(self, configname):
- default = "binary" if self.isIOS else "xml"
- format = self.xcode_settings[configname].get('INFOPLIST_OUTPUT_FORMAT',
- default)
- return format == "binary"
-
- def _IsBundle(self):
- return int(self.spec.get('mac_bundle', 0)) != 0
-
- def _IsIosAppExtension(self):
- return int(self.spec.get('ios_app_extension', 0)) != 0
-
- def _IsIosWatchKitExtension(self):
- return int(self.spec.get('ios_watchkit_extension', 0)) != 0
-
- def _IsIosWatchApp(self):
- return int(self.spec.get('ios_watch_app', 0)) != 0
-
- def _IsXCTest(self):
- return int(self.spec.get('mac_xctest_bundle', 0)) != 0
-
- def GetFrameworkVersion(self):
- """Returns the framework version of the current target. Only valid for
- bundles."""
- assert self._IsBundle()
- return self.GetPerTargetSetting('FRAMEWORK_VERSION', default='A')
-
- def GetWrapperExtension(self):
- """Returns the bundle extension (.app, .framework, .plugin, etc). Only
- valid for bundles."""
- assert self._IsBundle()
- if self.spec['type'] in ('loadable_module', 'shared_library'):
- default_wrapper_extension = {
- 'loadable_module': 'bundle',
- 'shared_library': 'framework',
- }[self.spec['type']]
- wrapper_extension = self.GetPerTargetSetting(
- 'WRAPPER_EXTENSION', default=default_wrapper_extension)
- return '.' + self.spec.get('product_extension', wrapper_extension)
- elif self.spec['type'] == 'executable':
- if self._IsIosAppExtension() or self._IsIosWatchKitExtension():
- return '.' + self.spec.get('product_extension', 'appex')
- else:
- return '.' + self.spec.get('product_extension', 'app')
- else:
- assert False, "Don't know extension for '%s', target '%s'" % (
- self.spec['type'], self.spec['target_name'])
-
- def GetProductName(self):
- """Returns PRODUCT_NAME."""
- return self.spec.get('product_name', self.spec['target_name'])
-
- def GetFullProductName(self):
- """Returns FULL_PRODUCT_NAME."""
- if self._IsBundle():
- return self.GetWrapperName()
- else:
- return self._GetStandaloneBinaryPath()
-
- def GetWrapperName(self):
- """Returns the directory name of the bundle represented by this target.
- Only valid for bundles."""
- assert self._IsBundle()
- return self.GetProductName() + self.GetWrapperExtension()
-
- def GetBundleContentsFolderPath(self):
- """Returns the qualified path to the bundle's contents folder. E.g.
- Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles."""
- if self.isIOS:
- return self.GetWrapperName()
- assert self._IsBundle()
- if self.spec['type'] == 'shared_library':
- return os.path.join(
- self.GetWrapperName(), 'Versions', self.GetFrameworkVersion())
- else:
- # loadable_modules have a 'Contents' folder like executables.
- return os.path.join(self.GetWrapperName(), 'Contents')
-
- def GetBundleResourceFolder(self):
- """Returns the qualified path to the bundle's resource folder. E.g.
- Chromium.app/Contents/Resources. Only valid for bundles."""
- assert self._IsBundle()
- if self.isIOS:
- return self.GetBundleContentsFolderPath()
- return os.path.join(self.GetBundleContentsFolderPath(), 'Resources')
-
- def GetBundlePlistPath(self):
- """Returns the qualified path to the bundle's plist file. E.g.
- Chromium.app/Contents/Info.plist. Only valid for bundles."""
- assert self._IsBundle()
- if self.spec['type'] in ('executable', 'loadable_module'):
- return os.path.join(self.GetBundleContentsFolderPath(), 'Info.plist')
- else:
- return os.path.join(self.GetBundleContentsFolderPath(),
- 'Resources', 'Info.plist')
-
- def GetProductType(self):
- """Returns the PRODUCT_TYPE of this target."""
- if self._IsIosAppExtension():
- assert self._IsBundle(), ('ios_app_extension flag requires mac_bundle '
- '(target %s)' % self.spec['target_name'])
- return 'com.apple.product-type.app-extension'
- if self._IsIosWatchKitExtension():
- assert self._IsBundle(), ('ios_watchkit_extension flag requires '
- 'mac_bundle (target %s)' % self.spec['target_name'])
- return 'com.apple.product-type.watchkit-extension'
- if self._IsIosWatchApp():
- assert self._IsBundle(), ('ios_watch_app flag requires mac_bundle '
- '(target %s)' % self.spec['target_name'])
- return 'com.apple.product-type.application.watchapp'
- if self._IsBundle():
- return {
- 'executable': 'com.apple.product-type.application',
- 'loadable_module': 'com.apple.product-type.bundle',
- 'shared_library': 'com.apple.product-type.framework',
- }[self.spec['type']]
- else:
- return {
- 'executable': 'com.apple.product-type.tool',
- 'loadable_module': 'com.apple.product-type.library.dynamic',
- 'shared_library': 'com.apple.product-type.library.dynamic',
- 'static_library': 'com.apple.product-type.library.static',
- }[self.spec['type']]
-
- def GetMachOType(self):
- """Returns the MACH_O_TYPE of this target."""
- # Weird, but matches Xcode.
- if not self._IsBundle() and self.spec['type'] == 'executable':
- return ''
- return {
- 'executable': 'mh_execute',
- 'static_library': 'staticlib',
- 'shared_library': 'mh_dylib',
- 'loadable_module': 'mh_bundle',
- }[self.spec['type']]
-
- def _GetBundleBinaryPath(self):
- """Returns the name of the bundle binary of by this target.
- E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles."""
- assert self._IsBundle()
- if self.spec['type'] in ('shared_library') or self.isIOS:
- path = self.GetBundleContentsFolderPath()
- elif self.spec['type'] in ('executable', 'loadable_module'):
- path = os.path.join(self.GetBundleContentsFolderPath(), 'MacOS')
- return os.path.join(path, self.GetExecutableName())
-
- def _GetStandaloneExecutableSuffix(self):
- if 'product_extension' in self.spec:
- return '.' + self.spec['product_extension']
- return {
- 'executable': '',
- 'static_library': '.a',
- 'shared_library': '.dylib',
- 'loadable_module': '.so',
- }[self.spec['type']]
-
- def _GetStandaloneExecutablePrefix(self):
- return self.spec.get('product_prefix', {
- 'executable': '',
- 'static_library': 'lib',
- 'shared_library': 'lib',
- # Non-bundled loadable_modules are called foo.so for some reason
- # (that is, .so and no prefix) with the xcode build -- match that.
- 'loadable_module': '',
- }[self.spec['type']])
-
- def _GetStandaloneBinaryPath(self):
- """Returns the name of the non-bundle binary represented by this target.
- E.g. hello_world. Only valid for non-bundles."""
- assert not self._IsBundle()
- assert self.spec['type'] in (
- 'executable', 'shared_library', 'static_library', 'loadable_module'), (
- 'Unexpected type %s' % self.spec['type'])
- target = self.spec['target_name']
- if self.spec['type'] == 'static_library':
- if target[:3] == 'lib':
- target = target[3:]
- elif self.spec['type'] in ('loadable_module', 'shared_library'):
- if target[:3] == 'lib':
- target = target[3:]
-
- target_prefix = self._GetStandaloneExecutablePrefix()
- target = self.spec.get('product_name', target)
- target_ext = self._GetStandaloneExecutableSuffix()
- return target_prefix + target + target_ext
-
- def GetExecutableName(self):
- """Returns the executable name of the bundle represented by this target.
- E.g. Chromium."""
- if self._IsBundle():
- return self.spec.get('product_name', self.spec['target_name'])
- else:
- return self._GetStandaloneBinaryPath()
-
- def GetExecutablePath(self):
- """Returns the directory name of the bundle represented by this target. E.g.
- Chromium.app/Contents/MacOS/Chromium."""
- if self._IsBundle():
- return self._GetBundleBinaryPath()
- else:
- return self._GetStandaloneBinaryPath()
-
- def GetActiveArchs(self, configname):
- """Returns the architectures this target should be built for."""
- config_settings = self.xcode_settings[configname]
- xcode_archs_default = GetXcodeArchsDefault()
- return xcode_archs_default.ActiveArchs(
- config_settings.get('ARCHS'),
- config_settings.get('VALID_ARCHS'),
- config_settings.get('SDKROOT'))
-
- def _GetSdkVersionInfoItem(self, sdk, infoitem):
- # xcodebuild requires Xcode and can't run on Command Line Tools-only
- # systems from 10.7 onward.
- # Since the CLT has no SDK paths anyway, returning None is the
- # most sensible route and should still do the right thing.
- try:
- return GetStdoutQuiet(['xcodebuild', '-version', '-sdk', sdk, infoitem])
- except GypError:
- pass
-
- def _SdkRoot(self, configname):
- if configname is None:
- configname = self.configname
- return self.GetPerConfigSetting('SDKROOT', configname, default='')
-
- def _SdkPath(self, configname=None):
- sdk_root = self._SdkRoot(configname)
- if sdk_root.startswith('/'):
- return sdk_root
- return self._XcodeSdkPath(sdk_root)
-
- def _XcodeSdkPath(self, sdk_root):
- if sdk_root not in XcodeSettings._sdk_path_cache:
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
- if sdk_root:
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
- return XcodeSettings._sdk_path_cache[sdk_root]
-
- def _AppendPlatformVersionMinFlags(self, lst):
- self._Appendf(lst, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
- if 'IPHONEOS_DEPLOYMENT_TARGET' in self._Settings():
- # TODO: Implement this better?
- sdk_path_basename = os.path.basename(self._SdkPath())
- if sdk_path_basename.lower().startswith('iphonesimulator'):
- self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
- '-mios-simulator-version-min=%s')
- else:
- self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
- '-miphoneos-version-min=%s')
-
- def GetCflags(self, configname, arch=None):
- """Returns flags that need to be added to .c, .cc, .m, and .mm
- compilations."""
- # This functions (and the similar ones below) do not offer complete
- # emulation of all xcode_settings keys. They're implemented on demand.
-
- self.configname = configname
- cflags = []
-
- sdk_root = self._SdkPath()
- if 'SDKROOT' in self._Settings() and sdk_root:
- cflags.append('-isysroot %s' % sdk_root)
-
- if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'):
- cflags.append('-Wconstant-conversion')
-
- if self._Test('GCC_CHAR_IS_UNSIGNED_CHAR', 'YES', default='NO'):
- cflags.append('-funsigned-char')
-
- if self._Test('GCC_CW_ASM_SYNTAX', 'YES', default='YES'):
- cflags.append('-fasm-blocks')
-
- if 'GCC_DYNAMIC_NO_PIC' in self._Settings():
- if self._Settings()['GCC_DYNAMIC_NO_PIC'] == 'YES':
- cflags.append('-mdynamic-no-pic')
- else:
- pass
- # TODO: In this case, it depends on the target. xcode passes
- # mdynamic-no-pic by default for executable and possibly static lib
- # according to mento
-
- if self._Test('GCC_ENABLE_PASCAL_STRINGS', 'YES', default='YES'):
- cflags.append('-mpascal-strings')
-
- self._Appendf(cflags, 'GCC_OPTIMIZATION_LEVEL', '-O%s', default='s')
-
- if self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES'):
- dbg_format = self._Settings().get('DEBUG_INFORMATION_FORMAT', 'dwarf')
- if dbg_format == 'dwarf':
- cflags.append('-gdwarf-2')
- elif dbg_format == 'stabs':
- raise NotImplementedError('stabs debug format is not supported yet.')
- elif dbg_format == 'dwarf-with-dsym':
- cflags.append('-gdwarf-2')
- else:
- raise NotImplementedError('Unknown debug format %s' % dbg_format)
-
- if self._Settings().get('GCC_STRICT_ALIASING') == 'YES':
- cflags.append('-fstrict-aliasing')
- elif self._Settings().get('GCC_STRICT_ALIASING') == 'NO':
- cflags.append('-fno-strict-aliasing')
-
- if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'):
- cflags.append('-fvisibility=hidden')
-
- if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'):
- cflags.append('-Werror')
-
- if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
- cflags.append('-Wnewline-eof')
-
- # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or
- # llvm-gcc. It also requires a fairly recent libtool, and
- # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the
- # path to the libLTO.dylib that matches the used clang.
- if self._Test('LLVM_LTO', 'YES', default='NO'):
- cflags.append('-flto')
-
- self._AppendPlatformVersionMinFlags(cflags)
-
- # TODO:
- if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'):
- self._WarnUnimplemented('COPY_PHASE_STRIP')
- self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS')
- self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS')
-
- # TODO: This is exported correctly, but assigning to it is not supported.
- self._WarnUnimplemented('MACH_O_TYPE')
- self._WarnUnimplemented('PRODUCT_TYPE')
-
- if arch is not None:
- archs = [arch]
- else:
- assert self.configname
- archs = self.GetActiveArchs(self.configname)
- if len(archs) != 1:
- # TODO: Supporting fat binaries will be annoying.
- self._WarnUnimplemented('ARCHS')
- archs = ['i386']
- cflags.append('-arch ' + archs[0])
-
- if archs[0] in ('i386', 'x86_64'):
- if self._Test('GCC_ENABLE_SSE3_EXTENSIONS', 'YES', default='NO'):
- cflags.append('-msse3')
- if self._Test('GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS', 'YES',
- default='NO'):
- cflags.append('-mssse3') # Note 3rd 's'.
- if self._Test('GCC_ENABLE_SSE41_EXTENSIONS', 'YES', default='NO'):
- cflags.append('-msse4.1')
- if self._Test('GCC_ENABLE_SSE42_EXTENSIONS', 'YES', default='NO'):
- cflags.append('-msse4.2')
-
- cflags += self._Settings().get('WARNING_CFLAGS', [])
-
- if self._IsXCTest():
- platform_root = self._XcodePlatformPath(configname)
- if platform_root:
- cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/')
-
- if sdk_root:
- framework_root = sdk_root
- else:
- framework_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
-
- self.configname = None
- return cflags
-
- def GetCflagsC(self, configname):
- """Returns flags that need to be added to .c, and .m compilations."""
- self.configname = configname
- cflags_c = []
- if self._Settings().get('GCC_C_LANGUAGE_STANDARD', '') == 'ansi':
- cflags_c.append('-ansi')
- else:
- self._Appendf(cflags_c, 'GCC_C_LANGUAGE_STANDARD', '-std=%s')
- cflags_c += self._Settings().get('OTHER_CFLAGS', [])
- self.configname = None
- return cflags_c
-
- def GetCflagsCC(self, configname):
- """Returns flags that need to be added to .cc, and .mm compilations."""
- self.configname = configname
- cflags_cc = []
-
- clang_cxx_language_standard = self._Settings().get(
- 'CLANG_CXX_LANGUAGE_STANDARD')
- # Note: Don't make c++0x to c++11 so that c++0x can be used with older
- # clangs that don't understand c++11 yet (like Xcode 4.2's).
- if clang_cxx_language_standard:
- cflags_cc.append('-std=%s' % clang_cxx_language_standard)
-
- self._Appendf(cflags_cc, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
-
- if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'):
- cflags_cc.append('-fno-rtti')
- if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'):
- cflags_cc.append('-fno-exceptions')
- if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'):
- cflags_cc.append('-fvisibility-inlines-hidden')
- if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'):
- cflags_cc.append('-fno-threadsafe-statics')
- # Note: This flag is a no-op for clang, it only has an effect for gcc.
- if self._Test('GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO', 'NO', default='YES'):
- cflags_cc.append('-Wno-invalid-offsetof')
-
- other_ccflags = []
-
- for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']):
- # TODO: More general variable expansion. Missing in many other places too.
- if flag in ('$inherited', '$(inherited)', '${inherited}'):
- flag = '$OTHER_CFLAGS'
- if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'):
- other_ccflags += self._Settings().get('OTHER_CFLAGS', [])
- else:
- other_ccflags.append(flag)
- cflags_cc += other_ccflags
-
- self.configname = None
- return cflags_cc
-
- def _AddObjectiveCGarbageCollectionFlags(self, flags):
- gc_policy = self._Settings().get('GCC_ENABLE_OBJC_GC', 'unsupported')
- if gc_policy == 'supported':
- flags.append('-fobjc-gc')
- elif gc_policy == 'required':
- flags.append('-fobjc-gc-only')
-
- def _AddObjectiveCARCFlags(self, flags):
- if self._Test('CLANG_ENABLE_OBJC_ARC', 'YES', default='NO'):
- flags.append('-fobjc-arc')
-
- def _AddObjectiveCMissingPropertySynthesisFlags(self, flags):
- if self._Test('CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS',
- 'YES', default='NO'):
- flags.append('-Wobjc-missing-property-synthesis')
-
- def GetCflagsObjC(self, configname):
- """Returns flags that need to be added to .m compilations."""
- self.configname = configname
- cflags_objc = []
- self._AddObjectiveCGarbageCollectionFlags(cflags_objc)
- self._AddObjectiveCARCFlags(cflags_objc)
- self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objc)
- self.configname = None
- return cflags_objc
-
- def GetCflagsObjCC(self, configname):
- """Returns flags that need to be added to .mm compilations."""
- self.configname = configname
- cflags_objcc = []
- self._AddObjectiveCGarbageCollectionFlags(cflags_objcc)
- self._AddObjectiveCARCFlags(cflags_objcc)
- self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objcc)
- if self._Test('GCC_OBJC_CALL_CXX_CDTORS', 'YES', default='NO'):
- cflags_objcc.append('-fobjc-call-cxx-cdtors')
- self.configname = None
- return cflags_objcc
-
- def GetInstallNameBase(self):
- """Return DYLIB_INSTALL_NAME_BASE for this target."""
- # Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
- if (self.spec['type'] != 'shared_library' and
- (self.spec['type'] != 'loadable_module' or self._IsBundle())):
- return None
- install_base = self.GetPerTargetSetting(
- 'DYLIB_INSTALL_NAME_BASE',
- default='/Library/Frameworks' if self._IsBundle() else '/usr/local/lib')
- return install_base
-
- def _StandardizePath(self, path):
- """Do :standardizepath processing for path."""
- # I'm not quite sure what :standardizepath does. Just call normpath(),
- # but don't let @executable_path/../foo collapse to foo.
- if '/' in path:
- prefix, rest = '', path
- if path.startswith('@'):
- prefix, rest = path.split('/', 1)
- rest = os.path.normpath(rest) # :standardizepath
- path = os.path.join(prefix, rest)
- return path
-
- def GetInstallName(self):
- """Return LD_DYLIB_INSTALL_NAME for this target."""
- # Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
- if (self.spec['type'] != 'shared_library' and
- (self.spec['type'] != 'loadable_module' or self._IsBundle())):
- return None
-
- default_install_name = \
- '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)'
- install_name = self.GetPerTargetSetting(
- 'LD_DYLIB_INSTALL_NAME', default=default_install_name)
-
- # Hardcode support for the variables used in chromium for now, to
- # unblock people using the make build.
- if '$' in install_name:
- assert install_name in ('$(DYLIB_INSTALL_NAME_BASE:standardizepath)/'
- '$(WRAPPER_NAME)/$(PRODUCT_NAME)', default_install_name), (
- 'Variables in LD_DYLIB_INSTALL_NAME are not generally supported '
- 'yet in target \'%s\' (got \'%s\')' %
- (self.spec['target_name'], install_name))
-
- install_name = install_name.replace(
- '$(DYLIB_INSTALL_NAME_BASE:standardizepath)',
- self._StandardizePath(self.GetInstallNameBase()))
- if self._IsBundle():
- # These are only valid for bundles, hence the |if|.
- install_name = install_name.replace(
- '$(WRAPPER_NAME)', self.GetWrapperName())
- install_name = install_name.replace(
- '$(PRODUCT_NAME)', self.GetProductName())
- else:
- assert '$(WRAPPER_NAME)' not in install_name
- assert '$(PRODUCT_NAME)' not in install_name
-
- install_name = install_name.replace(
- '$(EXECUTABLE_PATH)', self.GetExecutablePath())
- return install_name
-
- def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path):
- """Checks if ldflag contains a filename and if so remaps it from
- gyp-directory-relative to build-directory-relative."""
- # This list is expanded on demand.
- # They get matched as:
- # -exported_symbols_list file
- # -Wl,exported_symbols_list file
- # -Wl,exported_symbols_list,file
- LINKER_FILE = r'(\S+)'
- WORD = r'\S+'
- linker_flags = [
- ['-exported_symbols_list', LINKER_FILE], # Needed for NaCl.
- ['-unexported_symbols_list', LINKER_FILE],
- ['-reexported_symbols_list', LINKER_FILE],
- ['-sectcreate', WORD, WORD, LINKER_FILE], # Needed for remoting.
- ]
- for flag_pattern in linker_flags:
- regex = re.compile('(?:-Wl,)?' + '[ ,]'.join(flag_pattern))
- m = regex.match(ldflag)
- if m:
- ldflag = ldflag[:m.start(1)] + gyp_to_build_path(m.group(1)) + \
- ldflag[m.end(1):]
- # Required for ffmpeg (no idea why they don't use LIBRARY_SEARCH_PATHS,
- # TODO(thakis): Update ffmpeg.gyp):
- if ldflag.startswith('-L'):
- ldflag = '-L' + gyp_to_build_path(ldflag[len('-L'):])
- return ldflag
-
- def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
- """Returns flags that need to be passed to the linker.
-
- Args:
- configname: The name of the configuration to get ld flags for.
- product_dir: The directory where products such static and dynamic
- libraries are placed. This is added to the library search path.
- gyp_to_build_path: A function that converts paths relative to the
- current gyp file to paths relative to the build directory.
- """
- self.configname = configname
- ldflags = []
-
- # The xcode build is relative to a gyp file's directory, and OTHER_LDFLAGS
- # can contain entries that depend on this. Explicitly absolutify these.
- for ldflag in self._Settings().get('OTHER_LDFLAGS', []):
- ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path))
-
- if self._Test('DEAD_CODE_STRIPPING', 'YES', default='NO'):
- ldflags.append('-Wl,-dead_strip')
-
- if self._Test('PREBINDING', 'YES', default='NO'):
- ldflags.append('-Wl,-prebind')
-
- self._Appendf(
- ldflags, 'DYLIB_COMPATIBILITY_VERSION', '-compatibility_version %s')
- self._Appendf(
- ldflags, 'DYLIB_CURRENT_VERSION', '-current_version %s')
-
- self._AppendPlatformVersionMinFlags(ldflags)
-
- if 'SDKROOT' in self._Settings() and self._SdkPath():
- ldflags.append('-isysroot ' + self._SdkPath())
-
- for library_path in self._Settings().get('LIBRARY_SEARCH_PATHS', []):
- ldflags.append('-L' + gyp_to_build_path(library_path))
-
- if 'ORDER_FILE' in self._Settings():
- ldflags.append('-Wl,-order_file ' +
- '-Wl,' + gyp_to_build_path(
- self._Settings()['ORDER_FILE']))
-
- if arch is not None:
- archs = [arch]
- else:
- assert self.configname
- archs = self.GetActiveArchs(self.configname)
- if len(archs) != 1:
- # TODO: Supporting fat binaries will be annoying.
- self._WarnUnimplemented('ARCHS')
- archs = ['i386']
- ldflags.append('-arch ' + archs[0])
-
- # Xcode adds the product directory by default.
- ldflags.append('-L' + product_dir)
-
- install_name = self.GetInstallName()
- if install_name and self.spec['type'] != 'loadable_module':
- ldflags.append('-install_name ' + install_name.replace(' ', r'\ '))
-
- for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []):
- ldflags.append('-Wl,-rpath,' + rpath)
-
- sdk_root = self._SdkPath()
- if not sdk_root:
- sdk_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
-
- if self._IsXCTest():
- platform_root = self._XcodePlatformPath(configname)
- if platform_root:
- ldflags.append('-F' + platform_root + '/Developer/Library/Frameworks/')
-
- is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
- if sdk_root and is_extension:
- # Adds the link flags for extensions. These flags are common for all
- # extensions and provide loader and main function.
- # These flags reflect the compilation options used by xcode to compile
- # extensions.
- ldflags.append('-lpkstart')
- xcode_version, _ = XcodeVersion()
- if xcode_version < '0900':
- ldflags.append(sdk_root +
- '/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit')
- ldflags.append('-fapplication-extension')
- ldflags.append('-Xlinker -rpath '
- '-Xlinker @executable_path/../../Frameworks')
-
- self._Appendf(ldflags, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
-
- self.configname = None
- return ldflags
-
- def GetLibtoolflags(self, configname):
- """Returns flags that need to be passed to the static linker.
-
- Args:
- configname: The name of the configuration to get ld flags for.
- """
- self.configname = configname
- libtoolflags = []
-
- for libtoolflag in self._Settings().get('OTHER_LDFLAGS', []):
- libtoolflags.append(libtoolflag)
- # TODO(thakis): ARCHS?
-
- self.configname = None
- return libtoolflags
-
- def GetPerTargetSettings(self):
- """Gets a list of all the per-target settings. This will only fetch keys
- whose values are the same across all configurations."""
- first_pass = True
- result = {}
- for configname in sorted(self.xcode_settings.keys()):
- if first_pass:
- result = dict(self.xcode_settings[configname])
- first_pass = False
- else:
- for key, value in self.xcode_settings[configname].items():
- if key not in result:
- continue
- elif result[key] != value:
- del result[key]
- return result
-
- def GetPerConfigSetting(self, setting, configname, default=None):
- if configname in self.xcode_settings:
- return self.xcode_settings[configname].get(setting, default)
- else:
- return self.GetPerTargetSetting(setting, default)
-
- def GetPerTargetSetting(self, setting, default=None):
- """Tries to get xcode_settings.setting from spec. Assumes that the setting
- has the same value in all configurations and throws otherwise."""
- is_first_pass = True
- result = None
- for configname in sorted(self.xcode_settings.keys()):
- if is_first_pass:
- result = self.xcode_settings[configname].get(setting, None)
- is_first_pass = False
- else:
- assert result == self.xcode_settings[configname].get(setting, None), (
- "Expected per-target setting for '%s', got per-config setting "
- "(target %s)" % (setting, self.spec['target_name']))
- if result is None:
- return default
- return result
-
- def _GetStripPostbuilds(self, configname, output_binary, quiet):
- """Returns a list of shell commands that contain the shell commands
- necessary to strip this target's binary. These should be run as postbuilds
- before the actual postbuilds run."""
- self.configname = configname
-
- result = []
- if (self._Test('DEPLOYMENT_POSTPROCESSING', 'YES', default='NO') and
- self._Test('STRIP_INSTALLED_PRODUCT', 'YES', default='NO')):
-
- default_strip_style = 'debugging'
- if self.spec['type'] == 'loadable_module' and self._IsBundle():
- default_strip_style = 'non-global'
- elif self.spec['type'] == 'executable':
- default_strip_style = 'all'
-
- strip_style = self._Settings().get('STRIP_STYLE', default_strip_style)
- strip_flags = {
- 'all': '',
- 'non-global': '-x',
- 'debugging': '-S',
- }[strip_style]
-
- explicit_strip_flags = self._Settings().get('STRIPFLAGS', '')
- if explicit_strip_flags:
- strip_flags += ' ' + _NormalizeEnvVarReferences(explicit_strip_flags)
-
- if not quiet:
- result.append('echo STRIP\\(%s\\)' % self.spec['target_name'])
- result.append('strip %s %s' % (strip_flags, output_binary))
-
- self.configname = None
- return result
-
- def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet):
- """Returns a list of shell commands that contain the shell commands
- necessary to massage this target's debug information. These should be run
- as postbuilds before the actual postbuilds run."""
- self.configname = configname
-
- # For static libraries, no dSYMs are created.
- result = []
- if (self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES') and
- self._Test(
- 'DEBUG_INFORMATION_FORMAT', 'dwarf-with-dsym', default='dwarf') and
- self.spec['type'] != 'static_library'):
- if not quiet:
- result.append('echo DSYMUTIL\\(%s\\)' % self.spec['target_name'])
- result.append('dsymutil %s -o %s' % (output_binary, output + '.dSYM'))
-
- self.configname = None
- return result
-
- def _GetTargetPostbuilds(self, configname, output, output_binary,
- quiet=False):
- """Returns a list of shell commands that contain the shell commands
- to run as postbuilds for this target, before the actual postbuilds."""
- # dSYMs need to build before stripping happens.
- return (
- self._GetDebugInfoPostbuilds(configname, output, output_binary, quiet) +
- self._GetStripPostbuilds(configname, output_binary, quiet))
-
- def _GetIOSPostbuilds(self, configname, output_binary):
- """Return a shell command to codesign the iOS output binary so it can
- be deployed to a device. This should be run as the very last step of the
- build."""
- if not (self.isIOS and self.spec['type'] == 'executable'):
- return []
-
- settings = self.xcode_settings[configname]
- key = self._GetIOSCodeSignIdentityKey(settings)
- if not key:
- return []
-
- # Warn for any unimplemented signing xcode keys.
- unimpl = ['OTHER_CODE_SIGN_FLAGS']
- unimpl = set(unimpl) & set(self.xcode_settings[configname].keys())
- if unimpl:
- print('Warning: Some codesign keys not implemented, ignoring: %s' % (
- ', '.join(sorted(unimpl))))
-
- return ['%s code-sign-bundle "%s" "%s" "%s" "%s"' % (
- os.path.join('${TARGET_BUILD_DIR}', 'gyp-mac-tool'), key,
- settings.get('CODE_SIGN_RESOURCE_RULES_PATH', ''),
- settings.get('CODE_SIGN_ENTITLEMENTS', ''),
- settings.get('PROVISIONING_PROFILE', ''))
- ]
-
- def _GetIOSCodeSignIdentityKey(self, settings):
- identity = settings.get('CODE_SIGN_IDENTITY')
- if not identity:
- return None
- if identity not in XcodeSettings._codesigning_key_cache:
- output = subprocess.check_output(
- ['security', 'find-identity', '-p', 'codesigning', '-v'])
- for line in output.splitlines():
- if identity in line:
- fingerprint = line.split()[1]
- cache = XcodeSettings._codesigning_key_cache
- assert identity not in cache or fingerprint == cache[identity], (
- "Multiple codesigning fingerprints for identity: %s" % identity)
- XcodeSettings._codesigning_key_cache[identity] = fingerprint
- return XcodeSettings._codesigning_key_cache.get(identity, '')
-
- def AddImplicitPostbuilds(self, configname, output, output_binary,
- postbuilds=[], quiet=False):
- """Returns a list of shell commands that should run before and after
- |postbuilds|."""
- assert output_binary is not None
- pre = self._GetTargetPostbuilds(configname, output, output_binary, quiet)
- post = self._GetIOSPostbuilds(configname, output_binary)
- return pre + postbuilds + post
-
- def _AdjustLibrary(self, library, config_name=None):
- if library.endswith('.framework'):
- l = '-framework ' + os.path.splitext(os.path.basename(library))[0]
- else:
- m = self.library_re.match(library)
- if m:
- l = '-l' + m.group(1)
- else:
- l = library
-
- sdk_root = self._SdkPath(config_name)
- if not sdk_root:
- sdk_root = ''
- # Xcode 7 started shipping with ".tbd" (text based stubs) files instead of
- # ".dylib" without providing a real support for them. What it does, for
- # "/usr/lib" libraries, is do "-L/usr/lib -lname" which is dependent on the
- # library order and cause collision when building Chrome.
- #
- # Instead substitute ".tbd" to ".dylib" in the generated project when the
- # following conditions are both true:
- # - library is referenced in the gyp file as "$(SDKROOT)/**/*.dylib",
- # - the ".dylib" file does not exists but a ".tbd" file do.
- library = l.replace('$(SDKROOT)', sdk_root)
- if l.startswith('$(SDKROOT)'):
- basename, ext = os.path.splitext(library)
- if ext == '.dylib' and not os.path.exists(library):
- tbd_library = basename + '.tbd'
- if os.path.exists(tbd_library):
- library = tbd_library
- return library
-
- def AdjustLibraries(self, libraries, config_name=None):
- """Transforms entries like 'Cocoa.framework' in libraries into entries like
- '-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc.
- """
- libraries = [self._AdjustLibrary(library, config_name)
- for library in libraries]
- return libraries
-
- def _BuildMachineOSBuild(self):
- return GetStdout(['sw_vers', '-buildVersion'])
-
- def _XcodeIOSDeviceFamily(self, configname):
- family = self.xcode_settings[configname].get('TARGETED_DEVICE_FAMILY', '1')
- return [int(x) for x in family.split(',')]
-
- def GetExtraPlistItems(self, configname=None):
- """Returns a dictionary with extra items to insert into Info.plist."""
- if configname not in XcodeSettings._plist_cache:
- cache = {}
- cache['BuildMachineOSBuild'] = self._BuildMachineOSBuild()
-
- xcode_version, xcode_build = XcodeVersion()
- cache['DTXcode'] = xcode_version
- cache['DTXcodeBuild'] = xcode_build
-
- sdk_root = self._SdkRoot(configname)
- if not sdk_root:
- sdk_root = self._DefaultSdkRoot()
- cache['DTSDKName'] = sdk_root
- if xcode_version >= '0430':
- cache['DTSDKBuild'] = self._GetSdkVersionInfoItem(
- sdk_root, 'ProductBuildVersion')
- else:
- cache['DTSDKBuild'] = cache['BuildMachineOSBuild']
-
- if self.isIOS:
- cache['DTPlatformName'] = cache['DTSDKName']
- if configname.endswith("iphoneos"):
- cache['DTPlatformVersion'] = self._GetSdkVersionInfoItem(
- sdk_root, 'ProductVersion')
- cache['CFBundleSupportedPlatforms'] = ['iPhoneOS']
- else:
- cache['CFBundleSupportedPlatforms'] = ['iPhoneSimulator']
- XcodeSettings._plist_cache[configname] = cache
-
- # Include extra plist items that are per-target, not per global
- # XcodeSettings.
- items = dict(XcodeSettings._plist_cache[configname])
- if self.isIOS:
- items['UIDeviceFamily'] = self._XcodeIOSDeviceFamily(configname)
- return items
-
- def _DefaultSdkRoot(self):
- """Returns the default SDKROOT to use.
-
- Prior to version 5.0.0, if SDKROOT was not explicitly set in the Xcode
- project, then the environment variable was empty. Starting with this
- version, Xcode uses the name of the newest SDK installed.
- """
- xcode_version, _ = XcodeVersion()
- if xcode_version < '0500':
- return ''
- default_sdk_path = self._XcodeSdkPath('')
- default_sdk_root = XcodeSettings._sdk_root_cache.get(default_sdk_path)
- if default_sdk_root:
- return default_sdk_root
- try:
- all_sdks = GetStdout(['xcodebuild', '-showsdks'])
- except GypError:
- # If xcodebuild fails, there will be no valid SDKs
- return ''
- for line in all_sdks.splitlines():
- items = line.split()
- if len(items) >= 3 and items[-2] == '-sdk':
- sdk_root = items[-1]
- sdk_path = self._XcodeSdkPath(sdk_root)
- if sdk_path == default_sdk_path:
- return sdk_root
- return ''
-
-
-class MacPrefixHeader(object):
- """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
-
- This feature consists of several pieces:
- * If GCC_PREFIX_HEADER is present, all compilations in that project get an
- additional |-include path_to_prefix_header| cflag.
- * If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is
- instead compiled, and all other compilations in the project get an
- additional |-include path_to_compiled_header| instead.
- + Compiled prefix headers have the extension gch. There is one gch file for
- every language used in the project (c, cc, m, mm), since gch files for
- different languages aren't compatible.
- + gch files themselves are built with the target's normal cflags, but they
- obviously don't get the |-include| flag. Instead, they need a -x flag that
- describes their language.
- + All o files in the target need to depend on the gch file, to make sure
- it's built before any o file is built.
-
- This class helps with some of these tasks, but it needs help from the build
- system for writing dependencies to the gch files, for writing build commands
- for the gch files, and for figuring out the location of the gch files.
- """
- def __init__(self, xcode_settings,
- gyp_path_to_build_path, gyp_path_to_build_output):
- """If xcode_settings is None, all methods on this class are no-ops.
-
- Args:
- gyp_path_to_build_path: A function that takes a gyp-relative path,
- and returns a path relative to the build directory.
- gyp_path_to_build_output: A function that takes a gyp-relative path and
- a language code ('c', 'cc', 'm', or 'mm'), and that returns a path
- to where the output of precompiling that path for that language
- should be placed (without the trailing '.gch').
- """
- # This doesn't support per-configuration prefix headers. Good enough
- # for now.
- self.header = None
- self.compile_headers = False
- if xcode_settings:
- self.header = xcode_settings.GetPerTargetSetting('GCC_PREFIX_HEADER')
- self.compile_headers = xcode_settings.GetPerTargetSetting(
- 'GCC_PRECOMPILE_PREFIX_HEADER', default='NO') != 'NO'
- self.compiled_headers = {}
- if self.header:
- if self.compile_headers:
- for lang in ['c', 'cc', 'm', 'mm']:
- self.compiled_headers[lang] = gyp_path_to_build_output(
- self.header, lang)
- self.header = gyp_path_to_build_path(self.header)
-
- def _CompiledHeader(self, lang, arch):
- assert self.compile_headers
- h = self.compiled_headers[lang]
- if arch:
- h += '.' + arch
- return h
-
- def GetInclude(self, lang, arch=None):
- """Gets the cflags to include the prefix header for language |lang|."""
- if self.compile_headers and lang in self.compiled_headers:
- return '-include %s' % self._CompiledHeader(lang, arch)
- elif self.header:
- return '-include %s' % self.header
- else:
- return ''
-
- def _Gch(self, lang, arch):
- """Returns the actual file name of the prefix header for language |lang|."""
- assert self.compile_headers
- return self._CompiledHeader(lang, arch) + '.gch'
-
- def GetObjDependencies(self, sources, objs, arch=None):
- """Given a list of source files and the corresponding object files, returns
- a list of (source, object, gch) tuples, where |gch| is the build-directory
- relative path to the gch file each object file depends on. |compilable[i]|
- has to be the source file belonging to |objs[i]|."""
- if not self.header or not self.compile_headers:
- return []
-
- result = []
- for source, obj in zip(sources, objs):
- ext = os.path.splitext(source)[1]
- lang = {
- '.c': 'c',
- '.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc',
- '.m': 'm',
- '.mm': 'mm',
- }.get(ext, None)
- if lang:
- result.append((source, obj, self._Gch(lang, arch)))
- return result
-
- def GetPchBuildCommands(self, arch=None):
- """Returns [(path_to_gch, language_flag, language, header)].
- |path_to_gch| and |header| are relative to the build directory.
- """
- if not self.header or not self.compile_headers:
- return []
- return [
- (self._Gch('c', arch), '-x c-header', 'c', self.header),
- (self._Gch('cc', arch), '-x c++-header', 'cc', self.header),
- (self._Gch('m', arch), '-x objective-c-header', 'm', self.header),
- (self._Gch('mm', arch), '-x objective-c++-header', 'mm', self.header),
- ]
-
-
-def XcodeVersion():
- """Returns a tuple of version and build version of installed Xcode."""
- # `xcodebuild -version` output looks like
- # Xcode 4.6.3
- # Build version 4H1503
- # or like
- # Xcode 3.2.6
- # Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
- # BuildVersion: 10M2518
- # Convert that to ('0463', '4H1503') or ('0326', '10M2518').
- global XCODE_VERSION_CACHE
- if XCODE_VERSION_CACHE:
- return XCODE_VERSION_CACHE
- version = ""
- build = ""
- try:
- version_list = GetStdoutQuiet(['xcodebuild', '-version']).splitlines()
- # In some circumstances xcodebuild exits 0 but doesn't return
- # the right results; for example, a user on 10.7 or 10.8 with
- # a bogus path set via xcode-select
- # In that case this may be a CLT-only install so fall back to
- # checking that version.
- if len(version_list) < 2:
- raise GypError("xcodebuild returned unexpected results")
- version = version_list[0].split()[-1] # Last word on first line
- build = version_list[-1].split()[-1] # Last word on last line
- except GypError: # Xcode not installed so look for XCode Command Line Tools
- version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
- if not version:
- raise GypError("No Xcode or CLT version detected!")
- # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100":
- version = version.split(".")[:3] # Just major, minor, micro
- version[0] = version[0].zfill(2) # Add a leading zero if major is one digit
- version = ("".join(version) + "00")[:4] # Limit to exactly four characters
- XCODE_VERSION_CACHE = (version, build)
- return XCODE_VERSION_CACHE
-
-
-# This function ported from the logic in Homebrew's CLT version check
-def CLTVersion():
- """Returns the version of command-line tools from pkgutil."""
- # pkgutil output looks like
- # package-id: com.apple.pkg.CLTools_Executables
- # version: 5.0.1.0.1.1382131676
- # volume: /
- # location: /
- # install-time: 1382544035
- # groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
- STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo"
- FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI"
- MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables"
-
- regex = re.compile('version: (?P<version>.+)')
- for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]:
- try:
- output = GetStdout(['/usr/sbin/pkgutil', '--pkg-info', key])
- return re.search(regex, output).groupdict()['version']
- except GypError:
- continue
-
-
-def GetStdoutQuiet(cmdlist):
- """Returns the content of standard output returned by invoking |cmdlist|.
- Ignores the stderr.
- Raises |GypError| if the command return with a non-zero return code."""
- job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out = job.communicate()[0]
- if PY3:
- out = out.decode("utf-8")
- if job.returncode != 0:
- raise GypError('Error %d running %s' % (job.returncode, cmdlist[0]))
- return out.rstrip('\n')
-
-
-def GetStdout(cmdlist):
- """Returns the content of standard output returned by invoking |cmdlist|.
- Raises |GypError| if the command return with a non-zero return code."""
- job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
- out = job.communicate()[0]
- if PY3:
- out = out.decode("utf-8")
- if job.returncode != 0:
- sys.stderr.write(out + '\n')
- raise GypError('Error %d running %s' % (job.returncode, cmdlist[0]))
- return out.rstrip('\n')
-
-
-def MergeGlobalXcodeSettingsToSpec(global_dict, spec):
- """Merges the global xcode_settings dictionary into each configuration of the
- target represented by spec. For keys that are both in the global and the local
- xcode_settings dict, the local key gets precedence.
- """
- # The xcode generator special-cases global xcode_settings and does something
- # that amounts to merging in the global xcode_settings into each local
- # xcode_settings dict.
- global_xcode_settings = global_dict.get('xcode_settings', {})
- for config in spec['configurations'].values():
- if 'xcode_settings' in config:
- new_settings = global_xcode_settings.copy()
- new_settings.update(config['xcode_settings'])
- config['xcode_settings'] = new_settings
-
-
-def IsMacBundle(flavor, spec):
- """Returns if |spec| should be treated as a bundle.
-
- Bundles are directories with a certain subdirectory structure, instead of
- just a single file. Bundle rules do not produce a binary but also package
- resources into that directory."""
- is_mac_bundle = (int(spec.get('mac_bundle', 0)) != 0 and flavor == 'mac')
- if is_mac_bundle:
- assert spec['type'] != 'none', (
- 'mac_bundle targets cannot have type none (target "%s")' %
- spec['target_name'])
- return is_mac_bundle
-
-
-def GetMacBundleResources(product_dir, xcode_settings, resources):
- """Yields (output, resource) pairs for every resource in |resources|.
- Only call this for mac bundle targets.
-
- Args:
- product_dir: Path to the directory containing the output bundle,
- relative to the build directory.
- xcode_settings: The XcodeSettings of the current target.
- resources: A list of bundle resources, relative to the build directory.
- """
- dest = os.path.join(product_dir,
- xcode_settings.GetBundleResourceFolder())
- for res in resources:
- output = dest
-
- # The make generator doesn't support it, so forbid it everywhere
- # to keep the generators more interchangeable.
- assert ' ' not in res, (
- "Spaces in resource filenames not supported (%s)" % res)
-
- # Split into (path,file).
- res_parts = os.path.split(res)
-
- # Now split the path into (prefix,maybe.lproj).
- lproj_parts = os.path.split(res_parts[0])
- # If the resource lives in a .lproj bundle, add that to the destination.
- if lproj_parts[1].endswith('.lproj'):
- output = os.path.join(output, lproj_parts[1])
-
- output = os.path.join(output, res_parts[1])
- # Compiled XIB files are referred to by .nib.
- if output.endswith('.xib'):
- output = os.path.splitext(output)[0] + '.nib'
- # Compiled storyboard files are referred to by .storyboardc.
- if output.endswith('.storyboard'):
- output = os.path.splitext(output)[0] + '.storyboardc'
-
- yield output, res
-
-
-def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path):
- """Returns (info_plist, dest_plist, defines, extra_env), where:
- * |info_plist| is the source plist path, relative to the
- build directory,
- * |dest_plist| is the destination plist path, relative to the
- build directory,
- * |defines| is a list of preprocessor defines (empty if the plist
- shouldn't be preprocessed,
- * |extra_env| is a dict of env variables that should be exported when
- invoking |mac_tool copy-info-plist|.
-
- Only call this for mac bundle targets.
-
- Args:
- product_dir: Path to the directory containing the output bundle,
- relative to the build directory.
- xcode_settings: The XcodeSettings of the current target.
- gyp_to_build_path: A function that converts paths relative to the
- current gyp file to paths relative to the build directory.
- """
- info_plist = xcode_settings.GetPerTargetSetting('INFOPLIST_FILE')
- if not info_plist:
- return None, None, [], {}
-
- # The make generator doesn't support it, so forbid it everywhere
- # to keep the generators more interchangeable.
- assert ' ' not in info_plist, (
- "Spaces in Info.plist filenames not supported (%s)" % info_plist)
-
- info_plist = gyp_path_to_build_path(info_plist)
-
- # If explicitly set to preprocess the plist, invoke the C preprocessor and
- # specify any defines as -D flags.
- if xcode_settings.GetPerTargetSetting(
- 'INFOPLIST_PREPROCESS', default='NO') == 'YES':
- # Create an intermediate file based on the path.
- defines = shlex.split(xcode_settings.GetPerTargetSetting(
- 'INFOPLIST_PREPROCESSOR_DEFINITIONS', default=''))
- else:
- defines = []
-
- dest_plist = os.path.join(product_dir, xcode_settings.GetBundlePlistPath())
- extra_env = xcode_settings.GetPerTargetSettings()
-
- return info_plist, dest_plist, defines, extra_env
-
-
-def _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
- additional_settings=None):
- """Return the environment variables that Xcode would set. See
- http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153
- for a full list.
-
- Args:
- xcode_settings: An XcodeSettings object. If this is None, this function
- returns an empty dict.
- built_products_dir: Absolute path to the built products dir.
- srcroot: Absolute path to the source root.
- configuration: The build configuration name.
- additional_settings: An optional dict with more values to add to the
- result.
- """
- if not xcode_settings: return {}
-
- # This function is considered a friend of XcodeSettings, so let it reach into
- # its implementation details.
- spec = xcode_settings.spec
-
- # These are filled in on a as-needed basis.
- env = {
- 'BUILT_FRAMEWORKS_DIR' : built_products_dir,
- 'BUILT_PRODUCTS_DIR' : built_products_dir,
- 'CONFIGURATION' : configuration,
- 'PRODUCT_NAME' : xcode_settings.GetProductName(),
- # See /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX\ Product\ Types.xcspec for FULL_PRODUCT_NAME
- 'SRCROOT' : srcroot,
- 'SOURCE_ROOT': '${SRCROOT}',
- # This is not true for static libraries, but currently the env is only
- # written for bundles:
- 'TARGET_BUILD_DIR' : built_products_dir,
- 'TEMP_DIR' : '${TMPDIR}',
- }
- if xcode_settings.GetPerConfigSetting('SDKROOT', configuration):
- env['SDKROOT'] = xcode_settings._SdkPath(configuration)
- else:
- env['SDKROOT'] = ''
-
- if spec['type'] in (
- 'executable', 'static_library', 'shared_library', 'loadable_module'):
- env['EXECUTABLE_NAME'] = xcode_settings.GetExecutableName()
- env['EXECUTABLE_PATH'] = xcode_settings.GetExecutablePath()
- env['FULL_PRODUCT_NAME'] = xcode_settings.GetFullProductName()
- mach_o_type = xcode_settings.GetMachOType()
- if mach_o_type:
- env['MACH_O_TYPE'] = mach_o_type
- env['PRODUCT_TYPE'] = xcode_settings.GetProductType()
- if xcode_settings._IsBundle():
- env['CONTENTS_FOLDER_PATH'] = \
- xcode_settings.GetBundleContentsFolderPath()
- env['UNLOCALIZED_RESOURCES_FOLDER_PATH'] = \
- xcode_settings.GetBundleResourceFolder()
- env['INFOPLIST_PATH'] = xcode_settings.GetBundlePlistPath()
- env['WRAPPER_NAME'] = xcode_settings.GetWrapperName()
-
- install_name = xcode_settings.GetInstallName()
- if install_name:
- env['LD_DYLIB_INSTALL_NAME'] = install_name
- install_name_base = xcode_settings.GetInstallNameBase()
- if install_name_base:
- env['DYLIB_INSTALL_NAME_BASE'] = install_name_base
- xcode_version, _ = XcodeVersion()
- if xcode_version >= '0500' and not env.get('SDKROOT'):
- sdk_root = xcode_settings._SdkRoot(configuration)
- if not sdk_root:
- sdk_root = xcode_settings._XcodeSdkPath('')
- if sdk_root is None:
- sdk_root = ''
- env['SDKROOT'] = sdk_root
-
- if not additional_settings:
- additional_settings = {}
- else:
- # Flatten lists to strings.
- for k in additional_settings:
- if not isinstance(additional_settings[k], str):
- additional_settings[k] = ' '.join(additional_settings[k])
- additional_settings.update(env)
-
- for k in additional_settings:
- additional_settings[k] = _NormalizeEnvVarReferences(additional_settings[k])
-
- return additional_settings
-
-
-def _NormalizeEnvVarReferences(str):
- """Takes a string containing variable references in the form ${FOO}, $(FOO),
- or $FOO, and returns a string with all variable references in the form ${FOO}.
- """
- # $FOO -> ${FOO}
- str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str)
-
- # $(FOO) -> ${FOO}
- matches = re.findall(r'(\$\(([a-zA-Z0-9\-_]+)\))', str)
- for match in matches:
- to_replace, variable = match
- assert '$(' not in match, '$($(FOO)) variables not supported: ' + match
- str = str.replace(to_replace, '${' + variable + '}')
-
- return str
-
-
-def ExpandEnvVars(string, expansions):
- """Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
- expansions list. If the variable expands to something that references
- another variable, this variable is expanded as well if it's in env --
- until no variables present in env are left."""
- for k, v in reversed(expansions):
- string = string.replace('${' + k + '}', v)
- string = string.replace('$(' + k + ')', v)
- string = string.replace('$' + k, v)
- return string
-
-
-def _TopologicallySortedEnvVarKeys(env):
- """Takes a dict |env| whose values are strings that can refer to other keys,
- for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of
- env such that key2 is after key1 in L if env[key2] refers to env[key1].
-
- Throws an Exception in case of dependency cycles.
- """
- # Since environment variables can refer to other variables, the evaluation
- # order is important. Below is the logic to compute the dependency graph
- # and sort it.
- regex = re.compile(r'\$\{([a-zA-Z0-9\-_]+)\}')
- def GetEdges(node):
- # Use a definition of edges such that user_of_variable -> used_varible.
- # This happens to be easier in this case, since a variable's
- # definition contains all variables it references in a single string.
- # We can then reverse the result of the topological sort at the end.
- # Since: reverse(topsort(DAG)) = topsort(reverse_edges(DAG))
- matches = set([v for v in regex.findall(env[node]) if v in env])
- for dependee in matches:
- assert '${' not in dependee, 'Nested variables not supported: ' + dependee
- return matches
-
- try:
- # Topologically sort, and then reverse, because we used an edge definition
- # that's inverted from the expected result of this function (see comment
- # above).
- order = gyp.common.TopologicallySorted(env.keys(), GetEdges)
- order.reverse()
- return order
- except gyp.common.CycleError as e:
- raise GypError(
- 'Xcode environment variables are cyclically dependent: ' + str(e.nodes))
-
-
-def GetSortedXcodeEnv(xcode_settings, built_products_dir, srcroot,
- configuration, additional_settings=None):
- env = _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
- additional_settings)
- return [(key, env[key]) for key in _TopologicallySortedEnvVarKeys(env)]
-
-
-def GetSpecPostbuildCommands(spec, quiet=False):
- """Returns the list of postbuilds explicitly defined on |spec|, in a form
- executable by a shell."""
- postbuilds = []
- for postbuild in spec.get('postbuilds', []):
- if not quiet:
- postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
- spec['target_name'], postbuild['postbuild_name']))
- postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
- return postbuilds
-
-
-def _HasIOSTarget(targets):
- """Returns true if any target contains the iOS specific key
- IPHONEOS_DEPLOYMENT_TARGET."""
- for target_dict in targets.values():
- for config in target_dict['configurations'].values():
- if config.get('xcode_settings', {}).get('IPHONEOS_DEPLOYMENT_TARGET'):
- return True
- return False
-
-
-def _AddIOSDeviceConfigurations(targets):
- """Clone all targets and append -iphoneos to the name. Configure these targets
- to build for iOS devices and use correct architectures for those builds."""
- for target_dict in targets.values():
- toolset = target_dict['toolset']
- configs = target_dict['configurations']
- for config_name, config_dict in dict(configs).items():
- iphoneos_config_dict = copy.deepcopy(config_dict)
- configs[config_name + '-iphoneos'] = iphoneos_config_dict
- configs[config_name + '-iphonesimulator'] = config_dict
- if toolset == 'target':
- iphoneos_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos'
- return targets
-
-def CloneConfigurationForDeviceAndEmulator(target_dicts):
- """If |target_dicts| contains any iOS targets, automatically create -iphoneos
- targets for iOS device builds."""
- if _HasIOSTarget(target_dicts):
- return _AddIOSDeviceConfigurations(target_dicts)
- return target_dicts
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
deleted file mode 100644
index d70eddc90..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
+++ /dev/null
@@ -1,270 +0,0 @@
-# Copyright (c) 2014 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Xcode-ninja wrapper project file generator.
-
-This updates the data structures passed to the Xcode gyp generator to build
-with ninja instead. The Xcode project itself is transformed into a list of
-executable targets, each with a build step to build with ninja, and a target
-with every source and resource file. This appears to sidestep some of the
-major performance headaches experienced using complex projects and large number
-of targets within Xcode.
-"""
-
-import errno
-import gyp.generator.ninja
-import os
-import re
-import xml.sax.saxutils
-
-
-def _WriteWorkspace(main_gyp, sources_gyp, params):
- """ Create a workspace to wrap main and sources gyp paths. """
- (build_file_root, build_file_ext) = os.path.splitext(main_gyp)
- workspace_path = build_file_root + '.xcworkspace'
- options = params['options']
- if options.generator_output:
- workspace_path = os.path.join(options.generator_output, workspace_path)
- try:
- os.makedirs(workspace_path)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
- output_string = '<?xml version="1.0" encoding="UTF-8"?>\n' + \
- '<Workspace version = "1.0">\n'
- for gyp_name in [main_gyp, sources_gyp]:
- name = os.path.splitext(os.path.basename(gyp_name))[0] + '.xcodeproj'
- name = xml.sax.saxutils.quoteattr("group:" + name)
- output_string += ' <FileRef location = %s></FileRef>\n' % name
- output_string += '</Workspace>\n'
-
- workspace_file = os.path.join(workspace_path, "contents.xcworkspacedata")
-
- try:
- with open(workspace_file, 'r') as input_file:
- input_string = input_file.read()
- if input_string == output_string:
- return
- except IOError:
- # Ignore errors if the file doesn't exist.
- pass
-
- with open(workspace_file, 'w') as output_file:
- output_file.write(output_string)
-
-def _TargetFromSpec(old_spec, params):
- """ Create fake target for xcode-ninja wrapper. """
- # Determine ninja top level build dir (e.g. /path/to/out).
- ninja_toplevel = None
- jobs = 0
- if params:
- options = params['options']
- ninja_toplevel = \
- os.path.join(options.toplevel_dir,
- gyp.generator.ninja.ComputeOutputDir(params))
- jobs = params.get('generator_flags', {}).get('xcode_ninja_jobs', 0)
-
- target_name = old_spec.get('target_name')
- product_name = old_spec.get('product_name', target_name)
- product_extension = old_spec.get('product_extension')
-
- ninja_target = {}
- ninja_target['target_name'] = target_name
- ninja_target['product_name'] = product_name
- if product_extension:
- ninja_target['product_extension'] = product_extension
- ninja_target['toolset'] = old_spec.get('toolset')
- ninja_target['default_configuration'] = old_spec.get('default_configuration')
- ninja_target['configurations'] = {}
-
- # Tell Xcode to look in |ninja_toplevel| for build products.
- new_xcode_settings = {}
- if ninja_toplevel:
- new_xcode_settings['CONFIGURATION_BUILD_DIR'] = \
- "%s/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" % ninja_toplevel
-
- if 'configurations' in old_spec:
- for config in old_spec['configurations']:
- old_xcode_settings = \
- old_spec['configurations'][config].get('xcode_settings', {})
- if 'IPHONEOS_DEPLOYMENT_TARGET' in old_xcode_settings:
- new_xcode_settings['CODE_SIGNING_REQUIRED'] = "NO"
- new_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] = \
- old_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET']
- ninja_target['configurations'][config] = {}
- ninja_target['configurations'][config]['xcode_settings'] = \
- new_xcode_settings
-
- ninja_target['mac_bundle'] = old_spec.get('mac_bundle', 0)
- ninja_target['ios_app_extension'] = old_spec.get('ios_app_extension', 0)
- ninja_target['ios_watchkit_extension'] = \
- old_spec.get('ios_watchkit_extension', 0)
- ninja_target['ios_watchkit_app'] = old_spec.get('ios_watchkit_app', 0)
- ninja_target['type'] = old_spec['type']
- if ninja_toplevel:
- ninja_target['actions'] = [
- {
- 'action_name': 'Compile and copy %s via ninja' % target_name,
- 'inputs': [],
- 'outputs': [],
- 'action': [
- 'env',
- 'PATH=%s' % os.environ['PATH'],
- 'ninja',
- '-C',
- new_xcode_settings['CONFIGURATION_BUILD_DIR'],
- target_name,
- ],
- 'message': 'Compile and copy %s via ninja' % target_name,
- },
- ]
- if jobs > 0:
- ninja_target['actions'][0]['action'].extend(('-j', jobs))
- return ninja_target
-
-def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec):
- """Limit targets for Xcode wrapper.
-
- Xcode sometimes performs poorly with too many targets, so only include
- proper executable targets, with filters to customize.
- Arguments:
- target_extras: Regular expression to always add, matching any target.
- executable_target_pattern: Regular expression limiting executable targets.
- spec: Specifications for target.
- """
- target_name = spec.get('target_name')
- # Always include targets matching target_extras.
- if target_extras is not None and re.search(target_extras, target_name):
- return True
-
- # Otherwise just show executable targets.
- if spec.get('type', '') == 'executable' and \
- spec.get('product_extension', '') != 'bundle':
-
- # If there is a filter and the target does not match, exclude the target.
- if executable_target_pattern is not None:
- if not re.search(executable_target_pattern, target_name):
- return False
- return True
- return False
-
-def CreateWrapper(target_list, target_dicts, data, params):
- """Initialize targets for the ninja wrapper.
-
- This sets up the necessary variables in the targets to generate Xcode projects
- that use ninja as an external builder.
- Arguments:
- target_list: List of target pairs: 'base/base.gyp:base'.
- target_dicts: Dict of target properties keyed on target pair.
- data: Dict of flattened build files keyed on gyp path.
- params: Dict of global options for gyp.
- """
- orig_gyp = params['build_files'][0]
- for gyp_name, gyp_dict in data.items():
- if gyp_name == orig_gyp:
- depth = gyp_dict['_DEPTH']
-
- # Check for custom main gyp name, otherwise use the default CHROMIUM_GYP_FILE
- # and prepend .ninja before the .gyp extension.
- generator_flags = params.get('generator_flags', {})
- main_gyp = generator_flags.get('xcode_ninja_main_gyp', None)
- if main_gyp is None:
- (build_file_root, build_file_ext) = os.path.splitext(orig_gyp)
- main_gyp = build_file_root + ".ninja" + build_file_ext
-
- # Create new |target_list|, |target_dicts| and |data| data structures.
- new_target_list = []
- new_target_dicts = {}
- new_data = {}
-
- # Set base keys needed for |data|.
- new_data[main_gyp] = {}
- new_data[main_gyp]['included_files'] = []
- new_data[main_gyp]['targets'] = []
- new_data[main_gyp]['xcode_settings'] = \
- data[orig_gyp].get('xcode_settings', {})
-
- # Normally the xcode-ninja generator includes only valid executable targets.
- # If |xcode_ninja_executable_target_pattern| is set, that list is reduced to
- # executable targets that match the pattern. (Default all)
- executable_target_pattern = \
- generator_flags.get('xcode_ninja_executable_target_pattern', None)
-
- # For including other non-executable targets, add the matching target name
- # to the |xcode_ninja_target_pattern| regular expression. (Default none)
- target_extras = generator_flags.get('xcode_ninja_target_pattern', None)
-
- for old_qualified_target in target_list:
- spec = target_dicts[old_qualified_target]
- if IsValidTargetForWrapper(target_extras, executable_target_pattern, spec):
- # Add to new_target_list.
- target_name = spec.get('target_name')
- new_target_name = '%s:%s#target' % (main_gyp, target_name)
- new_target_list.append(new_target_name)
-
- # Add to new_target_dicts.
- new_target_dicts[new_target_name] = _TargetFromSpec(spec, params)
-
- # Add to new_data.
- for old_target in data[old_qualified_target.split(':')[0]]['targets']:
- if old_target['target_name'] == target_name:
- new_data_target = {}
- new_data_target['target_name'] = old_target['target_name']
- new_data_target['toolset'] = old_target['toolset']
- new_data[main_gyp]['targets'].append(new_data_target)
-
- # Create sources target.
- sources_target_name = 'sources_for_indexing'
- sources_target = _TargetFromSpec(
- { 'target_name' : sources_target_name,
- 'toolset': 'target',
- 'default_configuration': 'Default',
- 'mac_bundle': '0',
- 'type': 'executable'
- }, None)
-
- # Tell Xcode to look everywhere for headers.
- sources_target['configurations'] = {'Default': { 'include_dirs': [ depth ] } }
-
- sources = []
- for target, target_dict in target_dicts.items():
- base = os.path.dirname(target)
- files = target_dict.get('sources', []) + \
- target_dict.get('mac_bundle_resources', [])
- for action in target_dict.get('actions', []):
- files.extend(action.get('inputs', []))
- # Remove files starting with $. These are mostly intermediate files for the
- # build system.
- files = [ file for file in files if not file.startswith('$')]
-
- # Make sources relative to root build file.
- relative_path = os.path.dirname(main_gyp)
- sources += [ os.path.relpath(os.path.join(base, file), relative_path)
- for file in files ]
-
- sources_target['sources'] = sorted(set(sources))
-
- # Put sources_to_index in it's own gyp.
- sources_gyp = \
- os.path.join(os.path.dirname(main_gyp), sources_target_name + ".gyp")
- fully_qualified_target_name = \
- '%s:%s#target' % (sources_gyp, sources_target_name)
-
- # Add to new_target_list, new_target_dicts and new_data.
- new_target_list.append(fully_qualified_target_name)
- new_target_dicts[fully_qualified_target_name] = sources_target
- new_data_target = {}
- new_data_target['target_name'] = sources_target['target_name']
- new_data_target['_DEPTH'] = depth
- new_data_target['toolset'] = "target"
- new_data[sources_gyp] = {}
- new_data[sources_gyp]['targets'] = []
- new_data[sources_gyp]['included_files'] = []
- new_data[sources_gyp]['xcode_settings'] = \
- data[orig_gyp].get('xcode_settings', {})
- new_data[sources_gyp]['targets'].append(new_data_target)
-
- # Write workspace to file.
- _WriteWorkspace(main_gyp, sources_gyp, params)
- return (new_target_list, new_target_dicts, new_data)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
deleted file mode 100644
index 93ffca7c9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
+++ /dev/null
@@ -1,2922 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Xcode project file generator.
-
-This module is both an Xcode project file generator and a documentation of the
-Xcode project file format. Knowledge of the project file format was gained
-based on extensive experience with Xcode, and by making changes to projects in
-Xcode.app and observing the resultant changes in the associated project files.
-
-XCODE PROJECT FILES
-
-The generator targets the file format as written by Xcode 3.2 (specifically,
-3.2.6), but past experience has taught that the format has not changed
-significantly in the past several years, and future versions of Xcode are able
-to read older project files.
-
-Xcode project files are "bundled": the project "file" from an end-user's
-perspective is actually a directory with an ".xcodeproj" extension. The
-project file from this module's perspective is actually a file inside this
-directory, always named "project.pbxproj". This file contains a complete
-description of the project and is all that is needed to use the xcodeproj.
-Other files contained in the xcodeproj directory are simply used to store
-per-user settings, such as the state of various UI elements in the Xcode
-application.
-
-The project.pbxproj file is a property list, stored in a format almost
-identical to the NeXTstep property list format. The file is able to carry
-Unicode data, and is encoded in UTF-8. The root element in the property list
-is a dictionary that contains several properties of minimal interest, and two
-properties of immense interest. The most important property is a dictionary
-named "objects". The entire structure of the project is represented by the
-children of this property. The objects dictionary is keyed by unique 96-bit
-values represented by 24 uppercase hexadecimal characters. Each value in the
-objects dictionary is itself a dictionary, describing an individual object.
-
-Each object in the dictionary is a member of a class, which is identified by
-the "isa" property of each object. A variety of classes are represented in a
-project file. Objects can refer to other objects by ID, using the 24-character
-hexadecimal object key. A project's objects form a tree, with a root object
-of class PBXProject at the root. As an example, the PBXProject object serves
-as parent to an XCConfigurationList object defining the build configurations
-used in the project, a PBXGroup object serving as a container for all files
-referenced in the project, and a list of target objects, each of which defines
-a target in the project. There are several different types of target object,
-such as PBXNativeTarget and PBXAggregateTarget. In this module, this
-relationship is expressed by having each target type derive from an abstract
-base named XCTarget.
-
-The project.pbxproj file's root dictionary also contains a property, sibling to
-the "objects" dictionary, named "rootObject". The value of rootObject is a
-24-character object key referring to the root PBXProject object in the
-objects dictionary.
-
-In Xcode, every file used as input to a target or produced as a final product
-of a target must appear somewhere in the hierarchy rooted at the PBXGroup
-object referenced by the PBXProject's mainGroup property. A PBXGroup is
-generally represented as a folder in the Xcode application. PBXGroups can
-contain other PBXGroups as well as PBXFileReferences, which are pointers to
-actual files.
-
-Each XCTarget contains a list of build phases, represented in this module by
-the abstract base XCBuildPhase. Examples of concrete XCBuildPhase derivations
-are PBXSourcesBuildPhase and PBXFrameworksBuildPhase, which correspond to the
-"Compile Sources" and "Link Binary With Libraries" phases displayed in the
-Xcode application. Files used as input to these phases (for example, source
-files in the former case and libraries and frameworks in the latter) are
-represented by PBXBuildFile objects, referenced by elements of "files" lists
-in XCTarget objects. Each PBXBuildFile object refers to a PBXBuildFile
-object as a "weak" reference: it does not "own" the PBXBuildFile, which is
-owned by the root object's mainGroup or a descendant group. In most cases, the
-layer of indirection between an XCBuildPhase and a PBXFileReference via a
-PBXBuildFile appears extraneous, but there's actually one reason for this:
-file-specific compiler flags are added to the PBXBuildFile object so as to
-allow a single file to be a member of multiple targets while having distinct
-compiler flags for each. These flags can be modified in the Xcode applciation
-in the "Build" tab of a File Info window.
-
-When a project is open in the Xcode application, Xcode will rewrite it. As
-such, this module is careful to adhere to the formatting used by Xcode, to
-avoid insignificant changes appearing in the file when it is used in the
-Xcode application. This will keep version control repositories happy, and
-makes it possible to compare a project file used in Xcode to one generated by
-this module to determine if any significant changes were made in the
-application.
-
-Xcode has its own way of assigning 24-character identifiers to each object,
-which is not duplicated here. Because the identifier only is only generated
-once, when an object is created, and is then left unchanged, there is no need
-to attempt to duplicate Xcode's behavior in this area. The generator is free
-to select any identifier, even at random, to refer to the objects it creates,
-and Xcode will retain those identifiers and use them when subsequently
-rewriting the project file. However, the generator would choose new random
-identifiers each time the project files are generated, leading to difficulties
-comparing "used" project files to "pristine" ones produced by this module,
-and causing the appearance of changes as every object identifier is changed
-when updated projects are checked in to a version control repository. To
-mitigate this problem, this module chooses identifiers in a more deterministic
-way, by hashing a description of each object as well as its parent and ancestor
-objects. This strategy should result in minimal "shift" in IDs as successive
-generations of project files are produced.
-
-THIS MODULE
-
-This module introduces several classes, all derived from the XCObject class.
-Nearly all of the "brains" are built into the XCObject class, which understands
-how to create and modify objects, maintain the proper tree structure, compute
-identifiers, and print objects. For the most part, classes derived from
-XCObject need only provide a _schema class object, a dictionary that
-expresses what properties objects of the class may contain.
-
-Given this structure, it's possible to build a minimal project file by creating
-objects of the appropriate types and making the proper connections:
-
- config_list = XCConfigurationList()
- group = PBXGroup()
- project = PBXProject({'buildConfigurationList': config_list,
- 'mainGroup': group})
-
-With the project object set up, it can be added to an XCProjectFile object.
-XCProjectFile is a pseudo-class in the sense that it is a concrete XCObject
-subclass that does not actually correspond to a class type found in a project
-file. Rather, it is used to represent the project file's root dictionary.
-Printing an XCProjectFile will print the entire project file, including the
-full "objects" dictionary.
-
- project_file = XCProjectFile({'rootObject': project})
- project_file.ComputeIDs()
- project_file.Print()
-
-Xcode project files are always encoded in UTF-8. This module will accept
-strings of either the str class or the unicode class. Strings of class str
-are assumed to already be encoded in UTF-8. Obviously, if you're just using
-ASCII, you won't encounter difficulties because ASCII is a UTF-8 subset.
-Strings of class unicode are handled properly and encoded in UTF-8 when
-a project file is output.
-"""
-
-import gyp.common
-import hashlib
-import posixpath
-import re
-import struct
-import sys
-
-try:
- basestring, cmp, unicode
-except NameError: # Python 3
- basestring = unicode = str
- def cmp(x, y):
- return (x > y) - (x < y)
-
-
-# See XCObject._EncodeString. This pattern is used to determine when a string
-# can be printed unquoted. Strings that match this pattern may be printed
-# unquoted. Strings that do not match must be quoted and may be further
-# transformed to be properly encoded. Note that this expression matches the
-# characters listed with "+", for 1 or more occurrences: if a string is empty,
-# it must not match this pattern, because it needs to be encoded as "".
-_unquoted = re.compile('^[A-Za-z0-9$./_]+$')
-
-# Strings that match this pattern are quoted regardless of what _unquoted says.
-# Oddly, Xcode will quote any string with a run of three or more underscores.
-_quoted = re.compile('___')
-
-# This pattern should match any character that needs to be escaped by
-# XCObject._EncodeString. See that function.
-_escaped = re.compile('[\\\\"]|[\x00-\x1f]')
-
-
-# Used by SourceTreeAndPathFromPath
-_path_leading_variable = re.compile(r'^\$\((.*?)\)(/(.*))?$')
-
-def SourceTreeAndPathFromPath(input_path):
- """Given input_path, returns a tuple with sourceTree and path values.
-
- Examples:
- input_path (source_tree, output_path)
- '$(VAR)/path' ('VAR', 'path')
- '$(VAR)' ('VAR', None)
- 'path' (None, 'path')
- """
-
- source_group_match = _path_leading_variable.match(input_path)
- if source_group_match:
- source_tree = source_group_match.group(1)
- output_path = source_group_match.group(3) # This may be None.
- else:
- source_tree = None
- output_path = input_path
-
- return (source_tree, output_path)
-
-def ConvertVariablesToShellSyntax(input_string):
- return re.sub(r'\$\((.*?)\)', '${\\1}', input_string)
-
-class XCObject(object):
- """The abstract base of all class types used in Xcode project files.
-
- Class variables:
- _schema: A dictionary defining the properties of this class. The keys to
- _schema are string property keys as used in project files. Values
- are a list of four or five elements:
- [ is_list, property_type, is_strong, is_required, default ]
- is_list: True if the property described is a list, as opposed
- to a single element.
- property_type: The type to use as the value of the property,
- or if is_list is True, the type to use for each
- element of the value's list. property_type must
- be an XCObject subclass, or one of the built-in
- types str, int, or dict.
- is_strong: If property_type is an XCObject subclass, is_strong
- is True to assert that this class "owns," or serves
- as parent, to the property value (or, if is_list is
- True, values). is_strong must be False if
- property_type is not an XCObject subclass.
- is_required: True if the property is required for the class.
- Note that is_required being True does not preclude
- an empty string ("", in the case of property_type
- str) or list ([], in the case of is_list True) from
- being set for the property.
- default: Optional. If is_required is True, default may be set
- to provide a default value for objects that do not supply
- their own value. If is_required is True and default
- is not provided, users of the class must supply their own
- value for the property.
- Note that although the values of the array are expressed in
- boolean terms, subclasses provide values as integers to conserve
- horizontal space.
- _should_print_single_line: False in XCObject. Subclasses whose objects
- should be written to the project file in the
- alternate single-line format, such as
- PBXFileReference and PBXBuildFile, should
- set this to True.
- _encode_transforms: Used by _EncodeString to encode unprintable characters.
- The index into this list is the ordinal of the
- character to transform; each value is a string
- used to represent the character in the output. XCObject
- provides an _encode_transforms list suitable for most
- XCObject subclasses.
- _alternate_encode_transforms: Provided for subclasses that wish to use
- the alternate encoding rules. Xcode seems
- to use these rules when printing objects in
- single-line format. Subclasses that desire
- this behavior should set _encode_transforms
- to _alternate_encode_transforms.
- _hashables: A list of XCObject subclasses that can be hashed by ComputeIDs
- to construct this object's ID. Most classes that need custom
- hashing behavior should do it by overriding Hashables,
- but in some cases an object's parent may wish to push a
- hashable value into its child, and it can do so by appending
- to _hashables.
- Attributes:
- id: The object's identifier, a 24-character uppercase hexadecimal string.
- Usually, objects being created should not set id until the entire
- project file structure is built. At that point, UpdateIDs() should
- be called on the root object to assign deterministic values for id to
- each object in the tree.
- parent: The object's parent. This is set by a parent XCObject when a child
- object is added to it.
- _properties: The object's property dictionary. An object's properties are
- described by its class' _schema variable.
- """
-
- _schema = {}
- _should_print_single_line = False
-
- # See _EncodeString.
- _encode_transforms = []
- i = 0
- while i < ord(' '):
- _encode_transforms.append('\\U%04x' % i)
- i = i + 1
- _encode_transforms[7] = '\\a'
- _encode_transforms[8] = '\\b'
- _encode_transforms[9] = '\\t'
- _encode_transforms[10] = '\\n'
- _encode_transforms[11] = '\\v'
- _encode_transforms[12] = '\\f'
- _encode_transforms[13] = '\\n'
-
- _alternate_encode_transforms = list(_encode_transforms)
- _alternate_encode_transforms[9] = chr(9)
- _alternate_encode_transforms[10] = chr(10)
- _alternate_encode_transforms[11] = chr(11)
-
- def __init__(self, properties=None, id=None, parent=None):
- self.id = id
- self.parent = parent
- self._properties = {}
- self._hashables = []
- self._SetDefaultsFromSchema()
- self.UpdateProperties(properties)
-
- def __repr__(self):
- try:
- name = self.Name()
- except NotImplementedError:
- return '<%s at 0x%x>' % (self.__class__.__name__, id(self))
- return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self))
-
- def Copy(self):
- """Make a copy of this object.
-
- The new object will have its own copy of lists and dicts. Any XCObject
- objects owned by this object (marked "strong") will be copied in the
- new object, even those found in lists. If this object has any weak
- references to other XCObjects, the same references are added to the new
- object without making a copy.
- """
-
- that = self.__class__(id=self.id, parent=self.parent)
- for key, value in self._properties.items():
- is_strong = self._schema[key][2]
-
- if isinstance(value, XCObject):
- if is_strong:
- new_value = value.Copy()
- new_value.parent = that
- that._properties[key] = new_value
- else:
- that._properties[key] = value
- elif isinstance(value, (basestring, int)):
- that._properties[key] = value
- elif isinstance(value, list):
- if is_strong:
- # If is_strong is True, each element is an XCObject, so it's safe to
- # call Copy.
- that._properties[key] = []
- for item in value:
- new_item = item.Copy()
- new_item.parent = that
- that._properties[key].append(new_item)
- else:
- that._properties[key] = value[:]
- elif isinstance(value, dict):
- # dicts are never strong.
- if is_strong:
- raise TypeError('Strong dict for key ' + key + ' in ' + \
- self.__class__.__name__)
- else:
- that._properties[key] = value.copy()
- else:
- raise TypeError('Unexpected type ' + value.__class__.__name__ + \
- ' for key ' + key + ' in ' + self.__class__.__name__)
-
- return that
-
- def Name(self):
- """Return the name corresponding to an object.
-
- Not all objects necessarily need to be nameable, and not all that do have
- a "name" property. Override as needed.
- """
-
- # If the schema indicates that "name" is required, try to access the
- # property even if it doesn't exist. This will result in a KeyError
- # being raised for the property that should be present, which seems more
- # appropriate than NotImplementedError in this case.
- if 'name' in self._properties or \
- ('name' in self._schema and self._schema['name'][3]):
- return self._properties['name']
-
- raise NotImplementedError(self.__class__.__name__ + ' must implement Name')
-
- def Comment(self):
- """Return a comment string for the object.
-
- Most objects just use their name as the comment, but PBXProject uses
- different values.
-
- The returned comment is not escaped and does not have any comment marker
- strings applied to it.
- """
-
- return self.Name()
-
- def Hashables(self):
- hashables = [self.__class__.__name__]
-
- name = self.Name()
- if name != None:
- hashables.append(name)
-
- hashables.extend(self._hashables)
-
- return hashables
-
- def HashablesForChild(self):
- return None
-
- def ComputeIDs(self, recursive=True, overwrite=True, seed_hash=None):
- """Set "id" properties deterministically.
-
- An object's "id" property is set based on a hash of its class type and
- name, as well as the class type and name of all ancestor objects. As
- such, it is only advisable to call ComputeIDs once an entire project file
- tree is built.
-
- If recursive is True, recurse into all descendant objects and update their
- hashes.
-
- If overwrite is True, any existing value set in the "id" property will be
- replaced.
- """
-
- def _HashUpdate(hash, data):
- """Update hash with data's length and contents.
-
- If the hash were updated only with the value of data, it would be
- possible for clowns to induce collisions by manipulating the names of
- their objects. By adding the length, it's exceedingly less likely that
- ID collisions will be encountered, intentionally or not.
- """
-
- hash.update(struct.pack('>i', len(data)))
- hash.update(data)
-
- if seed_hash is None:
- seed_hash = hashlib.sha1()
-
- hash = seed_hash.copy()
-
- hashables = self.Hashables()
- assert len(hashables) > 0
- for hashable in hashables:
- _HashUpdate(hash, hashable)
-
- if recursive:
- hashables_for_child = self.HashablesForChild()
- if hashables_for_child is None:
- child_hash = hash
- else:
- assert len(hashables_for_child) > 0
- child_hash = seed_hash.copy()
- for hashable in hashables_for_child:
- _HashUpdate(child_hash, hashable)
-
- for child in self.Children():
- child.ComputeIDs(recursive, overwrite, child_hash)
-
- if overwrite or self.id is None:
- # Xcode IDs are only 96 bits (24 hex characters), but a SHA-1 digest is
- # is 160 bits. Instead of throwing out 64 bits of the digest, xor them
- # into the portion that gets used.
- assert hash.digest_size % 4 == 0
- digest_int_count = hash.digest_size / 4
- digest_ints = struct.unpack('>' + 'I' * digest_int_count, hash.digest())
- id_ints = [0, 0, 0]
- for index in range(0, digest_int_count):
- id_ints[index % 3] ^= digest_ints[index]
- self.id = '%08X%08X%08X' % tuple(id_ints)
-
- def EnsureNoIDCollisions(self):
- """Verifies that no two objects have the same ID. Checks all descendants.
- """
-
- ids = {}
- descendants = self.Descendants()
- for descendant in descendants:
- if descendant.id in ids:
- other = ids[descendant.id]
- raise KeyError(
- 'Duplicate ID %s, objects "%s" and "%s" in "%s"' % \
- (descendant.id, str(descendant._properties),
- str(other._properties), self._properties['rootObject'].Name()))
- ids[descendant.id] = descendant
-
- def Children(self):
- """Returns a list of all of this object's owned (strong) children."""
-
- children = []
- for property, attributes in self._schema.items():
- (is_list, property_type, is_strong) = attributes[0:3]
- if is_strong and property in self._properties:
- if not is_list:
- children.append(self._properties[property])
- else:
- children.extend(self._properties[property])
- return children
-
- def Descendants(self):
- """Returns a list of all of this object's descendants, including this
- object.
- """
-
- children = self.Children()
- descendants = [self]
- for child in children:
- descendants.extend(child.Descendants())
- return descendants
-
- def PBXProjectAncestor(self):
- # The base case for recursion is defined at PBXProject.PBXProjectAncestor.
- if self.parent:
- return self.parent.PBXProjectAncestor()
- return None
-
- def _EncodeComment(self, comment):
- """Encodes a comment to be placed in the project file output, mimicing
- Xcode behavior.
- """
-
- # This mimics Xcode behavior by wrapping the comment in "/*" and "*/". If
- # the string already contains a "*/", it is turned into "(*)/". This keeps
- # the file writer from outputting something that would be treated as the
- # end of a comment in the middle of something intended to be entirely a
- # comment.
-
- return '/* ' + comment.replace('*/', '(*)/') + ' */'
-
- def _EncodeTransform(self, match):
- # This function works closely with _EncodeString. It will only be called
- # by re.sub with match.group(0) containing a character matched by the
- # the _escaped expression.
- char = match.group(0)
-
- # Backslashes (\) and quotation marks (") are always replaced with a
- # backslash-escaped version of the same. Everything else gets its
- # replacement from the class' _encode_transforms array.
- if char == '\\':
- return '\\\\'
- if char == '"':
- return '\\"'
- return self._encode_transforms[ord(char)]
-
- def _EncodeString(self, value):
- """Encodes a string to be placed in the project file output, mimicing
- Xcode behavior.
- """
-
- # Use quotation marks when any character outside of the range A-Z, a-z, 0-9,
- # $ (dollar sign), . (period), and _ (underscore) is present. Also use
- # quotation marks to represent empty strings.
- #
- # Escape " (double-quote) and \ (backslash) by preceding them with a
- # backslash.
- #
- # Some characters below the printable ASCII range are encoded specially:
- # 7 ^G BEL is encoded as "\a"
- # 8 ^H BS is encoded as "\b"
- # 11 ^K VT is encoded as "\v"
- # 12 ^L NP is encoded as "\f"
- # 127 ^? DEL is passed through as-is without escaping
- # - In PBXFileReference and PBXBuildFile objects:
- # 9 ^I HT is passed through as-is without escaping
- # 10 ^J NL is passed through as-is without escaping
- # 13 ^M CR is passed through as-is without escaping
- # - In other objects:
- # 9 ^I HT is encoded as "\t"
- # 10 ^J NL is encoded as "\n"
- # 13 ^M CR is encoded as "\n" rendering it indistinguishable from
- # 10 ^J NL
- # All other characters within the ASCII control character range (0 through
- # 31 inclusive) are encoded as "\U001f" referring to the Unicode code point
- # in hexadecimal. For example, character 14 (^N SO) is encoded as "\U000e".
- # Characters above the ASCII range are passed through to the output encoded
- # as UTF-8 without any escaping. These mappings are contained in the
- # class' _encode_transforms list.
-
- if _unquoted.search(value) and not _quoted.search(value):
- return value
-
- return '"' + _escaped.sub(self._EncodeTransform, value) + '"'
-
- def _XCPrint(self, file, tabs, line):
- file.write('\t' * tabs + line)
-
- def _XCPrintableValue(self, tabs, value, flatten_list=False):
- """Returns a representation of value that may be printed in a project file,
- mimicing Xcode's behavior.
-
- _XCPrintableValue can handle str and int values, XCObjects (which are
- made printable by returning their id property), and list and dict objects
- composed of any of the above types. When printing a list or dict, and
- _should_print_single_line is False, the tabs parameter is used to determine
- how much to indent the lines corresponding to the items in the list or
- dict.
-
- If flatten_list is True, single-element lists will be transformed into
- strings.
- """
-
- printable = ''
- comment = None
-
- if self._should_print_single_line:
- sep = ' '
- element_tabs = ''
- end_tabs = ''
- else:
- sep = '\n'
- element_tabs = '\t' * (tabs + 1)
- end_tabs = '\t' * tabs
-
- if isinstance(value, XCObject):
- printable += value.id
- comment = value.Comment()
- elif isinstance(value, str):
- printable += self._EncodeString(value)
- elif isinstance(value, unicode):
- printable += self._EncodeString(value.encode('utf-8'))
- elif isinstance(value, int):
- printable += str(value)
- elif isinstance(value, list):
- if flatten_list and len(value) <= 1:
- if len(value) == 0:
- printable += self._EncodeString('')
- else:
- printable += self._EncodeString(value[0])
- else:
- printable = '(' + sep
- for item in value:
- printable += element_tabs + \
- self._XCPrintableValue(tabs + 1, item, flatten_list) + \
- ',' + sep
- printable += end_tabs + ')'
- elif isinstance(value, dict):
- printable = '{' + sep
- for item_key, item_value in sorted(value.items()):
- printable += element_tabs + \
- self._XCPrintableValue(tabs + 1, item_key, flatten_list) + ' = ' + \
- self._XCPrintableValue(tabs + 1, item_value, flatten_list) + ';' + \
- sep
- printable += end_tabs + '}'
- else:
- raise TypeError("Can't make " + value.__class__.__name__ + ' printable')
-
- if comment != None:
- printable += ' ' + self._EncodeComment(comment)
-
- return printable
-
- def _XCKVPrint(self, file, tabs, key, value):
- """Prints a key and value, members of an XCObject's _properties dictionary,
- to file.
-
- tabs is an int identifying the indentation level. If the class'
- _should_print_single_line variable is True, tabs is ignored and the
- key-value pair will be followed by a space insead of a newline.
- """
-
- if self._should_print_single_line:
- printable = ''
- after_kv = ' '
- else:
- printable = '\t' * tabs
- after_kv = '\n'
-
- # Xcode usually prints remoteGlobalIDString values in PBXContainerItemProxy
- # objects without comments. Sometimes it prints them with comments, but
- # the majority of the time, it doesn't. To avoid unnecessary changes to
- # the project file after Xcode opens it, don't write comments for
- # remoteGlobalIDString. This is a sucky hack and it would certainly be
- # cleaner to extend the schema to indicate whether or not a comment should
- # be printed, but since this is the only case where the problem occurs and
- # Xcode itself can't seem to make up its mind, the hack will suffice.
- #
- # Also see PBXContainerItemProxy._schema['remoteGlobalIDString'].
- if key == 'remoteGlobalIDString' and isinstance(self,
- PBXContainerItemProxy):
- value_to_print = value.id
- else:
- value_to_print = value
-
- # PBXBuildFile's settings property is represented in the output as a dict,
- # but a hack here has it represented as a string. Arrange to strip off the
- # quotes so that it shows up in the output as expected.
- if key == 'settings' and isinstance(self, PBXBuildFile):
- strip_value_quotes = True
- else:
- strip_value_quotes = False
-
- # In another one-off, let's set flatten_list on buildSettings properties
- # of XCBuildConfiguration objects, because that's how Xcode treats them.
- if key == 'buildSettings' and isinstance(self, XCBuildConfiguration):
- flatten_list = True
- else:
- flatten_list = False
-
- try:
- printable_key = self._XCPrintableValue(tabs, key, flatten_list)
- printable_value = self._XCPrintableValue(tabs, value_to_print,
- flatten_list)
- if strip_value_quotes and len(printable_value) > 1 and \
- printable_value[0] == '"' and printable_value[-1] == '"':
- printable_value = printable_value[1:-1]
- printable += printable_key + ' = ' + printable_value + ';' + after_kv
- except TypeError as e:
- gyp.common.ExceptionAppend(e,
- 'while printing key "%s"' % key)
- raise
-
- self._XCPrint(file, 0, printable)
-
- def Print(self, file=sys.stdout):
- """Prints a reprentation of this object to file, adhering to Xcode output
- formatting.
- """
-
- self.VerifyHasRequiredProperties()
-
- if self._should_print_single_line:
- # When printing an object in a single line, Xcode doesn't put any space
- # between the beginning of a dictionary (or presumably a list) and the
- # first contained item, so you wind up with snippets like
- # ...CDEF = {isa = PBXFileReference; fileRef = 0123...
- # If it were me, I would have put a space in there after the opening
- # curly, but I guess this is just another one of those inconsistencies
- # between how Xcode prints PBXFileReference and PBXBuildFile objects as
- # compared to other objects. Mimic Xcode's behavior here by using an
- # empty string for sep.
- sep = ''
- end_tabs = 0
- else:
- sep = '\n'
- end_tabs = 2
-
- # Start the object. For example, '\t\tPBXProject = {\n'.
- self._XCPrint(file, 2, self._XCPrintableValue(2, self) + ' = {' + sep)
-
- # "isa" isn't in the _properties dictionary, it's an intrinsic property
- # of the class which the object belongs to. Xcode always outputs "isa"
- # as the first element of an object dictionary.
- self._XCKVPrint(file, 3, 'isa', self.__class__.__name__)
-
- # The remaining elements of an object dictionary are sorted alphabetically.
- for property, value in sorted(self._properties.items()):
- self._XCKVPrint(file, 3, property, value)
-
- # End the object.
- self._XCPrint(file, end_tabs, '};\n')
-
- def UpdateProperties(self, properties, do_copy=False):
- """Merge the supplied properties into the _properties dictionary.
-
- The input properties must adhere to the class schema or a KeyError or
- TypeError exception will be raised. If adding an object of an XCObject
- subclass and the schema indicates a strong relationship, the object's
- parent will be set to this object.
-
- If do_copy is True, then lists, dicts, strong-owned XCObjects, and
- strong-owned XCObjects in lists will be copied instead of having their
- references added.
- """
-
- if properties is None:
- return
-
- for property, value in properties.items():
- # Make sure the property is in the schema.
- if not property in self._schema:
- raise KeyError(property + ' not in ' + self.__class__.__name__)
-
- # Make sure the property conforms to the schema.
- (is_list, property_type, is_strong) = self._schema[property][0:3]
- if is_list:
- if value.__class__ != list:
- raise TypeError(
- property + ' of ' + self.__class__.__name__ + \
- ' must be list, not ' + value.__class__.__name__)
- for item in value:
- if not isinstance(item, property_type) and \
- not (item.__class__ == unicode and property_type == str):
- # Accept unicode where str is specified. str is treated as
- # UTF-8-encoded.
- raise TypeError(
- 'item of ' + property + ' of ' + self.__class__.__name__ + \
- ' must be ' + property_type.__name__ + ', not ' + \
- item.__class__.__name__)
- elif not isinstance(value, property_type) and \
- not (value.__class__ == unicode and property_type == str):
- # Accept unicode where str is specified. str is treated as
- # UTF-8-encoded.
- raise TypeError(
- property + ' of ' + self.__class__.__name__ + ' must be ' + \
- property_type.__name__ + ', not ' + value.__class__.__name__)
-
- # Checks passed, perform the assignment.
- if do_copy:
- if isinstance(value, XCObject):
- if is_strong:
- self._properties[property] = value.Copy()
- else:
- self._properties[property] = value
- elif isinstance(value, (basestring, int)):
- self._properties[property] = value
- elif isinstance(value, list):
- if is_strong:
- # If is_strong is True, each element is an XCObject, so it's safe
- # to call Copy.
- self._properties[property] = []
- for item in value:
- self._properties[property].append(item.Copy())
- else:
- self._properties[property] = value[:]
- elif isinstance(value, dict):
- self._properties[property] = value.copy()
- else:
- raise TypeError("Don't know how to copy a " + \
- value.__class__.__name__ + ' object for ' + \
- property + ' in ' + self.__class__.__name__)
- else:
- self._properties[property] = value
-
- # Set up the child's back-reference to this object. Don't use |value|
- # any more because it may not be right if do_copy is true.
- if is_strong:
- if not is_list:
- self._properties[property].parent = self
- else:
- for item in self._properties[property]:
- item.parent = self
-
- def HasProperty(self, key):
- return key in self._properties
-
- def GetProperty(self, key):
- return self._properties[key]
-
- def SetProperty(self, key, value):
- self.UpdateProperties({key: value})
-
- def DelProperty(self, key):
- if key in self._properties:
- del self._properties[key]
-
- def AppendProperty(self, key, value):
- # TODO(mark): Support ExtendProperty too (and make this call that)?
-
- # Schema validation.
- if not key in self._schema:
- raise KeyError(key + ' not in ' + self.__class__.__name__)
-
- (is_list, property_type, is_strong) = self._schema[key][0:3]
- if not is_list:
- raise TypeError(key + ' of ' + self.__class__.__name__ + ' must be list')
- if not isinstance(value, property_type):
- raise TypeError('item of ' + key + ' of ' + self.__class__.__name__ + \
- ' must be ' + property_type.__name__ + ', not ' + \
- value.__class__.__name__)
-
- # If the property doesn't exist yet, create a new empty list to receive the
- # item.
- if not key in self._properties:
- self._properties[key] = []
-
- # Set up the ownership link.
- if is_strong:
- value.parent = self
-
- # Store the item.
- self._properties[key].append(value)
-
- def VerifyHasRequiredProperties(self):
- """Ensure that all properties identified as required by the schema are
- set.
- """
-
- # TODO(mark): A stronger verification mechanism is needed. Some
- # subclasses need to perform validation beyond what the schema can enforce.
- for property, attributes in self._schema.items():
- (is_list, property_type, is_strong, is_required) = attributes[0:4]
- if is_required and not property in self._properties:
- raise KeyError(self.__class__.__name__ + ' requires ' + property)
-
- def _SetDefaultsFromSchema(self):
- """Assign object default values according to the schema. This will not
- overwrite properties that have already been set."""
-
- defaults = {}
- for property, attributes in self._schema.items():
- (is_list, property_type, is_strong, is_required) = attributes[0:4]
- if is_required and len(attributes) >= 5 and \
- not property in self._properties:
- default = attributes[4]
-
- defaults[property] = default
-
- if len(defaults) > 0:
- # Use do_copy=True so that each new object gets its own copy of strong
- # objects, lists, and dicts.
- self.UpdateProperties(defaults, do_copy=True)
-
-
-class XCHierarchicalElement(XCObject):
- """Abstract base for PBXGroup and PBXFileReference. Not represented in a
- project file."""
-
- # TODO(mark): Do name and path belong here? Probably so.
- # If path is set and name is not, name may have a default value. Name will
- # be set to the basename of path, if the basename of path is different from
- # the full value of path. If path is already just a leaf name, name will
- # not be set.
- _schema = XCObject._schema.copy()
- _schema.update({
- 'comments': [0, str, 0, 0],
- 'fileEncoding': [0, str, 0, 0],
- 'includeInIndex': [0, int, 0, 0],
- 'indentWidth': [0, int, 0, 0],
- 'lineEnding': [0, int, 0, 0],
- 'sourceTree': [0, str, 0, 1, '<group>'],
- 'tabWidth': [0, int, 0, 0],
- 'usesTabs': [0, int, 0, 0],
- 'wrapsLines': [0, int, 0, 0],
- })
-
- def __init__(self, properties=None, id=None, parent=None):
- # super
- XCObject.__init__(self, properties, id, parent)
- if 'path' in self._properties and not 'name' in self._properties:
- path = self._properties['path']
- name = posixpath.basename(path)
- if name != '' and path != name:
- self.SetProperty('name', name)
-
- if 'path' in self._properties and \
- (not 'sourceTree' in self._properties or \
- self._properties['sourceTree'] == '<group>'):
- # If the pathname begins with an Xcode variable like "$(SDKROOT)/", take
- # the variable out and make the path be relative to that variable by
- # assigning the variable name as the sourceTree.
- (source_tree, path) = SourceTreeAndPathFromPath(self._properties['path'])
- if source_tree != None:
- self._properties['sourceTree'] = source_tree
- if path != None:
- self._properties['path'] = path
- if source_tree != None and path is None and \
- not 'name' in self._properties:
- # The path was of the form "$(SDKROOT)" with no path following it.
- # This object is now relative to that variable, so it has no path
- # attribute of its own. It does, however, keep a name.
- del self._properties['path']
- self._properties['name'] = source_tree
-
- def Name(self):
- if 'name' in self._properties:
- return self._properties['name']
- elif 'path' in self._properties:
- return self._properties['path']
- else:
- # This happens in the case of the root PBXGroup.
- return None
-
- def Hashables(self):
- """Custom hashables for XCHierarchicalElements.
-
- XCHierarchicalElements are special. Generally, their hashes shouldn't
- change if the paths don't change. The normal XCObject implementation of
- Hashables adds a hashable for each object, which means that if
- the hierarchical structure changes (possibly due to changes caused when
- TakeOverOnlyChild runs and encounters slight changes in the hierarchy),
- the hashes will change. For example, if a project file initially contains
- a/b/f1 and a/b becomes collapsed into a/b, f1 will have a single parent
- a/b. If someone later adds a/f2 to the project file, a/b can no longer be
- collapsed, and f1 winds up with parent b and grandparent a. That would
- be sufficient to change f1's hash.
-
- To counteract this problem, hashables for all XCHierarchicalElements except
- for the main group (which has neither a name nor a path) are taken to be
- just the set of path components. Because hashables are inherited from
- parents, this provides assurance that a/b/f1 has the same set of hashables
- whether its parent is b or a/b.
-
- The main group is a special case. As it is permitted to have no name or
- path, it is permitted to use the standard XCObject hash mechanism. This
- is not considered a problem because there can be only one main group.
- """
-
- if self == self.PBXProjectAncestor()._properties['mainGroup']:
- # super
- return XCObject.Hashables(self)
-
- hashables = []
-
- # Put the name in first, ensuring that if TakeOverOnlyChild collapses
- # children into a top-level group like "Source", the name always goes
- # into the list of hashables without interfering with path components.
- if 'name' in self._properties:
- # Make it less likely for people to manipulate hashes by following the
- # pattern of always pushing an object type value onto the list first.
- hashables.append(self.__class__.__name__ + '.name')
- hashables.append(self._properties['name'])
-
- # NOTE: This still has the problem that if an absolute path is encountered,
- # including paths with a sourceTree, they'll still inherit their parents'
- # hashables, even though the paths aren't relative to their parents. This
- # is not expected to be much of a problem in practice.
- path = self.PathFromSourceTreeAndPath()
- if path != None:
- components = path.split(posixpath.sep)
- for component in components:
- hashables.append(self.__class__.__name__ + '.path')
- hashables.append(component)
-
- hashables.extend(self._hashables)
-
- return hashables
-
- def Compare(self, other):
- # Allow comparison of these types. PBXGroup has the highest sort rank;
- # PBXVariantGroup is treated as equal to PBXFileReference.
- valid_class_types = {
- PBXFileReference: 'file',
- PBXGroup: 'group',
- PBXVariantGroup: 'file',
- }
- self_type = valid_class_types[self.__class__]
- other_type = valid_class_types[other.__class__]
-
- if self_type == other_type:
- # If the two objects are of the same sort rank, compare their names.
- return cmp(self.Name(), other.Name())
-
- # Otherwise, sort groups before everything else.
- if self_type == 'group':
- return -1
- return 1
-
- def CompareRootGroup(self, other):
- # This function should be used only to compare direct children of the
- # containing PBXProject's mainGroup. These groups should appear in the
- # listed order.
- # TODO(mark): "Build" is used by gyp.generator.xcode, perhaps the
- # generator should have a way of influencing this list rather than having
- # to hardcode for the generator here.
- order = ['Source', 'Intermediates', 'Projects', 'Frameworks', 'Products',
- 'Build']
-
- # If the groups aren't in the listed order, do a name comparison.
- # Otherwise, groups in the listed order should come before those that
- # aren't.
- self_name = self.Name()
- other_name = other.Name()
- self_in = isinstance(self, PBXGroup) and self_name in order
- other_in = isinstance(self, PBXGroup) and other_name in order
- if not self_in and not other_in:
- return self.Compare(other)
- if self_name in order and not other_name in order:
- return -1
- if other_name in order and not self_name in order:
- return 1
-
- # If both groups are in the listed order, go by the defined order.
- self_index = order.index(self_name)
- other_index = order.index(other_name)
- if self_index < other_index:
- return -1
- if self_index > other_index:
- return 1
- return 0
-
- def PathFromSourceTreeAndPath(self):
- # Turn the object's sourceTree and path properties into a single flat
- # string of a form comparable to the path parameter. If there's a
- # sourceTree property other than "<group>", wrap it in $(...) for the
- # comparison.
- components = []
- if self._properties['sourceTree'] != '<group>':
- components.append('$(' + self._properties['sourceTree'] + ')')
- if 'path' in self._properties:
- components.append(self._properties['path'])
-
- if len(components) > 0:
- return posixpath.join(*components)
-
- return None
-
- def FullPath(self):
- # Returns a full path to self relative to the project file, or relative
- # to some other source tree. Start with self, and walk up the chain of
- # parents prepending their paths, if any, until no more parents are
- # available (project-relative path) or until a path relative to some
- # source tree is found.
- xche = self
- path = None
- while isinstance(xche, XCHierarchicalElement) and \
- (path is None or \
- (not path.startswith('/') and not path.startswith('$'))):
- this_path = xche.PathFromSourceTreeAndPath()
- if this_path != None and path != None:
- path = posixpath.join(this_path, path)
- elif this_path != None:
- path = this_path
- xche = xche.parent
-
- return path
-
-
-class PBXGroup(XCHierarchicalElement):
- """
- Attributes:
- _children_by_path: Maps pathnames of children of this PBXGroup to the
- actual child XCHierarchicalElement objects.
- _variant_children_by_name_and_path: Maps (name, path) tuples of
- PBXVariantGroup children to the actual child PBXVariantGroup objects.
- """
-
- _schema = XCHierarchicalElement._schema.copy()
- _schema.update({
- 'children': [1, XCHierarchicalElement, 1, 1, []],
- 'name': [0, str, 0, 0],
- 'path': [0, str, 0, 0],
- })
-
- def __init__(self, properties=None, id=None, parent=None):
- # super
- XCHierarchicalElement.__init__(self, properties, id, parent)
- self._children_by_path = {}
- self._variant_children_by_name_and_path = {}
- for child in self._properties.get('children', []):
- self._AddChildToDicts(child)
-
- def Hashables(self):
- # super
- hashables = XCHierarchicalElement.Hashables(self)
-
- # It is not sufficient to just rely on name and parent to build a unique
- # hashable : a node could have two child PBXGroup sharing a common name.
- # To add entropy the hashable is enhanced with the names of all its
- # children.
- for child in self._properties.get('children', []):
- child_name = child.Name()
- if child_name != None:
- hashables.append(child_name)
-
- return hashables
-
- def HashablesForChild(self):
- # To avoid a circular reference the hashables used to compute a child id do
- # not include the child names.
- return XCHierarchicalElement.Hashables(self)
-
- def _AddChildToDicts(self, child):
- # Sets up this PBXGroup object's dicts to reference the child properly.
- child_path = child.PathFromSourceTreeAndPath()
- if child_path:
- if child_path in self._children_by_path:
- raise ValueError('Found multiple children with path ' + child_path)
- self._children_by_path[child_path] = child
-
- if isinstance(child, PBXVariantGroup):
- child_name = child._properties.get('name', None)
- key = (child_name, child_path)
- if key in self._variant_children_by_name_and_path:
- raise ValueError('Found multiple PBXVariantGroup children with ' + \
- 'name ' + str(child_name) + ' and path ' + \
- str(child_path))
- self._variant_children_by_name_and_path[key] = child
-
- def AppendChild(self, child):
- # Callers should use this instead of calling
- # AppendProperty('children', child) directly because this function
- # maintains the group's dicts.
- self.AppendProperty('children', child)
- self._AddChildToDicts(child)
-
- def GetChildByName(self, name):
- # This is not currently optimized with a dict as GetChildByPath is because
- # it has few callers. Most callers probably want GetChildByPath. This
- # function is only useful to get children that have names but no paths,
- # which is rare. The children of the main group ("Source", "Products",
- # etc.) is pretty much the only case where this likely to come up.
- #
- # TODO(mark): Maybe this should raise an error if more than one child is
- # present with the same name.
- if not 'children' in self._properties:
- return None
-
- for child in self._properties['children']:
- if child.Name() == name:
- return child
-
- return None
-
- def GetChildByPath(self, path):
- if not path:
- return None
-
- if path in self._children_by_path:
- return self._children_by_path[path]
-
- return None
-
- def GetChildByRemoteObject(self, remote_object):
- # This method is a little bit esoteric. Given a remote_object, which
- # should be a PBXFileReference in another project file, this method will
- # return this group's PBXReferenceProxy object serving as a local proxy
- # for the remote PBXFileReference.
- #
- # This function might benefit from a dict optimization as GetChildByPath
- # for some workloads, but profiling shows that it's not currently a
- # problem.
- if not 'children' in self._properties:
- return None
-
- for child in self._properties['children']:
- if not isinstance(child, PBXReferenceProxy):
- continue
-
- container_proxy = child._properties['remoteRef']
- if container_proxy._properties['remoteGlobalIDString'] == remote_object:
- return child
-
- return None
-
- def AddOrGetFileByPath(self, path, hierarchical):
- """Returns an existing or new file reference corresponding to path.
-
- If hierarchical is True, this method will create or use the necessary
- hierarchical group structure corresponding to path. Otherwise, it will
- look in and create an item in the current group only.
-
- If an existing matching reference is found, it is returned, otherwise, a
- new one will be created, added to the correct group, and returned.
-
- If path identifies a directory by virtue of carrying a trailing slash,
- this method returns a PBXFileReference of "folder" type. If path
- identifies a variant, by virtue of it identifying a file inside a directory
- with an ".lproj" extension, this method returns a PBXVariantGroup
- containing the variant named by path, and possibly other variants. For
- all other paths, a "normal" PBXFileReference will be returned.
- """
-
- # Adding or getting a directory? Directories end with a trailing slash.
- is_dir = False
- if path.endswith('/'):
- is_dir = True
- path = posixpath.normpath(path)
- if is_dir:
- path = path + '/'
-
- # Adding or getting a variant? Variants are files inside directories
- # with an ".lproj" extension. Xcode uses variants for localization. For
- # a variant path/to/Language.lproj/MainMenu.nib, put a variant group named
- # MainMenu.nib inside path/to, and give it a variant named Language. In
- # this example, grandparent would be set to path/to and parent_root would
- # be set to Language.
- variant_name = None
- parent = posixpath.dirname(path)
- grandparent = posixpath.dirname(parent)
- parent_basename = posixpath.basename(parent)
- (parent_root, parent_ext) = posixpath.splitext(parent_basename)
- if parent_ext == '.lproj':
- variant_name = parent_root
- if grandparent == '':
- grandparent = None
-
- # Putting a directory inside a variant group is not currently supported.
- assert not is_dir or variant_name is None
-
- path_split = path.split(posixpath.sep)
- if len(path_split) == 1 or \
- ((is_dir or variant_name != None) and len(path_split) == 2) or \
- not hierarchical:
- # The PBXFileReference or PBXVariantGroup will be added to or gotten from
- # this PBXGroup, no recursion necessary.
- if variant_name is None:
- # Add or get a PBXFileReference.
- file_ref = self.GetChildByPath(path)
- if file_ref != None:
- assert file_ref.__class__ == PBXFileReference
- else:
- file_ref = PBXFileReference({'path': path})
- self.AppendChild(file_ref)
- else:
- # Add or get a PBXVariantGroup. The variant group name is the same
- # as the basename (MainMenu.nib in the example above). grandparent
- # specifies the path to the variant group itself, and path_split[-2:]
- # is the path of the specific variant relative to its group.
- variant_group_name = posixpath.basename(path)
- variant_group_ref = self.AddOrGetVariantGroupByNameAndPath(
- variant_group_name, grandparent)
- variant_path = posixpath.sep.join(path_split[-2:])
- variant_ref = variant_group_ref.GetChildByPath(variant_path)
- if variant_ref != None:
- assert variant_ref.__class__ == PBXFileReference
- else:
- variant_ref = PBXFileReference({'name': variant_name,
- 'path': variant_path})
- variant_group_ref.AppendChild(variant_ref)
- # The caller is interested in the variant group, not the specific
- # variant file.
- file_ref = variant_group_ref
- return file_ref
- else:
- # Hierarchical recursion. Add or get a PBXGroup corresponding to the
- # outermost path component, and then recurse into it, chopping off that
- # path component.
- next_dir = path_split[0]
- group_ref = self.GetChildByPath(next_dir)
- if group_ref != None:
- assert group_ref.__class__ == PBXGroup
- else:
- group_ref = PBXGroup({'path': next_dir})
- self.AppendChild(group_ref)
- return group_ref.AddOrGetFileByPath(posixpath.sep.join(path_split[1:]),
- hierarchical)
-
- def AddOrGetVariantGroupByNameAndPath(self, name, path):
- """Returns an existing or new PBXVariantGroup for name and path.
-
- If a PBXVariantGroup identified by the name and path arguments is already
- present as a child of this object, it is returned. Otherwise, a new
- PBXVariantGroup with the correct properties is created, added as a child,
- and returned.
-
- This method will generally be called by AddOrGetFileByPath, which knows
- when to create a variant group based on the structure of the pathnames
- passed to it.
- """
-
- key = (name, path)
- if key in self._variant_children_by_name_and_path:
- variant_group_ref = self._variant_children_by_name_and_path[key]
- assert variant_group_ref.__class__ == PBXVariantGroup
- return variant_group_ref
-
- variant_group_properties = {'name': name}
- if path != None:
- variant_group_properties['path'] = path
- variant_group_ref = PBXVariantGroup(variant_group_properties)
- self.AppendChild(variant_group_ref)
-
- return variant_group_ref
-
- def TakeOverOnlyChild(self, recurse=False):
- """If this PBXGroup has only one child and it's also a PBXGroup, take
- it over by making all of its children this object's children.
-
- This function will continue to take over only children when those children
- are groups. If there are three PBXGroups representing a, b, and c, with
- c inside b and b inside a, and a and b have no other children, this will
- result in a taking over both b and c, forming a PBXGroup for a/b/c.
-
- If recurse is True, this function will recurse into children and ask them
- to collapse themselves by taking over only children as well. Assuming
- an example hierarchy with files at a/b/c/d1, a/b/c/d2, and a/b/c/d3/e/f
- (d1, d2, and f are files, the rest are groups), recursion will result in
- a group for a/b/c containing a group for d3/e.
- """
-
- # At this stage, check that child class types are PBXGroup exactly,
- # instead of using isinstance. The only subclass of PBXGroup,
- # PBXVariantGroup, should not participate in reparenting in the same way:
- # reparenting by merging different object types would be wrong.
- while len(self._properties['children']) == 1 and \
- self._properties['children'][0].__class__ == PBXGroup:
- # Loop to take over the innermost only-child group possible.
-
- child = self._properties['children'][0]
-
- # Assume the child's properties, including its children. Save a copy
- # of this object's old properties, because they'll still be needed.
- # This object retains its existing id and parent attributes.
- old_properties = self._properties
- self._properties = child._properties
- self._children_by_path = child._children_by_path
-
- if not 'sourceTree' in self._properties or \
- self._properties['sourceTree'] == '<group>':
- # The child was relative to its parent. Fix up the path. Note that
- # children with a sourceTree other than "<group>" are not relative to
- # their parents, so no path fix-up is needed in that case.
- if 'path' in old_properties:
- if 'path' in self._properties:
- # Both the original parent and child have paths set.
- self._properties['path'] = posixpath.join(old_properties['path'],
- self._properties['path'])
- else:
- # Only the original parent has a path, use it.
- self._properties['path'] = old_properties['path']
- if 'sourceTree' in old_properties:
- # The original parent had a sourceTree set, use it.
- self._properties['sourceTree'] = old_properties['sourceTree']
-
- # If the original parent had a name set, keep using it. If the original
- # parent didn't have a name but the child did, let the child's name
- # live on. If the name attribute seems unnecessary now, get rid of it.
- if 'name' in old_properties and old_properties['name'] != None and \
- old_properties['name'] != self.Name():
- self._properties['name'] = old_properties['name']
- if 'name' in self._properties and 'path' in self._properties and \
- self._properties['name'] == self._properties['path']:
- del self._properties['name']
-
- # Notify all children of their new parent.
- for child in self._properties['children']:
- child.parent = self
-
- # If asked to recurse, recurse.
- if recurse:
- for child in self._properties['children']:
- if child.__class__ == PBXGroup:
- child.TakeOverOnlyChild(recurse)
-
- def SortGroup(self):
- self._properties['children'] = \
- sorted(self._properties['children'], cmp=lambda x,y: x.Compare(y))
-
- # Recurse.
- for child in self._properties['children']:
- if isinstance(child, PBXGroup):
- child.SortGroup()
-
-
-class XCFileLikeElement(XCHierarchicalElement):
- # Abstract base for objects that can be used as the fileRef property of
- # PBXBuildFile.
-
- def PathHashables(self):
- # A PBXBuildFile that refers to this object will call this method to
- # obtain additional hashables specific to this XCFileLikeElement. Don't
- # just use this object's hashables, they're not specific and unique enough
- # on their own (without access to the parent hashables.) Instead, provide
- # hashables that identify this object by path by getting its hashables as
- # well as the hashables of ancestor XCHierarchicalElement objects.
-
- hashables = []
- xche = self
- while xche != None and isinstance(xche, XCHierarchicalElement):
- xche_hashables = xche.Hashables()
- for index in range(0, len(xche_hashables)):
- hashables.insert(index, xche_hashables[index])
- xche = xche.parent
- return hashables
-
-
-class XCContainerPortal(XCObject):
- # Abstract base for objects that can be used as the containerPortal property
- # of PBXContainerItemProxy.
- pass
-
-
-class XCRemoteObject(XCObject):
- # Abstract base for objects that can be used as the remoteGlobalIDString
- # property of PBXContainerItemProxy.
- pass
-
-
-class PBXFileReference(XCFileLikeElement, XCContainerPortal, XCRemoteObject):
- _schema = XCFileLikeElement._schema.copy()
- _schema.update({
- 'explicitFileType': [0, str, 0, 0],
- 'lastKnownFileType': [0, str, 0, 0],
- 'name': [0, str, 0, 0],
- 'path': [0, str, 0, 1],
- })
-
- # Weird output rules for PBXFileReference.
- _should_print_single_line = True
- # super
- _encode_transforms = XCFileLikeElement._alternate_encode_transforms
-
- def __init__(self, properties=None, id=None, parent=None):
- # super
- XCFileLikeElement.__init__(self, properties, id, parent)
- if 'path' in self._properties and self._properties['path'].endswith('/'):
- self._properties['path'] = self._properties['path'][:-1]
- is_dir = True
- else:
- is_dir = False
-
- if 'path' in self._properties and \
- not 'lastKnownFileType' in self._properties and \
- not 'explicitFileType' in self._properties:
- # TODO(mark): This is the replacement for a replacement for a quick hack.
- # It is no longer incredibly sucky, but this list needs to be extended.
- extension_map = {
- 'a': 'archive.ar',
- 'app': 'wrapper.application',
- 'bdic': 'file',
- 'bundle': 'wrapper.cfbundle',
- 'c': 'sourcecode.c.c',
- 'cc': 'sourcecode.cpp.cpp',
- 'cpp': 'sourcecode.cpp.cpp',
- 'css': 'text.css',
- 'cxx': 'sourcecode.cpp.cpp',
- 'dart': 'sourcecode',
- 'dylib': 'compiled.mach-o.dylib',
- 'framework': 'wrapper.framework',
- 'gyp': 'sourcecode',
- 'gypi': 'sourcecode',
- 'h': 'sourcecode.c.h',
- 'hxx': 'sourcecode.cpp.h',
- 'icns': 'image.icns',
- 'java': 'sourcecode.java',
- 'js': 'sourcecode.javascript',
- 'kext': 'wrapper.kext',
- 'm': 'sourcecode.c.objc',
- 'mm': 'sourcecode.cpp.objcpp',
- 'nib': 'wrapper.nib',
- 'o': 'compiled.mach-o.objfile',
- 'pdf': 'image.pdf',
- 'pl': 'text.script.perl',
- 'plist': 'text.plist.xml',
- 'pm': 'text.script.perl',
- 'png': 'image.png',
- 'py': 'text.script.python',
- 'r': 'sourcecode.rez',
- 'rez': 'sourcecode.rez',
- 's': 'sourcecode.asm',
- 'storyboard': 'file.storyboard',
- 'strings': 'text.plist.strings',
- 'swift': 'sourcecode.swift',
- 'ttf': 'file',
- 'xcassets': 'folder.assetcatalog',
- 'xcconfig': 'text.xcconfig',
- 'xcdatamodel': 'wrapper.xcdatamodel',
- 'xcdatamodeld':'wrapper.xcdatamodeld',
- 'xib': 'file.xib',
- 'y': 'sourcecode.yacc',
- }
-
- prop_map = {
- 'dart': 'explicitFileType',
- 'gyp': 'explicitFileType',
- 'gypi': 'explicitFileType',
- }
-
- if is_dir:
- file_type = 'folder'
- prop_name = 'lastKnownFileType'
- else:
- basename = posixpath.basename(self._properties['path'])
- (root, ext) = posixpath.splitext(basename)
- # Check the map using a lowercase extension.
- # TODO(mark): Maybe it should try with the original case first and fall
- # back to lowercase, in case there are any instances where case
- # matters. There currently aren't.
- if ext != '':
- ext = ext[1:].lower()
-
- # TODO(mark): "text" is the default value, but "file" is appropriate
- # for unrecognized files not containing text. Xcode seems to choose
- # based on content.
- file_type = extension_map.get(ext, 'text')
- prop_name = prop_map.get(ext, 'lastKnownFileType')
-
- self._properties[prop_name] = file_type
-
-
-class PBXVariantGroup(PBXGroup, XCFileLikeElement):
- """PBXVariantGroup is used by Xcode to represent localizations."""
- # No additions to the schema relative to PBXGroup.
- pass
-
-
-# PBXReferenceProxy is also an XCFileLikeElement subclass. It is defined below
-# because it uses PBXContainerItemProxy, defined below.
-
-
-class XCBuildConfiguration(XCObject):
- _schema = XCObject._schema.copy()
- _schema.update({
- 'baseConfigurationReference': [0, PBXFileReference, 0, 0],
- 'buildSettings': [0, dict, 0, 1, {}],
- 'name': [0, str, 0, 1],
- })
-
- def HasBuildSetting(self, key):
- return key in self._properties['buildSettings']
-
- def GetBuildSetting(self, key):
- return self._properties['buildSettings'][key]
-
- def SetBuildSetting(self, key, value):
- # TODO(mark): If a list, copy?
- self._properties['buildSettings'][key] = value
-
- def AppendBuildSetting(self, key, value):
- if not key in self._properties['buildSettings']:
- self._properties['buildSettings'][key] = []
- self._properties['buildSettings'][key].append(value)
-
- def DelBuildSetting(self, key):
- if key in self._properties['buildSettings']:
- del self._properties['buildSettings'][key]
-
- def SetBaseConfiguration(self, value):
- self._properties['baseConfigurationReference'] = value
-
-class XCConfigurationList(XCObject):
- # _configs is the default list of configurations.
- _configs = [ XCBuildConfiguration({'name': 'Debug'}),
- XCBuildConfiguration({'name': 'Release'}) ]
-
- _schema = XCObject._schema.copy()
- _schema.update({
- 'buildConfigurations': [1, XCBuildConfiguration, 1, 1, _configs],
- 'defaultConfigurationIsVisible': [0, int, 0, 1, 1],
- 'defaultConfigurationName': [0, str, 0, 1, 'Release'],
- })
-
- def Name(self):
- return 'Build configuration list for ' + \
- self.parent.__class__.__name__ + ' "' + self.parent.Name() + '"'
-
- def ConfigurationNamed(self, name):
- """Convenience accessor to obtain an XCBuildConfiguration by name."""
- for configuration in self._properties['buildConfigurations']:
- if configuration._properties['name'] == name:
- return configuration
-
- raise KeyError(name)
-
- def DefaultConfiguration(self):
- """Convenience accessor to obtain the default XCBuildConfiguration."""
- return self.ConfigurationNamed(self._properties['defaultConfigurationName'])
-
- def HasBuildSetting(self, key):
- """Determines the state of a build setting in all XCBuildConfiguration
- child objects.
-
- If all child objects have key in their build settings, and the value is the
- same in all child objects, returns 1.
-
- If no child objects have the key in their build settings, returns 0.
-
- If some, but not all, child objects have the key in their build settings,
- or if any children have different values for the key, returns -1.
- """
-
- has = None
- value = None
- for configuration in self._properties['buildConfigurations']:
- configuration_has = configuration.HasBuildSetting(key)
- if has is None:
- has = configuration_has
- elif has != configuration_has:
- return -1
-
- if configuration_has:
- configuration_value = configuration.GetBuildSetting(key)
- if value is None:
- value = configuration_value
- elif value != configuration_value:
- return -1
-
- if not has:
- return 0
-
- return 1
-
- def GetBuildSetting(self, key):
- """Gets the build setting for key.
-
- All child XCConfiguration objects must have the same value set for the
- setting, or a ValueError will be raised.
- """
-
- # TODO(mark): This is wrong for build settings that are lists. The list
- # contents should be compared (and a list copy returned?)
-
- value = None
- for configuration in self._properties['buildConfigurations']:
- configuration_value = configuration.GetBuildSetting(key)
- if value is None:
- value = configuration_value
- else:
- if value != configuration_value:
- raise ValueError('Variant values for ' + key)
-
- return value
-
- def SetBuildSetting(self, key, value):
- """Sets the build setting for key to value in all child
- XCBuildConfiguration objects.
- """
-
- for configuration in self._properties['buildConfigurations']:
- configuration.SetBuildSetting(key, value)
-
- def AppendBuildSetting(self, key, value):
- """Appends value to the build setting for key, which is treated as a list,
- in all child XCBuildConfiguration objects.
- """
-
- for configuration in self._properties['buildConfigurations']:
- configuration.AppendBuildSetting(key, value)
-
- def DelBuildSetting(self, key):
- """Deletes the build setting key from all child XCBuildConfiguration
- objects.
- """
-
- for configuration in self._properties['buildConfigurations']:
- configuration.DelBuildSetting(key)
-
- def SetBaseConfiguration(self, value):
- """Sets the build configuration in all child XCBuildConfiguration objects.
- """
-
- for configuration in self._properties['buildConfigurations']:
- configuration.SetBaseConfiguration(value)
-
-
-class PBXBuildFile(XCObject):
- _schema = XCObject._schema.copy()
- _schema.update({
- 'fileRef': [0, XCFileLikeElement, 0, 1],
- 'settings': [0, str, 0, 0], # hack, it's a dict
- })
-
- # Weird output rules for PBXBuildFile.
- _should_print_single_line = True
- _encode_transforms = XCObject._alternate_encode_transforms
-
- def Name(self):
- # Example: "main.cc in Sources"
- return self._properties['fileRef'].Name() + ' in ' + self.parent.Name()
-
- def Hashables(self):
- # super
- hashables = XCObject.Hashables(self)
-
- # It is not sufficient to just rely on Name() to get the
- # XCFileLikeElement's name, because that is not a complete pathname.
- # PathHashables returns hashables unique enough that no two
- # PBXBuildFiles should wind up with the same set of hashables, unless
- # someone adds the same file multiple times to the same target. That
- # would be considered invalid anyway.
- hashables.extend(self._properties['fileRef'].PathHashables())
-
- return hashables
-
-
-class XCBuildPhase(XCObject):
- """Abstract base for build phase classes. Not represented in a project
- file.
-
- Attributes:
- _files_by_path: A dict mapping each path of a child in the files list by
- path (keys) to the corresponding PBXBuildFile children (values).
- _files_by_xcfilelikeelement: A dict mapping each XCFileLikeElement (keys)
- to the corresponding PBXBuildFile children (values).
- """
-
- # TODO(mark): Some build phase types, like PBXShellScriptBuildPhase, don't
- # actually have a "files" list. XCBuildPhase should not have "files" but
- # another abstract subclass of it should provide this, and concrete build
- # phase types that do have "files" lists should be derived from that new
- # abstract subclass. XCBuildPhase should only provide buildActionMask and
- # runOnlyForDeploymentPostprocessing, and not files or the various
- # file-related methods and attributes.
-
- _schema = XCObject._schema.copy()
- _schema.update({
- 'buildActionMask': [0, int, 0, 1, 0x7fffffff],
- 'files': [1, PBXBuildFile, 1, 1, []],
- 'runOnlyForDeploymentPostprocessing': [0, int, 0, 1, 0],
- })
-
- def __init__(self, properties=None, id=None, parent=None):
- # super
- XCObject.__init__(self, properties, id, parent)
-
- self._files_by_path = {}
- self._files_by_xcfilelikeelement = {}
- for pbxbuildfile in self._properties.get('files', []):
- self._AddBuildFileToDicts(pbxbuildfile)
-
- def FileGroup(self, path):
- # Subclasses must override this by returning a two-element tuple. The
- # first item in the tuple should be the PBXGroup to which "path" should be
- # added, either as a child or deeper descendant. The second item should
- # be a boolean indicating whether files should be added into hierarchical
- # groups or one single flat group.
- raise NotImplementedError(
- self.__class__.__name__ + ' must implement FileGroup')
-
- def _AddPathToDict(self, pbxbuildfile, path):
- """Adds path to the dict tracking paths belonging to this build phase.
-
- If the path is already a member of this build phase, raises an exception.
- """
-
- if path in self._files_by_path:
- raise ValueError('Found multiple build files with path ' + path)
- self._files_by_path[path] = pbxbuildfile
-
- def _AddBuildFileToDicts(self, pbxbuildfile, path=None):
- """Maintains the _files_by_path and _files_by_xcfilelikeelement dicts.
-
- If path is specified, then it is the path that is being added to the
- phase, and pbxbuildfile must contain either a PBXFileReference directly
- referencing that path, or it must contain a PBXVariantGroup that itself
- contains a PBXFileReference referencing the path.
-
- If path is not specified, either the PBXFileReference's path or the paths
- of all children of the PBXVariantGroup are taken as being added to the
- phase.
-
- If the path is already present in the phase, raises an exception.
-
- If the PBXFileReference or PBXVariantGroup referenced by pbxbuildfile
- are already present in the phase, referenced by a different PBXBuildFile
- object, raises an exception. This does not raise an exception when
- a PBXFileReference or PBXVariantGroup reappear and are referenced by the
- same PBXBuildFile that has already introduced them, because in the case
- of PBXVariantGroup objects, they may correspond to multiple paths that are
- not all added simultaneously. When this situation occurs, the path needs
- to be added to _files_by_path, but nothing needs to change in
- _files_by_xcfilelikeelement, and the caller should have avoided adding
- the PBXBuildFile if it is already present in the list of children.
- """
-
- xcfilelikeelement = pbxbuildfile._properties['fileRef']
-
- paths = []
- if path != None:
- # It's best when the caller provides the path.
- if isinstance(xcfilelikeelement, PBXVariantGroup):
- paths.append(path)
- else:
- # If the caller didn't provide a path, there can be either multiple
- # paths (PBXVariantGroup) or one.
- if isinstance(xcfilelikeelement, PBXVariantGroup):
- for variant in xcfilelikeelement._properties['children']:
- paths.append(variant.FullPath())
- else:
- paths.append(xcfilelikeelement.FullPath())
-
- # Add the paths first, because if something's going to raise, the
- # messages provided by _AddPathToDict are more useful owing to its
- # having access to a real pathname and not just an object's Name().
- for a_path in paths:
- self._AddPathToDict(pbxbuildfile, a_path)
-
- # If another PBXBuildFile references this XCFileLikeElement, there's a
- # problem.
- if xcfilelikeelement in self._files_by_xcfilelikeelement and \
- self._files_by_xcfilelikeelement[xcfilelikeelement] != pbxbuildfile:
- raise ValueError('Found multiple build files for ' + \
- xcfilelikeelement.Name())
- self._files_by_xcfilelikeelement[xcfilelikeelement] = pbxbuildfile
-
- def AppendBuildFile(self, pbxbuildfile, path=None):
- # Callers should use this instead of calling
- # AppendProperty('files', pbxbuildfile) directly because this function
- # maintains the object's dicts. Better yet, callers can just call AddFile
- # with a pathname and not worry about building their own PBXBuildFile
- # objects.
- self.AppendProperty('files', pbxbuildfile)
- self._AddBuildFileToDicts(pbxbuildfile, path)
-
- def AddFile(self, path, settings=None):
- (file_group, hierarchical) = self.FileGroup(path)
- file_ref = file_group.AddOrGetFileByPath(path, hierarchical)
-
- if file_ref in self._files_by_xcfilelikeelement and \
- isinstance(file_ref, PBXVariantGroup):
- # There's already a PBXBuildFile in this phase corresponding to the
- # PBXVariantGroup. path just provides a new variant that belongs to
- # the group. Add the path to the dict.
- pbxbuildfile = self._files_by_xcfilelikeelement[file_ref]
- self._AddBuildFileToDicts(pbxbuildfile, path)
- else:
- # Add a new PBXBuildFile to get file_ref into the phase.
- if settings is None:
- pbxbuildfile = PBXBuildFile({'fileRef': file_ref})
- else:
- pbxbuildfile = PBXBuildFile({'fileRef': file_ref, 'settings': settings})
- self.AppendBuildFile(pbxbuildfile, path)
-
-
-class PBXHeadersBuildPhase(XCBuildPhase):
- # No additions to the schema relative to XCBuildPhase.
-
- def Name(self):
- return 'Headers'
-
- def FileGroup(self, path):
- return self.PBXProjectAncestor().RootGroupForPath(path)
-
-
-class PBXResourcesBuildPhase(XCBuildPhase):
- # No additions to the schema relative to XCBuildPhase.
-
- def Name(self):
- return 'Resources'
-
- def FileGroup(self, path):
- return self.PBXProjectAncestor().RootGroupForPath(path)
-
-
-class PBXSourcesBuildPhase(XCBuildPhase):
- # No additions to the schema relative to XCBuildPhase.
-
- def Name(self):
- return 'Sources'
-
- def FileGroup(self, path):
- return self.PBXProjectAncestor().RootGroupForPath(path)
-
-
-class PBXFrameworksBuildPhase(XCBuildPhase):
- # No additions to the schema relative to XCBuildPhase.
-
- def Name(self):
- return 'Frameworks'
-
- def FileGroup(self, path):
- (root, ext) = posixpath.splitext(path)
- if ext != '':
- ext = ext[1:].lower()
- if ext == 'o':
- # .o files are added to Xcode Frameworks phases, but conceptually aren't
- # frameworks, they're more like sources or intermediates. Redirect them
- # to show up in one of those other groups.
- return self.PBXProjectAncestor().RootGroupForPath(path)
- else:
- return (self.PBXProjectAncestor().FrameworksGroup(), False)
-
-
-class PBXShellScriptBuildPhase(XCBuildPhase):
- _schema = XCBuildPhase._schema.copy()
- _schema.update({
- 'inputPaths': [1, str, 0, 1, []],
- 'name': [0, str, 0, 0],
- 'outputPaths': [1, str, 0, 1, []],
- 'shellPath': [0, str, 0, 1, '/bin/sh'],
- 'shellScript': [0, str, 0, 1],
- 'showEnvVarsInLog': [0, int, 0, 0],
- })
-
- def Name(self):
- if 'name' in self._properties:
- return self._properties['name']
-
- return 'ShellScript'
-
-
-class PBXCopyFilesBuildPhase(XCBuildPhase):
- _schema = XCBuildPhase._schema.copy()
- _schema.update({
- 'dstPath': [0, str, 0, 1],
- 'dstSubfolderSpec': [0, int, 0, 1],
- 'name': [0, str, 0, 0],
- })
-
- # path_tree_re matches "$(DIR)/path" or just "$(DIR)". Match group 1 is
- # "DIR", match group 3 is "path" or None.
- path_tree_re = re.compile('^\\$\\((.*)\\)(/(.*)|)$')
-
- # path_tree_to_subfolder maps names of Xcode variables to the associated
- # dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase object.
- path_tree_to_subfolder = {
- 'BUILT_FRAMEWORKS_DIR': 10, # Frameworks Directory
- 'BUILT_PRODUCTS_DIR': 16, # Products Directory
- # Other types that can be chosen via the Xcode UI.
- # TODO(mark): Map Xcode variable names to these.
- # : 1, # Wrapper
- # : 6, # Executables: 6
- # : 7, # Resources
- # : 15, # Java Resources
- # : 11, # Shared Frameworks
- # : 12, # Shared Support
- # : 13, # PlugIns
- }
-
- def Name(self):
- if 'name' in self._properties:
- return self._properties['name']
-
- return 'CopyFiles'
-
- def FileGroup(self, path):
- return self.PBXProjectAncestor().RootGroupForPath(path)
-
- def SetDestination(self, path):
- """Set the dstSubfolderSpec and dstPath properties from path.
-
- path may be specified in the same notation used for XCHierarchicalElements,
- specifically, "$(DIR)/path".
- """
-
- path_tree_match = self.path_tree_re.search(path)
- if path_tree_match:
- # Everything else needs to be relative to an Xcode variable.
- path_tree = path_tree_match.group(1)
- relative_path = path_tree_match.group(3)
-
- if path_tree in self.path_tree_to_subfolder:
- subfolder = self.path_tree_to_subfolder[path_tree]
- if relative_path is None:
- relative_path = ''
- else:
- # The path starts with an unrecognized Xcode variable
- # name like $(SRCROOT). Xcode will still handle this
- # as an "absolute path" that starts with the variable.
- subfolder = 0
- relative_path = path
- elif path.startswith('/'):
- # Special case. Absolute paths are in dstSubfolderSpec 0.
- subfolder = 0
- relative_path = path[1:]
- else:
- raise ValueError('Can\'t use path %s in a %s' % \
- (path, self.__class__.__name__))
-
- self._properties['dstPath'] = relative_path
- self._properties['dstSubfolderSpec'] = subfolder
-
-
-class PBXBuildRule(XCObject):
- _schema = XCObject._schema.copy()
- _schema.update({
- 'compilerSpec': [0, str, 0, 1],
- 'filePatterns': [0, str, 0, 0],
- 'fileType': [0, str, 0, 1],
- 'isEditable': [0, int, 0, 1, 1],
- 'outputFiles': [1, str, 0, 1, []],
- 'script': [0, str, 0, 0],
- })
-
- def Name(self):
- # Not very inspired, but it's what Xcode uses.
- return self.__class__.__name__
-
- def Hashables(self):
- # super
- hashables = XCObject.Hashables(self)
-
- # Use the hashables of the weak objects that this object refers to.
- hashables.append(self._properties['fileType'])
- if 'filePatterns' in self._properties:
- hashables.append(self._properties['filePatterns'])
- return hashables
-
-
-class PBXContainerItemProxy(XCObject):
- # When referencing an item in this project file, containerPortal is the
- # PBXProject root object of this project file. When referencing an item in
- # another project file, containerPortal is a PBXFileReference identifying
- # the other project file.
- #
- # When serving as a proxy to an XCTarget (in this project file or another),
- # proxyType is 1. When serving as a proxy to a PBXFileReference (in another
- # project file), proxyType is 2. Type 2 is used for references to the
- # producs of the other project file's targets.
- #
- # Xcode is weird about remoteGlobalIDString. Usually, it's printed without
- # a comment, indicating that it's tracked internally simply as a string, but
- # sometimes it's printed with a comment (usually when the object is initially
- # created), indicating that it's tracked as a project file object at least
- # sometimes. This module always tracks it as an object, but contains a hack
- # to prevent it from printing the comment in the project file output. See
- # _XCKVPrint.
- _schema = XCObject._schema.copy()
- _schema.update({
- 'containerPortal': [0, XCContainerPortal, 0, 1],
- 'proxyType': [0, int, 0, 1],
- 'remoteGlobalIDString': [0, XCRemoteObject, 0, 1],
- 'remoteInfo': [0, str, 0, 1],
- })
-
- def __repr__(self):
- props = self._properties
- name = '%s.gyp:%s' % (props['containerPortal'].Name(), props['remoteInfo'])
- return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self))
-
- def Name(self):
- # Admittedly not the best name, but it's what Xcode uses.
- return self.__class__.__name__
-
- def Hashables(self):
- # super
- hashables = XCObject.Hashables(self)
-
- # Use the hashables of the weak objects that this object refers to.
- hashables.extend(self._properties['containerPortal'].Hashables())
- hashables.extend(self._properties['remoteGlobalIDString'].Hashables())
- return hashables
-
-
-class PBXTargetDependency(XCObject):
- # The "target" property accepts an XCTarget object, and obviously not
- # NoneType. But XCTarget is defined below, so it can't be put into the
- # schema yet. The definition of PBXTargetDependency can't be moved below
- # XCTarget because XCTarget's own schema references PBXTargetDependency.
- # Python doesn't deal well with this circular relationship, and doesn't have
- # a real way to do forward declarations. To work around, the type of
- # the "target" property is reset below, after XCTarget is defined.
- #
- # At least one of "name" and "target" is required.
- _schema = XCObject._schema.copy()
- _schema.update({
- 'name': [0, str, 0, 0],
- 'target': [0, None.__class__, 0, 0],
- 'targetProxy': [0, PBXContainerItemProxy, 1, 1],
- })
-
- def __repr__(self):
- name = self._properties.get('name') or self._properties['target'].Name()
- return '<%s %r at 0x%x>' % (self.__class__.__name__, name, id(self))
-
- def Name(self):
- # Admittedly not the best name, but it's what Xcode uses.
- return self.__class__.__name__
-
- def Hashables(self):
- # super
- hashables = XCObject.Hashables(self)
-
- # Use the hashables of the weak objects that this object refers to.
- hashables.extend(self._properties['targetProxy'].Hashables())
- return hashables
-
-
-class PBXReferenceProxy(XCFileLikeElement):
- _schema = XCFileLikeElement._schema.copy()
- _schema.update({
- 'fileType': [0, str, 0, 1],
- 'path': [0, str, 0, 1],
- 'remoteRef': [0, PBXContainerItemProxy, 1, 1],
- })
-
-
-class XCTarget(XCRemoteObject):
- # An XCTarget is really just an XCObject, the XCRemoteObject thing is just
- # to allow PBXProject to be used in the remoteGlobalIDString property of
- # PBXContainerItemProxy.
- #
- # Setting a "name" property at instantiation may also affect "productName",
- # which may in turn affect the "PRODUCT_NAME" build setting in children of
- # "buildConfigurationList". See __init__ below.
- _schema = XCRemoteObject._schema.copy()
- _schema.update({
- 'buildConfigurationList': [0, XCConfigurationList, 1, 1,
- XCConfigurationList()],
- 'buildPhases': [1, XCBuildPhase, 1, 1, []],
- 'dependencies': [1, PBXTargetDependency, 1, 1, []],
- 'name': [0, str, 0, 1],
- 'productName': [0, str, 0, 1],
- })
-
- def __init__(self, properties=None, id=None, parent=None,
- force_outdir=None, force_prefix=None, force_extension=None):
- # super
- XCRemoteObject.__init__(self, properties, id, parent)
-
- # Set up additional defaults not expressed in the schema. If a "name"
- # property was supplied, set "productName" if it is not present. Also set
- # the "PRODUCT_NAME" build setting in each configuration, but only if
- # the setting is not present in any build configuration.
- if 'name' in self._properties:
- if not 'productName' in self._properties:
- self.SetProperty('productName', self._properties['name'])
-
- if 'productName' in self._properties:
- if 'buildConfigurationList' in self._properties:
- configs = self._properties['buildConfigurationList']
- if configs.HasBuildSetting('PRODUCT_NAME') == 0:
- configs.SetBuildSetting('PRODUCT_NAME',
- self._properties['productName'])
-
- def AddDependency(self, other):
- pbxproject = self.PBXProjectAncestor()
- other_pbxproject = other.PBXProjectAncestor()
- if pbxproject == other_pbxproject:
- # Add a dependency to another target in the same project file.
- container = PBXContainerItemProxy({'containerPortal': pbxproject,
- 'proxyType': 1,
- 'remoteGlobalIDString': other,
- 'remoteInfo': other.Name()})
- dependency = PBXTargetDependency({'target': other,
- 'targetProxy': container})
- self.AppendProperty('dependencies', dependency)
- else:
- # Add a dependency to a target in a different project file.
- other_project_ref = \
- pbxproject.AddOrGetProjectReference(other_pbxproject)[1]
- container = PBXContainerItemProxy({
- 'containerPortal': other_project_ref,
- 'proxyType': 1,
- 'remoteGlobalIDString': other,
- 'remoteInfo': other.Name(),
- })
- dependency = PBXTargetDependency({'name': other.Name(),
- 'targetProxy': container})
- self.AppendProperty('dependencies', dependency)
-
- # Proxy all of these through to the build configuration list.
-
- def ConfigurationNamed(self, name):
- return self._properties['buildConfigurationList'].ConfigurationNamed(name)
-
- def DefaultConfiguration(self):
- return self._properties['buildConfigurationList'].DefaultConfiguration()
-
- def HasBuildSetting(self, key):
- return self._properties['buildConfigurationList'].HasBuildSetting(key)
-
- def GetBuildSetting(self, key):
- return self._properties['buildConfigurationList'].GetBuildSetting(key)
-
- def SetBuildSetting(self, key, value):
- return self._properties['buildConfigurationList'].SetBuildSetting(key, \
- value)
-
- def AppendBuildSetting(self, key, value):
- return self._properties['buildConfigurationList'].AppendBuildSetting(key, \
- value)
-
- def DelBuildSetting(self, key):
- return self._properties['buildConfigurationList'].DelBuildSetting(key)
-
-
-# Redefine the type of the "target" property. See PBXTargetDependency._schema
-# above.
-PBXTargetDependency._schema['target'][1] = XCTarget
-
-
-class PBXNativeTarget(XCTarget):
- # buildPhases is overridden in the schema to be able to set defaults.
- #
- # NOTE: Contrary to most objects, it is advisable to set parent when
- # constructing PBXNativeTarget. A parent of an XCTarget must be a PBXProject
- # object. A parent reference is required for a PBXNativeTarget during
- # construction to be able to set up the target defaults for productReference,
- # because a PBXBuildFile object must be created for the target and it must
- # be added to the PBXProject's mainGroup hierarchy.
- _schema = XCTarget._schema.copy()
- _schema.update({
- 'buildPhases': [1, XCBuildPhase, 1, 1,
- [PBXSourcesBuildPhase(), PBXFrameworksBuildPhase()]],
- 'buildRules': [1, PBXBuildRule, 1, 1, []],
- 'productReference': [0, PBXFileReference, 0, 1],
- 'productType': [0, str, 0, 1],
- })
-
- # Mapping from Xcode product-types to settings. The settings are:
- # filetype : used for explicitFileType in the project file
- # prefix : the prefix for the file name
- # suffix : the suffix for the file name
- _product_filetypes = {
- 'com.apple.product-type.application': ['wrapper.application',
- '', '.app'],
- 'com.apple.product-type.application.watchapp': ['wrapper.application',
- '', '.app'],
- 'com.apple.product-type.watchkit-extension': ['wrapper.app-extension',
- '', '.appex'],
- 'com.apple.product-type.app-extension': ['wrapper.app-extension',
- '', '.appex'],
- 'com.apple.product-type.bundle': ['wrapper.cfbundle',
- '', '.bundle'],
- 'com.apple.product-type.framework': ['wrapper.framework',
- '', '.framework'],
- 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib',
- 'lib', '.dylib'],
- 'com.apple.product-type.library.static': ['archive.ar',
- 'lib', '.a'],
- 'com.apple.product-type.tool': ['compiled.mach-o.executable',
- '', ''],
- 'com.apple.product-type.bundle.unit-test': ['wrapper.cfbundle',
- '', '.xctest'],
- 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib',
- '', '.so'],
- 'com.apple.product-type.kernel-extension': ['wrapper.kext',
- '', '.kext'],
- }
-
- def __init__(self, properties=None, id=None, parent=None,
- force_outdir=None, force_prefix=None, force_extension=None):
- # super
- XCTarget.__init__(self, properties, id, parent)
-
- if 'productName' in self._properties and \
- 'productType' in self._properties and \
- not 'productReference' in self._properties and \
- self._properties['productType'] in self._product_filetypes:
- products_group = None
- pbxproject = self.PBXProjectAncestor()
- if pbxproject != None:
- products_group = pbxproject.ProductsGroup()
-
- if products_group != None:
- (filetype, prefix, suffix) = \
- self._product_filetypes[self._properties['productType']]
- # Xcode does not have a distinct type for loadable modules that are
- # pure BSD targets (not in a bundle wrapper). GYP allows such modules
- # to be specified by setting a target type to loadable_module without
- # having mac_bundle set. These are mapped to the pseudo-product type
- # com.googlecode.gyp.xcode.bundle.
- #
- # By picking up this special type and converting it to a dynamic
- # library (com.apple.product-type.library.dynamic) with fix-ups,
- # single-file loadable modules can be produced.
- #
- # MACH_O_TYPE is changed to mh_bundle to produce the proper file type
- # (as opposed to mh_dylib). In order for linking to succeed,
- # DYLIB_CURRENT_VERSION and DYLIB_COMPATIBILITY_VERSION must be
- # cleared. They are meaningless for type mh_bundle.
- #
- # Finally, the .so extension is forcibly applied over the default
- # (.dylib), unless another forced extension is already selected.
- # .dylib is plainly wrong, and .bundle is used by loadable_modules in
- # bundle wrappers (com.apple.product-type.bundle). .so seems an odd
- # choice because it's used as the extension on many other systems that
- # don't distinguish between linkable shared libraries and non-linkable
- # loadable modules, but there's precedent: Python loadable modules on
- # Mac OS X use an .so extension.
- if self._properties['productType'] == 'com.googlecode.gyp.xcode.bundle':
- self._properties['productType'] = \
- 'com.apple.product-type.library.dynamic'
- self.SetBuildSetting('MACH_O_TYPE', 'mh_bundle')
- self.SetBuildSetting('DYLIB_CURRENT_VERSION', '')
- self.SetBuildSetting('DYLIB_COMPATIBILITY_VERSION', '')
- if force_extension is None:
- force_extension = suffix[1:]
-
- if self._properties['productType'] == \
- 'com.apple.product-type-bundle.unit.test':
- if force_extension is None:
- force_extension = suffix[1:]
-
- if force_extension is not None:
- # If it's a wrapper (bundle), set WRAPPER_EXTENSION.
- # Extension override.
- suffix = '.' + force_extension
- if filetype.startswith('wrapper.'):
- self.SetBuildSetting('WRAPPER_EXTENSION', force_extension)
- else:
- self.SetBuildSetting('EXECUTABLE_EXTENSION', force_extension)
-
- if filetype.startswith('compiled.mach-o.executable'):
- product_name = self._properties['productName']
- product_name += suffix
- suffix = ''
- self.SetProperty('productName', product_name)
- self.SetBuildSetting('PRODUCT_NAME', product_name)
-
- # Xcode handles most prefixes based on the target type, however there
- # are exceptions. If a "BSD Dynamic Library" target is added in the
- # Xcode UI, Xcode sets EXECUTABLE_PREFIX. This check duplicates that
- # behavior.
- if force_prefix is not None:
- prefix = force_prefix
- if filetype.startswith('wrapper.'):
- self.SetBuildSetting('WRAPPER_PREFIX', prefix)
- else:
- self.SetBuildSetting('EXECUTABLE_PREFIX', prefix)
-
- if force_outdir is not None:
- self.SetBuildSetting('TARGET_BUILD_DIR', force_outdir)
-
- # TODO(tvl): Remove the below hack.
- # http://code.google.com/p/gyp/issues/detail?id=122
-
- # Some targets include the prefix in the target_name. These targets
- # really should just add a product_name setting that doesn't include
- # the prefix. For example:
- # target_name = 'libevent', product_name = 'event'
- # This check cleans up for them.
- product_name = self._properties['productName']
- prefix_len = len(prefix)
- if prefix_len and (product_name[:prefix_len] == prefix):
- product_name = product_name[prefix_len:]
- self.SetProperty('productName', product_name)
- self.SetBuildSetting('PRODUCT_NAME', product_name)
-
- ref_props = {
- 'explicitFileType': filetype,
- 'includeInIndex': 0,
- 'path': prefix + product_name + suffix,
- 'sourceTree': 'BUILT_PRODUCTS_DIR',
- }
- file_ref = PBXFileReference(ref_props)
- products_group.AppendChild(file_ref)
- self.SetProperty('productReference', file_ref)
-
- def GetBuildPhaseByType(self, type):
- if not 'buildPhases' in self._properties:
- return None
-
- the_phase = None
- for phase in self._properties['buildPhases']:
- if isinstance(phase, type):
- # Some phases may be present in multiples in a well-formed project file,
- # but phases like PBXSourcesBuildPhase may only be present singly, and
- # this function is intended as an aid to GetBuildPhaseByType. Loop
- # over the entire list of phases and assert if more than one of the
- # desired type is found.
- assert the_phase is None
- the_phase = phase
-
- return the_phase
-
- def HeadersPhase(self):
- headers_phase = self.GetBuildPhaseByType(PBXHeadersBuildPhase)
- if headers_phase is None:
- headers_phase = PBXHeadersBuildPhase()
-
- # The headers phase should come before the resources, sources, and
- # frameworks phases, if any.
- insert_at = len(self._properties['buildPhases'])
- for index in range(0, len(self._properties['buildPhases'])):
- phase = self._properties['buildPhases'][index]
- if isinstance(phase, PBXResourcesBuildPhase) or \
- isinstance(phase, PBXSourcesBuildPhase) or \
- isinstance(phase, PBXFrameworksBuildPhase):
- insert_at = index
- break
-
- self._properties['buildPhases'].insert(insert_at, headers_phase)
- headers_phase.parent = self
-
- return headers_phase
-
- def ResourcesPhase(self):
- resources_phase = self.GetBuildPhaseByType(PBXResourcesBuildPhase)
- if resources_phase is None:
- resources_phase = PBXResourcesBuildPhase()
-
- # The resources phase should come before the sources and frameworks
- # phases, if any.
- insert_at = len(self._properties['buildPhases'])
- for index in range(0, len(self._properties['buildPhases'])):
- phase = self._properties['buildPhases'][index]
- if isinstance(phase, PBXSourcesBuildPhase) or \
- isinstance(phase, PBXFrameworksBuildPhase):
- insert_at = index
- break
-
- self._properties['buildPhases'].insert(insert_at, resources_phase)
- resources_phase.parent = self
-
- return resources_phase
-
- def SourcesPhase(self):
- sources_phase = self.GetBuildPhaseByType(PBXSourcesBuildPhase)
- if sources_phase is None:
- sources_phase = PBXSourcesBuildPhase()
- self.AppendProperty('buildPhases', sources_phase)
-
- return sources_phase
-
- def FrameworksPhase(self):
- frameworks_phase = self.GetBuildPhaseByType(PBXFrameworksBuildPhase)
- if frameworks_phase is None:
- frameworks_phase = PBXFrameworksBuildPhase()
- self.AppendProperty('buildPhases', frameworks_phase)
-
- return frameworks_phase
-
- def AddDependency(self, other):
- # super
- XCTarget.AddDependency(self, other)
-
- static_library_type = 'com.apple.product-type.library.static'
- shared_library_type = 'com.apple.product-type.library.dynamic'
- framework_type = 'com.apple.product-type.framework'
- if isinstance(other, PBXNativeTarget) and \
- 'productType' in self._properties and \
- self._properties['productType'] != static_library_type and \
- 'productType' in other._properties and \
- (other._properties['productType'] == static_library_type or \
- ((other._properties['productType'] == shared_library_type or \
- other._properties['productType'] == framework_type) and \
- ((not other.HasBuildSetting('MACH_O_TYPE')) or
- other.GetBuildSetting('MACH_O_TYPE') != 'mh_bundle'))):
-
- file_ref = other.GetProperty('productReference')
-
- pbxproject = self.PBXProjectAncestor()
- other_pbxproject = other.PBXProjectAncestor()
- if pbxproject != other_pbxproject:
- other_project_product_group = \
- pbxproject.AddOrGetProjectReference(other_pbxproject)[0]
- file_ref = other_project_product_group.GetChildByRemoteObject(file_ref)
-
- self.FrameworksPhase().AppendProperty('files',
- PBXBuildFile({'fileRef': file_ref}))
-
-
-class PBXAggregateTarget(XCTarget):
- pass
-
-
-class PBXProject(XCContainerPortal):
- # A PBXProject is really just an XCObject, the XCContainerPortal thing is
- # just to allow PBXProject to be used in the containerPortal property of
- # PBXContainerItemProxy.
- """
-
- Attributes:
- path: "sample.xcodeproj". TODO(mark) Document me!
- _other_pbxprojects: A dictionary, keyed by other PBXProject objects. Each
- value is a reference to the dict in the
- projectReferences list associated with the keyed
- PBXProject.
- """
-
- _schema = XCContainerPortal._schema.copy()
- _schema.update({
- 'attributes': [0, dict, 0, 0],
- 'buildConfigurationList': [0, XCConfigurationList, 1, 1,
- XCConfigurationList()],
- 'compatibilityVersion': [0, str, 0, 1, 'Xcode 3.2'],
- 'hasScannedForEncodings': [0, int, 0, 1, 1],
- 'mainGroup': [0, PBXGroup, 1, 1, PBXGroup()],
- 'projectDirPath': [0, str, 0, 1, ''],
- 'projectReferences': [1, dict, 0, 0],
- 'projectRoot': [0, str, 0, 1, ''],
- 'targets': [1, XCTarget, 1, 1, []],
- })
-
- def __init__(self, properties=None, id=None, parent=None, path=None):
- self.path = path
- self._other_pbxprojects = {}
- # super
- return XCContainerPortal.__init__(self, properties, id, parent)
-
- def Name(self):
- name = self.path
- if name[-10:] == '.xcodeproj':
- name = name[:-10]
- return posixpath.basename(name)
-
- def Path(self):
- return self.path
-
- def Comment(self):
- return 'Project object'
-
- def Children(self):
- # super
- children = XCContainerPortal.Children(self)
-
- # Add children that the schema doesn't know about. Maybe there's a more
- # elegant way around this, but this is the only case where we need to own
- # objects in a dictionary (that is itself in a list), and three lines for
- # a one-off isn't that big a deal.
- if 'projectReferences' in self._properties:
- for reference in self._properties['projectReferences']:
- children.append(reference['ProductGroup'])
-
- return children
-
- def PBXProjectAncestor(self):
- return self
-
- def _GroupByName(self, name):
- if not 'mainGroup' in self._properties:
- self.SetProperty('mainGroup', PBXGroup())
-
- main_group = self._properties['mainGroup']
- group = main_group.GetChildByName(name)
- if group is None:
- group = PBXGroup({'name': name})
- main_group.AppendChild(group)
-
- return group
-
- # SourceGroup and ProductsGroup are created by default in Xcode's own
- # templates.
- def SourceGroup(self):
- return self._GroupByName('Source')
-
- def ProductsGroup(self):
- return self._GroupByName('Products')
-
- # IntermediatesGroup is used to collect source-like files that are generated
- # by rules or script phases and are placed in intermediate directories such
- # as DerivedSources.
- def IntermediatesGroup(self):
- return self._GroupByName('Intermediates')
-
- # FrameworksGroup and ProjectsGroup are top-level groups used to collect
- # frameworks and projects.
- def FrameworksGroup(self):
- return self._GroupByName('Frameworks')
-
- def ProjectsGroup(self):
- return self._GroupByName('Projects')
-
- def RootGroupForPath(self, path):
- """Returns a PBXGroup child of this object to which path should be added.
-
- This method is intended to choose between SourceGroup and
- IntermediatesGroup on the basis of whether path is present in a source
- directory or an intermediates directory. For the purposes of this
- determination, any path located within a derived file directory such as
- PROJECT_DERIVED_FILE_DIR is treated as being in an intermediates
- directory.
-
- The returned value is a two-element tuple. The first element is the
- PBXGroup, and the second element specifies whether that group should be
- organized hierarchically (True) or as a single flat list (False).
- """
-
- # TODO(mark): make this a class variable and bind to self on call?
- # Also, this list is nowhere near exhaustive.
- # INTERMEDIATE_DIR and SHARED_INTERMEDIATE_DIR are used by
- # gyp.generator.xcode. There should probably be some way for that module
- # to push the names in, rather than having to hard-code them here.
- source_tree_groups = {
- 'DERIVED_FILE_DIR': (self.IntermediatesGroup, True),
- 'INTERMEDIATE_DIR': (self.IntermediatesGroup, True),
- 'PROJECT_DERIVED_FILE_DIR': (self.IntermediatesGroup, True),
- 'SHARED_INTERMEDIATE_DIR': (self.IntermediatesGroup, True),
- }
-
- (source_tree, path) = SourceTreeAndPathFromPath(path)
- if source_tree != None and source_tree in source_tree_groups:
- (group_func, hierarchical) = source_tree_groups[source_tree]
- group = group_func()
- return (group, hierarchical)
-
- # TODO(mark): make additional choices based on file extension.
-
- return (self.SourceGroup(), True)
-
- def AddOrGetFileInRootGroup(self, path):
- """Returns a PBXFileReference corresponding to path in the correct group
- according to RootGroupForPath's heuristics.
-
- If an existing PBXFileReference for path exists, it will be returned.
- Otherwise, one will be created and returned.
- """
-
- (group, hierarchical) = self.RootGroupForPath(path)
- return group.AddOrGetFileByPath(path, hierarchical)
-
- def RootGroupsTakeOverOnlyChildren(self, recurse=False):
- """Calls TakeOverOnlyChild for all groups in the main group."""
-
- for group in self._properties['mainGroup']._properties['children']:
- if isinstance(group, PBXGroup):
- group.TakeOverOnlyChild(recurse)
-
- def SortGroups(self):
- # Sort the children of the mainGroup (like "Source" and "Products")
- # according to their defined order.
- self._properties['mainGroup']._properties['children'] = \
- sorted(self._properties['mainGroup']._properties['children'],
- cmp=lambda x,y: x.CompareRootGroup(y))
-
- # Sort everything else by putting group before files, and going
- # alphabetically by name within sections of groups and files. SortGroup
- # is recursive.
- for group in self._properties['mainGroup']._properties['children']:
- if not isinstance(group, PBXGroup):
- continue
-
- if group.Name() == 'Products':
- # The Products group is a special case. Instead of sorting
- # alphabetically, sort things in the order of the targets that
- # produce the products. To do this, just build up a new list of
- # products based on the targets.
- products = []
- for target in self._properties['targets']:
- if not isinstance(target, PBXNativeTarget):
- continue
- product = target._properties['productReference']
- # Make sure that the product is already in the products group.
- assert product in group._properties['children']
- products.append(product)
-
- # Make sure that this process doesn't miss anything that was already
- # in the products group.
- assert len(products) == len(group._properties['children'])
- group._properties['children'] = products
- else:
- group.SortGroup()
-
- def AddOrGetProjectReference(self, other_pbxproject):
- """Add a reference to another project file (via PBXProject object) to this
- one.
-
- Returns [ProductGroup, ProjectRef]. ProductGroup is a PBXGroup object in
- this project file that contains a PBXReferenceProxy object for each
- product of each PBXNativeTarget in the other project file. ProjectRef is
- a PBXFileReference to the other project file.
-
- If this project file already references the other project file, the
- existing ProductGroup and ProjectRef are returned. The ProductGroup will
- still be updated if necessary.
- """
-
- if not 'projectReferences' in self._properties:
- self._properties['projectReferences'] = []
-
- product_group = None
- project_ref = None
-
- if not other_pbxproject in self._other_pbxprojects:
- # This project file isn't yet linked to the other one. Establish the
- # link.
- product_group = PBXGroup({'name': 'Products'})
-
- # ProductGroup is strong.
- product_group.parent = self
-
- # There's nothing unique about this PBXGroup, and if left alone, it will
- # wind up with the same set of hashables as all other PBXGroup objects
- # owned by the projectReferences list. Add the hashables of the
- # remote PBXProject that it's related to.
- product_group._hashables.extend(other_pbxproject.Hashables())
-
- # The other project reports its path as relative to the same directory
- # that this project's path is relative to. The other project's path
- # is not necessarily already relative to this project. Figure out the
- # pathname that this project needs to use to refer to the other one.
- this_path = posixpath.dirname(self.Path())
- projectDirPath = self.GetProperty('projectDirPath')
- if projectDirPath:
- if posixpath.isabs(projectDirPath[0]):
- this_path = projectDirPath
- else:
- this_path = posixpath.join(this_path, projectDirPath)
- other_path = gyp.common.RelativePath(other_pbxproject.Path(), this_path)
-
- # ProjectRef is weak (it's owned by the mainGroup hierarchy).
- project_ref = PBXFileReference({
- 'lastKnownFileType': 'wrapper.pb-project',
- 'path': other_path,
- 'sourceTree': 'SOURCE_ROOT',
- })
- self.ProjectsGroup().AppendChild(project_ref)
-
- ref_dict = {'ProductGroup': product_group, 'ProjectRef': project_ref}
- self._other_pbxprojects[other_pbxproject] = ref_dict
- self.AppendProperty('projectReferences', ref_dict)
-
- # Xcode seems to sort this list case-insensitively
- self._properties['projectReferences'] = \
- sorted(self._properties['projectReferences'], cmp=lambda x,y:
- cmp(x['ProjectRef'].Name().lower(),
- y['ProjectRef'].Name().lower()))
- else:
- # The link already exists. Pull out the relevnt data.
- project_ref_dict = self._other_pbxprojects[other_pbxproject]
- product_group = project_ref_dict['ProductGroup']
- project_ref = project_ref_dict['ProjectRef']
-
- self._SetUpProductReferences(other_pbxproject, product_group, project_ref)
-
- inherit_unique_symroot = self._AllSymrootsUnique(other_pbxproject, False)
- targets = other_pbxproject.GetProperty('targets')
- if all(self._AllSymrootsUnique(t, inherit_unique_symroot) for t in targets):
- dir_path = project_ref._properties['path']
- product_group._hashables.extend(dir_path)
-
- return [product_group, project_ref]
-
- def _AllSymrootsUnique(self, target, inherit_unique_symroot):
- # Returns True if all configurations have a unique 'SYMROOT' attribute.
- # The value of inherit_unique_symroot decides, if a configuration is assumed
- # to inherit a unique 'SYMROOT' attribute from its parent, if it doesn't
- # define an explicit value for 'SYMROOT'.
- symroots = self._DefinedSymroots(target)
- for s in self._DefinedSymroots(target):
- if (s is not None and not self._IsUniqueSymrootForTarget(s) or
- s is None and not inherit_unique_symroot):
- return False
- return True if symroots else inherit_unique_symroot
-
- def _DefinedSymroots(self, target):
- # Returns all values for the 'SYMROOT' attribute defined in all
- # configurations for this target. If any configuration doesn't define the
- # 'SYMROOT' attribute, None is added to the returned set. If all
- # configurations don't define the 'SYMROOT' attribute, an empty set is
- # returned.
- config_list = target.GetProperty('buildConfigurationList')
- symroots = set()
- for config in config_list.GetProperty('buildConfigurations'):
- setting = config.GetProperty('buildSettings')
- if 'SYMROOT' in setting:
- symroots.add(setting['SYMROOT'])
- else:
- symroots.add(None)
- if len(symroots) == 1 and None in symroots:
- return set()
- return symroots
-
- def _IsUniqueSymrootForTarget(self, symroot):
- # This method returns True if all configurations in target contain a
- # 'SYMROOT' attribute that is unique for the given target. A value is
- # unique, if the Xcode macro '$SRCROOT' appears in it in any form.
- uniquifier = ['$SRCROOT', '$(SRCROOT)']
- if any(x in symroot for x in uniquifier):
- return True
- return False
-
- def _SetUpProductReferences(self, other_pbxproject, product_group,
- project_ref):
- # TODO(mark): This only adds references to products in other_pbxproject
- # when they don't exist in this pbxproject. Perhaps it should also
- # remove references from this pbxproject that are no longer present in
- # other_pbxproject. Perhaps it should update various properties if they
- # change.
- for target in other_pbxproject._properties['targets']:
- if not isinstance(target, PBXNativeTarget):
- continue
-
- other_fileref = target._properties['productReference']
- if product_group.GetChildByRemoteObject(other_fileref) is None:
- # Xcode sets remoteInfo to the name of the target and not the name
- # of its product, despite this proxy being a reference to the product.
- container_item = PBXContainerItemProxy({
- 'containerPortal': project_ref,
- 'proxyType': 2,
- 'remoteGlobalIDString': other_fileref,
- 'remoteInfo': target.Name()
- })
- # TODO(mark): Does sourceTree get copied straight over from the other
- # project? Can the other project ever have lastKnownFileType here
- # instead of explicitFileType? (Use it if so?) Can path ever be
- # unset? (I don't think so.) Can other_fileref have name set, and
- # does it impact the PBXReferenceProxy if so? These are the questions
- # that perhaps will be answered one day.
- reference_proxy = PBXReferenceProxy({
- 'fileType': other_fileref._properties['explicitFileType'],
- 'path': other_fileref._properties['path'],
- 'sourceTree': other_fileref._properties['sourceTree'],
- 'remoteRef': container_item,
- })
-
- product_group.AppendChild(reference_proxy)
-
- def SortRemoteProductReferences(self):
- # For each remote project file, sort the associated ProductGroup in the
- # same order that the targets are sorted in the remote project file. This
- # is the sort order used by Xcode.
-
- def CompareProducts(x, y, remote_products):
- # x and y are PBXReferenceProxy objects. Go through their associated
- # PBXContainerItem to get the remote PBXFileReference, which will be
- # present in the remote_products list.
- x_remote = x._properties['remoteRef']._properties['remoteGlobalIDString']
- y_remote = y._properties['remoteRef']._properties['remoteGlobalIDString']
- x_index = remote_products.index(x_remote)
- y_index = remote_products.index(y_remote)
-
- # Use the order of each remote PBXFileReference in remote_products to
- # determine the sort order.
- return cmp(x_index, y_index)
-
- for other_pbxproject, ref_dict in self._other_pbxprojects.items():
- # Build up a list of products in the remote project file, ordered the
- # same as the targets that produce them.
- remote_products = []
- for target in other_pbxproject._properties['targets']:
- if not isinstance(target, PBXNativeTarget):
- continue
- remote_products.append(target._properties['productReference'])
-
- # Sort the PBXReferenceProxy children according to the list of remote
- # products.
- product_group = ref_dict['ProductGroup']
- product_group._properties['children'] = sorted(
- product_group._properties['children'],
- cmp=lambda x, y, rp=remote_products: CompareProducts(x, y, rp))
-
-
-class XCProjectFile(XCObject):
- _schema = XCObject._schema.copy()
- _schema.update({
- 'archiveVersion': [0, int, 0, 1, 1],
- 'classes': [0, dict, 0, 1, {}],
- 'objectVersion': [0, int, 0, 1, 46],
- 'rootObject': [0, PBXProject, 1, 1],
- })
-
- def ComputeIDs(self, recursive=True, overwrite=True, hash=None):
- # Although XCProjectFile is implemented here as an XCObject, it's not a
- # proper object in the Xcode sense, and it certainly doesn't have its own
- # ID. Pass through an attempt to update IDs to the real root object.
- if recursive:
- self._properties['rootObject'].ComputeIDs(recursive, overwrite, hash)
-
- def Print(self, file=sys.stdout):
- self.VerifyHasRequiredProperties()
-
- # Add the special "objects" property, which will be caught and handled
- # separately during printing. This structure allows a fairly standard
- # loop do the normal printing.
- self._properties['objects'] = {}
- self._XCPrint(file, 0, '// !$*UTF8*$!\n')
- if self._should_print_single_line:
- self._XCPrint(file, 0, '{ ')
- else:
- self._XCPrint(file, 0, '{\n')
- for property, value in sorted(self._properties.items(),
- cmp=lambda x, y: cmp(x, y)):
- if property == 'objects':
- self._PrintObjects(file)
- else:
- self._XCKVPrint(file, 1, property, value)
- self._XCPrint(file, 0, '}\n')
- del self._properties['objects']
-
- def _PrintObjects(self, file):
- if self._should_print_single_line:
- self._XCPrint(file, 0, 'objects = {')
- else:
- self._XCPrint(file, 1, 'objects = {\n')
-
- objects_by_class = {}
- for object in self.Descendants():
- if object == self:
- continue
- class_name = object.__class__.__name__
- if not class_name in objects_by_class:
- objects_by_class[class_name] = []
- objects_by_class[class_name].append(object)
-
- for class_name in sorted(objects_by_class):
- self._XCPrint(file, 0, '\n')
- self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n')
- for object in sorted(objects_by_class[class_name],
- cmp=lambda x, y: cmp(x.id, y.id)):
- object.Print(file)
- self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n')
-
- if self._should_print_single_line:
- self._XCPrint(file, 0, '}; ')
- else:
- self._XCPrint(file, 1, '};\n')
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
deleted file mode 100644
index 5de848158..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Applies a fix to CR LF TAB handling in xml.dom.
-
-Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
-Working around this: http://bugs.python.org/issue5752
-TODO(bradnelson): Consider dropping this when we drop XP support.
-"""
-
-
-import xml.dom.minidom
-
-
-def _Replacement_write_data(writer, data, is_attrib=False):
- """Writes datachars to writer."""
- data = data.replace("&", "&amp;").replace("<", "&lt;")
- data = data.replace("\"", "&quot;").replace(">", "&gt;")
- if is_attrib:
- data = data.replace(
- "\r", "&#xD;").replace(
- "\n", "&#xA;").replace(
- "\t", "&#x9;")
- writer.write(data)
-
-
-def _Replacement_writexml(self, writer, indent="", addindent="", newl=""):
- # indent = current indentation
- # addindent = indentation to add to higher levels
- # newl = newline string
- writer.write(indent+"<" + self.tagName)
-
- attrs = self._get_attributes()
- a_names = attrs.keys()
- a_names.sort()
-
- for a_name in a_names:
- writer.write(" %s=\"" % a_name)
- _Replacement_write_data(writer, attrs[a_name].value, is_attrib=True)
- writer.write("\"")
- if self.childNodes:
- writer.write(">%s" % newl)
- for node in self.childNodes:
- node.writexml(writer, indent + addindent, addindent, newl)
- writer.write("%s</%s>%s" % (indent, self.tagName, newl))
- else:
- writer.write("/>%s" % newl)
-
-
-class XmlFix(object):
- """Object to manage temporary patching of xml.dom.minidom."""
-
- def __init__(self):
- # Preserve current xml.dom.minidom functions.
- self.write_data = xml.dom.minidom._write_data
- self.writexml = xml.dom.minidom.Element.writexml
- # Inject replacement versions of a function and a method.
- xml.dom.minidom._write_data = _Replacement_write_data
- xml.dom.minidom.Element.writexml = _Replacement_writexml
-
- def Cleanup(self):
- if self.write_data:
- xml.dom.minidom._write_data = self.write_data
- xml.dom.minidom.Element.writexml = self.writexml
- self.write_data = None
-
- def __del__(self):
- self.Cleanup()
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples
deleted file mode 100755
index 804b61899..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os.path
-import shutil
-import sys
-
-
-gyps = [
- 'app/app.gyp',
- 'base/base.gyp',
- 'build/temp_gyp/googleurl.gyp',
- 'build/all.gyp',
- 'build/common.gypi',
- 'build/external_code.gypi',
- 'chrome/test/security_tests/security_tests.gyp',
- 'chrome/third_party/hunspell/hunspell.gyp',
- 'chrome/chrome.gyp',
- 'media/media.gyp',
- 'net/net.gyp',
- 'printing/printing.gyp',
- 'sdch/sdch.gyp',
- 'skia/skia.gyp',
- 'testing/gmock.gyp',
- 'testing/gtest.gyp',
- 'third_party/bzip2/bzip2.gyp',
- 'third_party/icu38/icu38.gyp',
- 'third_party/libevent/libevent.gyp',
- 'third_party/libjpeg/libjpeg.gyp',
- 'third_party/libpng/libpng.gyp',
- 'third_party/libxml/libxml.gyp',
- 'third_party/libxslt/libxslt.gyp',
- 'third_party/lzma_sdk/lzma_sdk.gyp',
- 'third_party/modp_b64/modp_b64.gyp',
- 'third_party/npapi/npapi.gyp',
- 'third_party/sqlite/sqlite.gyp',
- 'third_party/zlib/zlib.gyp',
- 'v8/tools/gyp/v8.gyp',
- 'webkit/activex_shim/activex_shim.gyp',
- 'webkit/activex_shim_dll/activex_shim_dll.gyp',
- 'webkit/build/action_csspropertynames.py',
- 'webkit/build/action_cssvaluekeywords.py',
- 'webkit/build/action_jsconfig.py',
- 'webkit/build/action_makenames.py',
- 'webkit/build/action_maketokenizer.py',
- 'webkit/build/action_useragentstylesheets.py',
- 'webkit/build/rule_binding.py',
- 'webkit/build/rule_bison.py',
- 'webkit/build/rule_gperf.py',
- 'webkit/tools/test_shell/test_shell.gyp',
- 'webkit/webkit.gyp',
-]
-
-
-def Main(argv):
- if len(argv) != 3 or argv[1] not in ['push', 'pull']:
- print 'Usage: %s push/pull PATH_TO_CHROME' % argv[0]
- return 1
-
- path_to_chrome = argv[2]
-
- for g in gyps:
- chrome_file = os.path.join(path_to_chrome, g)
- local_file = os.path.join(os.path.dirname(argv[0]), os.path.split(g)[1])
- if argv[1] == 'push':
- print 'Copying %s to %s' % (local_file, chrome_file)
- shutil.copyfile(local_file, chrome_file)
- elif argv[1] == 'pull':
- print 'Copying %s to %s' % (chrome_file, local_file)
- shutil.copyfile(chrome_file, local_file)
- else:
- assert False
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples.bat b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples.bat
deleted file mode 100644
index 778d9c90f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/samples/samples.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python %~dp0/samples %*
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/setup.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/setup.py
deleted file mode 100755
index 75a42558d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/setup.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from setuptools import setup
-
-setup(
- name='gyp',
- version='0.1',
- description='Generate Your Projects',
- author='Chromium Authors',
- author_email='chromium-dev@googlegroups.com',
- url='http://code.google.com/p/gyp',
- package_dir = {'': 'pylib'},
- packages=['gyp', 'gyp.generator'],
- entry_points = {'console_scripts': ['gyp=gyp:script_main'] }
-)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/README b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/README
deleted file mode 100644
index 712e4efbb..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/README
+++ /dev/null
@@ -1,15 +0,0 @@
-pretty_vcproj:
- Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2]
-
- They key/value pair are used to resolve vsprops name.
-
- For example, if I want to diff the base.vcproj project:
-
- pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > orignal.txt
- pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt
-
- And you can use your favorite diff tool to see the changes.
-
- Note: In the case of base.vcproj, the original vcproj is one level up the generated one.
- I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt
- before you perform the diff. \ No newline at end of file
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/README b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/README
deleted file mode 100644
index 2492a2c2f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in
-
-~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-
-and restart Xcode. \ No newline at end of file
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
deleted file mode 100644
index 85e2e268a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.pbfilespec
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- gyp.pbfilespec
- GYP source file spec for Xcode 3
-
- There is not much documentation available regarding the format
- of .pbfilespec files. As a starting point, see for instance the
- outdated documentation at:
- http://maxao.free.fr/xcode-plugin-interface/specifications.html
- and the files in:
- /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
-
- Place this file in directory:
- ~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-*/
-
-(
- {
- Identifier = sourcecode.gyp;
- BasedOn = sourcecode;
- Name = "GYP Files";
- Extensions = ("gyp", "gypi");
- MIMETypes = ("text/gyp");
- Language = "xcode.lang.gyp";
- IsTextFile = YES;
- IsSourceFile = YES;
- }
-)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
deleted file mode 100644
index 3b3506d31..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/Xcode/Specifications/gyp.xclangspec
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- Copyright (c) 2011 Google Inc. All rights reserved.
- Use of this source code is governed by a BSD-style license that can be
- found in the LICENSE file.
-
- gyp.xclangspec
- GYP language specification for Xcode 3
-
- There is not much documentation available regarding the format
- of .xclangspec files. As a starting point, see for instance the
- outdated documentation at:
- http://maxao.free.fr/xcode-plugin-interface/specifications.html
- and the files in:
- /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
-
- Place this file in directory:
- ~/Library/Application Support/Developer/Shared/Xcode/Specifications/
-*/
-
-(
-
- {
- Identifier = "xcode.lang.gyp.keyword";
- Syntax = {
- Words = (
- "and",
- "or",
- "<!",
- "<",
- );
- Type = "xcode.syntax.keyword";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.target.declarator";
- Syntax = {
- Words = (
- "'target_name'",
- );
- Type = "xcode.syntax.identifier.type";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.string.singlequote";
- Syntax = {
- IncludeRules = (
- "xcode.lang.string",
- "xcode.lang.gyp.keyword",
- "xcode.lang.number",
- );
- Start = "'";
- End = "'";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.comma";
- Syntax = {
- Words = ( ",", );
-
- };
- },
-
- {
- Identifier = "xcode.lang.gyp";
- Description = "GYP Coloring";
- BasedOn = "xcode.lang.simpleColoring";
- IncludeInMenu = YES;
- Name = "GYP";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer.toplevel";
- IncludeRules = (
- "xcode.lang.gyp.dictionary",
- );
- Type = "xcode.syntax.plain";
- };
- },
-
- // The following rule returns tokens to the other rules
- {
- Identifier = "xcode.lang.gyp.lexer";
- Syntax = {
- IncludeRules = (
- "xcode.lang.gyp.comment",
- "xcode.lang.string",
- 'xcode.lang.gyp.targetname.declarator',
- "xcode.lang.gyp.string.singlequote",
- "xcode.lang.number",
- "xcode.lang.gyp.comma",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.lexer.toplevel";
- Syntax = {
- IncludeRules = (
- "xcode.lang.gyp.comment",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.assignment";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Rules = (
- "xcode.lang.gyp.assignment.lhs",
- ":",
- "xcode.lang.gyp.assignment.rhs",
- );
- };
-
- },
-
- {
- Identifier = "xcode.lang.gyp.target.declaration";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Rules = (
- "xcode.lang.gyp.target.declarator",
- ":",
- "xcode.lang.gyp.target.name",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.target.name";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Rules = (
- "xcode.lang.gyp.string.singlequote",
- );
- Type = "xcode.syntax.definition.function";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.assignment.lhs";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Rules = (
- "xcode.lang.gyp.string.singlequote",
- );
- Type = "xcode.syntax.identifier.type";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.assignment.rhs";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Rules = (
- "xcode.lang.gyp.string.singlequote?",
- "xcode.lang.gyp.array?",
- "xcode.lang.gyp.dictionary?",
- "xcode.lang.number?",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.dictionary";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Start = "{";
- End = "}";
- Foldable = YES;
- Recursive = YES;
- IncludeRules = (
- "xcode.lang.gyp.target.declaration",
- "xcode.lang.gyp.assignment",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.array";
- Syntax = {
- Tokenizer = "xcode.lang.gyp.lexer";
- Start = "[";
- End = "]";
- Foldable = YES;
- Recursive = YES;
- IncludeRules = (
- "xcode.lang.gyp.array",
- "xcode.lang.gyp.dictionary",
- "xcode.lang.gyp.string.singlequote",
- );
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.todo.mark";
- Syntax = {
- StartChars = "T";
- Match = (
- "^\(TODO\(.*\):[ \t]+.*\)$", // include "TODO: " in the markers list
- );
- // This is the order of captures. All of the match strings above need the same order.
- CaptureTypes = (
- "xcode.syntax.mark"
- );
- Type = "xcode.syntax.comment";
- };
- },
-
- {
- Identifier = "xcode.lang.gyp.comment";
- BasedOn = "xcode.lang.comment"; // for text macros
- Syntax = {
- Start = "#";
- End = "\n";
- IncludeRules = (
- "xcode.lang.url",
- "xcode.lang.url.mail",
- "xcode.lang.comment.mark",
- "xcode.lang.gyp.todo.mark",
- );
- Type = "xcode.syntax.comment";
- };
- },
-)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/README b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/README
deleted file mode 100644
index eeef39f41..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/README
+++ /dev/null
@@ -1,12 +0,0 @@
-How to install gyp-mode for emacs:
-
-Add the following to your ~/.emacs (replace ... with the path to your gyp
-checkout).
-
-(setq load-path (cons ".../tools/emacs" load-path))
-(require 'gyp)
-
-Restart emacs (or eval-region the added lines) and you should be all set.
-
-Please note that ert is required for running the tests, which is included in
-Emacs 24, or available separately from https://github.com/ohler/ert
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el
deleted file mode 100644
index 11b849788..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp-tests.el
+++ /dev/null
@@ -1,63 +0,0 @@
-;;; gyp-tests.el - unit tests for gyp-mode.
-
-;; Copyright (c) 2012 Google Inc. All rights reserved.
-;; Use of this source code is governed by a BSD-style license that can be
-;; found in the LICENSE file.
-
-;; The recommended way to run these tests is to run them from the command-line,
-;; with the run-unit-tests.sh script.
-
-(require 'cl)
-(require 'ert)
-(require 'gyp)
-
-(defconst samples (directory-files "testdata" t ".gyp$")
- "List of golden samples to check")
-
-(defun fontify (filename)
- (with-temp-buffer
- (insert-file-contents-literally filename)
- (gyp-mode)
- (font-lock-fontify-buffer)
- (buffer-string)))
-
-(defun read-golden-sample (filename)
- (with-temp-buffer
- (insert-file-contents-literally (concat filename ".fontified"))
- (read (current-buffer))))
-
-(defun equivalent-face (face)
- "For the purposes of face comparison, we're not interested in the
- differences between certain faces. For example, the difference between
- font-lock-comment-delimiter and font-lock-comment-face."
- (case face
- ((font-lock-comment-delimiter-face) font-lock-comment-face)
- (t face)))
-
-(defun text-face-properties (s)
- "Extract the text properties from s"
- (let ((result (list t)))
- (dotimes (i (length s))
- (setq result (cons (equivalent-face (get-text-property i 'face s))
- result)))
- (nreverse result)))
-
-(ert-deftest test-golden-samples ()
- "Check that fontification produces the same results as the golden samples"
- (dolist (sample samples)
- (let ((golden (read-golden-sample sample))
- (fontified (fontify sample)))
- (should (equal golden fontified))
- (should (equal (text-face-properties golden)
- (text-face-properties fontified))))))
-
-(defun create-golden-sample (filename)
- "Create a golden sample by fontifying filename and writing out the printable
- representation of the fontified buffer (with text properties) to the
- FILENAME.fontified"
- (with-temp-file (concat filename ".fontified")
- (print (fontify filename) (current-buffer))))
-
-(defun create-golden-samples ()
- "Recreate the golden samples"
- (dolist (sample samples) (create-golden-sample sample)))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp.el b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp.el
deleted file mode 100644
index b98b155ce..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/gyp.el
+++ /dev/null
@@ -1,275 +0,0 @@
-;;; gyp.el - font-lock-mode support for gyp files.
-
-;; Copyright (c) 2012 Google Inc. All rights reserved.
-;; Use of this source code is governed by a BSD-style license that can be
-;; found in the LICENSE file.
-
-;; Put this somewhere in your load-path and
-;; (require 'gyp)
-
-(require 'python)
-(require 'cl)
-
-(when (string-match "python-mode.el" (symbol-file 'python-mode 'defun))
- (error (concat "python-mode must be loaded from python.el (bundled with "
- "recent emacsen), not from the older and less maintained "
- "python-mode.el")))
-
-(defadvice python-indent-calculate-levels (after gyp-outdent-closing-parens
- activate)
- "De-indent closing parens, braces, and brackets in gyp-mode."
- (when (and (eq major-mode 'gyp-mode)
- (string-match "^ *[])}][],)}]* *$"
- (buffer-substring-no-properties
- (line-beginning-position) (line-end-position))))
- (setf (first python-indent-levels)
- (- (first python-indent-levels) python-continuation-offset))))
-
-(defadvice python-indent-guess-indent-offset (around
- gyp-indent-guess-indent-offset
- activate)
- "Guess correct indent offset in gyp-mode."
- (or (and (not (eq major-mode 'gyp-mode))
- ad-do-it)
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- ;; Find first line ending with an opening brace that is not a comment.
- (or (and (re-search-forward "\\(^[[{]$\\|^.*[^#].*[[{]$\\)")
- (forward-line)
- (/= (current-indentation) 0)
- (set (make-local-variable 'python-indent-offset)
- (current-indentation))
- (set (make-local-variable 'python-continuation-offset)
- (current-indentation)))
- (message "Can't guess gyp indent offset, using default: %s"
- python-continuation-offset))))))
-
-(define-derived-mode gyp-mode python-mode "Gyp"
- "Major mode for editing .gyp files. See http://code.google.com/p/gyp/"
- ;; gyp-parse-history is a stack of (POSITION . PARSE-STATE) tuples,
- ;; with greater positions at the top of the stack. PARSE-STATE
- ;; is a list of section symbols (see gyp-section-name and gyp-parse-to)
- ;; with most nested section symbol at the front of the list.
- (set (make-local-variable 'gyp-parse-history) '((1 . (list))))
- (gyp-add-font-lock-keywords))
-
-(defun gyp-set-indentation ()
- "Hook function to configure python indentation to suit gyp mode."
- (set (make-local-variable 'python-indent-offset) 2)
- (set (make-local-variable 'python-continuation-offset) 2)
- (set (make-local-variable 'python-indent-guess-indent-offset) t)
- (python-indent-guess-indent-offset))
-
-(add-hook 'gyp-mode-hook 'gyp-set-indentation)
-
-(add-to-list 'auto-mode-alist '("\\.gyp\\'" . gyp-mode))
-(add-to-list 'auto-mode-alist '("\\.gypi\\'" . gyp-mode))
-(add-to-list 'auto-mode-alist '("/\\.gclient\\'" . gyp-mode))
-
-;;; Font-lock support
-
-(defconst gyp-dependencies-regexp
- (regexp-opt (list "dependencies" "export_dependent_settings"))
- "Regular expression to introduce 'dependencies' section")
-
-(defconst gyp-sources-regexp
- (regexp-opt (list "action" "files" "include_dirs" "includes" "inputs"
- "libraries" "outputs" "sources"))
- "Regular expression to introduce 'sources' sections")
-
-(defconst gyp-conditions-regexp
- (regexp-opt (list "conditions" "target_conditions"))
- "Regular expression to introduce conditions sections")
-
-(defconst gyp-variables-regexp
- "^variables"
- "Regular expression to introduce variables sections")
-
-(defconst gyp-defines-regexp
- "^defines"
- "Regular expression to introduce 'defines' sections")
-
-(defconst gyp-targets-regexp
- "^targets"
- "Regular expression to introduce 'targets' sections")
-
-(defun gyp-section-name (section)
- "Map the sections we are interested in from SECTION to symbol.
-
- SECTION is a string from the buffer that introduces a section. The result is
- a symbol representing the kind of section.
-
- This allows us to treat (for the purposes of font-lock) several different
- section names as the same kind of section. For example, a 'sources section
- can be introduced by the 'sources', 'inputs', 'outputs' keyword.
-
- 'other is the default section kind when a more specific match is not made."
- (cond ((string-match-p gyp-dependencies-regexp section) 'dependencies)
- ((string-match-p gyp-sources-regexp section) 'sources)
- ((string-match-p gyp-variables-regexp section) 'variables)
- ((string-match-p gyp-conditions-regexp section) 'conditions)
- ((string-match-p gyp-targets-regexp section) 'targets)
- ((string-match-p gyp-defines-regexp section) 'defines)
- (t 'other)))
-
-(defun gyp-invalidate-parse-states-after (target-point)
- "Erase any parse information after target-point."
- (while (> (caar gyp-parse-history) target-point)
- (setq gyp-parse-history (cdr gyp-parse-history))))
-
-(defun gyp-parse-point ()
- "The point of the last parse state added by gyp-parse-to."
- (caar gyp-parse-history))
-
-(defun gyp-parse-sections ()
- "A list of section symbols holding at the last parse state point."
- (cdar gyp-parse-history))
-
-(defun gyp-inside-dictionary-p ()
- "Predicate returning true if the parser is inside a dictionary."
- (not (eq (cadar gyp-parse-history) 'list)))
-
-(defun gyp-add-parse-history (point sections)
- "Add parse state SECTIONS to the parse history at POINT so that parsing can be
- resumed instantly."
- (while (>= (caar gyp-parse-history) point)
- (setq gyp-parse-history (cdr gyp-parse-history)))
- (setq gyp-parse-history (cons (cons point sections) gyp-parse-history)))
-
-(defun gyp-parse-to (target-point)
- "Parses from (point) to TARGET-POINT adding the parse state information to
- gyp-parse-state-history. Parsing stops if TARGET-POINT is reached or if a
- string literal has been parsed. Returns nil if no further parsing can be
- done, otherwise returns the position of the start of a parsed string, leaving
- the point at the end of the string."
- (let ((parsing t)
- string-start)
- (while parsing
- (setq string-start nil)
- ;; Parse up to a character that starts a sexp, or if the nesting
- ;; level decreases.
- (let ((state (parse-partial-sexp (gyp-parse-point)
- target-point
- -1
- t))
- (sections (gyp-parse-sections)))
- (if (= (nth 0 state) -1)
- (setq sections (cdr sections)) ; pop out a level
- (cond ((looking-at-p "['\"]") ; a string
- (setq string-start (point))
- (goto-char (scan-sexps (point) 1))
- (if (gyp-inside-dictionary-p)
- ;; Look for sections inside a dictionary
- (let ((section (gyp-section-name
- (buffer-substring-no-properties
- (+ 1 string-start)
- (- (point) 1)))))
- (setq sections (cons section (cdr sections)))))
- ;; Stop after the string so it can be fontified.
- (setq target-point (point)))
- ((looking-at-p "{")
- ;; Inside a dictionary. Increase nesting.
- (forward-char 1)
- (setq sections (cons 'unknown sections)))
- ((looking-at-p "\\[")
- ;; Inside a list. Increase nesting
- (forward-char 1)
- (setq sections (cons 'list sections)))
- ((not (eobp))
- ;; other
- (forward-char 1))))
- (gyp-add-parse-history (point) sections)
- (setq parsing (< (point) target-point))))
- string-start))
-
-(defun gyp-section-at-point ()
- "Transform the last parse state, which is a list of nested sections and return
- the section symbol that should be used to determine font-lock information for
- the string. Can return nil indicating the string should not have any attached
- section."
- (let ((sections (gyp-parse-sections)))
- (cond
- ((eq (car sections) 'conditions)
- ;; conditions can occur in a variables section, but we still want to
- ;; highlight it as a keyword.
- nil)
- ((and (eq (car sections) 'list)
- (eq (cadr sections) 'list))
- ;; conditions and sources can have items in [[ ]]
- (caddr sections))
- (t (cadr sections)))))
-
-(defun gyp-section-match (limit)
- "Parse from (point) to LIMIT returning by means of match data what was
- matched. The group of the match indicates what style font-lock should apply.
- See also `gyp-add-font-lock-keywords'."
- (gyp-invalidate-parse-states-after (point))
- (let ((group nil)
- (string-start t))
- (while (and (< (point) limit)
- (not group)
- string-start)
- (setq string-start (gyp-parse-to limit))
- (if string-start
- (setq group (case (gyp-section-at-point)
- ('dependencies 1)
- ('variables 2)
- ('conditions 2)
- ('sources 3)
- ('defines 4)
- (nil nil)))))
- (if group
- (progn
- ;; Set the match data to indicate to the font-lock mechanism the
- ;; highlighting to be performed.
- (set-match-data (append (list string-start (point))
- (make-list (* (1- group) 2) nil)
- (list (1+ string-start) (1- (point)))))
- t))))
-
-;;; Please see http://code.google.com/p/gyp/wiki/GypLanguageSpecification for
-;;; canonical list of keywords.
-(defun gyp-add-font-lock-keywords ()
- "Add gyp-mode keywords to font-lock mechanism."
- ;; TODO(jknotten): Move all the keyword highlighting into gyp-section-match
- ;; so that we can do the font-locking in a single font-lock pass.
- (font-lock-add-keywords
- nil
- (list
- ;; Top-level keywords
- (list (concat "['\"]\\("
- (regexp-opt (list "action" "action_name" "actions" "cflags"
- "cflags_cc" "conditions" "configurations"
- "copies" "defines" "dependencies" "destination"
- "direct_dependent_settings"
- "export_dependent_settings" "extension" "files"
- "include_dirs" "includes" "inputs" "ldflags" "libraries"
- "link_settings" "mac_bundle" "message"
- "msvs_external_rule" "outputs" "product_name"
- "process_outputs_as_sources" "rules" "rule_name"
- "sources" "suppress_wildcard"
- "target_conditions" "target_defaults"
- "target_defines" "target_name" "toolsets"
- "targets" "type" "variables" "xcode_settings"))
- "[!/+=]?\\)") 1 'font-lock-keyword-face t)
- ;; Type of target
- (list (concat "['\"]\\("
- (regexp-opt (list "loadable_module" "static_library"
- "shared_library" "executable" "none"))
- "\\)") 1 'font-lock-type-face t)
- (list "\\(?:target\\|action\\)_name['\"]\\s-*:\\s-*['\"]\\([^ '\"]*\\)" 1
- 'font-lock-function-name-face t)
- (list 'gyp-section-match
- (list 1 'font-lock-function-name-face t t) ; dependencies
- (list 2 'font-lock-variable-name-face t t) ; variables, conditions
- (list 3 'font-lock-constant-face t t) ; sources
- (list 4 'font-lock-preprocessor-face t t)) ; preprocessor
- ;; Variable expansion
- (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t)
- ;; Command expansion
- (list "<!@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t)
- )))
-
-(provide 'gyp)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh
deleted file mode 100755
index 6e62b9b28..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/run-unit-tests.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-emacs --no-site-file --no-init-file --batch \
- --load ert.el --load gyp.el --load gyp-tests.el \
- -f ert-run-tests-batch-and-exit
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
deleted file mode 100644
index 29300fe1b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp
+++ /dev/null
@@ -1,1105 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'chromium_code': 1,
- # Override to dynamically link the PulseAudio library.
- 'use_pulseaudio%': 0,
- # Override to dynamically link the cras (ChromeOS audio) library.
- 'use_cras%': 0,
- },
- 'targets': [
- {
- 'target_name': 'media',
- 'type': '<(component)',
- 'dependencies': [
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../build/temp_gyp/googleurl.gyp:googleurl',
- '../crypto/crypto.gyp:crypto',
- '../third_party/openmax/openmax.gyp:il',
- '../ui/ui.gyp:ui',
- ],
- 'defines': [
- 'MEDIA_IMPLEMENTATION',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'audio/android/audio_manager_android.cc',
- 'audio/android/audio_manager_android.h',
- 'audio/android/audio_track_output_android.cc',
- 'audio/android/audio_track_output_android.h',
- 'audio/android/opensles_input.cc',
- 'audio/android/opensles_input.h',
- 'audio/android/opensles_output.cc',
- 'audio/android/opensles_output.h',
- 'audio/async_socket_io_handler.h',
- 'audio/async_socket_io_handler_posix.cc',
- 'audio/async_socket_io_handler_win.cc',
- 'audio/audio_buffers_state.cc',
- 'audio/audio_buffers_state.h',
- 'audio/audio_io.h',
- 'audio/audio_input_controller.cc',
- 'audio/audio_input_controller.h',
- 'audio/audio_input_stream_impl.cc',
- 'audio/audio_input_stream_impl.h',
- 'audio/audio_device_name.cc',
- 'audio/audio_device_name.h',
- 'audio/audio_manager.cc',
- 'audio/audio_manager.h',
- 'audio/audio_manager_base.cc',
- 'audio/audio_manager_base.h',
- 'audio/audio_output_controller.cc',
- 'audio/audio_output_controller.h',
- 'audio/audio_output_dispatcher.cc',
- 'audio/audio_output_dispatcher.h',
- 'audio/audio_output_dispatcher_impl.cc',
- 'audio/audio_output_dispatcher_impl.h',
- 'audio/audio_output_mixer.cc',
- 'audio/audio_output_mixer.h',
- 'audio/audio_output_proxy.cc',
- 'audio/audio_output_proxy.h',
- 'audio/audio_parameters.cc',
- 'audio/audio_parameters.h',
- 'audio/audio_util.cc',
- 'audio/audio_util.h',
- 'audio/cross_process_notification.cc',
- 'audio/cross_process_notification.h',
- 'audio/cross_process_notification_win.cc',
- 'audio/cross_process_notification_posix.cc',
- 'audio/fake_audio_input_stream.cc',
- 'audio/fake_audio_input_stream.h',
- 'audio/fake_audio_output_stream.cc',
- 'audio/fake_audio_output_stream.h',
- 'audio/linux/audio_manager_linux.cc',
- 'audio/linux/audio_manager_linux.h',
- 'audio/linux/alsa_input.cc',
- 'audio/linux/alsa_input.h',
- 'audio/linux/alsa_output.cc',
- 'audio/linux/alsa_output.h',
- 'audio/linux/alsa_util.cc',
- 'audio/linux/alsa_util.h',
- 'audio/linux/alsa_wrapper.cc',
- 'audio/linux/alsa_wrapper.h',
- 'audio/linux/cras_output.cc',
- 'audio/linux/cras_output.h',
- 'audio/openbsd/audio_manager_openbsd.cc',
- 'audio/openbsd/audio_manager_openbsd.h',
- 'audio/mac/audio_input_mac.cc',
- 'audio/mac/audio_input_mac.h',
- 'audio/mac/audio_low_latency_input_mac.cc',
- 'audio/mac/audio_low_latency_input_mac.h',
- 'audio/mac/audio_low_latency_output_mac.cc',
- 'audio/mac/audio_low_latency_output_mac.h',
- 'audio/mac/audio_manager_mac.cc',
- 'audio/mac/audio_manager_mac.h',
- 'audio/mac/audio_output_mac.cc',
- 'audio/mac/audio_output_mac.h',
- 'audio/null_audio_sink.cc',
- 'audio/null_audio_sink.h',
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- 'audio/sample_rates.cc',
- 'audio/sample_rates.h',
- 'audio/simple_sources.cc',
- 'audio/simple_sources.h',
- 'audio/win/audio_low_latency_input_win.cc',
- 'audio/win/audio_low_latency_input_win.h',
- 'audio/win/audio_low_latency_output_win.cc',
- 'audio/win/audio_low_latency_output_win.h',
- 'audio/win/audio_manager_win.cc',
- 'audio/win/audio_manager_win.h',
- 'audio/win/avrt_wrapper_win.cc',
- 'audio/win/avrt_wrapper_win.h',
- 'audio/win/device_enumeration_win.cc',
- 'audio/win/device_enumeration_win.h',
- 'audio/win/wavein_input_win.cc',
- 'audio/win/wavein_input_win.h',
- 'audio/win/waveout_output_win.cc',
- 'audio/win/waveout_output_win.h',
- 'base/android/media_jni_registrar.cc',
- 'base/android/media_jni_registrar.h',
- 'base/audio_decoder.cc',
- 'base/audio_decoder.h',
- 'base/audio_decoder_config.cc',
- 'base/audio_decoder_config.h',
- 'base/audio_renderer.h',
- 'base/audio_renderer_mixer.cc',
- 'base/audio_renderer_mixer.h',
- 'base/audio_renderer_mixer_input.cc',
- 'base/audio_renderer_mixer_input.h',
- 'base/bitstream_buffer.h',
- 'base/buffers.cc',
- 'base/buffers.h',
- 'base/byte_queue.cc',
- 'base/byte_queue.h',
- 'base/channel_layout.cc',
- 'base/channel_layout.h',
- 'base/clock.cc',
- 'base/clock.h',
- 'base/composite_filter.cc',
- 'base/composite_filter.h',
- 'base/data_buffer.cc',
- 'base/data_buffer.h',
- 'base/data_source.cc',
- 'base/data_source.h',
- 'base/decoder_buffer.cc',
- 'base/decoder_buffer.h',
- 'base/decrypt_config.cc',
- 'base/decrypt_config.h',
- 'base/decryptor.h',
- 'base/decryptor_client.h',
- 'base/demuxer.cc',
- 'base/demuxer.h',
- 'base/demuxer_stream.cc',
- 'base/demuxer_stream.h',
- 'base/djb2.cc',
- 'base/djb2.h',
- 'base/filter_collection.cc',
- 'base/filter_collection.h',
- 'base/filter_host.h',
- 'base/filters.cc',
- 'base/filters.h',
- 'base/h264_bitstream_converter.cc',
- 'base/h264_bitstream_converter.h',
- 'base/media.h',
- 'base/media_android.cc',
- 'base/media_export.h',
- 'base/media_log.cc',
- 'base/media_log.h',
- 'base/media_log_event.h',
- 'base/media_posix.cc',
- 'base/media_switches.cc',
- 'base/media_switches.h',
- 'base/media_win.cc',
- 'base/message_loop_factory.cc',
- 'base/message_loop_factory.h',
- 'base/pipeline.cc',
- 'base/pipeline.h',
- 'base/pipeline_status.cc',
- 'base/pipeline_status.h',
- 'base/ranges.cc',
- 'base/ranges.h',
- 'base/seekable_buffer.cc',
- 'base/seekable_buffer.h',
- 'base/state_matrix.cc',
- 'base/state_matrix.h',
- 'base/stream_parser.cc',
- 'base/stream_parser.h',
- 'base/stream_parser_buffer.cc',
- 'base/stream_parser_buffer.h',
- 'base/video_decoder.cc',
- 'base/video_decoder.h',
- 'base/video_decoder_config.cc',
- 'base/video_decoder_config.h',
- 'base/video_frame.cc',
- 'base/video_frame.h',
- 'base/video_renderer.h',
- 'base/video_util.cc',
- 'base/video_util.h',
- 'crypto/aes_decryptor.cc',
- 'crypto/aes_decryptor.h',
- 'ffmpeg/ffmpeg_common.cc',
- 'ffmpeg/ffmpeg_common.h',
- 'ffmpeg/file_protocol.cc',
- 'ffmpeg/file_protocol.h',
- 'filters/audio_file_reader.cc',
- 'filters/audio_file_reader.h',
- 'filters/audio_renderer_algorithm.cc',
- 'filters/audio_renderer_algorithm.h',
- 'filters/audio_renderer_impl.cc',
- 'filters/audio_renderer_impl.h',
- 'filters/bitstream_converter.cc',
- 'filters/bitstream_converter.h',
- 'filters/chunk_demuxer.cc',
- 'filters/chunk_demuxer.h',
- 'filters/chunk_demuxer_client.h',
- 'filters/dummy_demuxer.cc',
- 'filters/dummy_demuxer.h',
- 'filters/ffmpeg_audio_decoder.cc',
- 'filters/ffmpeg_audio_decoder.h',
- 'filters/ffmpeg_demuxer.cc',
- 'filters/ffmpeg_demuxer.h',
- 'filters/ffmpeg_h264_bitstream_converter.cc',
- 'filters/ffmpeg_h264_bitstream_converter.h',
- 'filters/ffmpeg_glue.cc',
- 'filters/ffmpeg_glue.h',
- 'filters/ffmpeg_video_decoder.cc',
- 'filters/ffmpeg_video_decoder.h',
- 'filters/file_data_source.cc',
- 'filters/file_data_source.h',
- 'filters/gpu_video_decoder.cc',
- 'filters/gpu_video_decoder.h',
- 'filters/in_memory_url_protocol.cc',
- 'filters/in_memory_url_protocol.h',
- 'filters/source_buffer_stream.cc',
- 'filters/source_buffer_stream.h',
- 'filters/video_frame_generator.cc',
- 'filters/video_frame_generator.h',
- 'filters/video_renderer_base.cc',
- 'filters/video_renderer_base.h',
- 'video/capture/fake_video_capture_device.cc',
- 'video/capture/fake_video_capture_device.h',
- 'video/capture/linux/video_capture_device_linux.cc',
- 'video/capture/linux/video_capture_device_linux.h',
- 'video/capture/mac/video_capture_device_mac.h',
- 'video/capture/mac/video_capture_device_mac.mm',
- 'video/capture/mac/video_capture_device_qtkit_mac.h',
- 'video/capture/mac/video_capture_device_qtkit_mac.mm',
- 'video/capture/video_capture.h',
- 'video/capture/video_capture_device.h',
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- 'video/capture/video_capture_proxy.cc',
- 'video/capture/video_capture_proxy.h',
- 'video/capture/video_capture_types.h',
- 'video/capture/win/filter_base_win.cc',
- 'video/capture/win/filter_base_win.h',
- 'video/capture/win/pin_base_win.cc',
- 'video/capture/win/pin_base_win.h',
- 'video/capture/win/sink_filter_observer_win.h',
- 'video/capture/win/sink_filter_win.cc',
- 'video/capture/win/sink_filter_win.h',
- 'video/capture/win/sink_input_pin_win.cc',
- 'video/capture/win/sink_input_pin_win.h',
- 'video/capture/win/video_capture_device_win.cc',
- 'video/capture/win/video_capture_device_win.h',
- 'video/picture.cc',
- 'video/picture.h',
- 'video/video_decode_accelerator.cc',
- 'video/video_decode_accelerator.h',
- 'webm/webm_constants.h',
- 'webm/webm_cluster_parser.cc',
- 'webm/webm_cluster_parser.h',
- 'webm/webm_content_encodings.cc',
- 'webm/webm_content_encodings.h',
- 'webm/webm_content_encodings_client.cc',
- 'webm/webm_content_encodings_client.h',
- 'webm/webm_info_parser.cc',
- 'webm/webm_info_parser.h',
- 'webm/webm_parser.cc',
- 'webm/webm_parser.h',
- 'webm/webm_stream_parser.cc',
- 'webm/webm_stream_parser.h',
- 'webm/webm_tracks_parser.cc',
- 'webm/webm_tracks_parser.h',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- 'conditions': [
- # Android doesn't use ffmpeg, so make the dependency conditional
- # and exclude the sources which depend on ffmpeg.
- ['OS != "android"', {
- 'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- }],
- ['OS == "android"', {
- 'sources!': [
- 'base/media_posix.cc',
- 'ffmpeg/ffmpeg_common.cc',
- 'ffmpeg/ffmpeg_common.h',
- 'ffmpeg/file_protocol.cc',
- 'ffmpeg/file_protocol.h',
- 'filters/audio_file_reader.cc',
- 'filters/audio_file_reader.h',
- 'filters/bitstream_converter.cc',
- 'filters/bitstream_converter.h',
- 'filters/chunk_demuxer.cc',
- 'filters/chunk_demuxer.h',
- 'filters/chunk_demuxer_client.h',
- 'filters/ffmpeg_audio_decoder.cc',
- 'filters/ffmpeg_audio_decoder.h',
- 'filters/ffmpeg_demuxer.cc',
- 'filters/ffmpeg_demuxer.h',
- 'filters/ffmpeg_h264_bitstream_converter.cc',
- 'filters/ffmpeg_h264_bitstream_converter.h',
- 'filters/ffmpeg_glue.cc',
- 'filters/ffmpeg_glue.h',
- 'filters/ffmpeg_video_decoder.cc',
- 'filters/ffmpeg_video_decoder.h',
- 'filters/gpu_video_decoder.cc',
- 'filters/gpu_video_decoder.h',
- 'webm/webm_cluster_parser.cc',
- 'webm/webm_cluster_parser.h',
- 'webm/webm_stream_parser.cc',
- 'webm/webm_stream_parser.h',
- ],
- }],
- # The below 'android' condition were added temporarily and should be
- # removed in downstream, because there is no Java environment setup in
- # upstream yet.
- ['OS == "android"', {
- 'sources!':[
- 'audio/android/audio_track_output_android.cc',
- ],
- 'sources':[
- 'audio/android/audio_track_output_stub_android.cc',
- ],
- 'link_settings': {
- 'libraries': [
- '-lOpenSLES',
- ],
- },
- }],
- ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
- 'link_settings': {
- 'libraries': [
- '-lasound',
- ],
- },
- }],
- ['OS=="openbsd"', {
- 'sources/': [ ['exclude', '/alsa_' ],
- ['exclude', '/audio_manager_linux' ] ],
- 'link_settings': {
- 'libraries': [
- ],
- },
- }],
- ['OS!="openbsd"', {
- 'sources!': [
- 'audio/openbsd/audio_manager_openbsd.cc',
- 'audio/openbsd/audio_manager_openbsd.h',
- ],
- }],
- ['OS=="linux"', {
- 'variables': {
- 'conditions': [
- ['sysroot!=""', {
- 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
- }, {
- 'pkg-config': 'pkg-config'
- }],
- ],
- },
- 'conditions': [
- ['use_cras == 1', {
- 'cflags': [
- '<!@(<(pkg-config) --cflags libcras)',
- ],
- 'link_settings': {
- 'libraries': [
- '<!@(<(pkg-config) --libs libcras)',
- ],
- },
- 'defines': [
- 'USE_CRAS',
- ],
- }, { # else: use_cras == 0
- 'sources!': [
- 'audio/linux/cras_output.cc',
- 'audio/linux/cras_output.h',
- ],
- }],
- ],
- }],
- ['os_posix == 1', {
- 'conditions': [
- ['use_pulseaudio == 1', {
- 'cflags': [
- '<!@(pkg-config --cflags libpulse)',
- ],
- 'link_settings': {
- 'libraries': [
- '<!@(pkg-config --libs-only-l libpulse)',
- ],
- },
- 'defines': [
- 'USE_PULSEAUDIO',
- ],
- }, { # else: use_pulseaudio == 0
- 'sources!': [
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- ],
- }],
- ],
- }],
- ['os_posix == 1 and OS != "android"', {
- # Video capture isn't supported in Android yet.
- 'sources!': [
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- ],
- }],
- ['OS=="mac"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
- '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
- '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
- ],
- },
- }],
- ['OS=="win"', {
- 'sources!': [
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- ],
- }],
- ['proprietary_codecs==1 or branding=="Chrome"', {
- 'sources': [
- 'mp4/avc.cc',
- 'mp4/avc.h',
- 'mp4/box_definitions.cc',
- 'mp4/box_definitions.h',
- 'mp4/box_reader.cc',
- 'mp4/box_reader.h',
- 'mp4/cenc.cc',
- 'mp4/cenc.h',
- 'mp4/mp4_stream_parser.cc',
- 'mp4/mp4_stream_parser.h',
- 'mp4/offset_byte_queue.cc',
- 'mp4/offset_byte_queue.h',
- 'mp4/track_run_iterator.cc',
- 'mp4/track_run_iterator.h',
- ],
- }],
- ],
- },
- {
- 'target_name': 'yuv_convert',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'conditions': [
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset=="target"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
- }],
- [ 'target_arch == "ia32" or target_arch == "x64"', {
- 'dependencies': [
- 'yuv_convert_simd_x86',
- ],
- }],
- [ 'target_arch == "arm"', {
- 'dependencies': [
- 'yuv_convert_simd_arm',
- ],
- }],
- ],
- 'sources': [
- 'base/yuv_convert.cc',
- 'base/yuv_convert.h',
- ],
- },
- {
- 'target_name': 'yuv_convert_simd_x86',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_c.cc',
- 'base/simd/convert_rgb_to_yuv_sse2.cc',
- 'base/simd/convert_rgb_to_yuv_ssse3.asm',
- 'base/simd/convert_rgb_to_yuv_ssse3.cc',
- 'base/simd/convert_rgb_to_yuv_ssse3.inc',
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/convert_yuv_to_rgb_x86.cc',
- 'base/simd/convert_yuv_to_rgb_mmx.asm',
- 'base/simd/convert_yuv_to_rgb_mmx.inc',
- 'base/simd/convert_yuv_to_rgb_sse.asm',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- 'base/simd/filter_yuv_mmx.cc',
- 'base/simd/filter_yuv_sse2.cc',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
- 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.inc',
- 'base/simd/scale_yuv_to_rgb_sse.asm',
- 'base/simd/yuv_to_rgb_table.cc',
- 'base/simd/yuv_to_rgb_table.h',
- ],
- 'conditions': [
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset=="target"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
- }],
- [ 'target_arch == "x64"', {
- # Source files optimized for X64 systems.
- 'sources': [
- 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
- 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
- ],
- }],
- [ 'os_posix == 1 and OS != "mac" and OS != "android"', {
- 'cflags': [
- '-msse2',
- ],
- }],
- [ 'OS == "mac"', {
- 'configurations': {
- 'Debug': {
- 'xcode_settings': {
- # gcc on the mac builds horribly unoptimized sse code in debug
- # mode. Since this is rarely going to be debugged, run with full
- # optimizations in Debug as well as Release.
- 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
- },
- },
- },
- }],
- [ 'OS=="win"', {
- 'variables': {
- 'yasm_flags': [
- '-DWIN32',
- '-DMSVC',
- '-DCHROMIUM',
- '-Isimd',
- ],
- },
- }],
- [ 'OS=="mac"', {
- 'variables': {
- 'yasm_flags': [
- '-DPREFIX',
- '-DMACHO',
- '-DCHROMIUM',
- '-Isimd',
- ],
- },
- }],
- [ 'os_posix==1 and OS!="mac"', {
- 'variables': {
- 'conditions': [
- [ 'target_arch=="ia32"', {
- 'yasm_flags': [
- '-DX86_32',
- '-DELF',
- '-DCHROMIUM',
- '-Isimd',
- ],
- }, {
- 'yasm_flags': [
- '-DARCH_X86_64',
- '-DELF',
- '-DPIC',
- '-DCHROMIUM',
- '-Isimd',
- ],
- }],
- ],
- },
- }],
- ],
- 'variables': {
- 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
- },
- 'msvs_2010_disable_uldi_when_referenced': 1,
- 'includes': [
- '../third_party/yasm/yasm_compile.gypi',
- ],
- },
- {
- 'target_name': 'yuv_convert_simd_arm',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_c.cc',
- 'base/simd/convert_rgb_to_yuv.h',
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/convert_yuv_to_rgb.h',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- 'base/simd/yuv_to_rgb_table.cc',
- 'base/simd/yuv_to_rgb_table.h',
- ],
- },
- {
- 'target_name': 'media_unittests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/base.gyp:base_i18n',
- '../base/base.gyp:test_support_base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../ui/ui.gyp:ui',
- ],
- 'sources': [
- 'audio/async_socket_io_handler_unittest.cc',
- 'audio/audio_input_controller_unittest.cc',
- 'audio/audio_input_device_unittest.cc',
- 'audio/audio_input_unittest.cc',
- 'audio/audio_input_volume_unittest.cc',
- 'audio/audio_low_latency_input_output_unittest.cc',
- 'audio/audio_output_controller_unittest.cc',
- 'audio/audio_output_proxy_unittest.cc',
- 'audio/audio_parameters_unittest.cc',
- 'audio/audio_util_unittest.cc',
- 'audio/cross_process_notification_unittest.cc',
- 'audio/linux/alsa_output_unittest.cc',
- 'audio/mac/audio_low_latency_input_mac_unittest.cc',
- 'audio/mac/audio_output_mac_unittest.cc',
- 'audio/simple_sources_unittest.cc',
- 'audio/win/audio_low_latency_input_win_unittest.cc',
- 'audio/win/audio_low_latency_output_win_unittest.cc',
- 'audio/win/audio_output_win_unittest.cc',
- 'base/audio_renderer_mixer_unittest.cc',
- 'base/audio_renderer_mixer_input_unittest.cc',
- 'base/buffers_unittest.cc',
- 'base/clock_unittest.cc',
- 'base/composite_filter_unittest.cc',
- 'base/data_buffer_unittest.cc',
- 'base/decoder_buffer_unittest.cc',
- 'base/djb2_unittest.cc',
- 'base/fake_audio_render_callback.cc',
- 'base/fake_audio_render_callback.h',
- 'base/filter_collection_unittest.cc',
- 'base/h264_bitstream_converter_unittest.cc',
- 'base/pipeline_unittest.cc',
- 'base/ranges_unittest.cc',
- 'base/run_all_unittests.cc',
- 'base/seekable_buffer_unittest.cc',
- 'base/state_matrix_unittest.cc',
- 'base/test_data_util.cc',
- 'base/test_data_util.h',
- 'base/video_frame_unittest.cc',
- 'base/video_util_unittest.cc',
- 'base/yuv_convert_unittest.cc',
- 'crypto/aes_decryptor_unittest.cc',
- 'ffmpeg/ffmpeg_common_unittest.cc',
- 'filters/audio_renderer_algorithm_unittest.cc',
- 'filters/audio_renderer_impl_unittest.cc',
- 'filters/bitstream_converter_unittest.cc',
- 'filters/chunk_demuxer_unittest.cc',
- 'filters/ffmpeg_audio_decoder_unittest.cc',
- 'filters/ffmpeg_decoder_unittest.h',
- 'filters/ffmpeg_demuxer_unittest.cc',
- 'filters/ffmpeg_glue_unittest.cc',
- 'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
- 'filters/ffmpeg_video_decoder_unittest.cc',
- 'filters/file_data_source_unittest.cc',
- 'filters/pipeline_integration_test.cc',
- 'filters/pipeline_integration_test_base.cc',
- 'filters/source_buffer_stream_unittest.cc',
- 'filters/video_renderer_base_unittest.cc',
- 'video/capture/video_capture_device_unittest.cc',
- 'webm/cluster_builder.cc',
- 'webm/cluster_builder.h',
- 'webm/webm_cluster_parser_unittest.cc',
- 'webm/webm_content_encodings_client_unittest.cc',
- 'webm/webm_parser_unittest.cc',
- ],
- 'conditions': [
- ['os_posix==1 and OS!="mac"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ['OS != "android"', {
- 'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- }],
- ['OS == "android"', {
- 'sources!': [
- 'audio/audio_input_volume_unittest.cc',
- 'base/test_data_util.cc',
- 'base/test_data_util.h',
- 'ffmpeg/ffmpeg_common_unittest.cc',
- 'filters/ffmpeg_audio_decoder_unittest.cc',
- 'filters/bitstream_converter_unittest.cc',
- 'filters/chunk_demuxer_unittest.cc',
- 'filters/ffmpeg_demuxer_unittest.cc',
- 'filters/ffmpeg_glue_unittest.cc',
- 'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
- 'filters/ffmpeg_video_decoder_unittest.cc',
- 'filters/pipeline_integration_test.cc',
- 'filters/pipeline_integration_test_base.cc',
- 'mp4/mp4_stream_parser_unittest.cc',
- 'webm/webm_cluster_parser_unittest.cc',
- ],
- }],
- ['OS == "linux"', {
- 'conditions': [
- ['use_cras == 1', {
- 'sources': [
- 'audio/linux/cras_output_unittest.cc',
- ],
- 'defines': [
- 'USE_CRAS',
- ],
- }],
- ],
- }],
- [ 'target_arch=="ia32" or target_arch=="x64"', {
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_unittest.cc',
- ],
- }],
- ['proprietary_codecs==1 or branding=="Chrome"', {
- 'sources': [
- 'mp4/avc_unittest.cc',
- 'mp4/box_reader_unittest.cc',
- 'mp4/mp4_stream_parser_unittest.cc',
- 'mp4/offset_byte_queue_unittest.cc',
- ],
- }],
- ],
- },
- {
- 'target_name': 'media_test_support',
- 'type': 'static_library',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- ],
- 'sources': [
- 'audio/test_audio_input_controller_factory.cc',
- 'audio/test_audio_input_controller_factory.h',
- 'base/mock_callback.cc',
- 'base/mock_callback.h',
- 'base/mock_data_source_host.cc',
- 'base/mock_data_source_host.h',
- 'base/mock_demuxer_host.cc',
- 'base/mock_demuxer_host.h',
- 'base/mock_filter_host.cc',
- 'base/mock_filter_host.h',
- 'base/mock_filters.cc',
- 'base/mock_filters.h',
- ],
- },
- {
- 'target_name': 'scaler_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../skia/skia.gyp:skia',
- ],
- 'sources': [
- 'tools/scaler_bench/scaler_bench.cc',
- ],
- },
- {
- 'target_name': 'qt_faststart',
- 'type': 'executable',
- 'sources': [
- 'tools/qt_faststart/qt_faststart.c'
- ],
- },
- {
- 'target_name': 'seek_tester',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- ],
- 'sources': [
- 'tools/seek_tester/seek_tester.cc',
- ],
- },
- ],
- 'conditions': [
- ['OS=="win"', {
- 'targets': [
- {
- 'target_name': 'player_wtl',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../ui/ui.gyp:ui',
- ],
- 'include_dirs': [
- '<(DEPTH)/third_party/wtl/include',
- ],
- 'sources': [
- 'tools/player_wtl/list.h',
- 'tools/player_wtl/mainfrm.h',
- 'tools/player_wtl/movie.cc',
- 'tools/player_wtl/movie.h',
- 'tools/player_wtl/player_wtl.cc',
- 'tools/player_wtl/player_wtl.rc',
- 'tools/player_wtl/props.h',
- 'tools/player_wtl/seek.h',
- 'tools/player_wtl/resource.h',
- 'tools/player_wtl/view.h',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
- },
- },
- 'defines': [
- '_CRT_SECURE_NO_WARNINGS=1',
- ],
- },
- ],
- }],
- ['OS == "win" or toolkit_uses_gtk == 1', {
- 'targets': [
- {
- 'target_name': 'shader_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'sources': [
- 'tools/shader_bench/shader_bench.cc',
- 'tools/shader_bench/cpu_color_painter.cc',
- 'tools/shader_bench/cpu_color_painter.h',
- 'tools/shader_bench/gpu_color_painter.cc',
- 'tools/shader_bench/gpu_color_painter.h',
- 'tools/shader_bench/gpu_painter.cc',
- 'tools/shader_bench/gpu_painter.h',
- 'tools/shader_bench/painter.cc',
- 'tools/shader_bench/painter.h',
- 'tools/shader_bench/window.cc',
- 'tools/shader_bench/window.h',
- ],
- 'conditions': [
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- 'sources': [
- 'tools/shader_bench/window_linux.cc',
- ],
- }],
- ['OS=="win"', {
- 'dependencies': [
- '../third_party/angle/src/build_angle.gyp:libEGL',
- '../third_party/angle/src/build_angle.gyp:libGLESv2',
- ],
- 'sources': [
- 'tools/shader_bench/window_win.cc',
- ],
- }],
- ],
- },
- ],
- }],
- ['OS == "linux" and target_arch != "arm"', {
- 'targets': [
- {
- 'target_name': 'tile_render_bench',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'libraries': [
- '-lGL',
- '-ldl',
- ],
- 'sources': [
- 'tools/tile_render_bench/tile_render_bench.cc',
- ],
- },
- ],
- }],
- ['os_posix == 1 and OS != "mac" and OS != "android"', {
- 'targets': [
- {
- 'target_name': 'player_x11',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'link_settings': {
- 'libraries': [
- '-ldl',
- '-lX11',
- '-lXrender',
- '-lXext',
- ],
- },
- 'sources': [
- 'tools/player_x11/data_source_logger.cc',
- 'tools/player_x11/data_source_logger.h',
- 'tools/player_x11/gl_video_renderer.cc',
- 'tools/player_x11/gl_video_renderer.h',
- 'tools/player_x11/player_x11.cc',
- 'tools/player_x11/x11_video_renderer.cc',
- 'tools/player_x11/x11_video_renderer.h',
- ],
- },
- ],
- }],
- ['OS == "android"', {
- 'targets': [
- {
- 'target_name': 'player_android',
- 'type': 'static_library',
- 'sources': [
- 'base/android/media_player_bridge.cc',
- 'base/android/media_player_bridge.h',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/media',
- ],
- 'actions': [
- {
- 'action_name': 'generate-jni-headers',
- 'inputs': [
- '../base/android/jni_generator/jni_generator.py',
- 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h',
- ],
- 'action': [
- 'python',
- '<(DEPTH)/base/android/jni_generator/jni_generator.py',
- '-o',
- '<@(_inputs)',
- '<@(_outputs)',
- ],
- },
- ],
- },
- {
- 'target_name': 'media_java',
- 'type': 'none',
- 'dependencies': [ '../base/base.gyp:base_java' ],
- 'variables': {
- 'package_name': 'media',
- 'java_in_dir': 'base/android/java',
- },
- 'includes': [ '../build/java.gypi' ],
- },
-
- ],
- }, { # OS != "android"'
- # Android does not use ffmpeg, so disable the targets which require it.
- 'targets': [
- {
- 'target_name': 'ffmpeg_unittests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- '../base/base.gyp:base',
- '../base/base.gyp:base_i18n',
- '../base/base.gyp:test_support_base',
- '../base/base.gyp:test_support_perf',
- '../testing/gtest.gyp:gtest',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'ffmpeg/ffmpeg_unittest.cc',
- ],
- 'conditions': [
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- # Needed for the following #include chain:
- # base/run_all_unittests.cc
- # ../base/test_suite.h
- # gtk/gtk.h
- '../build/linux/system.gyp:gtk',
- ],
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
- },
- {
- 'target_name': 'ffmpeg_regression_tests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- '../base/base.gyp:test_support_base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'base/test_data_util.cc',
- 'base/run_all_unittests.cc',
- 'ffmpeg/ffmpeg_regression_tests.cc',
- 'filters/pipeline_integration_test_base.cc',
- ],
- 'conditions': [
- ['os_posix==1 and OS!="mac"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
- },
- {
- 'target_name': 'ffmpeg_tests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'test/ffmpeg_tests/ffmpeg_tests.cc',
- ],
- },
- {
- 'target_name': 'media_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'tools/media_bench/media_bench.cc',
- ],
- },
- ],
- }]
- ],
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified
deleted file mode 100644
index 962b7b2c4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified
+++ /dev/null
@@ -1,1107 +0,0 @@
-
-#("# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'chromium_code': 1,
- # Override to dynamically link the PulseAudio library.
- 'use_pulseaudio%': 0,
- # Override to dynamically link the cras (ChromeOS audio) library.
- 'use_cras%': 0,
- },
- 'targets': [
- {
- 'target_name': 'media',
- 'type': '<(component)',
- 'dependencies': [
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../build/temp_gyp/googleurl.gyp:googleurl',
- '../crypto/crypto.gyp:crypto',
- '../third_party/openmax/openmax.gyp:il',
- '../ui/ui.gyp:ui',
- ],
- 'defines': [
- 'MEDIA_IMPLEMENTATION',
- ],
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'audio/android/audio_manager_android.cc',
- 'audio/android/audio_manager_android.h',
- 'audio/android/audio_track_output_android.cc',
- 'audio/android/audio_track_output_android.h',
- 'audio/android/opensles_input.cc',
- 'audio/android/opensles_input.h',
- 'audio/android/opensles_output.cc',
- 'audio/android/opensles_output.h',
- 'audio/async_socket_io_handler.h',
- 'audio/async_socket_io_handler_posix.cc',
- 'audio/async_socket_io_handler_win.cc',
- 'audio/audio_buffers_state.cc',
- 'audio/audio_buffers_state.h',
- 'audio/audio_io.h',
- 'audio/audio_input_controller.cc',
- 'audio/audio_input_controller.h',
- 'audio/audio_input_stream_impl.cc',
- 'audio/audio_input_stream_impl.h',
- 'audio/audio_device_name.cc',
- 'audio/audio_device_name.h',
- 'audio/audio_manager.cc',
- 'audio/audio_manager.h',
- 'audio/audio_manager_base.cc',
- 'audio/audio_manager_base.h',
- 'audio/audio_output_controller.cc',
- 'audio/audio_output_controller.h',
- 'audio/audio_output_dispatcher.cc',
- 'audio/audio_output_dispatcher.h',
- 'audio/audio_output_dispatcher_impl.cc',
- 'audio/audio_output_dispatcher_impl.h',
- 'audio/audio_output_mixer.cc',
- 'audio/audio_output_mixer.h',
- 'audio/audio_output_proxy.cc',
- 'audio/audio_output_proxy.h',
- 'audio/audio_parameters.cc',
- 'audio/audio_parameters.h',
- 'audio/audio_util.cc',
- 'audio/audio_util.h',
- 'audio/cross_process_notification.cc',
- 'audio/cross_process_notification.h',
- 'audio/cross_process_notification_win.cc',
- 'audio/cross_process_notification_posix.cc',
- 'audio/fake_audio_input_stream.cc',
- 'audio/fake_audio_input_stream.h',
- 'audio/fake_audio_output_stream.cc',
- 'audio/fake_audio_output_stream.h',
- 'audio/linux/audio_manager_linux.cc',
- 'audio/linux/audio_manager_linux.h',
- 'audio/linux/alsa_input.cc',
- 'audio/linux/alsa_input.h',
- 'audio/linux/alsa_output.cc',
- 'audio/linux/alsa_output.h',
- 'audio/linux/alsa_util.cc',
- 'audio/linux/alsa_util.h',
- 'audio/linux/alsa_wrapper.cc',
- 'audio/linux/alsa_wrapper.h',
- 'audio/linux/cras_output.cc',
- 'audio/linux/cras_output.h',
- 'audio/openbsd/audio_manager_openbsd.cc',
- 'audio/openbsd/audio_manager_openbsd.h',
- 'audio/mac/audio_input_mac.cc',
- 'audio/mac/audio_input_mac.h',
- 'audio/mac/audio_low_latency_input_mac.cc',
- 'audio/mac/audio_low_latency_input_mac.h',
- 'audio/mac/audio_low_latency_output_mac.cc',
- 'audio/mac/audio_low_latency_output_mac.h',
- 'audio/mac/audio_manager_mac.cc',
- 'audio/mac/audio_manager_mac.h',
- 'audio/mac/audio_output_mac.cc',
- 'audio/mac/audio_output_mac.h',
- 'audio/null_audio_sink.cc',
- 'audio/null_audio_sink.h',
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- 'audio/sample_rates.cc',
- 'audio/sample_rates.h',
- 'audio/simple_sources.cc',
- 'audio/simple_sources.h',
- 'audio/win/audio_low_latency_input_win.cc',
- 'audio/win/audio_low_latency_input_win.h',
- 'audio/win/audio_low_latency_output_win.cc',
- 'audio/win/audio_low_latency_output_win.h',
- 'audio/win/audio_manager_win.cc',
- 'audio/win/audio_manager_win.h',
- 'audio/win/avrt_wrapper_win.cc',
- 'audio/win/avrt_wrapper_win.h',
- 'audio/win/device_enumeration_win.cc',
- 'audio/win/device_enumeration_win.h',
- 'audio/win/wavein_input_win.cc',
- 'audio/win/wavein_input_win.h',
- 'audio/win/waveout_output_win.cc',
- 'audio/win/waveout_output_win.h',
- 'base/android/media_jni_registrar.cc',
- 'base/android/media_jni_registrar.h',
- 'base/audio_decoder.cc',
- 'base/audio_decoder.h',
- 'base/audio_decoder_config.cc',
- 'base/audio_decoder_config.h',
- 'base/audio_renderer.h',
- 'base/audio_renderer_mixer.cc',
- 'base/audio_renderer_mixer.h',
- 'base/audio_renderer_mixer_input.cc',
- 'base/audio_renderer_mixer_input.h',
- 'base/bitstream_buffer.h',
- 'base/buffers.cc',
- 'base/buffers.h',
- 'base/byte_queue.cc',
- 'base/byte_queue.h',
- 'base/channel_layout.cc',
- 'base/channel_layout.h',
- 'base/clock.cc',
- 'base/clock.h',
- 'base/composite_filter.cc',
- 'base/composite_filter.h',
- 'base/data_buffer.cc',
- 'base/data_buffer.h',
- 'base/data_source.cc',
- 'base/data_source.h',
- 'base/decoder_buffer.cc',
- 'base/decoder_buffer.h',
- 'base/decrypt_config.cc',
- 'base/decrypt_config.h',
- 'base/decryptor.h',
- 'base/decryptor_client.h',
- 'base/demuxer.cc',
- 'base/demuxer.h',
- 'base/demuxer_stream.cc',
- 'base/demuxer_stream.h',
- 'base/djb2.cc',
- 'base/djb2.h',
- 'base/filter_collection.cc',
- 'base/filter_collection.h',
- 'base/filter_host.h',
- 'base/filters.cc',
- 'base/filters.h',
- 'base/h264_bitstream_converter.cc',
- 'base/h264_bitstream_converter.h',
- 'base/media.h',
- 'base/media_android.cc',
- 'base/media_export.h',
- 'base/media_log.cc',
- 'base/media_log.h',
- 'base/media_log_event.h',
- 'base/media_posix.cc',
- 'base/media_switches.cc',
- 'base/media_switches.h',
- 'base/media_win.cc',
- 'base/message_loop_factory.cc',
- 'base/message_loop_factory.h',
- 'base/pipeline.cc',
- 'base/pipeline.h',
- 'base/pipeline_status.cc',
- 'base/pipeline_status.h',
- 'base/ranges.cc',
- 'base/ranges.h',
- 'base/seekable_buffer.cc',
- 'base/seekable_buffer.h',
- 'base/state_matrix.cc',
- 'base/state_matrix.h',
- 'base/stream_parser.cc',
- 'base/stream_parser.h',
- 'base/stream_parser_buffer.cc',
- 'base/stream_parser_buffer.h',
- 'base/video_decoder.cc',
- 'base/video_decoder.h',
- 'base/video_decoder_config.cc',
- 'base/video_decoder_config.h',
- 'base/video_frame.cc',
- 'base/video_frame.h',
- 'base/video_renderer.h',
- 'base/video_util.cc',
- 'base/video_util.h',
- 'crypto/aes_decryptor.cc',
- 'crypto/aes_decryptor.h',
- 'ffmpeg/ffmpeg_common.cc',
- 'ffmpeg/ffmpeg_common.h',
- 'ffmpeg/file_protocol.cc',
- 'ffmpeg/file_protocol.h',
- 'filters/audio_file_reader.cc',
- 'filters/audio_file_reader.h',
- 'filters/audio_renderer_algorithm.cc',
- 'filters/audio_renderer_algorithm.h',
- 'filters/audio_renderer_impl.cc',
- 'filters/audio_renderer_impl.h',
- 'filters/bitstream_converter.cc',
- 'filters/bitstream_converter.h',
- 'filters/chunk_demuxer.cc',
- 'filters/chunk_demuxer.h',
- 'filters/chunk_demuxer_client.h',
- 'filters/dummy_demuxer.cc',
- 'filters/dummy_demuxer.h',
- 'filters/ffmpeg_audio_decoder.cc',
- 'filters/ffmpeg_audio_decoder.h',
- 'filters/ffmpeg_demuxer.cc',
- 'filters/ffmpeg_demuxer.h',
- 'filters/ffmpeg_h264_bitstream_converter.cc',
- 'filters/ffmpeg_h264_bitstream_converter.h',
- 'filters/ffmpeg_glue.cc',
- 'filters/ffmpeg_glue.h',
- 'filters/ffmpeg_video_decoder.cc',
- 'filters/ffmpeg_video_decoder.h',
- 'filters/file_data_source.cc',
- 'filters/file_data_source.h',
- 'filters/gpu_video_decoder.cc',
- 'filters/gpu_video_decoder.h',
- 'filters/in_memory_url_protocol.cc',
- 'filters/in_memory_url_protocol.h',
- 'filters/source_buffer_stream.cc',
- 'filters/source_buffer_stream.h',
- 'filters/video_frame_generator.cc',
- 'filters/video_frame_generator.h',
- 'filters/video_renderer_base.cc',
- 'filters/video_renderer_base.h',
- 'video/capture/fake_video_capture_device.cc',
- 'video/capture/fake_video_capture_device.h',
- 'video/capture/linux/video_capture_device_linux.cc',
- 'video/capture/linux/video_capture_device_linux.h',
- 'video/capture/mac/video_capture_device_mac.h',
- 'video/capture/mac/video_capture_device_mac.mm',
- 'video/capture/mac/video_capture_device_qtkit_mac.h',
- 'video/capture/mac/video_capture_device_qtkit_mac.mm',
- 'video/capture/video_capture.h',
- 'video/capture/video_capture_device.h',
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- 'video/capture/video_capture_proxy.cc',
- 'video/capture/video_capture_proxy.h',
- 'video/capture/video_capture_types.h',
- 'video/capture/win/filter_base_win.cc',
- 'video/capture/win/filter_base_win.h',
- 'video/capture/win/pin_base_win.cc',
- 'video/capture/win/pin_base_win.h',
- 'video/capture/win/sink_filter_observer_win.h',
- 'video/capture/win/sink_filter_win.cc',
- 'video/capture/win/sink_filter_win.h',
- 'video/capture/win/sink_input_pin_win.cc',
- 'video/capture/win/sink_input_pin_win.h',
- 'video/capture/win/video_capture_device_win.cc',
- 'video/capture/win/video_capture_device_win.h',
- 'video/picture.cc',
- 'video/picture.h',
- 'video/video_decode_accelerator.cc',
- 'video/video_decode_accelerator.h',
- 'webm/webm_constants.h',
- 'webm/webm_cluster_parser.cc',
- 'webm/webm_cluster_parser.h',
- 'webm/webm_content_encodings.cc',
- 'webm/webm_content_encodings.h',
- 'webm/webm_content_encodings_client.cc',
- 'webm/webm_content_encodings_client.h',
- 'webm/webm_info_parser.cc',
- 'webm/webm_info_parser.h',
- 'webm/webm_parser.cc',
- 'webm/webm_parser.h',
- 'webm/webm_stream_parser.cc',
- 'webm/webm_stream_parser.h',
- 'webm/webm_tracks_parser.cc',
- 'webm/webm_tracks_parser.h',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '..',
- ],
- },
- 'conditions': [
- # Android doesn't use ffmpeg, so make the dependency conditional
- # and exclude the sources which depend on ffmpeg.
- ['OS != \"android\"', {
- 'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- }],
- ['OS == \"android\"', {
- 'sources!': [
- 'base/media_posix.cc',
- 'ffmpeg/ffmpeg_common.cc',
- 'ffmpeg/ffmpeg_common.h',
- 'ffmpeg/file_protocol.cc',
- 'ffmpeg/file_protocol.h',
- 'filters/audio_file_reader.cc',
- 'filters/audio_file_reader.h',
- 'filters/bitstream_converter.cc',
- 'filters/bitstream_converter.h',
- 'filters/chunk_demuxer.cc',
- 'filters/chunk_demuxer.h',
- 'filters/chunk_demuxer_client.h',
- 'filters/ffmpeg_audio_decoder.cc',
- 'filters/ffmpeg_audio_decoder.h',
- 'filters/ffmpeg_demuxer.cc',
- 'filters/ffmpeg_demuxer.h',
- 'filters/ffmpeg_h264_bitstream_converter.cc',
- 'filters/ffmpeg_h264_bitstream_converter.h',
- 'filters/ffmpeg_glue.cc',
- 'filters/ffmpeg_glue.h',
- 'filters/ffmpeg_video_decoder.cc',
- 'filters/ffmpeg_video_decoder.h',
- 'filters/gpu_video_decoder.cc',
- 'filters/gpu_video_decoder.h',
- 'webm/webm_cluster_parser.cc',
- 'webm/webm_cluster_parser.h',
- 'webm/webm_stream_parser.cc',
- 'webm/webm_stream_parser.h',
- ],
- }],
- # The below 'android' condition were added temporarily and should be
- # removed in downstream, because there is no Java environment setup in
- # upstream yet.
- ['OS == \"android\"', {
- 'sources!':[
- 'audio/android/audio_track_output_android.cc',
- ],
- 'sources':[
- 'audio/android/audio_track_output_stub_android.cc',
- ],
- 'link_settings': {
- 'libraries': [
- '-lOpenSLES',
- ],
- },
- }],
- ['OS==\"linux\" or OS==\"freebsd\" or OS==\"solaris\"', {
- 'link_settings': {
- 'libraries': [
- '-lasound',
- ],
- },
- }],
- ['OS==\"openbsd\"', {
- 'sources/': [ ['exclude', '/alsa_' ],
- ['exclude', '/audio_manager_linux' ] ],
- 'link_settings': {
- 'libraries': [
- ],
- },
- }],
- ['OS!=\"openbsd\"', {
- 'sources!': [
- 'audio/openbsd/audio_manager_openbsd.cc',
- 'audio/openbsd/audio_manager_openbsd.h',
- ],
- }],
- ['OS==\"linux\"', {
- 'variables': {
- 'conditions': [
- ['sysroot!=\"\"', {
- 'pkg-config': '../build/linux/pkg-config-wrapper \"<(sysroot)\" \"<(target_arch)\"',
- }, {
- 'pkg-config': 'pkg-config'
- }],
- ],
- },
- 'conditions': [
- ['use_cras == 1', {
- 'cflags': [
- '<!@(<(pkg-config) --cflags libcras)',
- ],
- 'link_settings': {
- 'libraries': [
- '<!@(<(pkg-config) --libs libcras)',
- ],
- },
- 'defines': [
- 'USE_CRAS',
- ],
- }, { # else: use_cras == 0
- 'sources!': [
- 'audio/linux/cras_output.cc',
- 'audio/linux/cras_output.h',
- ],
- }],
- ],
- }],
- ['os_posix == 1', {
- 'conditions': [
- ['use_pulseaudio == 1', {
- 'cflags': [
- '<!@(pkg-config --cflags libpulse)',
- ],
- 'link_settings': {
- 'libraries': [
- '<!@(pkg-config --libs-only-l libpulse)',
- ],
- },
- 'defines': [
- 'USE_PULSEAUDIO',
- ],
- }, { # else: use_pulseaudio == 0
- 'sources!': [
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- ],
- }],
- ],
- }],
- ['os_posix == 1 and OS != \"android\"', {
- # Video capture isn't supported in Android yet.
- 'sources!': [
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- ],
- }],
- ['OS==\"mac\"', {
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
- '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
- '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
- '$(SDKROOT)/System/Library/Frameworks/QTKit.framework',
- ],
- },
- }],
- ['OS==\"win\"', {
- 'sources!': [
- 'audio/pulse/pulse_output.cc',
- 'audio/pulse/pulse_output.h',
- 'video/capture/video_capture_device_dummy.cc',
- 'video/capture/video_capture_device_dummy.h',
- ],
- }],
- ['proprietary_codecs==1 or branding==\"Chrome\"', {
- 'sources': [
- 'mp4/avc.cc',
- 'mp4/avc.h',
- 'mp4/box_definitions.cc',
- 'mp4/box_definitions.h',
- 'mp4/box_reader.cc',
- 'mp4/box_reader.h',
- 'mp4/cenc.cc',
- 'mp4/cenc.h',
- 'mp4/mp4_stream_parser.cc',
- 'mp4/mp4_stream_parser.h',
- 'mp4/offset_byte_queue.cc',
- 'mp4/offset_byte_queue.h',
- 'mp4/track_run_iterator.cc',
- 'mp4/track_run_iterator.h',
- ],
- }],
- ],
- },
- {
- 'target_name': 'yuv_convert',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'conditions': [
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset==\"target\"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
- }],
- [ 'target_arch == \"ia32\" or target_arch == \"x64\"', {
- 'dependencies': [
- 'yuv_convert_simd_x86',
- ],
- }],
- [ 'target_arch == \"arm\"', {
- 'dependencies': [
- 'yuv_convert_simd_arm',
- ],
- }],
- ],
- 'sources': [
- 'base/yuv_convert.cc',
- 'base/yuv_convert.h',
- ],
- },
- {
- 'target_name': 'yuv_convert_simd_x86',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_c.cc',
- 'base/simd/convert_rgb_to_yuv_sse2.cc',
- 'base/simd/convert_rgb_to_yuv_ssse3.asm',
- 'base/simd/convert_rgb_to_yuv_ssse3.cc',
- 'base/simd/convert_rgb_to_yuv_ssse3.inc',
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/convert_yuv_to_rgb_x86.cc',
- 'base/simd/convert_yuv_to_rgb_mmx.asm',
- 'base/simd/convert_yuv_to_rgb_mmx.inc',
- 'base/simd/convert_yuv_to_rgb_sse.asm',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- 'base/simd/filter_yuv_mmx.cc',
- 'base/simd/filter_yuv_sse2.cc',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
- 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.inc',
- 'base/simd/scale_yuv_to_rgb_sse.asm',
- 'base/simd/yuv_to_rgb_table.cc',
- 'base/simd/yuv_to_rgb_table.h',
- ],
- 'conditions': [
- ['order_profiling != 0', {
- 'target_conditions' : [
- ['_toolset==\"target\"', {
- 'cflags!': [ '-finstrument-functions' ],
- }],
- ],
- }],
- [ 'target_arch == \"x64\"', {
- # Source files optimized for X64 systems.
- 'sources': [
- 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
- 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
- ],
- }],
- [ 'os_posix == 1 and OS != \"mac\" and OS != \"android\"', {
- 'cflags': [
- '-msse2',
- ],
- }],
- [ 'OS == \"mac\"', {
- 'configurations': {
- 'Debug': {
- 'xcode_settings': {
- # gcc on the mac builds horribly unoptimized sse code in debug
- # mode. Since this is rarely going to be debugged, run with full
- # optimizations in Debug as well as Release.
- 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
- },
- },
- },
- }],
- [ 'OS==\"win\"', {
- 'variables': {
- 'yasm_flags': [
- '-DWIN32',
- '-DMSVC',
- '-DCHROMIUM',
- '-Isimd',
- ],
- },
- }],
- [ 'OS==\"mac\"', {
- 'variables': {
- 'yasm_flags': [
- '-DPREFIX',
- '-DMACHO',
- '-DCHROMIUM',
- '-Isimd',
- ],
- },
- }],
- [ 'os_posix==1 and OS!=\"mac\"', {
- 'variables': {
- 'conditions': [
- [ 'target_arch==\"ia32\"', {
- 'yasm_flags': [
- '-DX86_32',
- '-DELF',
- '-DCHROMIUM',
- '-Isimd',
- ],
- }, {
- 'yasm_flags': [
- '-DARCH_X86_64',
- '-DELF',
- '-DPIC',
- '-DCHROMIUM',
- '-Isimd',
- ],
- }],
- ],
- },
- }],
- ],
- 'variables': {
- 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
- },
- 'msvs_2010_disable_uldi_when_referenced': 1,
- 'includes': [
- '../third_party/yasm/yasm_compile.gypi',
- ],
- },
- {
- 'target_name': 'yuv_convert_simd_arm',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_c.cc',
- 'base/simd/convert_rgb_to_yuv.h',
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/convert_yuv_to_rgb.h',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- 'base/simd/yuv_to_rgb_table.cc',
- 'base/simd/yuv_to_rgb_table.h',
- ],
- },
- {
- 'target_name': 'media_unittests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/base.gyp:base_i18n',
- '../base/base.gyp:test_support_base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../ui/ui.gyp:ui',
- ],
- 'sources': [
- 'audio/async_socket_io_handler_unittest.cc',
- 'audio/audio_input_controller_unittest.cc',
- 'audio/audio_input_device_unittest.cc',
- 'audio/audio_input_unittest.cc',
- 'audio/audio_input_volume_unittest.cc',
- 'audio/audio_low_latency_input_output_unittest.cc',
- 'audio/audio_output_controller_unittest.cc',
- 'audio/audio_output_proxy_unittest.cc',
- 'audio/audio_parameters_unittest.cc',
- 'audio/audio_util_unittest.cc',
- 'audio/cross_process_notification_unittest.cc',
- 'audio/linux/alsa_output_unittest.cc',
- 'audio/mac/audio_low_latency_input_mac_unittest.cc',
- 'audio/mac/audio_output_mac_unittest.cc',
- 'audio/simple_sources_unittest.cc',
- 'audio/win/audio_low_latency_input_win_unittest.cc',
- 'audio/win/audio_low_latency_output_win_unittest.cc',
- 'audio/win/audio_output_win_unittest.cc',
- 'base/audio_renderer_mixer_unittest.cc',
- 'base/audio_renderer_mixer_input_unittest.cc',
- 'base/buffers_unittest.cc',
- 'base/clock_unittest.cc',
- 'base/composite_filter_unittest.cc',
- 'base/data_buffer_unittest.cc',
- 'base/decoder_buffer_unittest.cc',
- 'base/djb2_unittest.cc',
- 'base/fake_audio_render_callback.cc',
- 'base/fake_audio_render_callback.h',
- 'base/filter_collection_unittest.cc',
- 'base/h264_bitstream_converter_unittest.cc',
- 'base/pipeline_unittest.cc',
- 'base/ranges_unittest.cc',
- 'base/run_all_unittests.cc',
- 'base/seekable_buffer_unittest.cc',
- 'base/state_matrix_unittest.cc',
- 'base/test_data_util.cc',
- 'base/test_data_util.h',
- 'base/video_frame_unittest.cc',
- 'base/video_util_unittest.cc',
- 'base/yuv_convert_unittest.cc',
- 'crypto/aes_decryptor_unittest.cc',
- 'ffmpeg/ffmpeg_common_unittest.cc',
- 'filters/audio_renderer_algorithm_unittest.cc',
- 'filters/audio_renderer_impl_unittest.cc',
- 'filters/bitstream_converter_unittest.cc',
- 'filters/chunk_demuxer_unittest.cc',
- 'filters/ffmpeg_audio_decoder_unittest.cc',
- 'filters/ffmpeg_decoder_unittest.h',
- 'filters/ffmpeg_demuxer_unittest.cc',
- 'filters/ffmpeg_glue_unittest.cc',
- 'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
- 'filters/ffmpeg_video_decoder_unittest.cc',
- 'filters/file_data_source_unittest.cc',
- 'filters/pipeline_integration_test.cc',
- 'filters/pipeline_integration_test_base.cc',
- 'filters/source_buffer_stream_unittest.cc',
- 'filters/video_renderer_base_unittest.cc',
- 'video/capture/video_capture_device_unittest.cc',
- 'webm/cluster_builder.cc',
- 'webm/cluster_builder.h',
- 'webm/webm_cluster_parser_unittest.cc',
- 'webm/webm_content_encodings_client_unittest.cc',
- 'webm/webm_parser_unittest.cc',
- ],
- 'conditions': [
- ['os_posix==1 and OS!=\"mac\"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ['OS != \"android\"', {
- 'dependencies': [
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- }],
- ['OS == \"android\"', {
- 'sources!': [
- 'audio/audio_input_volume_unittest.cc',
- 'base/test_data_util.cc',
- 'base/test_data_util.h',
- 'ffmpeg/ffmpeg_common_unittest.cc',
- 'filters/ffmpeg_audio_decoder_unittest.cc',
- 'filters/bitstream_converter_unittest.cc',
- 'filters/chunk_demuxer_unittest.cc',
- 'filters/ffmpeg_demuxer_unittest.cc',
- 'filters/ffmpeg_glue_unittest.cc',
- 'filters/ffmpeg_h264_bitstream_converter_unittest.cc',
- 'filters/ffmpeg_video_decoder_unittest.cc',
- 'filters/pipeline_integration_test.cc',
- 'filters/pipeline_integration_test_base.cc',
- 'mp4/mp4_stream_parser_unittest.cc',
- 'webm/webm_cluster_parser_unittest.cc',
- ],
- }],
- ['OS == \"linux\"', {
- 'conditions': [
- ['use_cras == 1', {
- 'sources': [
- 'audio/linux/cras_output_unittest.cc',
- ],
- 'defines': [
- 'USE_CRAS',
- ],
- }],
- ],
- }],
- [ 'target_arch==\"ia32\" or target_arch==\"x64\"', {
- 'sources': [
- 'base/simd/convert_rgb_to_yuv_unittest.cc',
- ],
- }],
- ['proprietary_codecs==1 or branding==\"Chrome\"', {
- 'sources': [
- 'mp4/avc_unittest.cc',
- 'mp4/box_reader_unittest.cc',
- 'mp4/mp4_stream_parser_unittest.cc',
- 'mp4/offset_byte_queue_unittest.cc',
- ],
- }],
- ],
- },
- {
- 'target_name': 'media_test_support',
- 'type': 'static_library',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- ],
- 'sources': [
- 'audio/test_audio_input_controller_factory.cc',
- 'audio/test_audio_input_controller_factory.h',
- 'base/mock_callback.cc',
- 'base/mock_callback.h',
- 'base/mock_data_source_host.cc',
- 'base/mock_data_source_host.h',
- 'base/mock_demuxer_host.cc',
- 'base/mock_demuxer_host.h',
- 'base/mock_filter_host.cc',
- 'base/mock_filter_host.h',
- 'base/mock_filters.cc',
- 'base/mock_filters.h',
- ],
- },
- {
- 'target_name': 'scaler_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../skia/skia.gyp:skia',
- ],
- 'sources': [
- 'tools/scaler_bench/scaler_bench.cc',
- ],
- },
- {
- 'target_name': 'qt_faststart',
- 'type': 'executable',
- 'sources': [
- 'tools/qt_faststart/qt_faststart.c'
- ],
- },
- {
- 'target_name': 'seek_tester',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- ],
- 'sources': [
- 'tools/seek_tester/seek_tester.cc',
- ],
- },
- ],
- 'conditions': [
- ['OS==\"win\"', {
- 'targets': [
- {
- 'target_name': 'player_wtl',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../ui/ui.gyp:ui',
- ],
- 'include_dirs': [
- '<(DEPTH)/third_party/wtl/include',
- ],
- 'sources': [
- 'tools/player_wtl/list.h',
- 'tools/player_wtl/mainfrm.h',
- 'tools/player_wtl/movie.cc',
- 'tools/player_wtl/movie.h',
- 'tools/player_wtl/player_wtl.cc',
- 'tools/player_wtl/player_wtl.rc',
- 'tools/player_wtl/props.h',
- 'tools/player_wtl/seek.h',
- 'tools/player_wtl/resource.h',
- 'tools/player_wtl/view.h',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
- },
- },
- 'defines': [
- '_CRT_SECURE_NO_WARNINGS=1',
- ],
- },
- ],
- }],
- ['OS == \"win\" or toolkit_uses_gtk == 1', {
- 'targets': [
- {
- 'target_name': 'shader_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'sources': [
- 'tools/shader_bench/shader_bench.cc',
- 'tools/shader_bench/cpu_color_painter.cc',
- 'tools/shader_bench/cpu_color_painter.h',
- 'tools/shader_bench/gpu_color_painter.cc',
- 'tools/shader_bench/gpu_color_painter.h',
- 'tools/shader_bench/gpu_painter.cc',
- 'tools/shader_bench/gpu_painter.h',
- 'tools/shader_bench/painter.cc',
- 'tools/shader_bench/painter.h',
- 'tools/shader_bench/window.cc',
- 'tools/shader_bench/window.h',
- ],
- 'conditions': [
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- '../build/linux/system.gyp:gtk',
- ],
- 'sources': [
- 'tools/shader_bench/window_linux.cc',
- ],
- }],
- ['OS==\"win\"', {
- 'dependencies': [
- '../third_party/angle/src/build_angle.gyp:libEGL',
- '../third_party/angle/src/build_angle.gyp:libGLESv2',
- ],
- 'sources': [
- 'tools/shader_bench/window_win.cc',
- ],
- }],
- ],
- },
- ],
- }],
- ['OS == \"linux\" and target_arch != \"arm\"', {
- 'targets': [
- {
- 'target_name': 'tile_render_bench',
- 'type': 'executable',
- 'dependencies': [
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'libraries': [
- '-lGL',
- '-ldl',
- ],
- 'sources': [
- 'tools/tile_render_bench/tile_render_bench.cc',
- ],
- },
- ],
- }],
- ['os_posix == 1 and OS != \"mac\" and OS != \"android\"', {
- 'targets': [
- {
- 'target_name': 'player_x11',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'yuv_convert',
- '../base/base.gyp:base',
- '../ui/gl/gl.gyp:gl',
- ],
- 'link_settings': {
- 'libraries': [
- '-ldl',
- '-lX11',
- '-lXrender',
- '-lXext',
- ],
- },
- 'sources': [
- 'tools/player_x11/data_source_logger.cc',
- 'tools/player_x11/data_source_logger.h',
- 'tools/player_x11/gl_video_renderer.cc',
- 'tools/player_x11/gl_video_renderer.h',
- 'tools/player_x11/player_x11.cc',
- 'tools/player_x11/x11_video_renderer.cc',
- 'tools/player_x11/x11_video_renderer.h',
- ],
- },
- ],
- }],
- ['OS == \"android\"', {
- 'targets': [
- {
- 'target_name': 'player_android',
- 'type': 'static_library',
- 'sources': [
- 'base/android/media_player_bridge.cc',
- 'base/android/media_player_bridge.h',
- ],
- 'dependencies': [
- '../base/base.gyp:base',
- ],
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/media',
- ],
- 'actions': [
- {
- 'action_name': 'generate-jni-headers',
- 'inputs': [
- '../base/android/jni_generator/jni_generator.py',
- 'base/android/java/src/org/chromium/media/MediaPlayerListener.java',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h',
- ],
- 'action': [
- 'python',
- '<(DEPTH)/base/android/jni_generator/jni_generator.py',
- '-o',
- '<@(_inputs)',
- '<@(_outputs)',
- ],
- },
- ],
- },
- {
- 'target_name': 'media_java',
- 'type': 'none',
- 'dependencies': [ '../base/base.gyp:base_java' ],
- 'variables': {
- 'package_name': 'media',
- 'java_in_dir': 'base/android/java',
- },
- 'includes': [ '../build/java.gypi' ],
- },
-
- ],
- }, { # OS != \"android\"'
- # Android does not use ffmpeg, so disable the targets which require it.
- 'targets': [
- {
- 'target_name': 'ffmpeg_unittests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- '../base/base.gyp:base',
- '../base/base.gyp:base_i18n',
- '../base/base.gyp:test_support_base',
- '../base/base.gyp:test_support_perf',
- '../testing/gtest.gyp:gtest',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'ffmpeg/ffmpeg_unittest.cc',
- ],
- 'conditions': [
- ['toolkit_uses_gtk == 1', {
- 'dependencies': [
- # Needed for the following #include chain:
- # base/run_all_unittests.cc
- # ../base/test_suite.h
- # gtk/gtk.h
- '../build/linux/system.gyp:gtk',
- ],
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
- },
- {
- 'target_name': 'ffmpeg_regression_tests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- 'media_test_support',
- '../base/base.gyp:test_support_base',
- '../testing/gmock.gyp:gmock',
- '../testing/gtest.gyp:gtest',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'base/test_data_util.cc',
- 'base/run_all_unittests.cc',
- 'ffmpeg/ffmpeg_regression_tests.cc',
- 'filters/pipeline_integration_test_base.cc',
- ],
- 'conditions': [
- ['os_posix==1 and OS!=\"mac\"', {
- 'conditions': [
- ['linux_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- }],
- ],
- },
- {
- 'target_name': 'ffmpeg_tests',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'test/ffmpeg_tests/ffmpeg_tests.cc',
- ],
- },
- {
- 'target_name': 'media_bench',
- 'type': 'executable',
- 'dependencies': [
- 'media',
- '../base/base.gyp:base',
- '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
- ],
- 'sources': [
- 'tools/media_bench/media_bench.cc',
- ],
- },
- ],
- }]
- ],
-}
-" 0 64 (face font-lock-comment-face) 64 137 (face font-lock-comment-face) 137 166 (face font-lock-comment-face) 166 171 nil 171 172 (face font-lock-string-face) 172 181 (face font-lock-keyword-face) 181 182 (face font-lock-string-face) 182 190 nil 190 191 (face font-lock-string-face) 191 204 (face font-lock-variable-name-face) 204 205 (face font-lock-string-face) 205 214 nil 214 269 (face font-lock-comment-face) 269 273 nil 273 274 (face font-lock-string-face) 274 289 (face font-lock-variable-name-face) 289 290 (face font-lock-string-face) 290 299 nil 299 365 (face font-lock-comment-face) 365 369 nil 369 370 (face font-lock-string-face) 370 379 (face font-lock-variable-name-face) 379 380 (face font-lock-string-face) 380 392 nil 392 393 (face font-lock-string-face) 393 400 (face font-lock-keyword-face) 400 401 (face font-lock-string-face) 401 417 nil 417 418 (face font-lock-string-face) 418 429 (face font-lock-keyword-face) 429 430 (face font-lock-string-face) 430 432 nil 432 433 (face font-lock-string-face) 433 438 (face font-lock-function-name-face) 438 439 (face font-lock-string-face) 439 447 nil 447 448 (face font-lock-string-face) 448 452 (face font-lock-keyword-face) 452 453 (face font-lock-string-face) 453 455 nil 455 458 (face font-lock-string-face) 458 467 (face font-lock-variable-name-face) 467 469 (face font-lock-string-face) 469 477 nil 477 478 (face font-lock-string-face) 478 490 (face font-lock-keyword-face) 490 491 (face font-lock-string-face) 491 503 nil 503 504 (face font-lock-string-face) 504 515 (face font-lock-function-name-face) 515 516 (face font-lock-string-face) 516 526 nil 526 527 (face font-lock-string-face) 527 548 (face font-lock-function-name-face) 548 549 (face font-lock-string-face) 549 559 nil 559 560 (face font-lock-string-face) 560 643 (face font-lock-function-name-face) 643 644 (face font-lock-string-face) 644 654 nil 654 655 (face font-lock-string-face) 655 696 (face font-lock-function-name-face) 696 697 (face font-lock-string-face) 697 707 nil 707 708 (face font-lock-string-face) 708 735 (face font-lock-function-name-face) 735 736 (face font-lock-string-face) 736 746 nil 746 747 (face font-lock-string-face) 747 784 (face font-lock-function-name-face) 784 785 (face font-lock-string-face) 785 795 nil 795 796 (face font-lock-string-face) 796 811 (face font-lock-function-name-face) 811 812 (face font-lock-string-face) 812 829 nil 829 830 (face font-lock-string-face) 830 837 (face font-lock-keyword-face) 837 838 (face font-lock-string-face) 838 850 nil 850 851 (face font-lock-string-face) 851 871 (face font-lock-preprocessor-face) 871 872 (face font-lock-string-face) 872 889 nil 889 890 (face font-lock-string-face) 890 902 (face font-lock-keyword-face) 902 903 (face font-lock-string-face) 903 915 nil 915 916 (face font-lock-string-face) 916 918 (face font-lock-constant-face) 918 919 (face font-lock-string-face) 919 936 nil 936 937 (face font-lock-string-face) 937 944 (face font-lock-keyword-face) 944 945 (face font-lock-string-face) 945 957 nil 957 958 (face font-lock-string-face) 958 996 (face font-lock-constant-face) 996 997 (face font-lock-string-face) 997 1007 nil 1007 1008 (face font-lock-string-face) 1008 1045 (face font-lock-constant-face) 1045 1046 (face font-lock-string-face) 1046 1056 nil 1056 1057 (face font-lock-string-face) 1057 1100 (face font-lock-constant-face) 1100 1101 (face font-lock-string-face) 1101 1111 nil 1111 1112 (face font-lock-string-face) 1112 1154 (face font-lock-constant-face) 1154 1155 (face font-lock-string-face) 1155 1165 nil 1165 1166 (face font-lock-string-face) 1166 1197 (face font-lock-constant-face) 1197 1198 (face font-lock-string-face) 1198 1208 nil 1208 1209 (face font-lock-string-face) 1209 1239 (face font-lock-constant-face) 1239 1240 (face font-lock-string-face) 1240 1250 nil 1250 1251 (face font-lock-string-face) 1251 1283 (face font-lock-constant-face) 1283 1284 (face font-lock-string-face) 1284 1294 nil 1294 1295 (face font-lock-string-face) 1295 1326 (face font-lock-constant-face) 1326 1327 (face font-lock-string-face) 1327 1337 nil 1337 1338 (face font-lock-string-face) 1338 1369 (face font-lock-constant-face) 1369 1370 (face font-lock-string-face) 1370 1380 nil 1380 1381 (face font-lock-string-face) 1381 1419 (face font-lock-constant-face) 1419 1420 (face font-lock-string-face) 1420 1430 nil 1430 1431 (face font-lock-string-face) 1431 1467 (face font-lock-constant-face) 1467 1468 (face font-lock-string-face) 1468 1478 nil 1478 1479 (face font-lock-string-face) 1479 1507 (face font-lock-constant-face) 1507 1508 (face font-lock-string-face) 1508 1518 nil 1518 1519 (face font-lock-string-face) 1519 1546 (face font-lock-constant-face) 1546 1547 (face font-lock-string-face) 1547 1557 nil 1557 1558 (face font-lock-string-face) 1558 1574 (face font-lock-constant-face) 1574 1575 (face font-lock-string-face) 1575 1585 nil 1585 1586 (face font-lock-string-face) 1586 1617 (face font-lock-constant-face) 1617 1618 (face font-lock-string-face) 1618 1628 nil 1628 1629 (face font-lock-string-face) 1629 1659 (face font-lock-constant-face) 1659 1660 (face font-lock-string-face) 1660 1670 nil 1670 1671 (face font-lock-string-face) 1671 1703 (face font-lock-constant-face) 1703 1704 (face font-lock-string-face) 1704 1714 nil 1714 1715 (face font-lock-string-face) 1715 1746 (face font-lock-constant-face) 1746 1747 (face font-lock-string-face) 1747 1757 nil 1757 1758 (face font-lock-string-face) 1758 1784 (face font-lock-constant-face) 1784 1785 (face font-lock-string-face) 1785 1795 nil 1795 1796 (face font-lock-string-face) 1796 1821 (face font-lock-constant-face) 1821 1822 (face font-lock-string-face) 1822 1832 nil 1832 1833 (face font-lock-string-face) 1833 1855 (face font-lock-constant-face) 1855 1856 (face font-lock-string-face) 1856 1866 nil 1866 1867 (face font-lock-string-face) 1867 1888 (face font-lock-constant-face) 1888 1889 (face font-lock-string-face) 1889 1899 nil 1899 1900 (face font-lock-string-face) 1900 1927 (face font-lock-constant-face) 1927 1928 (face font-lock-string-face) 1928 1938 nil 1938 1939 (face font-lock-string-face) 1939 1965 (face font-lock-constant-face) 1965 1966 (face font-lock-string-face) 1966 1976 nil 1976 1977 (face font-lock-string-face) 1977 2009 (face font-lock-constant-face) 2009 2010 (face font-lock-string-face) 2010 2020 nil 2020 2021 (face font-lock-string-face) 2021 2052 (face font-lock-constant-face) 2052 2053 (face font-lock-string-face) 2053 2063 nil 2063 2064 (face font-lock-string-face) 2064 2096 (face font-lock-constant-face) 2096 2097 (face font-lock-string-face) 2097 2107 nil 2107 2108 (face font-lock-string-face) 2108 2139 (face font-lock-constant-face) 2139 2140 (face font-lock-string-face) 2140 2150 nil 2150 2151 (face font-lock-string-face) 2151 2188 (face font-lock-constant-face) 2188 2189 (face font-lock-string-face) 2189 2199 nil 2199 2200 (face font-lock-string-face) 2200 2236 (face font-lock-constant-face) 2236 2237 (face font-lock-string-face) 2237 2247 nil 2247 2248 (face font-lock-string-face) 2248 2275 (face font-lock-constant-face) 2275 2276 (face font-lock-string-face) 2276 2286 nil 2286 2287 (face font-lock-string-face) 2287 2313 (face font-lock-constant-face) 2313 2314 (face font-lock-string-face) 2314 2324 nil 2324 2325 (face font-lock-string-face) 2325 2352 (face font-lock-constant-face) 2352 2353 (face font-lock-string-face) 2353 2363 nil 2363 2364 (face font-lock-string-face) 2364 2390 (face font-lock-constant-face) 2390 2391 (face font-lock-string-face) 2391 2401 nil 2401 2402 (face font-lock-string-face) 2402 2427 (face font-lock-constant-face) 2427 2428 (face font-lock-string-face) 2428 2438 nil 2438 2439 (face font-lock-string-face) 2439 2463 (face font-lock-constant-face) 2463 2464 (face font-lock-string-face) 2464 2474 nil 2474 2475 (face font-lock-string-face) 2475 2494 (face font-lock-constant-face) 2494 2495 (face font-lock-string-face) 2495 2505 nil 2505 2506 (face font-lock-string-face) 2506 2524 (face font-lock-constant-face) 2524 2525 (face font-lock-string-face) 2525 2535 nil 2535 2536 (face font-lock-string-face) 2536 2571 (face font-lock-constant-face) 2571 2572 (face font-lock-string-face) 2572 2582 nil 2582 2583 (face font-lock-string-face) 2583 2617 (face font-lock-constant-face) 2617 2618 (face font-lock-string-face) 2618 2628 nil 2628 2629 (face font-lock-string-face) 2629 2668 (face font-lock-constant-face) 2668 2669 (face font-lock-string-face) 2669 2679 nil 2679 2680 (face font-lock-string-face) 2680 2721 (face font-lock-constant-face) 2721 2722 (face font-lock-string-face) 2722 2732 nil 2732 2733 (face font-lock-string-face) 2733 2765 (face font-lock-constant-face) 2765 2766 (face font-lock-string-face) 2766 2776 nil 2776 2777 (face font-lock-string-face) 2777 2808 (face font-lock-constant-face) 2808 2809 (face font-lock-string-face) 2809 2819 nil 2819 2820 (face font-lock-string-face) 2820 2853 (face font-lock-constant-face) 2853 2854 (face font-lock-string-face) 2854 2864 nil 2864 2865 (face font-lock-string-face) 2865 2897 (face font-lock-constant-face) 2897 2898 (face font-lock-string-face) 2898 2908 nil 2908 2909 (face font-lock-string-face) 2909 2943 (face font-lock-constant-face) 2943 2944 (face font-lock-string-face) 2944 2954 nil 2954 2955 (face font-lock-string-face) 2955 2988 (face font-lock-constant-face) 2988 2989 (face font-lock-string-face) 2989 2999 nil 2999 3000 (face font-lock-string-face) 3000 3025 (face font-lock-constant-face) 3025 3026 (face font-lock-string-face) 3026 3036 nil 3036 3037 (face font-lock-string-face) 3037 3061 (face font-lock-constant-face) 3061 3062 (face font-lock-string-face) 3062 3072 nil 3072 3073 (face font-lock-string-face) 3073 3099 (face font-lock-constant-face) 3099 3100 (face font-lock-string-face) 3100 3110 nil 3110 3111 (face font-lock-string-face) 3111 3136 (face font-lock-constant-face) 3136 3137 (face font-lock-string-face) 3137 3147 nil 3147 3148 (face font-lock-string-face) 3148 3172 (face font-lock-constant-face) 3172 3173 (face font-lock-string-face) 3173 3183 nil 3183 3184 (face font-lock-string-face) 3184 3207 (face font-lock-constant-face) 3207 3208 (face font-lock-string-face) 3208 3218 nil 3218 3219 (face font-lock-string-face) 3219 3246 (face font-lock-constant-face) 3246 3247 (face font-lock-string-face) 3247 3257 nil 3257 3258 (face font-lock-string-face) 3258 3284 (face font-lock-constant-face) 3284 3285 (face font-lock-string-face) 3285 3295 nil 3295 3296 (face font-lock-string-face) 3296 3322 (face font-lock-constant-face) 3322 3323 (face font-lock-string-face) 3323 3333 nil 3333 3334 (face font-lock-string-face) 3334 3359 (face font-lock-constant-face) 3359 3360 (face font-lock-string-face) 3360 3370 nil 3370 3371 (face font-lock-string-face) 3371 3409 (face font-lock-constant-face) 3409 3410 (face font-lock-string-face) 3410 3420 nil 3420 3421 (face font-lock-string-face) 3421 3458 (face font-lock-constant-face) 3458 3459 (face font-lock-string-face) 3459 3469 nil 3469 3470 (face font-lock-string-face) 3470 3498 (face font-lock-constant-face) 3498 3499 (face font-lock-string-face) 3499 3509 nil 3509 3510 (face font-lock-string-face) 3510 3537 (face font-lock-constant-face) 3537 3538 (face font-lock-string-face) 3538 3548 nil 3548 3549 (face font-lock-string-face) 3549 3589 (face font-lock-constant-face) 3589 3590 (face font-lock-string-face) 3590 3600 nil 3600 3601 (face font-lock-string-face) 3601 3640 (face font-lock-constant-face) 3640 3641 (face font-lock-string-face) 3641 3651 nil 3651 3652 (face font-lock-string-face) 3652 3693 (face font-lock-constant-face) 3693 3694 (face font-lock-string-face) 3694 3704 nil 3704 3705 (face font-lock-string-face) 3705 3745 (face font-lock-constant-face) 3745 3746 (face font-lock-string-face) 3746 3756 nil 3756 3757 (face font-lock-string-face) 3757 3787 (face font-lock-constant-face) 3787 3788 (face font-lock-string-face) 3788 3798 nil 3798 3799 (face font-lock-string-face) 3799 3828 (face font-lock-constant-face) 3828 3829 (face font-lock-string-face) 3829 3839 nil 3839 3840 (face font-lock-string-face) 3840 3869 (face font-lock-constant-face) 3869 3870 (face font-lock-string-face) 3870 3880 nil 3880 3881 (face font-lock-string-face) 3881 3909 (face font-lock-constant-face) 3909 3910 (face font-lock-string-face) 3910 3920 nil 3920 3921 (face font-lock-string-face) 3921 3945 (face font-lock-constant-face) 3945 3946 (face font-lock-string-face) 3946 3956 nil 3956 3957 (face font-lock-string-face) 3957 3980 (face font-lock-constant-face) 3980 3981 (face font-lock-string-face) 3981 3991 nil 3991 3992 (face font-lock-string-face) 3992 4019 (face font-lock-constant-face) 4019 4020 (face font-lock-string-face) 4020 4030 nil 4030 4031 (face font-lock-string-face) 4031 4057 (face font-lock-constant-face) 4057 4058 (face font-lock-string-face) 4058 4068 nil 4068 4069 (face font-lock-string-face) 4069 4090 (face font-lock-constant-face) 4090 4091 (face font-lock-string-face) 4091 4101 nil 4101 4102 (face font-lock-string-face) 4102 4122 (face font-lock-constant-face) 4122 4123 (face font-lock-string-face) 4123 4133 nil 4133 4134 (face font-lock-string-face) 4134 4157 (face font-lock-constant-face) 4157 4158 (face font-lock-string-face) 4158 4168 nil 4168 4169 (face font-lock-string-face) 4169 4191 (face font-lock-constant-face) 4191 4192 (face font-lock-string-face) 4192 4202 nil 4202 4203 (face font-lock-string-face) 4203 4243 (face font-lock-constant-face) 4243 4244 (face font-lock-string-face) 4244 4254 nil 4254 4255 (face font-lock-string-face) 4255 4294 (face font-lock-constant-face) 4294 4295 (face font-lock-string-face) 4295 4305 nil 4305 4306 (face font-lock-string-face) 4306 4347 (face font-lock-constant-face) 4347 4348 (face font-lock-string-face) 4348 4358 nil 4358 4359 (face font-lock-string-face) 4359 4399 (face font-lock-constant-face) 4399 4400 (face font-lock-string-face) 4400 4410 nil 4410 4411 (face font-lock-string-face) 4411 4441 (face font-lock-constant-face) 4441 4442 (face font-lock-string-face) 4442 4452 nil 4452 4453 (face font-lock-string-face) 4453 4482 (face font-lock-constant-face) 4482 4483 (face font-lock-string-face) 4483 4493 nil 4493 4494 (face font-lock-string-face) 4494 4523 (face font-lock-constant-face) 4523 4524 (face font-lock-string-face) 4524 4534 nil 4534 4535 (face font-lock-string-face) 4535 4563 (face font-lock-constant-face) 4563 4564 (face font-lock-string-face) 4564 4574 nil 4574 4575 (face font-lock-string-face) 4575 4610 (face font-lock-constant-face) 4610 4611 (face font-lock-string-face) 4611 4621 nil 4621 4622 (face font-lock-string-face) 4622 4656 (face font-lock-constant-face) 4656 4657 (face font-lock-string-face) 4657 4667 nil 4667 4668 (face font-lock-string-face) 4668 4697 (face font-lock-constant-face) 4697 4698 (face font-lock-string-face) 4698 4708 nil 4708 4709 (face font-lock-string-face) 4709 4737 (face font-lock-constant-face) 4737 4738 (face font-lock-string-face) 4738 4748 nil 4748 4749 (face font-lock-string-face) 4749 4780 (face font-lock-constant-face) 4780 4781 (face font-lock-string-face) 4781 4791 nil 4791 4792 (face font-lock-string-face) 4792 4822 (face font-lock-constant-face) 4822 4823 (face font-lock-string-face) 4823 4833 nil 4833 4834 (face font-lock-string-face) 4834 4869 (face font-lock-constant-face) 4869 4870 (face font-lock-string-face) 4870 4880 nil 4880 4881 (face font-lock-string-face) 4881 4915 (face font-lock-constant-face) 4915 4916 (face font-lock-string-face) 4916 4926 nil 4926 4927 (face font-lock-string-face) 4927 4948 (face font-lock-constant-face) 4948 4949 (face font-lock-string-face) 4949 4959 nil 4959 4960 (face font-lock-string-face) 4960 4980 (face font-lock-constant-face) 4980 4981 (face font-lock-string-face) 4981 4991 nil 4991 4992 (face font-lock-string-face) 4992 5020 (face font-lock-constant-face) 5020 5021 (face font-lock-string-face) 5021 5031 nil 5031 5032 (face font-lock-string-face) 5032 5059 (face font-lock-constant-face) 5059 5060 (face font-lock-string-face) 5060 5070 nil 5070 5071 (face font-lock-string-face) 5071 5092 (face font-lock-constant-face) 5092 5093 (face font-lock-string-face) 5093 5103 nil 5103 5104 (face font-lock-string-face) 5104 5132 (face font-lock-constant-face) 5132 5133 (face font-lock-string-face) 5133 5143 nil 5143 5144 (face font-lock-string-face) 5144 5171 (face font-lock-constant-face) 5171 5172 (face font-lock-string-face) 5172 5182 nil 5182 5183 (face font-lock-string-face) 5183 5217 (face font-lock-constant-face) 5217 5218 (face font-lock-string-face) 5218 5228 nil 5228 5229 (face font-lock-string-face) 5229 5262 (face font-lock-constant-face) 5262 5263 (face font-lock-string-face) 5263 5273 nil 5273 5274 (face font-lock-string-face) 5274 5297 (face font-lock-constant-face) 5297 5298 (face font-lock-string-face) 5298 5308 nil 5308 5309 (face font-lock-string-face) 5309 5324 (face font-lock-constant-face) 5324 5325 (face font-lock-string-face) 5325 5335 nil 5335 5336 (face font-lock-string-face) 5336 5350 (face font-lock-constant-face) 5350 5351 (face font-lock-string-face) 5351 5361 nil 5361 5362 (face font-lock-string-face) 5362 5380 (face font-lock-constant-face) 5380 5381 (face font-lock-string-face) 5381 5391 nil 5391 5392 (face font-lock-string-face) 5392 5409 (face font-lock-constant-face) 5409 5410 (face font-lock-string-face) 5410 5420 nil 5420 5421 (face font-lock-string-face) 5421 5443 (face font-lock-constant-face) 5443 5444 (face font-lock-string-face) 5444 5454 nil 5454 5455 (face font-lock-string-face) 5455 5476 (face font-lock-constant-face) 5476 5477 (face font-lock-string-face) 5477 5487 nil 5487 5488 (face font-lock-string-face) 5488 5501 (face font-lock-constant-face) 5501 5502 (face font-lock-string-face) 5502 5512 nil 5512 5513 (face font-lock-string-face) 5513 5525 (face font-lock-constant-face) 5525 5526 (face font-lock-string-face) 5526 5536 nil 5536 5537 (face font-lock-string-face) 5537 5561 (face font-lock-constant-face) 5561 5562 (face font-lock-string-face) 5562 5572 nil 5572 5573 (face font-lock-string-face) 5573 5596 (face font-lock-constant-face) 5596 5597 (face font-lock-string-face) 5597 5607 nil 5607 5608 (face font-lock-string-face) 5608 5627 (face font-lock-constant-face) 5627 5628 (face font-lock-string-face) 5628 5638 nil 5638 5639 (face font-lock-string-face) 5639 5657 (face font-lock-constant-face) 5657 5658 (face font-lock-string-face) 5658 5668 nil 5668 5669 (face font-lock-string-face) 5669 5688 (face font-lock-constant-face) 5688 5689 (face font-lock-string-face) 5689 5699 nil 5699 5700 (face font-lock-string-face) 5700 5718 (face font-lock-constant-face) 5718 5719 (face font-lock-string-face) 5719 5729 nil 5729 5730 (face font-lock-string-face) 5730 5752 (face font-lock-constant-face) 5752 5753 (face font-lock-string-face) 5753 5763 nil 5763 5764 (face font-lock-string-face) 5764 5785 (face font-lock-constant-face) 5785 5786 (face font-lock-string-face) 5786 5796 nil 5796 5797 (face font-lock-string-face) 5797 5819 (face font-lock-constant-face) 5819 5820 (face font-lock-string-face) 5820 5830 nil 5830 5831 (face font-lock-string-face) 5831 5852 (face font-lock-constant-face) 5852 5853 (face font-lock-string-face) 5853 5863 nil 5863 5864 (face font-lock-string-face) 5864 5880 (face font-lock-constant-face) 5880 5881 (face font-lock-string-face) 5881 5891 nil 5891 5892 (face font-lock-string-face) 5892 5915 (face font-lock-constant-face) 5915 5916 (face font-lock-string-face) 5916 5926 nil 5926 5927 (face font-lock-string-face) 5927 5942 (face font-lock-constant-face) 5942 5943 (face font-lock-string-face) 5943 5953 nil 5953 5954 (face font-lock-string-face) 5954 5968 (face font-lock-constant-face) 5968 5969 (face font-lock-string-face) 5969 5979 nil 5979 5980 (face font-lock-string-face) 5980 6002 (face font-lock-constant-face) 6002 6003 (face font-lock-string-face) 6003 6013 nil 6013 6014 (face font-lock-string-face) 6014 6035 (face font-lock-constant-face) 6035 6036 (face font-lock-string-face) 6036 6046 nil 6046 6047 (face font-lock-string-face) 6047 6059 (face font-lock-constant-face) 6059 6060 (face font-lock-string-face) 6060 6070 nil 6070 6071 (face font-lock-string-face) 6071 6082 (face font-lock-constant-face) 6082 6083 (face font-lock-string-face) 6083 6093 nil 6093 6094 (face font-lock-string-face) 6094 6119 (face font-lock-constant-face) 6119 6120 (face font-lock-string-face) 6120 6130 nil 6130 6131 (face font-lock-string-face) 6131 6155 (face font-lock-constant-face) 6155 6156 (face font-lock-string-face) 6156 6166 nil 6166 6167 (face font-lock-string-face) 6167 6185 (face font-lock-constant-face) 6185 6186 (face font-lock-string-face) 6186 6196 nil 6196 6197 (face font-lock-string-face) 6197 6212 (face font-lock-constant-face) 6212 6213 (face font-lock-string-face) 6213 6223 nil 6223 6224 (face font-lock-string-face) 6224 6238 (face font-lock-constant-face) 6238 6239 (face font-lock-string-face) 6239 6249 nil 6249 6250 (face font-lock-string-face) 6250 6282 (face font-lock-constant-face) 6282 6283 (face font-lock-string-face) 6283 6293 nil 6293 6294 (face font-lock-string-face) 6294 6325 (face font-lock-constant-face) 6325 6326 (face font-lock-string-face) 6326 6336 nil 6336 6337 (face font-lock-string-face) 6337 6349 (face font-lock-constant-face) 6349 6350 (face font-lock-string-face) 6350 6360 nil 6360 6361 (face font-lock-string-face) 6361 6382 (face font-lock-constant-face) 6382 6383 (face font-lock-string-face) 6383 6393 nil 6393 6394 (face font-lock-string-face) 6394 6413 (face font-lock-constant-face) 6413 6414 (face font-lock-string-face) 6414 6424 nil 6424 6425 (face font-lock-string-face) 6425 6442 (face font-lock-constant-face) 6442 6443 (face font-lock-string-face) 6443 6453 nil 6453 6454 (face font-lock-string-face) 6454 6470 (face font-lock-constant-face) 6470 6471 (face font-lock-string-face) 6471 6481 nil 6481 6482 (face font-lock-string-face) 6482 6504 (face font-lock-constant-face) 6504 6505 (face font-lock-string-face) 6505 6515 nil 6515 6516 (face font-lock-string-face) 6516 6535 (face font-lock-constant-face) 6535 6536 (face font-lock-string-face) 6536 6546 nil 6546 6547 (face font-lock-string-face) 6547 6569 (face font-lock-constant-face) 6569 6570 (face font-lock-string-face) 6570 6580 nil 6580 6581 (face font-lock-string-face) 6581 6602 (face font-lock-constant-face) 6602 6603 (face font-lock-string-face) 6603 6613 nil 6613 6614 (face font-lock-string-face) 6614 6631 (face font-lock-constant-face) 6631 6632 (face font-lock-string-face) 6632 6642 nil 6642 6643 (face font-lock-string-face) 6643 6671 (face font-lock-constant-face) 6671 6672 (face font-lock-string-face) 6672 6682 nil 6682 6683 (face font-lock-string-face) 6683 6710 (face font-lock-constant-face) 6710 6711 (face font-lock-string-face) 6711 6721 nil 6721 6722 (face font-lock-string-face) 6722 6738 (face font-lock-constant-face) 6738 6739 (face font-lock-string-face) 6739 6749 nil 6749 6750 (face font-lock-string-face) 6750 6765 (face font-lock-constant-face) 6765 6766 (face font-lock-string-face) 6766 6776 nil 6776 6777 (face font-lock-string-face) 6777 6800 (face font-lock-constant-face) 6800 6801 (face font-lock-string-face) 6801 6811 nil 6811 6812 (face font-lock-string-face) 6812 6834 (face font-lock-constant-face) 6834 6835 (face font-lock-string-face) 6835 6845 nil 6845 6846 (face font-lock-string-face) 6846 6860 (face font-lock-constant-face) 6860 6861 (face font-lock-string-face) 6861 6871 nil 6871 6872 (face font-lock-string-face) 6872 6885 (face font-lock-constant-face) 6885 6886 (face font-lock-string-face) 6886 6896 nil 6896 6897 (face font-lock-string-face) 6897 6920 (face font-lock-constant-face) 6920 6921 (face font-lock-string-face) 6921 6931 nil 6931 6932 (face font-lock-string-face) 6932 6954 (face font-lock-constant-face) 6954 6955 (face font-lock-string-face) 6955 6965 nil 6965 6966 (face font-lock-string-face) 6966 6986 (face font-lock-constant-face) 6986 6987 (face font-lock-string-face) 6987 6997 nil 6997 6998 (face font-lock-string-face) 6998 7017 (face font-lock-constant-face) 7017 7018 (face font-lock-string-face) 7018 7028 nil 7028 7029 (face font-lock-string-face) 7029 7050 (face font-lock-constant-face) 7050 7051 (face font-lock-string-face) 7051 7061 nil 7061 7062 (face font-lock-string-face) 7062 7082 (face font-lock-constant-face) 7082 7083 (face font-lock-string-face) 7083 7093 nil 7093 7094 (face font-lock-string-face) 7094 7122 (face font-lock-constant-face) 7122 7123 (face font-lock-string-face) 7123 7133 nil 7133 7134 (face font-lock-string-face) 7134 7161 (face font-lock-constant-face) 7161 7162 (face font-lock-string-face) 7162 7172 nil 7172 7173 (face font-lock-string-face) 7173 7194 (face font-lock-constant-face) 7194 7195 (face font-lock-string-face) 7195 7205 nil 7205 7206 (face font-lock-string-face) 7206 7226 (face font-lock-constant-face) 7226 7227 (face font-lock-string-face) 7227 7237 nil 7237 7238 (face font-lock-string-face) 7238 7266 (face font-lock-constant-face) 7266 7267 (face font-lock-string-face) 7267 7277 nil 7277 7278 (face font-lock-string-face) 7278 7305 (face font-lock-constant-face) 7305 7306 (face font-lock-string-face) 7306 7316 nil 7316 7317 (face font-lock-string-face) 7317 7336 (face font-lock-constant-face) 7336 7337 (face font-lock-string-face) 7337 7347 nil 7347 7348 (face font-lock-string-face) 7348 7366 (face font-lock-constant-face) 7366 7367 (face font-lock-string-face) 7367 7377 nil 7377 7378 (face font-lock-string-face) 7378 7399 (face font-lock-constant-face) 7399 7400 (face font-lock-string-face) 7400 7410 nil 7410 7411 (face font-lock-string-face) 7411 7429 (face font-lock-constant-face) 7429 7430 (face font-lock-string-face) 7430 7440 nil 7440 7441 (face font-lock-string-face) 7441 7458 (face font-lock-constant-face) 7458 7459 (face font-lock-string-face) 7459 7469 nil 7469 7470 (face font-lock-string-face) 7470 7493 (face font-lock-constant-face) 7493 7494 (face font-lock-string-face) 7494 7504 nil 7504 7505 (face font-lock-string-face) 7505 7527 (face font-lock-constant-face) 7527 7528 (face font-lock-string-face) 7528 7538 nil 7538 7539 (face font-lock-string-face) 7539 7562 (face font-lock-constant-face) 7562 7563 (face font-lock-string-face) 7563 7573 nil 7573 7574 (face font-lock-string-face) 7574 7596 (face font-lock-constant-face) 7596 7597 (face font-lock-string-face) 7597 7607 nil 7607 7608 (face font-lock-string-face) 7608 7631 (face font-lock-constant-face) 7631 7632 (face font-lock-string-face) 7632 7642 nil 7642 7643 (face font-lock-string-face) 7643 7665 (face font-lock-constant-face) 7665 7666 (face font-lock-string-face) 7666 7676 nil 7676 7677 (face font-lock-string-face) 7677 7705 (face font-lock-constant-face) 7705 7706 (face font-lock-string-face) 7706 7716 nil 7716 7717 (face font-lock-string-face) 7717 7744 (face font-lock-constant-face) 7744 7745 (face font-lock-string-face) 7745 7755 nil 7755 7756 (face font-lock-string-face) 7756 7791 (face font-lock-constant-face) 7791 7792 (face font-lock-string-face) 7792 7802 nil 7802 7803 (face font-lock-string-face) 7803 7837 (face font-lock-constant-face) 7837 7838 (face font-lock-string-face) 7838 7848 nil 7848 7849 (face font-lock-string-face) 7849 7879 (face font-lock-constant-face) 7879 7880 (face font-lock-string-face) 7880 7890 nil 7890 7891 (face font-lock-string-face) 7891 7920 (face font-lock-constant-face) 7920 7921 (face font-lock-string-face) 7921 7931 nil 7931 7932 (face font-lock-string-face) 7932 7962 (face font-lock-constant-face) 7962 7963 (face font-lock-string-face) 7963 7973 nil 7973 7974 (face font-lock-string-face) 7974 8003 (face font-lock-constant-face) 8003 8004 (face font-lock-string-face) 8004 8014 nil 8014 8015 (face font-lock-string-face) 8015 8039 (face font-lock-constant-face) 8039 8040 (face font-lock-string-face) 8040 8050 nil 8050 8051 (face font-lock-string-face) 8051 8074 (face font-lock-constant-face) 8074 8075 (face font-lock-string-face) 8075 8085 nil 8085 8086 (face font-lock-string-face) 8086 8116 (face font-lock-constant-face) 8116 8117 (face font-lock-string-face) 8117 8127 nil 8127 8128 (face font-lock-string-face) 8128 8152 (face font-lock-constant-face) 8152 8153 (face font-lock-string-face) 8153 8163 nil 8163 8164 (face font-lock-string-face) 8164 8187 (face font-lock-constant-face) 8187 8188 (face font-lock-string-face) 8188 8198 nil 8198 8199 (face font-lock-string-face) 8199 8230 (face font-lock-constant-face) 8230 8231 (face font-lock-string-face) 8231 8241 nil 8241 8242 (face font-lock-string-face) 8242 8272 (face font-lock-constant-face) 8272 8273 (face font-lock-string-face) 8273 8283 nil 8283 8284 (face font-lock-string-face) 8284 8309 (face font-lock-constant-face) 8309 8310 (face font-lock-string-face) 8310 8320 nil 8320 8321 (face font-lock-string-face) 8321 8345 (face font-lock-constant-face) 8345 8346 (face font-lock-string-face) 8346 8356 nil 8356 8357 (face font-lock-string-face) 8357 8399 (face font-lock-constant-face) 8399 8400 (face font-lock-string-face) 8400 8410 nil 8410 8411 (face font-lock-string-face) 8411 8452 (face font-lock-constant-face) 8452 8453 (face font-lock-string-face) 8453 8463 nil 8463 8464 (face font-lock-string-face) 8464 8486 (face font-lock-constant-face) 8486 8487 (face font-lock-string-face) 8487 8497 nil 8497 8498 (face font-lock-string-face) 8498 8519 (face font-lock-constant-face) 8519 8520 (face font-lock-string-face) 8520 8530 nil 8530 8531 (face font-lock-string-face) 8531 8562 (face font-lock-constant-face) 8562 8563 (face font-lock-string-face) 8563 8573 nil 8573 8574 (face font-lock-string-face) 8574 8604 (face font-lock-constant-face) 8604 8605 (face font-lock-string-face) 8605 8615 nil 8615 8616 (face font-lock-string-face) 8616 8643 (face font-lock-constant-face) 8643 8644 (face font-lock-string-face) 8644 8654 nil 8654 8655 (face font-lock-string-face) 8655 8681 (face font-lock-constant-face) 8681 8682 (face font-lock-string-face) 8682 8692 nil 8692 8693 (face font-lock-string-face) 8693 8721 (face font-lock-constant-face) 8721 8722 (face font-lock-string-face) 8722 8732 nil 8732 8733 (face font-lock-string-face) 8733 8760 (face font-lock-constant-face) 8760 8761 (face font-lock-string-face) 8761 8771 nil 8771 8772 (face font-lock-string-face) 8772 8805 (face font-lock-constant-face) 8805 8806 (face font-lock-string-face) 8806 8816 nil 8816 8817 (face font-lock-string-face) 8817 8849 (face font-lock-constant-face) 8849 8850 (face font-lock-string-face) 8850 8860 nil 8860 8861 (face font-lock-string-face) 8861 8892 (face font-lock-constant-face) 8892 8893 (face font-lock-string-face) 8893 8903 nil 8903 8904 (face font-lock-string-face) 8904 8934 (face font-lock-constant-face) 8934 8935 (face font-lock-string-face) 8935 8945 nil 8945 8946 (face font-lock-string-face) 8946 8978 (face font-lock-constant-face) 8978 8979 (face font-lock-string-face) 8979 8989 nil 8989 8990 (face font-lock-string-face) 8990 9021 (face font-lock-constant-face) 9021 9022 (face font-lock-string-face) 9022 9032 nil 9032 9033 (face font-lock-string-face) 9033 9063 (face font-lock-constant-face) 9063 9064 (face font-lock-string-face) 9064 9074 nil 9074 9075 (face font-lock-string-face) 9075 9104 (face font-lock-constant-face) 9104 9105 (face font-lock-string-face) 9105 9115 nil 9115 9116 (face font-lock-string-face) 9116 9158 (face font-lock-constant-face) 9158 9159 (face font-lock-string-face) 9159 9169 nil 9169 9170 (face font-lock-string-face) 9170 9211 (face font-lock-constant-face) 9211 9212 (face font-lock-string-face) 9212 9222 nil 9222 9223 (face font-lock-string-face) 9223 9272 (face font-lock-constant-face) 9272 9273 (face font-lock-string-face) 9273 9283 nil 9283 9284 (face font-lock-string-face) 9284 9332 (face font-lock-constant-face) 9332 9333 (face font-lock-string-face) 9333 9343 nil 9343 9344 (face font-lock-string-face) 9344 9388 (face font-lock-constant-face) 9388 9389 (face font-lock-string-face) 9389 9399 nil 9399 9400 (face font-lock-string-face) 9400 9445 (face font-lock-constant-face) 9445 9446 (face font-lock-string-face) 9446 9456 nil 9456 9457 (face font-lock-string-face) 9457 9507 (face font-lock-constant-face) 9507 9508 (face font-lock-string-face) 9508 9518 nil 9518 9519 (face font-lock-string-face) 9519 9570 (face font-lock-constant-face) 9570 9571 (face font-lock-string-face) 9571 9581 nil 9581 9582 (face font-lock-string-face) 9582 9611 (face font-lock-constant-face) 9611 9612 (face font-lock-string-face) 9612 9622 nil 9622 9623 (face font-lock-string-face) 9623 9659 (face font-lock-constant-face) 9659 9660 (face font-lock-string-face) 9660 9670 nil 9670 9671 (face font-lock-string-face) 9671 9714 (face font-lock-constant-face) 9714 9715 (face font-lock-string-face) 9715 9725 nil 9725 9726 (face font-lock-string-face) 9726 9768 (face font-lock-constant-face) 9768 9769 (face font-lock-string-face) 9769 9779 nil 9779 9780 (face font-lock-string-face) 9780 9816 (face font-lock-constant-face) 9816 9817 (face font-lock-string-face) 9817 9827 nil 9827 9828 (face font-lock-string-face) 9828 9863 (face font-lock-constant-face) 9863 9864 (face font-lock-string-face) 9864 9874 nil 9874 9875 (face font-lock-string-face) 9875 9910 (face font-lock-constant-face) 9910 9911 (face font-lock-string-face) 9911 9921 nil 9921 9922 (face font-lock-string-face) 9922 9958 (face font-lock-constant-face) 9958 9959 (face font-lock-string-face) 9959 9969 nil 9969 9970 (face font-lock-string-face) 9970 10005 (face font-lock-constant-face) 10005 10006 (face font-lock-string-face) 10006 10016 nil 10016 10017 (face font-lock-string-face) 10017 10050 (face font-lock-constant-face) 10050 10051 (face font-lock-string-face) 10051 10061 nil 10061 10062 (face font-lock-string-face) 10062 10094 (face font-lock-constant-face) 10094 10095 (face font-lock-string-face) 10095 10105 nil 10105 10106 (face font-lock-string-face) 10106 10150 (face font-lock-constant-face) 10150 10151 (face font-lock-string-face) 10151 10161 nil 10161 10162 (face font-lock-string-face) 10162 10198 (face font-lock-constant-face) 10198 10199 (face font-lock-string-face) 10199 10209 nil 10209 10210 (face font-lock-string-face) 10210 10245 (face font-lock-constant-face) 10245 10246 (face font-lock-string-face) 10246 10256 nil 10256 10257 (face font-lock-string-face) 10257 10296 (face font-lock-constant-face) 10296 10297 (face font-lock-string-face) 10297 10307 nil 10307 10308 (face font-lock-string-face) 10308 10346 (face font-lock-constant-face) 10346 10347 (face font-lock-string-face) 10347 10357 nil 10357 10358 (face font-lock-string-face) 10358 10403 (face font-lock-constant-face) 10403 10404 (face font-lock-string-face) 10404 10414 nil 10414 10415 (face font-lock-string-face) 10415 10459 (face font-lock-constant-face) 10459 10460 (face font-lock-string-face) 10460 10470 nil 10470 10471 (face font-lock-string-face) 10471 10487 (face font-lock-constant-face) 10487 10488 (face font-lock-string-face) 10488 10498 nil 10498 10499 (face font-lock-string-face) 10499 10514 (face font-lock-constant-face) 10514 10515 (face font-lock-string-face) 10515 10525 nil 10525 10526 (face font-lock-string-face) 10526 10559 (face font-lock-constant-face) 10559 10560 (face font-lock-string-face) 10560 10570 nil 10570 10571 (face font-lock-string-face) 10571 10603 (face font-lock-constant-face) 10603 10604 (face font-lock-string-face) 10604 10614 nil 10614 10615 (face font-lock-string-face) 10615 10636 (face font-lock-constant-face) 10636 10637 (face font-lock-string-face) 10637 10647 nil 10647 10648 (face font-lock-string-face) 10648 10675 (face font-lock-constant-face) 10675 10676 (face font-lock-string-face) 10676 10686 nil 10686 10687 (face font-lock-string-face) 10687 10713 (face font-lock-constant-face) 10713 10714 (face font-lock-string-face) 10714 10724 nil 10724 10725 (face font-lock-string-face) 10725 10755 (face font-lock-constant-face) 10755 10756 (face font-lock-string-face) 10756 10766 nil 10766 10767 (face font-lock-string-face) 10767 10796 (face font-lock-constant-face) 10796 10797 (face font-lock-string-face) 10797 10807 nil 10807 10808 (face font-lock-string-face) 10808 10845 (face font-lock-constant-face) 10845 10846 (face font-lock-string-face) 10846 10856 nil 10856 10857 (face font-lock-string-face) 10857 10893 (face font-lock-constant-face) 10893 10894 (face font-lock-string-face) 10894 10904 nil 10904 10905 (face font-lock-string-face) 10905 10929 (face font-lock-constant-face) 10929 10930 (face font-lock-string-face) 10930 10940 nil 10940 10941 (face font-lock-string-face) 10941 10964 (face font-lock-constant-face) 10964 10965 (face font-lock-string-face) 10965 10975 nil 10975 10976 (face font-lock-string-face) 10976 10995 (face font-lock-constant-face) 10995 10996 (face font-lock-string-face) 10996 11006 nil 11006 11007 (face font-lock-string-face) 11007 11025 (face font-lock-constant-face) 11025 11026 (face font-lock-string-face) 11026 11036 nil 11036 11037 (face font-lock-string-face) 11037 11063 (face font-lock-constant-face) 11063 11064 (face font-lock-string-face) 11064 11074 nil 11074 11075 (face font-lock-string-face) 11075 11100 (face font-lock-constant-face) 11100 11101 (face font-lock-string-face) 11101 11111 nil 11111 11112 (face font-lock-string-face) 11112 11138 (face font-lock-constant-face) 11138 11139 (face font-lock-string-face) 11139 11149 nil 11149 11150 (face font-lock-string-face) 11150 11175 (face font-lock-constant-face) 11175 11176 (face font-lock-string-face) 11176 11193 nil 11193 11194 (face font-lock-string-face) 11194 11219 (face font-lock-keyword-face) 11219 11220 (face font-lock-string-face) 11220 11232 nil 11232 11233 (face font-lock-string-face) 11233 11245 (face font-lock-keyword-face) 11245 11246 (face font-lock-string-face) 11246 11260 nil 11260 11261 (face font-lock-string-face) 11261 11263 (face font-lock-constant-face) 11263 11264 (face font-lock-string-face) 11264 11292 nil 11292 11293 (face font-lock-string-face) 11293 11303 (face font-lock-keyword-face) 11303 11304 (face font-lock-string-face) 11304 11316 nil 11316 11381 (face font-lock-comment-face) 11381 11389 nil 11389 11439 (face font-lock-comment-face) 11439 11448 nil 11448 11449 (face font-lock-string-face) 11449 11464 (face font-lock-variable-name-face) 11464 11465 (face font-lock-string-face) 11465 11479 nil 11479 11480 (face font-lock-string-face) 11480 11492 (face font-lock-keyword-face) 11492 11493 (face font-lock-string-face) 11493 11509 nil 11509 11510 (face font-lock-string-face) 11510 11549 (face font-lock-function-name-face) 11549 11550 (face font-lock-string-face) 11550 11586 nil 11586 11587 (face font-lock-string-face) 11587 11602 (face font-lock-variable-name-face) 11602 11603 (face font-lock-string-face) 11603 11617 nil 11617 11618 (face font-lock-string-face) 11618 11626 (face font-lock-keyword-face) 11626 11627 (face font-lock-string-face) 11627 11643 nil 11643 11644 (face font-lock-string-face) 11644 11663 (face font-lock-constant-face) 11663 11664 (face font-lock-string-face) 11664 11678 nil 11678 11679 (face font-lock-string-face) 11679 11702 (face font-lock-constant-face) 11702 11703 (face font-lock-string-face) 11703 11717 nil 11717 11718 (face font-lock-string-face) 11718 11740 (face font-lock-constant-face) 11740 11741 (face font-lock-string-face) 11741 11755 nil 11755 11756 (face font-lock-string-face) 11756 11779 (face font-lock-constant-face) 11779 11780 (face font-lock-string-face) 11780 11794 nil 11794 11795 (face font-lock-string-face) 11795 11817 (face font-lock-constant-face) 11817 11818 (face font-lock-string-face) 11818 11832 nil 11832 11833 (face font-lock-string-face) 11833 11861 (face font-lock-constant-face) 11861 11862 (face font-lock-string-face) 11862 11876 nil 11876 11877 (face font-lock-string-face) 11877 11904 (face font-lock-constant-face) 11904 11905 (face font-lock-string-face) 11905 11919 nil 11919 11920 (face font-lock-string-face) 11920 11950 (face font-lock-constant-face) 11950 11951 (face font-lock-string-face) 11951 11965 nil 11965 11966 (face font-lock-string-face) 11966 11995 (face font-lock-constant-face) 11995 11996 (face font-lock-string-face) 11996 12010 nil 12010 12011 (face font-lock-string-face) 12011 12035 (face font-lock-constant-face) 12035 12036 (face font-lock-string-face) 12036 12050 nil 12050 12051 (face font-lock-string-face) 12051 12074 (face font-lock-constant-face) 12074 12075 (face font-lock-string-face) 12075 12089 nil 12089 12090 (face font-lock-string-face) 12090 12120 (face font-lock-constant-face) 12120 12121 (face font-lock-string-face) 12121 12135 nil 12135 12136 (face font-lock-string-face) 12136 12167 (face font-lock-constant-face) 12167 12168 (face font-lock-string-face) 12168 12182 nil 12182 12183 (face font-lock-string-face) 12183 12213 (face font-lock-constant-face) 12213 12214 (face font-lock-string-face) 12214 12228 nil 12228 12229 (face font-lock-string-face) 12229 12254 (face font-lock-constant-face) 12254 12255 (face font-lock-string-face) 12255 12269 nil 12269 12270 (face font-lock-string-face) 12270 12294 (face font-lock-constant-face) 12294 12295 (face font-lock-string-face) 12295 12309 nil 12309 12310 (face font-lock-string-face) 12310 12352 (face font-lock-constant-face) 12352 12353 (face font-lock-string-face) 12353 12367 nil 12367 12368 (face font-lock-string-face) 12368 12409 (face font-lock-constant-face) 12409 12410 (face font-lock-string-face) 12410 12424 nil 12424 12425 (face font-lock-string-face) 12425 12447 (face font-lock-constant-face) 12447 12448 (face font-lock-string-face) 12448 12462 nil 12462 12463 (face font-lock-string-face) 12463 12484 (face font-lock-constant-face) 12484 12485 (face font-lock-string-face) 12485 12499 nil 12499 12500 (face font-lock-string-face) 12500 12531 (face font-lock-constant-face) 12531 12532 (face font-lock-string-face) 12532 12546 nil 12546 12547 (face font-lock-string-face) 12547 12577 (face font-lock-constant-face) 12577 12578 (face font-lock-string-face) 12578 12592 nil 12592 12593 (face font-lock-string-face) 12593 12621 (face font-lock-constant-face) 12621 12622 (face font-lock-string-face) 12622 12636 nil 12636 12637 (face font-lock-string-face) 12637 12664 (face font-lock-constant-face) 12664 12665 (face font-lock-string-face) 12665 12679 nil 12679 12680 (face font-lock-string-face) 12680 12707 (face font-lock-constant-face) 12707 12708 (face font-lock-string-face) 12708 12722 nil 12722 12723 (face font-lock-string-face) 12723 12749 (face font-lock-constant-face) 12749 12750 (face font-lock-string-face) 12750 12764 nil 12764 12765 (face font-lock-string-face) 12765 12791 (face font-lock-constant-face) 12791 12792 (face font-lock-string-face) 12792 12806 nil 12806 12807 (face font-lock-string-face) 12807 12832 (face font-lock-constant-face) 12832 12833 (face font-lock-string-face) 12833 12868 nil 12868 12937 (face font-lock-comment-face) 12937 12945 nil 12945 13016 (face font-lock-comment-face) 13016 13024 nil 13024 13040 (face font-lock-comment-face) 13040 13049 nil 13049 13050 (face font-lock-string-face) 13050 13065 (face font-lock-variable-name-face) 13065 13066 (face font-lock-string-face) 13066 13080 nil 13080 13081 (face font-lock-string-face) 13081 13089 (face font-lock-keyword-face) 13089 13090 (face font-lock-string-face) 13090 13105 nil 13105 13106 (face font-lock-string-face) 13106 13149 (face font-lock-constant-face) 13149 13150 (face font-lock-string-face) 13150 13175 nil 13175 13176 (face font-lock-string-face) 13176 13183 (face font-lock-keyword-face) 13183 13184 (face font-lock-string-face) 13184 13199 nil 13199 13200 (face font-lock-string-face) 13200 13248 (face font-lock-constant-face) 13248 13249 (face font-lock-string-face) 13249 13274 nil 13274 13275 (face font-lock-string-face) 13275 13288 (face font-lock-keyword-face) 13288 13289 (face font-lock-string-face) 13289 13305 nil 13305 13306 (face font-lock-string-face) 13306 13315 (face font-lock-keyword-face) 13315 13316 (face font-lock-string-face) 13316 13334 nil 13334 13335 (face font-lock-string-face) 13335 13345 (face font-lock-constant-face) 13345 13346 (face font-lock-string-face) 13346 13397 nil 13397 13398 (face font-lock-string-face) 13398 13443 (face font-lock-variable-name-face) 13443 13444 (face font-lock-string-face) 13444 13458 nil 13458 13459 (face font-lock-string-face) 13459 13472 (face font-lock-keyword-face) 13472 13473 (face font-lock-string-face) 13473 13489 nil 13489 13490 (face font-lock-string-face) 13490 13499 (face font-lock-keyword-face) 13499 13500 (face font-lock-string-face) 13500 13518 nil 13518 13519 (face font-lock-string-face) 13519 13527 (face font-lock-constant-face) 13527 13528 (face font-lock-string-face) 13528 13579 nil 13579 13580 (face font-lock-string-face) 13580 13593 (face font-lock-variable-name-face) 13593 13594 (face font-lock-string-face) 13594 13608 nil 13608 13609 (face font-lock-string-face) 13609 13617 (face font-lock-keyword-face) 13617 13618 (face font-lock-string-face) 13618 13623 nil 13623 13624 (face font-lock-string-face) 13624 13631 (face font-lock-constant-face) 13631 13632 (face font-lock-string-face) 13632 13634 nil 13634 13635 (face font-lock-string-face) 13635 13641 (face font-lock-constant-face) 13641 13642 (face font-lock-string-face) 13642 13671 nil 13671 13672 (face font-lock-string-face) 13672 13679 (face font-lock-constant-face) 13679 13680 (face font-lock-string-face) 13680 13682 nil 13682 13683 (face font-lock-string-face) 13683 13703 (face font-lock-constant-face) 13703 13704 (face font-lock-string-face) 13704 13720 nil 13720 13721 (face font-lock-string-face) 13721 13734 (face font-lock-keyword-face) 13734 13735 (face font-lock-string-face) 13735 13751 nil 13751 13752 (face font-lock-string-face) 13752 13761 (face font-lock-keyword-face) 13761 13762 (face font-lock-string-face) 13762 13815 nil 13815 13816 (face font-lock-string-face) 13816 13829 (face font-lock-variable-name-face) 13829 13830 (face font-lock-string-face) 13830 13844 nil 13844 13845 (face font-lock-string-face) 13845 13853 (face font-lock-keyword-face) 13853 13854 (face font-lock-string-face) 13854 13870 nil 13870 13871 (face font-lock-string-face) 13871 13909 (face font-lock-constant-face) 13909 13910 (face font-lock-string-face) 13910 13924 nil 13924 13925 (face font-lock-string-face) 13925 13962 (face font-lock-constant-face) 13962 13963 (face font-lock-string-face) 13963 13999 nil 13999 14000 (face font-lock-string-face) 14000 14011 (face font-lock-variable-name-face) 14011 14012 (face font-lock-string-face) 14012 14026 nil 14026 14027 (face font-lock-string-face) 14027 14036 (face font-lock-keyword-face) 14036 14037 (face font-lock-string-face) 14037 14053 nil 14053 14054 (face font-lock-string-face) 14054 14064 (face font-lock-keyword-face) 14064 14065 (face font-lock-string-face) 14065 14084 nil 14084 14085 (face font-lock-string-face) 14085 14096 (face font-lock-variable-name-face) 14096 14097 (face font-lock-string-face) 14097 14117 nil 14117 14129 (face font-lock-string-face) 14129 14131 nil 14131 14169 (face font-lock-string-face) 14169 14176 (face font-lock-variable-name-face) 14176 14182 (face font-lock-string-face) 14182 14193 (face font-lock-variable-name-face) 14193 14196 (face font-lock-string-face) 14196 14233 nil 14233 14245 (face font-lock-string-face) 14245 14247 nil 14247 14259 (face font-lock-string-face) 14259 14316 nil 14316 14317 (face font-lock-string-face) 14317 14327 (face font-lock-keyword-face) 14327 14328 (face font-lock-string-face) 14328 14345 nil 14345 14346 (face font-lock-string-face) 14346 14359 (face font-lock-variable-name-face) 14359 14360 (face font-lock-string-face) 14360 14378 nil 14378 14379 (face font-lock-string-face) 14379 14385 (face font-lock-keyword-face) 14385 14386 (face font-lock-string-face) 14386 14406 nil 14406 14411 (face font-lock-string-face) 14411 14413 (face font-lock-variable-name-face) 14413 14423 (face font-lock-variable-name-face) 14423 14443 (face font-lock-string-face) 14443 14476 nil 14476 14477 (face font-lock-string-face) 14477 14490 (face font-lock-keyword-face) 14490 14491 (face font-lock-string-face) 14491 14511 nil 14511 14512 (face font-lock-string-face) 14512 14521 (face font-lock-keyword-face) 14521 14522 (face font-lock-string-face) 14522 14544 nil 14544 14545 (face font-lock-string-face) 14545 14549 (face font-lock-constant-face) 14549 14551 (face font-lock-variable-name-face) 14551 14561 (face font-lock-variable-name-face) 14561 14578 (face font-lock-constant-face) 14578 14579 (face font-lock-string-face) 14579 14631 nil 14631 14632 (face font-lock-string-face) 14632 14639 (face font-lock-keyword-face) 14639 14640 (face font-lock-string-face) 14640 14660 nil 14660 14661 (face font-lock-string-face) 14661 14669 (face font-lock-preprocessor-face) 14669 14670 (face font-lock-string-face) 14670 14707 nil 14707 14729 (face font-lock-comment-face) 14729 14743 nil 14743 14744 (face font-lock-string-face) 14744 14752 (face font-lock-keyword-face) 14752 14753 (face font-lock-string-face) 14753 14773 nil 14773 14774 (face font-lock-string-face) 14774 14800 (face font-lock-constant-face) 14800 14801 (face font-lock-string-face) 14801 14819 nil 14819 14820 (face font-lock-string-face) 14820 14845 (face font-lock-constant-face) 14845 14846 (face font-lock-string-face) 14846 14915 nil 14915 14916 (face font-lock-string-face) 14916 14929 (face font-lock-variable-name-face) 14929 14930 (face font-lock-string-face) 14930 14944 nil 14944 14945 (face font-lock-string-face) 14945 14955 (face font-lock-keyword-face) 14955 14956 (face font-lock-string-face) 14956 14973 nil 14973 14974 (face font-lock-string-face) 14974 14993 (face font-lock-variable-name-face) 14993 14994 (face font-lock-string-face) 14994 15012 nil 15012 15013 (face font-lock-string-face) 15013 15019 (face font-lock-keyword-face) 15019 15020 (face font-lock-string-face) 15020 15040 nil 15040 15075 (face font-lock-string-face) 15075 15108 nil 15108 15109 (face font-lock-string-face) 15109 15122 (face font-lock-keyword-face) 15122 15123 (face font-lock-string-face) 15123 15143 nil 15143 15144 (face font-lock-string-face) 15144 15153 (face font-lock-keyword-face) 15153 15154 (face font-lock-string-face) 15154 15176 nil 15176 15177 (face font-lock-string-face) 15177 15215 (face font-lock-constant-face) 15215 15216 (face font-lock-string-face) 15216 15268 nil 15268 15269 (face font-lock-string-face) 15269 15276 (face font-lock-keyword-face) 15276 15277 (face font-lock-string-face) 15277 15297 nil 15297 15298 (face font-lock-string-face) 15298 15312 (face font-lock-preprocessor-face) 15312 15313 (face font-lock-string-face) 15313 15350 nil 15350 15378 (face font-lock-comment-face) 15378 15392 nil 15392 15393 (face font-lock-string-face) 15393 15401 (face font-lock-keyword-face) 15401 15402 (face font-lock-string-face) 15402 15422 nil 15422 15423 (face font-lock-string-face) 15423 15450 (face font-lock-constant-face) 15450 15451 (face font-lock-string-face) 15451 15469 nil 15469 15470 (face font-lock-string-face) 15470 15496 (face font-lock-constant-face) 15496 15497 (face font-lock-string-face) 15497 15566 nil 15566 15567 (face font-lock-string-face) 15567 15600 (face font-lock-variable-name-face) 15600 15601 (face font-lock-string-face) 15601 15615 nil 15615 15663 (face font-lock-comment-face) 15663 15673 nil 15673 15674 (face font-lock-string-face) 15674 15682 (face font-lock-keyword-face) 15682 15683 (face font-lock-string-face) 15683 15699 nil 15699 15700 (face font-lock-string-face) 15700 15743 (face font-lock-constant-face) 15743 15744 (face font-lock-string-face) 15744 15758 nil 15758 15759 (face font-lock-string-face) 15759 15801 (face font-lock-constant-face) 15801 15802 (face font-lock-string-face) 15802 15838 nil 15838 15839 (face font-lock-string-face) 15839 15848 (face font-lock-variable-name-face) 15848 15849 (face font-lock-string-face) 15849 15863 nil 15863 15864 (face font-lock-string-face) 15864 15877 (face font-lock-keyword-face) 15877 15878 (face font-lock-string-face) 15878 15894 nil 15894 15895 (face font-lock-string-face) 15895 15904 (face font-lock-keyword-face) 15904 15905 (face font-lock-string-face) 15905 15923 nil 15923 15924 (face font-lock-string-face) 15924 15980 (face font-lock-constant-face) 15980 15981 (face font-lock-string-face) 15981 15997 nil 15997 15998 (face font-lock-string-face) 15998 16057 (face font-lock-constant-face) 16057 16058 (face font-lock-string-face) 16058 16074 nil 16074 16075 (face font-lock-string-face) 16075 16131 (face font-lock-constant-face) 16131 16132 (face font-lock-string-face) 16132 16148 nil 16148 16149 (face font-lock-string-face) 16149 16205 (face font-lock-constant-face) 16205 16206 (face font-lock-string-face) 16206 16222 nil 16222 16223 (face font-lock-string-face) 16223 16275 (face font-lock-constant-face) 16275 16276 (face font-lock-string-face) 16276 16327 nil 16327 16328 (face font-lock-string-face) 16328 16337 (face font-lock-variable-name-face) 16337 16338 (face font-lock-string-face) 16338 16352 nil 16352 16353 (face font-lock-string-face) 16353 16361 (face font-lock-keyword-face) 16361 16362 (face font-lock-string-face) 16362 16378 nil 16378 16379 (face font-lock-string-face) 16379 16406 (face font-lock-constant-face) 16406 16407 (face font-lock-string-face) 16407 16421 nil 16421 16422 (face font-lock-string-face) 16422 16448 (face font-lock-constant-face) 16448 16449 (face font-lock-string-face) 16449 16463 nil 16463 16464 (face font-lock-string-face) 16464 16507 (face font-lock-constant-face) 16507 16508 (face font-lock-string-face) 16508 16522 nil 16522 16523 (face font-lock-string-face) 16523 16565 (face font-lock-constant-face) 16565 16566 (face font-lock-string-face) 16566 16602 nil 16602 16603 (face font-lock-string-face) 16603 16646 (face font-lock-variable-name-face) 16646 16647 (face font-lock-string-face) 16647 16661 nil 16661 16662 (face font-lock-string-face) 16662 16669 (face font-lock-keyword-face) 16669 16670 (face font-lock-string-face) 16670 16686 nil 16686 16687 (face font-lock-string-face) 16687 16697 (face font-lock-constant-face) 16697 16698 (face font-lock-string-face) 16698 16712 nil 16712 16713 (face font-lock-string-face) 16713 16722 (face font-lock-constant-face) 16722 16723 (face font-lock-string-face) 16723 16737 nil 16737 16738 (face font-lock-string-face) 16738 16760 (face font-lock-constant-face) 16760 16761 (face font-lock-string-face) 16761 16775 nil 16775 16776 (face font-lock-string-face) 16776 16797 (face font-lock-constant-face) 16797 16798 (face font-lock-string-face) 16798 16812 nil 16812 16813 (face font-lock-string-face) 16813 16830 (face font-lock-constant-face) 16830 16831 (face font-lock-string-face) 16831 16845 nil 16845 16846 (face font-lock-string-face) 16846 16862 (face font-lock-constant-face) 16862 16863 (face font-lock-string-face) 16863 16877 nil 16877 16878 (face font-lock-string-face) 16878 16889 (face font-lock-constant-face) 16889 16890 (face font-lock-string-face) 16890 16904 nil 16904 16905 (face font-lock-string-face) 16905 16915 (face font-lock-constant-face) 16915 16916 (face font-lock-string-face) 16916 16930 nil 16930 16931 (face font-lock-string-face) 16931 16955 (face font-lock-constant-face) 16955 16956 (face font-lock-string-face) 16956 16970 nil 16970 16971 (face font-lock-string-face) 16971 16994 (face font-lock-constant-face) 16994 16995 (face font-lock-string-face) 16995 17009 nil 17009 17010 (face font-lock-string-face) 17010 17034 (face font-lock-constant-face) 17034 17035 (face font-lock-string-face) 17035 17049 nil 17049 17050 (face font-lock-string-face) 17050 17073 (face font-lock-constant-face) 17073 17074 (face font-lock-string-face) 17074 17088 nil 17088 17089 (face font-lock-string-face) 17089 17114 (face font-lock-constant-face) 17114 17115 (face font-lock-string-face) 17115 17129 nil 17129 17130 (face font-lock-string-face) 17130 17154 (face font-lock-constant-face) 17154 17155 (face font-lock-string-face) 17155 17210 nil 17210 17211 (face font-lock-string-face) 17211 17222 (face font-lock-keyword-face) 17222 17223 (face font-lock-string-face) 17223 17225 nil 17225 17226 (face font-lock-string-face) 17226 17237 (face font-lock-function-name-face) 17237 17238 (face font-lock-string-face) 17238 17246 nil 17246 17247 (face font-lock-string-face) 17247 17251 (face font-lock-keyword-face) 17251 17252 (face font-lock-string-face) 17252 17254 nil 17254 17255 (face font-lock-string-face) 17255 17269 (face font-lock-type-face) 17269 17270 (face font-lock-string-face) 17270 17278 nil 17278 17279 (face font-lock-string-face) 17279 17291 (face font-lock-keyword-face) 17291 17292 (face font-lock-string-face) 17292 17304 nil 17304 17305 (face font-lock-string-face) 17305 17307 (face font-lock-constant-face) 17307 17308 (face font-lock-string-face) 17308 17325 nil 17325 17326 (face font-lock-string-face) 17326 17336 (face font-lock-keyword-face) 17336 17337 (face font-lock-string-face) 17337 17350 nil 17350 17351 (face font-lock-string-face) 17351 17371 (face font-lock-variable-name-face) 17371 17372 (face font-lock-string-face) 17372 17386 nil 17386 17387 (face font-lock-string-face) 17387 17404 (face font-lock-keyword-face) 17404 17405 (face font-lock-string-face) 17405 17423 nil 17423 17424 (face font-lock-string-face) 17424 17442 (face font-lock-variable-name-face) 17442 17443 (face font-lock-string-face) 17443 17461 nil 17461 17462 (face font-lock-string-face) 17462 17469 (face font-lock-keyword-face) 17469 17470 (face font-lock-string-face) 17470 17474 nil 17474 17498 (face font-lock-string-face) 17498 17553 nil 17553 17554 (face font-lock-string-face) 17554 17599 (face font-lock-variable-name-face) 17599 17600 (face font-lock-string-face) 17600 17614 nil 17614 17615 (face font-lock-string-face) 17615 17627 (face font-lock-keyword-face) 17627 17628 (face font-lock-string-face) 17628 17644 nil 17644 17645 (face font-lock-string-face) 17645 17665 (face font-lock-function-name-face) 17665 17666 (face font-lock-string-face) 17666 17703 nil 17703 17704 (face font-lock-string-face) 17704 17724 (face font-lock-variable-name-face) 17724 17725 (face font-lock-string-face) 17725 17739 nil 17739 17740 (face font-lock-string-face) 17740 17752 (face font-lock-keyword-face) 17752 17753 (face font-lock-string-face) 17753 17769 nil 17769 17770 (face font-lock-string-face) 17770 17790 (face font-lock-function-name-face) 17790 17791 (face font-lock-string-face) 17791 17833 nil 17833 17834 (face font-lock-string-face) 17834 17841 (face font-lock-keyword-face) 17841 17842 (face font-lock-string-face) 17842 17854 nil 17854 17855 (face font-lock-string-face) 17855 17874 (face font-lock-constant-face) 17874 17875 (face font-lock-string-face) 17875 17885 nil 17885 17886 (face font-lock-string-face) 17886 17904 (face font-lock-constant-face) 17904 17905 (face font-lock-string-face) 17905 17935 nil 17935 17936 (face font-lock-string-face) 17936 17947 (face font-lock-keyword-face) 17947 17948 (face font-lock-string-face) 17948 17950 nil 17950 17951 (face font-lock-string-face) 17951 17971 (face font-lock-function-name-face) 17971 17972 (face font-lock-string-face) 17972 17980 nil 17980 17981 (face font-lock-string-face) 17981 17985 (face font-lock-keyword-face) 17985 17986 (face font-lock-string-face) 17986 17988 nil 17988 17989 (face font-lock-string-face) 17989 18003 (face font-lock-type-face) 18003 18004 (face font-lock-string-face) 18004 18012 nil 18012 18013 (face font-lock-string-face) 18013 18025 (face font-lock-keyword-face) 18025 18026 (face font-lock-string-face) 18026 18038 nil 18038 18039 (face font-lock-string-face) 18039 18041 (face font-lock-constant-face) 18041 18042 (face font-lock-string-face) 18042 18059 nil 18059 18060 (face font-lock-string-face) 18060 18067 (face font-lock-keyword-face) 18067 18068 (face font-lock-string-face) 18068 18080 nil 18080 18081 (face font-lock-string-face) 18081 18114 (face font-lock-constant-face) 18114 18115 (face font-lock-string-face) 18115 18125 nil 18125 18126 (face font-lock-string-face) 18126 18162 (face font-lock-constant-face) 18162 18163 (face font-lock-string-face) 18163 18173 nil 18173 18174 (face font-lock-string-face) 18174 18212 (face font-lock-constant-face) 18212 18213 (face font-lock-string-face) 18213 18223 nil 18223 18224 (face font-lock-string-face) 18224 18261 (face font-lock-constant-face) 18261 18262 (face font-lock-string-face) 18262 18272 nil 18272 18273 (face font-lock-string-face) 18273 18311 (face font-lock-constant-face) 18311 18312 (face font-lock-string-face) 18312 18322 nil 18322 18323 (face font-lock-string-face) 18323 18356 (face font-lock-constant-face) 18356 18357 (face font-lock-string-face) 18357 18367 nil 18367 18368 (face font-lock-string-face) 18368 18403 (face font-lock-constant-face) 18403 18404 (face font-lock-string-face) 18404 18414 nil 18414 18415 (face font-lock-string-face) 18415 18451 (face font-lock-constant-face) 18451 18452 (face font-lock-string-face) 18452 18462 nil 18462 18463 (face font-lock-string-face) 18463 18499 (face font-lock-constant-face) 18499 18500 (face font-lock-string-face) 18500 18510 nil 18510 18511 (face font-lock-string-face) 18511 18547 (face font-lock-constant-face) 18547 18548 (face font-lock-string-face) 18548 18558 nil 18558 18559 (face font-lock-string-face) 18559 18581 (face font-lock-constant-face) 18581 18582 (face font-lock-string-face) 18582 18592 nil 18592 18593 (face font-lock-string-face) 18593 18618 (face font-lock-constant-face) 18618 18619 (face font-lock-string-face) 18619 18629 nil 18629 18630 (face font-lock-string-face) 18630 18657 (face font-lock-constant-face) 18657 18658 (face font-lock-string-face) 18658 18668 nil 18668 18669 (face font-lock-string-face) 18669 18697 (face font-lock-constant-face) 18697 18698 (face font-lock-string-face) 18698 18708 nil 18708 18709 (face font-lock-string-face) 18709 18750 (face font-lock-constant-face) 18750 18751 (face font-lock-string-face) 18751 18761 nil 18761 18762 (face font-lock-string-face) 18762 18803 (face font-lock-constant-face) 18803 18804 (face font-lock-string-face) 18804 18814 nil 18814 18815 (face font-lock-string-face) 18815 18856 (face font-lock-constant-face) 18856 18857 (face font-lock-string-face) 18857 18867 nil 18867 18868 (face font-lock-string-face) 18868 18902 (face font-lock-constant-face) 18902 18903 (face font-lock-string-face) 18903 18913 nil 18913 18914 (face font-lock-string-face) 18914 18948 (face font-lock-constant-face) 18948 18949 (face font-lock-string-face) 18949 18959 nil 18959 18960 (face font-lock-string-face) 18960 18994 (face font-lock-constant-face) 18994 18995 (face font-lock-string-face) 18995 19005 nil 19005 19006 (face font-lock-string-face) 19006 19035 (face font-lock-constant-face) 19035 19036 (face font-lock-string-face) 19036 19046 nil 19046 19047 (face font-lock-string-face) 19047 19075 (face font-lock-constant-face) 19075 19076 (face font-lock-string-face) 19076 19093 nil 19093 19094 (face font-lock-string-face) 19094 19104 (face font-lock-keyword-face) 19104 19105 (face font-lock-string-face) 19105 19118 nil 19118 19119 (face font-lock-string-face) 19119 19139 (face font-lock-variable-name-face) 19139 19140 (face font-lock-string-face) 19140 19154 nil 19154 19155 (face font-lock-string-face) 19155 19172 (face font-lock-keyword-face) 19172 19173 (face font-lock-string-face) 19173 19191 nil 19191 19192 (face font-lock-string-face) 19192 19210 (face font-lock-variable-name-face) 19210 19211 (face font-lock-string-face) 19211 19229 nil 19229 19230 (face font-lock-string-face) 19230 19237 (face font-lock-keyword-face) 19237 19238 (face font-lock-string-face) 19238 19242 nil 19242 19266 (face font-lock-string-face) 19266 19321 nil 19321 19322 (face font-lock-string-face) 19322 19342 (face font-lock-variable-name-face) 19342 19343 (face font-lock-string-face) 19343 19357 nil 19357 19399 (face font-lock-comment-face) 19399 19409 nil 19409 19410 (face font-lock-string-face) 19410 19417 (face font-lock-keyword-face) 19417 19418 (face font-lock-string-face) 19418 19434 nil 19434 19435 (face font-lock-string-face) 19435 19480 (face font-lock-constant-face) 19480 19481 (face font-lock-string-face) 19481 19495 nil 19495 19496 (face font-lock-string-face) 19496 19535 (face font-lock-constant-face) 19535 19536 (face font-lock-string-face) 19536 19573 nil 19573 19574 (face font-lock-string-face) 19574 19623 (face font-lock-variable-name-face) 19623 19624 (face font-lock-string-face) 19624 19638 nil 19638 19639 (face font-lock-string-face) 19639 19645 (face font-lock-keyword-face) 19645 19646 (face font-lock-string-face) 19646 19662 nil 19662 19670 (face font-lock-string-face) 19670 19707 nil 19707 19708 (face font-lock-string-face) 19708 19719 (face font-lock-variable-name-face) 19719 19720 (face font-lock-string-face) 19720 19734 nil 19734 19735 (face font-lock-string-face) 19735 19749 (face font-lock-keyword-face) 19749 19750 (face font-lock-string-face) 19750 19766 nil 19766 19773 (face font-lock-string-face) 19773 19791 nil 19791 19792 (face font-lock-string-face) 19792 19806 (face font-lock-keyword-face) 19806 19807 (face font-lock-string-face) 19807 19827 nil 19827 19890 (face font-lock-comment-face) 19890 19906 nil 19906 19971 (face font-lock-comment-face) 19971 19987 nil 19987 20032 (face font-lock-comment-face) 20032 20048 nil 20048 20072 (face font-lock-string-face) 20072 20074 nil 20074 20077 (face font-lock-string-face) 20077 20080 nil 20080 20086 (face font-lock-comment-face) 20086 20155 nil 20155 20156 (face font-lock-string-face) 20156 20165 (face font-lock-variable-name-face) 20165 20166 (face font-lock-string-face) 20166 20180 nil 20180 20181 (face font-lock-string-face) 20181 20190 (face font-lock-keyword-face) 20190 20191 (face font-lock-string-face) 20191 20207 nil 20207 20208 (face font-lock-string-face) 20208 20218 (face font-lock-variable-name-face) 20218 20219 (face font-lock-string-face) 20219 20237 nil 20237 20246 (face font-lock-string-face) 20246 20262 nil 20262 20270 (face font-lock-string-face) 20270 20286 nil 20286 20298 (face font-lock-string-face) 20298 20314 nil 20314 20322 (face font-lock-string-face) 20322 20374 nil 20374 20375 (face font-lock-string-face) 20375 20384 (face font-lock-variable-name-face) 20384 20385 (face font-lock-string-face) 20385 20399 nil 20399 20400 (face font-lock-string-face) 20400 20409 (face font-lock-keyword-face) 20409 20410 (face font-lock-string-face) 20410 20426 nil 20426 20427 (face font-lock-string-face) 20427 20437 (face font-lock-variable-name-face) 20437 20438 (face font-lock-string-face) 20438 20456 nil 20456 20466 (face font-lock-string-face) 20466 20482 nil 20482 20491 (face font-lock-string-face) 20491 20507 nil 20507 20519 (face font-lock-string-face) 20519 20535 nil 20535 20543 (face font-lock-string-face) 20543 20595 nil 20595 20596 (face font-lock-string-face) 20596 20621 (face font-lock-variable-name-face) 20621 20622 (face font-lock-string-face) 20622 20636 nil 20636 20637 (face font-lock-string-face) 20637 20646 (face font-lock-keyword-face) 20646 20647 (face font-lock-string-face) 20647 20663 nil 20663 20664 (face font-lock-string-face) 20664 20674 (face font-lock-keyword-face) 20674 20675 (face font-lock-string-face) 20675 20695 nil 20695 20696 (face font-lock-string-face) 20696 20715 (face font-lock-variable-name-face) 20715 20716 (face font-lock-string-face) 20716 20736 nil 20736 20748 (face font-lock-string-face) 20748 20770 nil 20770 20780 (face font-lock-string-face) 20780 20800 nil 20800 20807 (face font-lock-string-face) 20807 20827 nil 20827 20839 (face font-lock-string-face) 20839 20859 nil 20859 20867 (face font-lock-string-face) 20867 20923 nil 20923 20935 (face font-lock-string-face) 20935 20957 nil 20957 20972 (face font-lock-string-face) 20972 20992 nil 20992 20999 (face font-lock-string-face) 20999 21019 nil 21019 21026 (face font-lock-string-face) 21026 21046 nil 21046 21058 (face font-lock-string-face) 21058 21078 nil 21078 21086 (face font-lock-string-face) 21086 21180 nil 21180 21181 (face font-lock-string-face) 21181 21190 (face font-lock-keyword-face) 21190 21191 (face font-lock-string-face) 21191 21203 nil 21203 21204 (face font-lock-string-face) 21204 21220 (face font-lock-variable-name-face) 21220 21221 (face font-lock-string-face) 21221 21223 nil 21223 21224 (face font-lock-string-face) 21224 21256 (face font-lock-variable-name-face) 21256 21257 (face font-lock-string-face) 21257 21274 nil 21274 21314 (face font-lock-string-face) 21314 21325 nil 21325 21326 (face font-lock-string-face) 21326 21334 (face font-lock-keyword-face) 21334 21335 (face font-lock-string-face) 21335 21347 nil 21347 21348 (face font-lock-string-face) 21348 21385 (face font-lock-constant-face) 21385 21386 (face font-lock-string-face) 21386 21416 nil 21416 21417 (face font-lock-string-face) 21417 21428 (face font-lock-keyword-face) 21428 21429 (face font-lock-string-face) 21429 21431 nil 21431 21432 (face font-lock-string-face) 21432 21452 (face font-lock-function-name-face) 21452 21453 (face font-lock-string-face) 21453 21461 nil 21461 21462 (face font-lock-string-face) 21462 21466 (face font-lock-keyword-face) 21466 21467 (face font-lock-string-face) 21467 21469 nil 21469 21470 (face font-lock-string-face) 21470 21484 (face font-lock-type-face) 21484 21485 (face font-lock-string-face) 21485 21493 nil 21493 21494 (face font-lock-string-face) 21494 21506 (face font-lock-keyword-face) 21506 21507 (face font-lock-string-face) 21507 21519 nil 21519 21520 (face font-lock-string-face) 21520 21522 (face font-lock-constant-face) 21522 21523 (face font-lock-string-face) 21523 21540 nil 21540 21541 (face font-lock-string-face) 21541 21548 (face font-lock-keyword-face) 21548 21549 (face font-lock-string-face) 21549 21561 nil 21561 21562 (face font-lock-string-face) 21562 21595 (face font-lock-constant-face) 21595 21596 (face font-lock-string-face) 21596 21606 nil 21606 21607 (face font-lock-string-face) 21607 21637 (face font-lock-constant-face) 21637 21638 (face font-lock-string-face) 21638 21648 nil 21648 21649 (face font-lock-string-face) 21649 21682 (face font-lock-constant-face) 21682 21683 (face font-lock-string-face) 21683 21693 nil 21693 21694 (face font-lock-string-face) 21694 21724 (face font-lock-constant-face) 21724 21725 (face font-lock-string-face) 21725 21735 nil 21735 21736 (face font-lock-string-face) 21736 21758 (face font-lock-constant-face) 21758 21759 (face font-lock-string-face) 21759 21769 nil 21769 21770 (face font-lock-string-face) 21770 21795 (face font-lock-constant-face) 21795 21796 (face font-lock-string-face) 21796 21806 nil 21806 21807 (face font-lock-string-face) 21807 21836 (face font-lock-constant-face) 21836 21837 (face font-lock-string-face) 21837 21847 nil 21847 21848 (face font-lock-string-face) 21848 21876 (face font-lock-constant-face) 21876 21877 (face font-lock-string-face) 21877 21907 nil 21907 21908 (face font-lock-string-face) 21908 21919 (face font-lock-keyword-face) 21919 21920 (face font-lock-string-face) 21920 21922 nil 21922 21923 (face font-lock-string-face) 21923 21938 (face font-lock-function-name-face) 21938 21939 (face font-lock-string-face) 21939 21947 nil 21947 21948 (face font-lock-string-face) 21948 21952 (face font-lock-keyword-face) 21952 21953 (face font-lock-string-face) 21953 21955 nil 21955 21956 (face font-lock-string-face) 21956 21966 (face font-lock-type-face) 21966 21967 (face font-lock-string-face) 21967 21975 nil 21975 21976 (face font-lock-string-face) 21976 21988 (face font-lock-keyword-face) 21988 21989 (face font-lock-string-face) 21989 22001 nil 22001 22002 (face font-lock-string-face) 22002 22007 (face font-lock-function-name-face) 22007 22008 (face font-lock-string-face) 22008 22018 nil 22018 22019 (face font-lock-string-face) 22019 22037 (face font-lock-function-name-face) 22037 22038 (face font-lock-string-face) 22038 22048 nil 22048 22049 (face font-lock-string-face) 22049 22060 (face font-lock-function-name-face) 22060 22061 (face font-lock-string-face) 22061 22071 nil 22071 22072 (face font-lock-string-face) 22072 22093 (face font-lock-function-name-face) 22093 22094 (face font-lock-string-face) 22094 22104 nil 22104 22105 (face font-lock-string-face) 22105 22131 (face font-lock-function-name-face) 22131 22132 (face font-lock-string-face) 22132 22142 nil 22142 22143 (face font-lock-string-face) 22143 22177 (face font-lock-function-name-face) 22177 22178 (face font-lock-string-face) 22178 22188 nil 22188 22189 (face font-lock-string-face) 22189 22215 (face font-lock-function-name-face) 22215 22216 (face font-lock-string-face) 22216 22226 nil 22226 22227 (face font-lock-string-face) 22227 22253 (face font-lock-function-name-face) 22253 22254 (face font-lock-string-face) 22254 22264 nil 22264 22265 (face font-lock-string-face) 22265 22280 (face font-lock-function-name-face) 22280 22281 (face font-lock-string-face) 22281 22298 nil 22298 22299 (face font-lock-string-face) 22299 22306 (face font-lock-keyword-face) 22306 22307 (face font-lock-string-face) 22307 22319 nil 22319 22320 (face font-lock-string-face) 22320 22361 (face font-lock-constant-face) 22361 22362 (face font-lock-string-face) 22362 22372 nil 22372 22373 (face font-lock-string-face) 22373 22413 (face font-lock-constant-face) 22413 22414 (face font-lock-string-face) 22414 22424 nil 22424 22425 (face font-lock-string-face) 22425 22461 (face font-lock-constant-face) 22461 22462 (face font-lock-string-face) 22462 22472 nil 22472 22473 (face font-lock-string-face) 22473 22502 (face font-lock-constant-face) 22502 22503 (face font-lock-string-face) 22503 22513 nil 22513 22514 (face font-lock-string-face) 22514 22550 (face font-lock-constant-face) 22550 22551 (face font-lock-string-face) 22551 22561 nil 22561 22562 (face font-lock-string-face) 22562 22610 (face font-lock-constant-face) 22610 22611 (face font-lock-string-face) 22611 22621 nil 22621 22622 (face font-lock-string-face) 22622 22663 (face font-lock-constant-face) 22663 22664 (face font-lock-string-face) 22664 22674 nil 22674 22675 (face font-lock-string-face) 22675 22711 (face font-lock-constant-face) 22711 22712 (face font-lock-string-face) 22712 22722 nil 22722 22723 (face font-lock-string-face) 22723 22757 (face font-lock-constant-face) 22757 22758 (face font-lock-string-face) 22758 22768 nil 22768 22769 (face font-lock-string-face) 22769 22797 (face font-lock-constant-face) 22797 22798 (face font-lock-string-face) 22798 22808 nil 22808 22809 (face font-lock-string-face) 22809 22853 (face font-lock-constant-face) 22853 22854 (face font-lock-string-face) 22854 22864 nil 22864 22865 (face font-lock-string-face) 22865 22900 (face font-lock-constant-face) 22900 22901 (face font-lock-string-face) 22901 22911 nil 22911 22912 (face font-lock-string-face) 22912 22961 (face font-lock-constant-face) 22961 22962 (face font-lock-string-face) 22962 22972 nil 22972 22973 (face font-lock-string-face) 22973 23011 (face font-lock-constant-face) 23011 23012 (face font-lock-string-face) 23012 23022 nil 23022 23023 (face font-lock-string-face) 23023 23055 (face font-lock-constant-face) 23055 23056 (face font-lock-string-face) 23056 23066 nil 23066 23067 (face font-lock-string-face) 23067 23116 (face font-lock-constant-face) 23116 23117 (face font-lock-string-face) 23117 23127 nil 23127 23128 (face font-lock-string-face) 23128 23178 (face font-lock-constant-face) 23178 23179 (face font-lock-string-face) 23179 23189 nil 23189 23190 (face font-lock-string-face) 23190 23228 (face font-lock-constant-face) 23228 23229 (face font-lock-string-face) 23229 23239 nil 23239 23240 (face font-lock-string-face) 23240 23277 (face font-lock-constant-face) 23277 23278 (face font-lock-string-face) 23278 23288 nil 23288 23289 (face font-lock-string-face) 23289 23332 (face font-lock-constant-face) 23332 23333 (face font-lock-string-face) 23333 23343 nil 23343 23344 (face font-lock-string-face) 23344 23368 (face font-lock-constant-face) 23368 23369 (face font-lock-string-face) 23369 23379 nil 23379 23380 (face font-lock-string-face) 23380 23402 (face font-lock-constant-face) 23402 23403 (face font-lock-string-face) 23403 23413 nil 23413 23414 (face font-lock-string-face) 23414 23447 (face font-lock-constant-face) 23447 23448 (face font-lock-string-face) 23448 23458 nil 23458 23459 (face font-lock-string-face) 23459 23487 (face font-lock-constant-face) 23487 23488 (face font-lock-string-face) 23488 23498 nil 23498 23499 (face font-lock-string-face) 23499 23530 (face font-lock-constant-face) 23530 23531 (face font-lock-string-face) 23531 23541 nil 23541 23542 (face font-lock-string-face) 23542 23563 (face font-lock-constant-face) 23563 23564 (face font-lock-string-face) 23564 23574 nil 23574 23575 (face font-lock-string-face) 23575 23609 (face font-lock-constant-face) 23609 23610 (face font-lock-string-face) 23610 23620 nil 23620 23621 (face font-lock-string-face) 23621 23654 (face font-lock-constant-face) 23654 23655 (face font-lock-string-face) 23655 23665 nil 23665 23666 (face font-lock-string-face) 23666 23700 (face font-lock-constant-face) 23700 23701 (face font-lock-string-face) 23701 23711 nil 23711 23712 (face font-lock-string-face) 23712 23753 (face font-lock-constant-face) 23753 23754 (face font-lock-string-face) 23754 23764 nil 23764 23765 (face font-lock-string-face) 23765 23790 (face font-lock-constant-face) 23790 23791 (face font-lock-string-face) 23791 23801 nil 23801 23802 (face font-lock-string-face) 23802 23825 (face font-lock-constant-face) 23825 23826 (face font-lock-string-face) 23826 23836 nil 23836 23837 (face font-lock-string-face) 23837 23862 (face font-lock-constant-face) 23862 23863 (face font-lock-string-face) 23863 23873 nil 23873 23874 (face font-lock-string-face) 23874 23906 (face font-lock-constant-face) 23906 23907 (face font-lock-string-face) 23907 23917 nil 23917 23918 (face font-lock-string-face) 23918 23947 (face font-lock-constant-face) 23947 23948 (face font-lock-string-face) 23948 23958 nil 23958 23959 (face font-lock-string-face) 23959 23981 (face font-lock-constant-face) 23981 23982 (face font-lock-string-face) 23982 23992 nil 23992 23993 (face font-lock-string-face) 23993 24014 (face font-lock-constant-face) 24014 24015 (face font-lock-string-face) 24015 24025 nil 24025 24026 (face font-lock-string-face) 24026 24054 (face font-lock-constant-face) 24054 24055 (face font-lock-string-face) 24055 24065 nil 24065 24066 (face font-lock-string-face) 24066 24093 (face font-lock-constant-face) 24093 24094 (face font-lock-string-face) 24094 24104 nil 24104 24105 (face font-lock-string-face) 24105 24133 (face font-lock-constant-face) 24133 24134 (face font-lock-string-face) 24134 24144 nil 24144 24145 (face font-lock-string-face) 24145 24177 (face font-lock-constant-face) 24177 24178 (face font-lock-string-face) 24178 24188 nil 24188 24189 (face font-lock-string-face) 24189 24221 (face font-lock-constant-face) 24221 24222 (face font-lock-string-face) 24222 24232 nil 24232 24233 (face font-lock-string-face) 24233 24277 (face font-lock-constant-face) 24277 24278 (face font-lock-string-face) 24278 24288 nil 24288 24289 (face font-lock-string-face) 24289 24328 (face font-lock-constant-face) 24328 24329 (face font-lock-string-face) 24329 24339 nil 24339 24340 (face font-lock-string-face) 24340 24379 (face font-lock-constant-face) 24379 24380 (face font-lock-string-face) 24380 24390 nil 24390 24391 (face font-lock-string-face) 24391 24424 (face font-lock-constant-face) 24424 24425 (face font-lock-string-face) 24425 24435 nil 24435 24436 (face font-lock-string-face) 24436 24476 (face font-lock-constant-face) 24476 24477 (face font-lock-string-face) 24477 24487 nil 24487 24488 (face font-lock-string-face) 24488 24521 (face font-lock-constant-face) 24521 24522 (face font-lock-string-face) 24522 24532 nil 24532 24533 (face font-lock-string-face) 24533 24567 (face font-lock-constant-face) 24567 24568 (face font-lock-string-face) 24568 24578 nil 24578 24579 (face font-lock-string-face) 24579 24610 (face font-lock-constant-face) 24610 24611 (face font-lock-string-face) 24611 24621 nil 24621 24622 (face font-lock-string-face) 24622 24673 (face font-lock-constant-face) 24673 24674 (face font-lock-string-face) 24674 24684 nil 24684 24685 (face font-lock-string-face) 24685 24725 (face font-lock-constant-face) 24725 24726 (face font-lock-string-face) 24726 24736 nil 24736 24737 (face font-lock-string-face) 24737 24773 (face font-lock-constant-face) 24773 24774 (face font-lock-string-face) 24774 24784 nil 24784 24785 (face font-lock-string-face) 24785 24821 (face font-lock-constant-face) 24821 24822 (face font-lock-string-face) 24822 24832 nil 24832 24833 (face font-lock-string-face) 24833 24874 (face font-lock-constant-face) 24874 24875 (face font-lock-string-face) 24875 24885 nil 24885 24886 (face font-lock-string-face) 24886 24926 (face font-lock-constant-face) 24926 24927 (face font-lock-string-face) 24927 24937 nil 24937 24938 (face font-lock-string-face) 24938 24977 (face font-lock-constant-face) 24977 24978 (face font-lock-string-face) 24978 24988 nil 24988 24989 (face font-lock-string-face) 24989 25035 (face font-lock-constant-face) 25035 25036 (face font-lock-string-face) 25036 25046 nil 25046 25047 (face font-lock-string-face) 25047 25070 (face font-lock-constant-face) 25070 25071 (face font-lock-string-face) 25071 25081 nil 25081 25082 (face font-lock-string-face) 25082 25104 (face font-lock-constant-face) 25104 25105 (face font-lock-string-face) 25105 25115 nil 25115 25116 (face font-lock-string-face) 25116 25152 (face font-lock-constant-face) 25152 25153 (face font-lock-string-face) 25153 25163 nil 25163 25164 (face font-lock-string-face) 25164 25210 (face font-lock-constant-face) 25210 25211 (face font-lock-string-face) 25211 25221 nil 25221 25222 (face font-lock-string-face) 25222 25250 (face font-lock-constant-face) 25250 25251 (face font-lock-string-face) 25251 25268 nil 25268 25269 (face font-lock-string-face) 25269 25279 (face font-lock-keyword-face) 25279 25280 (face font-lock-string-face) 25280 25293 nil 25293 25294 (face font-lock-string-face) 25294 25319 (face font-lock-variable-name-face) 25319 25320 (face font-lock-string-face) 25320 25334 nil 25334 25335 (face font-lock-string-face) 25335 25345 (face font-lock-keyword-face) 25345 25346 (face font-lock-string-face) 25346 25363 nil 25363 25364 (face font-lock-string-face) 25364 25385 (face font-lock-variable-name-face) 25385 25386 (face font-lock-string-face) 25386 25404 nil 25404 25405 (face font-lock-string-face) 25405 25417 (face font-lock-keyword-face) 25417 25418 (face font-lock-string-face) 25418 25438 nil 25438 25439 (face font-lock-string-face) 25439 25480 (face font-lock-function-name-face) 25480 25481 (face font-lock-string-face) 25481 25550 nil 25550 25551 (face font-lock-string-face) 25551 25566 (face font-lock-variable-name-face) 25566 25567 (face font-lock-string-face) 25567 25581 nil 25581 25582 (face font-lock-string-face) 25582 25594 (face font-lock-keyword-face) 25594 25595 (face font-lock-string-face) 25595 25611 nil 25611 25612 (face font-lock-string-face) 25612 25651 (face font-lock-function-name-face) 25651 25652 (face font-lock-string-face) 25652 25688 nil 25688 25689 (face font-lock-string-face) 25689 25704 (face font-lock-variable-name-face) 25704 25705 (face font-lock-string-face) 25705 25719 nil 25719 25720 (face font-lock-string-face) 25720 25728 (face font-lock-keyword-face) 25728 25729 (face font-lock-string-face) 25729 25745 nil 25745 25746 (face font-lock-string-face) 25746 25782 (face font-lock-constant-face) 25782 25783 (face font-lock-string-face) 25783 25797 nil 25797 25798 (face font-lock-string-face) 25798 25820 (face font-lock-constant-face) 25820 25821 (face font-lock-string-face) 25821 25835 nil 25835 25836 (face font-lock-string-face) 25836 25857 (face font-lock-constant-face) 25857 25858 (face font-lock-string-face) 25858 25872 nil 25872 25873 (face font-lock-string-face) 25873 25905 (face font-lock-constant-face) 25905 25906 (face font-lock-string-face) 25906 25920 nil 25920 25921 (face font-lock-string-face) 25921 25961 (face font-lock-constant-face) 25961 25962 (face font-lock-string-face) 25962 25976 nil 25976 25977 (face font-lock-string-face) 25977 26016 (face font-lock-constant-face) 26016 26017 (face font-lock-string-face) 26017 26031 nil 26031 26032 (face font-lock-string-face) 26032 26065 (face font-lock-constant-face) 26065 26066 (face font-lock-string-face) 26066 26080 nil 26080 26081 (face font-lock-string-face) 26081 26115 (face font-lock-constant-face) 26115 26116 (face font-lock-string-face) 26116 26130 nil 26130 26131 (face font-lock-string-face) 26131 26162 (face font-lock-constant-face) 26162 26163 (face font-lock-string-face) 26163 26177 nil 26177 26178 (face font-lock-string-face) 26178 26229 (face font-lock-constant-face) 26229 26230 (face font-lock-string-face) 26230 26244 nil 26244 26245 (face font-lock-string-face) 26245 26285 (face font-lock-constant-face) 26285 26286 (face font-lock-string-face) 26286 26300 nil 26300 26301 (face font-lock-string-face) 26301 26337 (face font-lock-constant-face) 26337 26338 (face font-lock-string-face) 26338 26352 nil 26352 26353 (face font-lock-string-face) 26353 26394 (face font-lock-constant-face) 26394 26395 (face font-lock-string-face) 26395 26409 nil 26409 26410 (face font-lock-string-face) 26410 26443 (face font-lock-constant-face) 26443 26444 (face font-lock-string-face) 26444 26458 nil 26458 26459 (face font-lock-string-face) 26459 26495 (face font-lock-constant-face) 26495 26496 (face font-lock-string-face) 26496 26532 nil 26532 26533 (face font-lock-string-face) 26533 26546 (face font-lock-variable-name-face) 26546 26547 (face font-lock-string-face) 26547 26561 nil 26561 26562 (face font-lock-string-face) 26562 26572 (face font-lock-keyword-face) 26572 26573 (face font-lock-string-face) 26573 26590 nil 26590 26591 (face font-lock-string-face) 26591 26604 (face font-lock-variable-name-face) 26604 26605 (face font-lock-string-face) 26605 26623 nil 26623 26624 (face font-lock-string-face) 26624 26631 (face font-lock-keyword-face) 26631 26632 (face font-lock-string-face) 26632 26652 nil 26652 26653 (face font-lock-string-face) 26653 26688 (face font-lock-constant-face) 26688 26689 (face font-lock-string-face) 26689 26722 nil 26722 26723 (face font-lock-string-face) 26723 26730 (face font-lock-keyword-face) 26730 26731 (face font-lock-string-face) 26731 26751 nil 26751 26752 (face font-lock-string-face) 26752 26760 (face font-lock-preprocessor-face) 26760 26761 (face font-lock-string-face) 26761 26831 nil 26831 26832 (face font-lock-string-face) 26832 26873 (face font-lock-variable-name-face) 26873 26874 (face font-lock-string-face) 26874 26888 nil 26888 26889 (face font-lock-string-face) 26889 26896 (face font-lock-keyword-face) 26896 26897 (face font-lock-string-face) 26897 26913 nil 26913 26914 (face font-lock-string-face) 26914 26954 (face font-lock-constant-face) 26954 26955 (face font-lock-string-face) 26955 26991 nil 26991 26992 (face font-lock-string-face) 26992 27035 (face font-lock-variable-name-face) 27035 27036 (face font-lock-string-face) 27036 27050 nil 27050 27051 (face font-lock-string-face) 27051 27058 (face font-lock-keyword-face) 27058 27059 (face font-lock-string-face) 27059 27075 nil 27075 27076 (face font-lock-string-face) 27076 27095 (face font-lock-constant-face) 27095 27096 (face font-lock-string-face) 27096 27110 nil 27110 27111 (face font-lock-string-face) 27111 27137 (face font-lock-constant-face) 27137 27138 (face font-lock-string-face) 27138 27152 nil 27152 27153 (face font-lock-string-face) 27153 27186 (face font-lock-constant-face) 27186 27187 (face font-lock-string-face) 27187 27201 nil 27201 27202 (face font-lock-string-face) 27202 27235 (face font-lock-constant-face) 27235 27236 (face font-lock-string-face) 27236 27291 nil 27291 27292 (face font-lock-string-face) 27292 27303 (face font-lock-keyword-face) 27303 27304 (face font-lock-string-face) 27304 27306 nil 27306 27307 (face font-lock-string-face) 27307 27325 (face font-lock-function-name-face) 27325 27326 (face font-lock-string-face) 27326 27334 nil 27334 27335 (face font-lock-string-face) 27335 27339 (face font-lock-keyword-face) 27339 27340 (face font-lock-string-face) 27340 27342 nil 27342 27343 (face font-lock-string-face) 27343 27357 (face font-lock-type-face) 27357 27358 (face font-lock-string-face) 27358 27366 nil 27366 27367 (face font-lock-string-face) 27367 27379 (face font-lock-keyword-face) 27379 27380 (face font-lock-string-face) 27380 27392 nil 27392 27393 (face font-lock-string-face) 27393 27398 (face font-lock-function-name-face) 27398 27399 (face font-lock-string-face) 27399 27409 nil 27409 27410 (face font-lock-string-face) 27410 27431 (face font-lock-function-name-face) 27431 27432 (face font-lock-string-face) 27432 27442 nil 27442 27443 (face font-lock-string-face) 27443 27469 (face font-lock-function-name-face) 27469 27470 (face font-lock-string-face) 27470 27480 nil 27480 27481 (face font-lock-string-face) 27481 27507 (face font-lock-function-name-face) 27507 27508 (face font-lock-string-face) 27508 27525 nil 27525 27526 (face font-lock-string-face) 27526 27533 (face font-lock-keyword-face) 27533 27534 (face font-lock-string-face) 27534 27546 nil 27546 27547 (face font-lock-string-face) 27547 27591 (face font-lock-constant-face) 27591 27592 (face font-lock-string-face) 27592 27602 nil 27602 27603 (face font-lock-string-face) 27603 27646 (face font-lock-constant-face) 27646 27647 (face font-lock-string-face) 27647 27657 nil 27657 27658 (face font-lock-string-face) 27658 27679 (face font-lock-constant-face) 27679 27680 (face font-lock-string-face) 27680 27690 nil 27690 27691 (face font-lock-string-face) 27691 27711 (face font-lock-constant-face) 27711 27712 (face font-lock-string-face) 27712 27722 nil 27722 27723 (face font-lock-string-face) 27723 27752 (face font-lock-constant-face) 27752 27753 (face font-lock-string-face) 27753 27763 nil 27763 27764 (face font-lock-string-face) 27764 27792 (face font-lock-constant-face) 27792 27793 (face font-lock-string-face) 27793 27803 nil 27803 27804 (face font-lock-string-face) 27804 27829 (face font-lock-constant-face) 27829 27830 (face font-lock-string-face) 27830 27840 nil 27840 27841 (face font-lock-string-face) 27841 27865 (face font-lock-constant-face) 27865 27866 (face font-lock-string-face) 27866 27876 nil 27876 27877 (face font-lock-string-face) 27877 27901 (face font-lock-constant-face) 27901 27902 (face font-lock-string-face) 27902 27912 nil 27912 27913 (face font-lock-string-face) 27913 27936 (face font-lock-constant-face) 27936 27937 (face font-lock-string-face) 27937 27947 nil 27947 27948 (face font-lock-string-face) 27948 27968 (face font-lock-constant-face) 27968 27969 (face font-lock-string-face) 27969 27979 nil 27979 27980 (face font-lock-string-face) 27980 27999 (face font-lock-constant-face) 27999 28000 (face font-lock-string-face) 28000 28030 nil 28030 28031 (face font-lock-string-face) 28031 28042 (face font-lock-keyword-face) 28042 28043 (face font-lock-string-face) 28043 28045 nil 28045 28046 (face font-lock-string-face) 28046 28058 (face font-lock-function-name-face) 28058 28059 (face font-lock-string-face) 28059 28067 nil 28067 28068 (face font-lock-string-face) 28068 28072 (face font-lock-keyword-face) 28072 28073 (face font-lock-string-face) 28073 28075 nil 28075 28076 (face font-lock-string-face) 28076 28086 (face font-lock-type-face) 28086 28087 (face font-lock-string-face) 28087 28095 nil 28095 28096 (face font-lock-string-face) 28096 28108 (face font-lock-keyword-face) 28108 28109 (face font-lock-string-face) 28109 28121 nil 28121 28122 (face font-lock-string-face) 28122 28127 (face font-lock-function-name-face) 28127 28128 (face font-lock-string-face) 28128 28138 nil 28138 28139 (face font-lock-string-face) 28139 28150 (face font-lock-function-name-face) 28150 28151 (face font-lock-string-face) 28151 28161 nil 28161 28162 (face font-lock-string-face) 28162 28183 (face font-lock-function-name-face) 28183 28184 (face font-lock-string-face) 28184 28194 nil 28194 28195 (face font-lock-string-face) 28195 28216 (face font-lock-function-name-face) 28216 28217 (face font-lock-string-face) 28217 28234 nil 28234 28235 (face font-lock-string-face) 28235 28242 (face font-lock-keyword-face) 28242 28243 (face font-lock-string-face) 28243 28255 nil 28255 28256 (face font-lock-string-face) 28256 28290 (face font-lock-constant-face) 28290 28291 (face font-lock-string-face) 28291 28321 nil 28321 28322 (face font-lock-string-face) 28322 28333 (face font-lock-keyword-face) 28333 28334 (face font-lock-string-face) 28334 28336 nil 28336 28337 (face font-lock-string-face) 28337 28349 (face font-lock-function-name-face) 28349 28350 (face font-lock-string-face) 28350 28358 nil 28358 28359 (face font-lock-string-face) 28359 28363 (face font-lock-keyword-face) 28363 28364 (face font-lock-string-face) 28364 28366 nil 28366 28367 (face font-lock-string-face) 28367 28377 (face font-lock-type-face) 28377 28378 (face font-lock-string-face) 28378 28386 nil 28386 28387 (face font-lock-string-face) 28387 28394 (face font-lock-keyword-face) 28394 28395 (face font-lock-string-face) 28395 28407 nil 28407 28408 (face font-lock-string-face) 28408 28441 (face font-lock-constant-face) 28441 28442 (face font-lock-string-face) 28442 28471 nil 28471 28472 (face font-lock-string-face) 28472 28483 (face font-lock-keyword-face) 28483 28484 (face font-lock-string-face) 28484 28486 nil 28486 28487 (face font-lock-string-face) 28487 28498 (face font-lock-function-name-face) 28498 28499 (face font-lock-string-face) 28499 28507 nil 28507 28508 (face font-lock-string-face) 28508 28512 (face font-lock-keyword-face) 28512 28513 (face font-lock-string-face) 28513 28515 nil 28515 28516 (face font-lock-string-face) 28516 28526 (face font-lock-type-face) 28526 28527 (face font-lock-string-face) 28527 28535 nil 28535 28536 (face font-lock-string-face) 28536 28548 (face font-lock-keyword-face) 28548 28549 (face font-lock-string-face) 28549 28561 nil 28561 28562 (face font-lock-string-face) 28562 28567 (face font-lock-function-name-face) 28567 28568 (face font-lock-string-face) 28568 28578 nil 28578 28579 (face font-lock-string-face) 28579 28600 (face font-lock-function-name-face) 28600 28601 (face font-lock-string-face) 28601 28618 nil 28618 28619 (face font-lock-string-face) 28619 28626 (face font-lock-keyword-face) 28626 28627 (face font-lock-string-face) 28627 28639 nil 28639 28640 (face font-lock-string-face) 28640 28672 (face font-lock-constant-face) 28672 28673 (face font-lock-string-face) 28673 28698 nil 28698 28699 (face font-lock-string-face) 28699 28709 (face font-lock-keyword-face) 28709 28710 (face font-lock-string-face) 28710 28719 nil 28719 28720 (face font-lock-string-face) 28720 28729 (face font-lock-variable-name-face) 28729 28730 (face font-lock-string-face) 28730 28740 nil 28740 28741 (face font-lock-string-face) 28741 28748 (face font-lock-keyword-face) 28748 28749 (face font-lock-string-face) 28749 28773 nil 28773 28774 (face font-lock-string-face) 28774 28785 (face font-lock-keyword-face) 28785 28786 (face font-lock-string-face) 28786 28788 nil 28788 28789 (face font-lock-string-face) 28789 28799 (face font-lock-function-name-face) 28799 28800 (face font-lock-string-face) 28800 28812 nil 28812 28813 (face font-lock-string-face) 28813 28817 (face font-lock-keyword-face) 28817 28818 (face font-lock-string-face) 28818 28820 nil 28820 28821 (face font-lock-string-face) 28821 28831 (face font-lock-type-face) 28831 28832 (face font-lock-string-face) 28832 28844 nil 28844 28845 (face font-lock-string-face) 28845 28857 (face font-lock-keyword-face) 28857 28858 (face font-lock-string-face) 28858 28874 nil 28874 28875 (face font-lock-string-face) 28875 28880 (face font-lock-function-name-face) 28880 28881 (face font-lock-string-face) 28881 28895 nil 28895 28896 (face font-lock-string-face) 28896 28907 (face font-lock-function-name-face) 28907 28908 (face font-lock-string-face) 28908 28922 nil 28922 28923 (face font-lock-string-face) 28923 28944 (face font-lock-function-name-face) 28944 28945 (face font-lock-string-face) 28945 28959 nil 28959 28960 (face font-lock-string-face) 28960 29043 (face font-lock-function-name-face) 29043 29044 (face font-lock-string-face) 29044 29058 nil 29058 29059 (face font-lock-string-face) 29059 29074 (face font-lock-function-name-face) 29074 29075 (face font-lock-string-face) 29075 29100 nil 29100 29101 (face font-lock-string-face) 29101 29113 (face font-lock-keyword-face) 29113 29114 (face font-lock-string-face) 29114 29130 nil 29130 29131 (face font-lock-string-face) 29131 29133 (face font-lock-constant-face) 29133 29138 (face font-lock-variable-name-face) 29138 29163 (face font-lock-constant-face) 29163 29164 (face font-lock-string-face) 29164 29189 nil 29189 29190 (face font-lock-string-face) 29190 29197 (face font-lock-keyword-face) 29197 29198 (face font-lock-string-face) 29198 29214 nil 29214 29215 (face font-lock-string-face) 29215 29238 (face font-lock-constant-face) 29238 29239 (face font-lock-string-face) 29239 29253 nil 29253 29254 (face font-lock-string-face) 29254 29280 (face font-lock-constant-face) 29280 29281 (face font-lock-string-face) 29281 29295 nil 29295 29296 (face font-lock-string-face) 29296 29321 (face font-lock-constant-face) 29321 29322 (face font-lock-string-face) 29322 29336 nil 29336 29337 (face font-lock-string-face) 29337 29361 (face font-lock-constant-face) 29361 29362 (face font-lock-string-face) 29362 29376 nil 29376 29377 (face font-lock-string-face) 29377 29407 (face font-lock-constant-face) 29407 29408 (face font-lock-string-face) 29408 29422 nil 29422 29423 (face font-lock-string-face) 29423 29453 (face font-lock-constant-face) 29453 29454 (face font-lock-string-face) 29454 29468 nil 29468 29469 (face font-lock-string-face) 29469 29493 (face font-lock-constant-face) 29493 29494 (face font-lock-string-face) 29494 29508 nil 29508 29509 (face font-lock-string-face) 29509 29532 (face font-lock-constant-face) 29532 29533 (face font-lock-string-face) 29533 29547 nil 29547 29548 (face font-lock-string-face) 29548 29575 (face font-lock-constant-face) 29575 29576 (face font-lock-string-face) 29576 29590 nil 29590 29591 (face font-lock-string-face) 29591 29614 (face font-lock-constant-face) 29614 29615 (face font-lock-string-face) 29615 29640 nil 29640 29655 (face font-lock-string-face) 29655 29671 nil 29671 29685 (face font-lock-string-face) 29685 29703 nil 29703 29714 (face font-lock-string-face) 29714 29716 nil 29716 29719 (face font-lock-string-face) 29719 29729 nil 29729 29754 (face font-lock-comment-face) 29754 29792 nil 29792 29793 (face font-lock-string-face) 29793 29800 (face font-lock-keyword-face) 29800 29801 (face font-lock-string-face) 29801 29817 nil 29817 29818 (face font-lock-string-face) 29818 29843 (face font-lock-preprocessor-face) 29843 29844 (face font-lock-string-face) 29844 29892 nil 29892 29893 (face font-lock-string-face) 29893 29929 (face font-lock-variable-name-face) 29929 29930 (face font-lock-string-face) 29930 29940 nil 29940 29941 (face font-lock-string-face) 29941 29948 (face font-lock-keyword-face) 29948 29949 (face font-lock-string-face) 29949 29973 nil 29973 29974 (face font-lock-string-face) 29974 29985 (face font-lock-keyword-face) 29985 29986 (face font-lock-string-face) 29986 29988 nil 29988 29989 (face font-lock-string-face) 29989 30001 (face font-lock-function-name-face) 30001 30002 (face font-lock-string-face) 30002 30014 nil 30014 30015 (face font-lock-string-face) 30015 30019 (face font-lock-keyword-face) 30019 30020 (face font-lock-string-face) 30020 30022 nil 30022 30023 (face font-lock-string-face) 30023 30033 (face font-lock-type-face) 30033 30034 (face font-lock-string-face) 30034 30046 nil 30046 30047 (face font-lock-string-face) 30047 30059 (face font-lock-keyword-face) 30059 30060 (face font-lock-string-face) 30060 30076 nil 30076 30077 (face font-lock-string-face) 30077 30082 (face font-lock-function-name-face) 30082 30083 (face font-lock-string-face) 30083 30097 nil 30097 30098 (face font-lock-string-face) 30098 30109 (face font-lock-function-name-face) 30109 30110 (face font-lock-string-face) 30110 30124 nil 30124 30125 (face font-lock-string-face) 30125 30146 (face font-lock-function-name-face) 30146 30147 (face font-lock-string-face) 30147 30161 nil 30161 30162 (face font-lock-string-face) 30162 30180 (face font-lock-function-name-face) 30180 30181 (face font-lock-string-face) 30181 30206 nil 30206 30207 (face font-lock-string-face) 30207 30214 (face font-lock-keyword-face) 30214 30215 (face font-lock-string-face) 30215 30231 nil 30231 30232 (face font-lock-string-face) 30232 30266 (face font-lock-constant-face) 30266 30267 (face font-lock-string-face) 30267 30281 nil 30281 30282 (face font-lock-string-face) 30282 30321 (face font-lock-constant-face) 30321 30322 (face font-lock-string-face) 30322 30336 nil 30336 30337 (face font-lock-string-face) 30337 30375 (face font-lock-constant-face) 30375 30376 (face font-lock-string-face) 30376 30390 nil 30390 30391 (face font-lock-string-face) 30391 30430 (face font-lock-constant-face) 30430 30431 (face font-lock-string-face) 30431 30445 nil 30445 30446 (face font-lock-string-face) 30446 30484 (face font-lock-constant-face) 30484 30485 (face font-lock-string-face) 30485 30499 nil 30499 30500 (face font-lock-string-face) 30500 30533 (face font-lock-constant-face) 30533 30534 (face font-lock-string-face) 30534 30548 nil 30548 30549 (face font-lock-string-face) 30549 30581 (face font-lock-constant-face) 30581 30582 (face font-lock-string-face) 30582 30596 nil 30596 30597 (face font-lock-string-face) 30597 30626 (face font-lock-constant-face) 30626 30627 (face font-lock-string-face) 30627 30641 nil 30641 30642 (face font-lock-string-face) 30642 30670 (face font-lock-constant-face) 30670 30671 (face font-lock-string-face) 30671 30685 nil 30685 30686 (face font-lock-string-face) 30686 30714 (face font-lock-constant-face) 30714 30715 (face font-lock-string-face) 30715 30729 nil 30729 30730 (face font-lock-string-face) 30730 30757 (face font-lock-constant-face) 30757 30758 (face font-lock-string-face) 30758 30783 nil 30783 30784 (face font-lock-string-face) 30784 30794 (face font-lock-keyword-face) 30794 30795 (face font-lock-string-face) 30795 30812 nil 30812 30813 (face font-lock-string-face) 30813 30834 (face font-lock-variable-name-face) 30834 30835 (face font-lock-string-face) 30835 30853 nil 30853 30854 (face font-lock-string-face) 30854 30866 (face font-lock-keyword-face) 30866 30867 (face font-lock-string-face) 30867 30887 nil 30887 30888 (face font-lock-string-face) 30888 30917 (face font-lock-function-name-face) 30917 30918 (face font-lock-string-face) 30918 30951 nil 30951 30952 (face font-lock-string-face) 30952 30959 (face font-lock-keyword-face) 30959 30960 (face font-lock-string-face) 30960 30980 nil 30980 30981 (face font-lock-string-face) 30981 31015 (face font-lock-constant-face) 31015 31016 (face font-lock-string-face) 31016 31064 nil 31064 31065 (face font-lock-string-face) 31065 31074 (face font-lock-variable-name-face) 31074 31075 (face font-lock-string-face) 31075 31093 nil 31093 31094 (face font-lock-string-face) 31094 31106 (face font-lock-keyword-face) 31106 31107 (face font-lock-string-face) 31107 31127 nil 31127 31128 (face font-lock-string-face) 31128 31175 (face font-lock-function-name-face) 31175 31176 (face font-lock-string-face) 31176 31194 nil 31194 31195 (face font-lock-string-face) 31195 31245 (face font-lock-function-name-face) 31245 31246 (face font-lock-string-face) 31246 31279 nil 31279 31280 (face font-lock-string-face) 31280 31287 (face font-lock-keyword-face) 31287 31288 (face font-lock-string-face) 31288 31308 nil 31308 31309 (face font-lock-string-face) 31309 31341 (face font-lock-constant-face) 31341 31342 (face font-lock-string-face) 31342 31423 nil 31423 31424 (face font-lock-string-face) 31424 31462 (face font-lock-variable-name-face) 31462 31463 (face font-lock-string-face) 31463 31473 nil 31473 31474 (face font-lock-string-face) 31474 31481 (face font-lock-keyword-face) 31481 31482 (face font-lock-string-face) 31482 31506 nil 31506 31507 (face font-lock-string-face) 31507 31518 (face font-lock-keyword-face) 31518 31519 (face font-lock-string-face) 31519 31521 nil 31521 31522 (face font-lock-string-face) 31522 31539 (face font-lock-function-name-face) 31539 31540 (face font-lock-string-face) 31540 31552 nil 31552 31553 (face font-lock-string-face) 31553 31557 (face font-lock-keyword-face) 31557 31558 (face font-lock-string-face) 31558 31560 nil 31560 31561 (face font-lock-string-face) 31561 31571 (face font-lock-type-face) 31571 31572 (face font-lock-string-face) 31572 31584 nil 31584 31585 (face font-lock-string-face) 31585 31597 (face font-lock-keyword-face) 31597 31598 (face font-lock-string-face) 31598 31614 nil 31614 31615 (face font-lock-string-face) 31615 31636 (face font-lock-function-name-face) 31636 31637 (face font-lock-string-face) 31637 31651 nil 31651 31652 (face font-lock-string-face) 31652 31670 (face font-lock-function-name-face) 31670 31671 (face font-lock-string-face) 31671 31696 nil 31696 31697 (face font-lock-string-face) 31697 31706 (face font-lock-keyword-face) 31706 31707 (face font-lock-string-face) 31707 31723 nil 31723 31724 (face font-lock-string-face) 31724 31728 (face font-lock-constant-face) 31728 31729 (face font-lock-string-face) 31729 31743 nil 31743 31744 (face font-lock-string-face) 31744 31748 (face font-lock-constant-face) 31748 31749 (face font-lock-string-face) 31749 31774 nil 31774 31775 (face font-lock-string-face) 31775 31782 (face font-lock-keyword-face) 31782 31783 (face font-lock-string-face) 31783 31799 nil 31799 31800 (face font-lock-string-face) 31800 31844 (face font-lock-constant-face) 31844 31845 (face font-lock-string-face) 31845 31893 nil 31893 31894 (face font-lock-string-face) 31894 31943 (face font-lock-variable-name-face) 31943 31944 (face font-lock-string-face) 31944 31954 nil 31954 31955 (face font-lock-string-face) 31955 31962 (face font-lock-keyword-face) 31962 31963 (face font-lock-string-face) 31963 31987 nil 31987 31988 (face font-lock-string-face) 31988 31999 (face font-lock-keyword-face) 31999 32000 (face font-lock-string-face) 32000 32002 nil 32002 32003 (face font-lock-string-face) 32003 32013 (face font-lock-function-name-face) 32013 32014 (face font-lock-string-face) 32014 32026 nil 32026 32027 (face font-lock-string-face) 32027 32031 (face font-lock-keyword-face) 32031 32032 (face font-lock-string-face) 32032 32034 nil 32034 32035 (face font-lock-string-face) 32035 32045 (face font-lock-type-face) 32045 32046 (face font-lock-string-face) 32046 32058 nil 32058 32059 (face font-lock-string-face) 32059 32071 (face font-lock-keyword-face) 32071 32072 (face font-lock-string-face) 32072 32088 nil 32088 32089 (face font-lock-string-face) 32089 32094 (face font-lock-function-name-face) 32094 32095 (face font-lock-string-face) 32095 32109 nil 32109 32110 (face font-lock-string-face) 32110 32121 (face font-lock-function-name-face) 32121 32122 (face font-lock-string-face) 32122 32136 nil 32136 32137 (face font-lock-string-face) 32137 32158 (face font-lock-function-name-face) 32158 32159 (face font-lock-string-face) 32159 32173 nil 32173 32174 (face font-lock-string-face) 32174 32192 (face font-lock-function-name-face) 32192 32193 (face font-lock-string-face) 32193 32218 nil 32218 32219 (face font-lock-string-face) 32219 32232 (face font-lock-keyword-face) 32232 32233 (face font-lock-string-face) 32233 32249 nil 32249 32250 (face font-lock-string-face) 32250 32259 (face font-lock-keyword-face) 32259 32260 (face font-lock-string-face) 32260 32278 nil 32278 32279 (face font-lock-string-face) 32279 32283 (face font-lock-constant-face) 32283 32284 (face font-lock-string-face) 32284 32300 nil 32300 32301 (face font-lock-string-face) 32301 32306 (face font-lock-constant-face) 32306 32307 (face font-lock-string-face) 32307 32323 nil 32323 32324 (face font-lock-string-face) 32324 32333 (face font-lock-constant-face) 32333 32334 (face font-lock-string-face) 32334 32350 nil 32350 32351 (face font-lock-string-face) 32351 32357 (face font-lock-constant-face) 32357 32358 (face font-lock-string-face) 32358 32398 nil 32398 32399 (face font-lock-string-face) 32399 32406 (face font-lock-keyword-face) 32406 32407 (face font-lock-string-face) 32407 32423 nil 32423 32424 (face font-lock-string-face) 32424 32462 (face font-lock-constant-face) 32462 32463 (face font-lock-string-face) 32463 32477 nil 32477 32478 (face font-lock-string-face) 32478 32515 (face font-lock-constant-face) 32515 32516 (face font-lock-string-face) 32516 32530 nil 32530 32531 (face font-lock-string-face) 32531 32568 (face font-lock-constant-face) 32568 32569 (face font-lock-string-face) 32569 32583 nil 32583 32584 (face font-lock-string-face) 32584 32620 (face font-lock-constant-face) 32620 32621 (face font-lock-string-face) 32621 32635 nil 32635 32636 (face font-lock-string-face) 32636 32666 (face font-lock-constant-face) 32666 32667 (face font-lock-string-face) 32667 32681 nil 32681 32682 (face font-lock-string-face) 32682 32720 (face font-lock-constant-face) 32720 32721 (face font-lock-string-face) 32721 32735 nil 32735 32736 (face font-lock-string-face) 32736 32773 (face font-lock-constant-face) 32773 32774 (face font-lock-string-face) 32774 32822 nil 32822 32823 (face font-lock-string-face) 32823 32838 (face font-lock-variable-name-face) 32838 32839 (face font-lock-string-face) 32839 32849 nil 32849 32850 (face font-lock-string-face) 32850 32857 (face font-lock-keyword-face) 32857 32858 (face font-lock-string-face) 32858 32882 nil 32882 32883 (face font-lock-string-face) 32883 32894 (face font-lock-keyword-face) 32894 32895 (face font-lock-string-face) 32895 32897 nil 32897 32898 (face font-lock-string-face) 32898 32912 (face font-lock-function-name-face) 32912 32913 (face font-lock-string-face) 32913 32925 nil 32925 32926 (face font-lock-string-face) 32926 32930 (face font-lock-keyword-face) 32930 32931 (face font-lock-string-face) 32931 32933 nil 32933 32934 (face font-lock-string-face) 32934 32948 (face font-lock-type-face) 32948 32949 (face font-lock-string-face) 32949 32961 nil 32961 32962 (face font-lock-string-face) 32962 32969 (face font-lock-keyword-face) 32969 32970 (face font-lock-string-face) 32970 32986 nil 32986 32987 (face font-lock-string-face) 32987 33022 (face font-lock-constant-face) 33022 33023 (face font-lock-string-face) 33023 33037 nil 33037 33038 (face font-lock-string-face) 33038 33072 (face font-lock-constant-face) 33072 33073 (face font-lock-string-face) 33073 33098 nil 33098 33099 (face font-lock-string-face) 33099 33111 (face font-lock-keyword-face) 33111 33112 (face font-lock-string-face) 33112 33128 nil 33128 33129 (face font-lock-string-face) 33129 33150 (face font-lock-function-name-face) 33150 33151 (face font-lock-string-face) 33151 33176 nil 33176 33177 (face font-lock-string-face) 33177 33189 (face font-lock-keyword-face) 33189 33190 (face font-lock-string-face) 33190 33206 nil 33206 33207 (face font-lock-string-face) 33207 33209 (face font-lock-constant-face) 33209 33232 (face font-lock-variable-name-face) 33232 33239 (face font-lock-constant-face) 33239 33240 (face font-lock-string-face) 33240 33265 nil 33265 33266 (face font-lock-string-face) 33266 33273 (face font-lock-keyword-face) 33273 33274 (face font-lock-string-face) 33274 33306 nil 33306 33307 (face font-lock-string-face) 33307 33318 (face font-lock-keyword-face) 33318 33319 (face font-lock-string-face) 33319 33321 nil 33321 33322 (face font-lock-string-face) 33322 33342 (face font-lock-function-name-face) 33342 33343 (face font-lock-string-face) 33343 33359 nil 33359 33360 (face font-lock-string-face) 33360 33366 (face font-lock-keyword-face) 33366 33367 (face font-lock-string-face) 33367 33387 nil 33387 33388 (face font-lock-string-face) 33388 33434 (face font-lock-constant-face) 33434 33435 (face font-lock-string-face) 33435 33453 nil 33453 33454 (face font-lock-string-face) 33454 33519 (face font-lock-constant-face) 33519 33520 (face font-lock-string-face) 33520 33553 nil 33553 33554 (face font-lock-string-face) 33554 33561 (face font-lock-keyword-face) 33561 33562 (face font-lock-string-face) 33562 33582 nil 33582 33583 (face font-lock-string-face) 33583 33585 (face font-lock-constant-face) 33585 33608 (face font-lock-variable-name-face) 33608 33647 (face font-lock-constant-face) 33647 33648 (face font-lock-string-face) 33648 33681 nil 33681 33682 (face font-lock-string-face) 33682 33688 (face font-lock-keyword-face) 33688 33689 (face font-lock-string-face) 33689 33709 nil 33709 33710 (face font-lock-string-face) 33710 33716 (face font-lock-constant-face) 33716 33717 (face font-lock-string-face) 33717 33735 nil 33735 33736 (face font-lock-string-face) 33736 33738 (face font-lock-constant-face) 33738 33743 (face font-lock-variable-name-face) 33743 33788 (face font-lock-constant-face) 33788 33789 (face font-lock-string-face) 33789 33807 nil 33807 33808 (face font-lock-string-face) 33808 33810 (face font-lock-constant-face) 33810 33811 (face font-lock-string-face) 33811 33829 nil 33829 33830 (face font-lock-string-face) 33830 33833 (face font-lock-constant-face) 33833 33840 (face font-lock-variable-name-face) 33840 33841 (face font-lock-constant-face) 33841 33842 (face font-lock-string-face) 33842 33860 nil 33860 33861 (face font-lock-string-face) 33861 33864 (face font-lock-constant-face) 33864 33872 (face font-lock-variable-name-face) 33872 33873 (face font-lock-constant-face) 33873 33874 (face font-lock-string-face) 33874 33952 nil 33952 33953 (face font-lock-string-face) 33953 33964 (face font-lock-keyword-face) 33964 33965 (face font-lock-string-face) 33965 33967 nil 33967 33968 (face font-lock-string-face) 33968 33978 (face font-lock-function-name-face) 33978 33979 (face font-lock-string-face) 33979 33991 nil 33991 33992 (face font-lock-string-face) 33992 33996 (face font-lock-keyword-face) 33996 33997 (face font-lock-string-face) 33997 33999 nil 33999 34000 (face font-lock-string-face) 34000 34004 (face font-lock-type-face) 34004 34005 (face font-lock-string-face) 34005 34017 nil 34017 34018 (face font-lock-string-face) 34018 34030 (face font-lock-keyword-face) 34030 34031 (face font-lock-string-face) 34031 34035 nil 34035 34036 (face font-lock-string-face) 34036 34062 (face font-lock-function-name-face) 34062 34063 (face font-lock-string-face) 34063 34077 nil 34077 34078 (face font-lock-string-face) 34078 34087 (face font-lock-keyword-face) 34087 34088 (face font-lock-string-face) 34088 34104 nil 34104 34105 (face font-lock-string-face) 34105 34117 (face font-lock-variable-name-face) 34117 34118 (face font-lock-string-face) 34118 34120 nil 34120 34121 (face font-lock-string-face) 34121 34126 (face font-lock-variable-name-face) 34126 34127 (face font-lock-string-face) 34127 34141 nil 34141 34142 (face font-lock-string-face) 34142 34153 (face font-lock-variable-name-face) 34153 34154 (face font-lock-string-face) 34154 34156 nil 34156 34157 (face font-lock-string-face) 34157 34174 (face font-lock-variable-name-face) 34174 34175 (face font-lock-string-face) 34175 34200 nil 34200 34201 (face font-lock-string-face) 34201 34209 (face font-lock-keyword-face) 34209 34210 (face font-lock-string-face) 34210 34214 nil 34214 34215 (face font-lock-string-face) 34215 34233 (face font-lock-constant-face) 34233 34234 (face font-lock-string-face) 34234 34268 nil 34268 34287 (face font-lock-comment-face) 34287 34293 nil 34293 34365 (face font-lock-comment-face) 34365 34371 nil 34371 34372 (face font-lock-string-face) 34372 34379 (face font-lock-keyword-face) 34379 34380 (face font-lock-string-face) 34380 34404 nil 34404 34405 (face font-lock-string-face) 34405 34416 (face font-lock-keyword-face) 34416 34417 (face font-lock-string-face) 34417 34419 nil 34419 34420 (face font-lock-string-face) 34420 34436 (face font-lock-function-name-face) 34436 34437 (face font-lock-string-face) 34437 34449 nil 34449 34450 (face font-lock-string-face) 34450 34454 (face font-lock-keyword-face) 34454 34455 (face font-lock-string-face) 34455 34457 nil 34457 34458 (face font-lock-string-face) 34458 34468 (face font-lock-type-face) 34468 34469 (face font-lock-string-face) 34469 34481 nil 34481 34482 (face font-lock-string-face) 34482 34494 (face font-lock-keyword-face) 34494 34495 (face font-lock-string-face) 34495 34511 nil 34511 34512 (face font-lock-string-face) 34512 34517 (face font-lock-function-name-face) 34517 34518 (face font-lock-string-face) 34518 34532 nil 34532 34533 (face font-lock-string-face) 34533 34551 (face font-lock-function-name-face) 34551 34552 (face font-lock-string-face) 34552 34566 nil 34566 34567 (face font-lock-string-face) 34567 34588 (face font-lock-function-name-face) 34588 34589 (face font-lock-string-face) 34589 34603 nil 34603 34604 (face font-lock-string-face) 34604 34630 (face font-lock-function-name-face) 34630 34631 (face font-lock-string-face) 34631 34645 nil 34645 34646 (face font-lock-string-face) 34646 34680 (face font-lock-function-name-face) 34680 34681 (face font-lock-string-face) 34681 34695 nil 34695 34696 (face font-lock-string-face) 34696 34730 (face font-lock-function-name-face) 34730 34731 (face font-lock-string-face) 34731 34745 nil 34745 34746 (face font-lock-string-face) 34746 34772 (face font-lock-function-name-face) 34772 34773 (face font-lock-string-face) 34773 34787 nil 34787 34788 (face font-lock-string-face) 34788 34827 (face font-lock-function-name-face) 34827 34828 (face font-lock-string-face) 34828 34853 nil 34853 34854 (face font-lock-string-face) 34854 34861 (face font-lock-keyword-face) 34861 34862 (face font-lock-string-face) 34862 34878 nil 34878 34879 (face font-lock-string-face) 34879 34904 (face font-lock-constant-face) 34904 34905 (face font-lock-string-face) 34905 34930 nil 34930 34931 (face font-lock-string-face) 34931 34941 (face font-lock-keyword-face) 34941 34942 (face font-lock-string-face) 34942 34959 nil 34959 34960 (face font-lock-string-face) 34960 34981 (face font-lock-variable-name-face) 34981 34982 (face font-lock-string-face) 34982 35000 nil 35000 35001 (face font-lock-string-face) 35001 35013 (face font-lock-keyword-face) 35013 35014 (face font-lock-string-face) 35014 35034 nil 35034 35077 (face font-lock-comment-face) 35077 35093 nil 35093 35123 (face font-lock-comment-face) 35123 35139 nil 35139 35164 (face font-lock-comment-face) 35164 35180 nil 35180 35194 (face font-lock-comment-face) 35194 35210 nil 35210 35211 (face font-lock-string-face) 35211 35240 (face font-lock-function-name-face) 35240 35241 (face font-lock-string-face) 35241 35274 nil 35274 35275 (face font-lock-string-face) 35275 35285 (face font-lock-keyword-face) 35285 35286 (face font-lock-string-face) 35286 35307 nil 35307 35308 (face font-lock-string-face) 35308 35329 (face font-lock-variable-name-face) 35329 35330 (face font-lock-string-face) 35330 35352 nil 35352 35353 (face font-lock-string-face) 35353 35365 (face font-lock-keyword-face) 35365 35366 (face font-lock-string-face) 35366 35390 nil 35390 35391 (face font-lock-string-face) 35391 35432 (face font-lock-function-name-face) 35432 35433 (face font-lock-string-face) 35433 35553 nil 35553 35554 (face font-lock-string-face) 35554 35565 (face font-lock-keyword-face) 35565 35566 (face font-lock-string-face) 35566 35568 nil 35568 35569 (face font-lock-string-face) 35569 35592 (face font-lock-function-name-face) 35592 35593 (face font-lock-string-face) 35593 35605 nil 35605 35606 (face font-lock-string-face) 35606 35610 (face font-lock-keyword-face) 35610 35611 (face font-lock-string-face) 35611 35613 nil 35613 35614 (face font-lock-string-face) 35614 35624 (face font-lock-type-face) 35624 35625 (face font-lock-string-face) 35625 35637 nil 35637 35638 (face font-lock-string-face) 35638 35650 (face font-lock-keyword-face) 35650 35651 (face font-lock-string-face) 35651 35667 nil 35667 35668 (face font-lock-string-face) 35668 35673 (face font-lock-function-name-face) 35673 35674 (face font-lock-string-face) 35674 35688 nil 35688 35689 (face font-lock-string-face) 35689 35707 (face font-lock-function-name-face) 35707 35708 (face font-lock-string-face) 35708 35722 nil 35722 35723 (face font-lock-string-face) 35723 35757 (face font-lock-function-name-face) 35757 35758 (face font-lock-string-face) 35758 35772 nil 35772 35773 (face font-lock-string-face) 35773 35799 (face font-lock-function-name-face) 35799 35800 (face font-lock-string-face) 35800 35814 nil 35814 35815 (face font-lock-string-face) 35815 35841 (face font-lock-function-name-face) 35841 35842 (face font-lock-string-face) 35842 35856 nil 35856 35857 (face font-lock-string-face) 35857 35896 (face font-lock-function-name-face) 35896 35897 (face font-lock-string-face) 35897 35922 nil 35922 35923 (face font-lock-string-face) 35923 35930 (face font-lock-keyword-face) 35930 35931 (face font-lock-string-face) 35931 35947 nil 35947 35948 (face font-lock-string-face) 35948 35970 (face font-lock-constant-face) 35970 35971 (face font-lock-string-face) 35971 35985 nil 35985 35986 (face font-lock-string-face) 35986 36011 (face font-lock-constant-face) 36011 36012 (face font-lock-string-face) 36012 36026 nil 36026 36027 (face font-lock-string-face) 36027 36060 (face font-lock-constant-face) 36060 36061 (face font-lock-string-face) 36061 36075 nil 36075 36076 (face font-lock-string-face) 36076 36117 (face font-lock-constant-face) 36117 36118 (face font-lock-string-face) 36118 36143 nil 36143 36144 (face font-lock-string-face) 36144 36154 (face font-lock-keyword-face) 36154 36155 (face font-lock-string-face) 36155 36172 nil 36172 36173 (face font-lock-string-face) 36173 36198 (face font-lock-variable-name-face) 36198 36199 (face font-lock-string-face) 36199 36217 nil 36217 36218 (face font-lock-string-face) 36218 36228 (face font-lock-keyword-face) 36228 36229 (face font-lock-string-face) 36229 36250 nil 36250 36251 (face font-lock-string-face) 36251 36272 (face font-lock-variable-name-face) 36272 36273 (face font-lock-string-face) 36273 36295 nil 36295 36296 (face font-lock-string-face) 36296 36308 (face font-lock-keyword-face) 36308 36309 (face font-lock-string-face) 36309 36333 nil 36333 36334 (face font-lock-string-face) 36334 36375 (face font-lock-function-name-face) 36375 36376 (face font-lock-string-face) 36376 36496 nil 36496 36497 (face font-lock-string-face) 36497 36508 (face font-lock-keyword-face) 36508 36509 (face font-lock-string-face) 36509 36511 nil 36511 36512 (face font-lock-string-face) 36512 36524 (face font-lock-function-name-face) 36524 36525 (face font-lock-string-face) 36525 36537 nil 36537 36538 (face font-lock-string-face) 36538 36542 (face font-lock-keyword-face) 36542 36543 (face font-lock-string-face) 36543 36545 nil 36545 36546 (face font-lock-string-face) 36546 36556 (face font-lock-type-face) 36556 36557 (face font-lock-string-face) 36557 36569 nil 36569 36570 (face font-lock-string-face) 36570 36582 (face font-lock-keyword-face) 36582 36583 (face font-lock-string-face) 36583 36599 nil 36599 36600 (face font-lock-string-face) 36600 36605 (face font-lock-function-name-face) 36605 36606 (face font-lock-string-face) 36606 36620 nil 36620 36621 (face font-lock-string-face) 36621 36642 (face font-lock-function-name-face) 36642 36643 (face font-lock-string-face) 36643 36657 nil 36657 36658 (face font-lock-string-face) 36658 36697 (face font-lock-function-name-face) 36697 36698 (face font-lock-string-face) 36698 36723 nil 36723 36724 (face font-lock-string-face) 36724 36731 (face font-lock-keyword-face) 36731 36732 (face font-lock-string-face) 36732 36748 nil 36748 36749 (face font-lock-string-face) 36749 36782 (face font-lock-constant-face) 36782 36783 (face font-lock-string-face) 36783 36829 nil 36829 36830 (face font-lock-string-face) 36830 36841 (face font-lock-keyword-face) 36841 36842 (face font-lock-string-face) 36842 36844 nil 36844 36845 (face font-lock-string-face) 36845 36856 (face font-lock-function-name-face) 36856 36857 (face font-lock-string-face) 36857 36869 nil 36869 36870 (face font-lock-string-face) 36870 36874 (face font-lock-keyword-face) 36874 36875 (face font-lock-string-face) 36875 36877 nil 36877 36878 (face font-lock-string-face) 36878 36888 (face font-lock-type-face) 36888 36889 (face font-lock-string-face) 36889 36901 nil 36901 36902 (face font-lock-string-face) 36902 36914 (face font-lock-keyword-face) 36914 36915 (face font-lock-string-face) 36915 36931 nil 36931 36932 (face font-lock-string-face) 36932 36937 (face font-lock-function-name-face) 36937 36938 (face font-lock-string-face) 36938 36952 nil 36952 36953 (face font-lock-string-face) 36953 36974 (face font-lock-function-name-face) 36974 36975 (face font-lock-string-face) 36975 36989 nil 36989 36990 (face font-lock-string-face) 36990 37029 (face font-lock-function-name-face) 37029 37030 (face font-lock-string-face) 37030 37055 nil 37055 37056 (face font-lock-string-face) 37056 37063 (face font-lock-keyword-face) 37063 37064 (face font-lock-string-face) 37064 37080 nil 37080 37081 (face font-lock-string-face) 37081 37113 (face font-lock-constant-face) 37113 37114 (face font-lock-string-face) 37114 37163 nil)
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/graphviz.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/graphviz.py
deleted file mode 100755
index 538b059da..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/graphviz.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Using the JSON dumped by the dump-dependency-json generator,
-generate input suitable for graphviz to render a dependency graph of
-targets."""
-
-from __future__ import print_function
-
-import collections
-import json
-import sys
-
-
-def ParseTarget(target):
- target, _, suffix = target.partition('#')
- filename, _, target = target.partition(':')
- return filename, target, suffix
-
-
-def LoadEdges(filename, targets):
- """Load the edges map from the dump file, and filter it to only
- show targets in |targets| and their depedendents."""
-
- file = open('dump.json')
- edges = json.load(file)
- file.close()
-
- # Copy out only the edges we're interested in from the full edge list.
- target_edges = {}
- to_visit = targets[:]
- while to_visit:
- src = to_visit.pop()
- if src in target_edges:
- continue
- target_edges[src] = edges[src]
- to_visit.extend(edges[src])
-
- return target_edges
-
-
-def WriteGraph(edges):
- """Print a graphviz graph to stdout.
- |edges| is a map of target to a list of other targets it depends on."""
-
- # Bucket targets by file.
- files = collections.defaultdict(list)
- for src, dst in edges.items():
- build_file, target_name, toolset = ParseTarget(src)
- files[build_file].append(src)
-
- print('digraph D {')
- print(' fontsize=8') # Used by subgraphs.
- print(' node [fontsize=8]')
-
- # Output nodes by file. We must first write out each node within
- # its file grouping before writing out any edges that may refer
- # to those nodes.
- for filename, targets in files.items():
- if len(targets) == 1:
- # If there's only one node for this file, simplify
- # the display by making it a box without an internal node.
- target = targets[0]
- build_file, target_name, toolset = ParseTarget(target)
- print(' "%s" [shape=box, label="%s\\n%s"]' % (target, filename,
- target_name))
- else:
- # Group multiple nodes together in a subgraph.
- print(' subgraph "cluster_%s" {' % filename)
- print(' label = "%s"' % filename)
- for target in targets:
- build_file, target_name, toolset = ParseTarget(target)
- print(' "%s" [label="%s"]' % (target, target_name))
- print(' }')
-
- # Now that we've placed all the nodes within subgraphs, output all
- # the edges between nodes.
- for src, dsts in edges.items():
- for dst in dsts:
- print(' "%s" -> "%s"' % (src, dst))
-
- print('}')
-
-
-def main():
- if len(sys.argv) < 2:
- print(__doc__, file=sys.stderr)
- print(file=sys.stderr)
- print('usage: %s target1 target2...' % (sys.argv[0]), file=sys.stderr)
- return 1
-
- edges = LoadEdges('dump.json', sys.argv[1:])
-
- WriteGraph(edges)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_gyp.py
deleted file mode 100755
index 633048a59..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_gyp.py
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Pretty-prints the contents of a GYP file."""
-
-from __future__ import print_function
-
-import sys
-import re
-
-
-# Regex to remove comments when we're counting braces.
-COMMENT_RE = re.compile(r'\s*#.*')
-
-# Regex to remove quoted strings when we're counting braces.
-# It takes into account quoted quotes, and makes sure that the quotes match.
-# NOTE: It does not handle quotes that span more than one line, or
-# cases where an escaped quote is preceded by an escaped backslash.
-QUOTE_RE_STR = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
-QUOTE_RE = re.compile(QUOTE_RE_STR)
-
-
-def comment_replace(matchobj):
- return matchobj.group(1) + matchobj.group(2) + '#' * len(matchobj.group(3))
-
-
-def mask_comments(input):
- """Mask the quoted strings so we skip braces inside quoted strings."""
- search_re = re.compile(r'(.*?)(#)(.*)')
- return [search_re.sub(comment_replace, line) for line in input]
-
-
-def quote_replace(matchobj):
- return "%s%s%s%s" % (matchobj.group(1),
- matchobj.group(2),
- 'x'*len(matchobj.group(3)),
- matchobj.group(2))
-
-
-def mask_quotes(input):
- """Mask the quoted strings so we skip braces inside quoted strings."""
- search_re = re.compile(r'(.*?)' + QUOTE_RE_STR)
- return [search_re.sub(quote_replace, line) for line in input]
-
-
-def do_split(input, masked_input, search_re):
- output = []
- mask_output = []
- for (line, masked_line) in zip(input, masked_input):
- m = search_re.match(masked_line)
- while m:
- split = len(m.group(1))
- line = line[:split] + r'\n' + line[split:]
- masked_line = masked_line[:split] + r'\n' + masked_line[split:]
- m = search_re.match(masked_line)
- output.extend(line.split(r'\n'))
- mask_output.extend(masked_line.split(r'\n'))
- return (output, mask_output)
-
-
-def split_double_braces(input):
- """Masks out the quotes and comments, and then splits appropriate
- lines (lines that matche the double_*_brace re's above) before
- indenting them below.
-
- These are used to split lines which have multiple braces on them, so
- that the indentation looks prettier when all laid out (e.g. closing
- braces make a nice diagonal line).
- """
- double_open_brace_re = re.compile(r'(.*?[\[\{\(,])(\s*)([\[\{\(])')
- double_close_brace_re = re.compile(r'(.*?[\]\}\)],?)(\s*)([\]\}\)])')
-
- masked_input = mask_quotes(input)
- masked_input = mask_comments(masked_input)
-
- (output, mask_output) = do_split(input, masked_input, double_open_brace_re)
- (output, mask_output) = do_split(output, mask_output, double_close_brace_re)
-
- return output
-
-
-def count_braces(line):
- """keeps track of the number of braces on a given line and returns the result.
-
- It starts at zero and subtracts for closed braces, and adds for open braces.
- """
- open_braces = ['[', '(', '{']
- close_braces = [']', ')', '}']
- closing_prefix_re = re.compile(r'(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$')
- cnt = 0
- stripline = COMMENT_RE.sub(r'', line)
- stripline = QUOTE_RE.sub(r"''", stripline)
- for char in stripline:
- for brace in open_braces:
- if char == brace:
- cnt += 1
- for brace in close_braces:
- if char == brace:
- cnt -= 1
-
- after = False
- if cnt > 0:
- after = True
-
- # This catches the special case of a closing brace having something
- # other than just whitespace ahead of it -- we don't want to
- # unindent that until after this line is printed so it stays with
- # the previous indentation level.
- if cnt < 0 and closing_prefix_re.match(stripline):
- after = True
- return (cnt, after)
-
-
-def prettyprint_input(lines):
- """Does the main work of indenting the input based on the brace counts."""
- indent = 0
- basic_offset = 2
- last_line = ""
- for line in lines:
- if COMMENT_RE.match(line):
- print(line)
- else:
- line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix.
- if len(line) > 0:
- (brace_diff, after) = count_braces(line)
- if brace_diff != 0:
- if after:
- print(" " * (basic_offset * indent) + line)
- indent += brace_diff
- else:
- indent += brace_diff
- print(" " * (basic_offset * indent) + line)
- else:
- print(" " * (basic_offset * indent) + line)
- else:
- print("")
- last_line = line
-
-
-def main():
- if len(sys.argv) > 1:
- data = open(sys.argv[1]).read().splitlines()
- else:
- data = sys.stdin.read().splitlines()
- # Split up the double braces.
- lines = split_double_braces(data)
-
- # Indent and print the output.
- prettyprint_input(lines)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_sln.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_sln.py
deleted file mode 100755
index 196566fb9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_sln.py
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Prints the information in a sln file in a diffable way.
-
- It first outputs each projects in alphabetical order with their
- dependencies.
-
- Then it outputs a possible build order.
-"""
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import pretty_vcproj
-
-__author__ = 'nsylvain (Nicolas Sylvain)'
-
-def BuildProject(project, built, projects, deps):
- # if all dependencies are done, we can build it, otherwise we try to build the
- # dependency.
- # This is not infinite-recursion proof.
- for dep in deps[project]:
- if dep not in built:
- BuildProject(dep, built, projects, deps)
- print(project)
- built.append(project)
-
-def ParseSolution(solution_file):
- # All projects, their clsid and paths.
- projects = dict()
-
- # A list of dependencies associated with a project.
- dependencies = dict()
-
- # Regular expressions that matches the SLN format.
- # The first line of a project definition.
- begin_project = re.compile(r'^Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942'
- r'}"\) = "(.*)", "(.*)", "(.*)"$')
- # The last line of a project definition.
- end_project = re.compile('^EndProject$')
- # The first line of a dependency list.
- begin_dep = re.compile(
- r'ProjectSection\(ProjectDependencies\) = postProject$')
- # The last line of a dependency list.
- end_dep = re.compile('EndProjectSection$')
- # A line describing a dependency.
- dep_line = re.compile(' *({.*}) = ({.*})$')
-
- in_deps = False
- solution = open(solution_file)
- for line in solution:
- results = begin_project.search(line)
- if results:
- # Hack to remove icu because the diff is too different.
- if results.group(1).find('icu') != -1:
- continue
- # We remove "_gyp" from the names because it helps to diff them.
- current_project = results.group(1).replace('_gyp', '')
- projects[current_project] = [results.group(2).replace('_gyp', ''),
- results.group(3),
- results.group(2)]
- dependencies[current_project] = []
- continue
-
- results = end_project.search(line)
- if results:
- current_project = None
- continue
-
- results = begin_dep.search(line)
- if results:
- in_deps = True
- continue
-
- results = end_dep.search(line)
- if results:
- in_deps = False
- continue
-
- results = dep_line.search(line)
- if results and in_deps and current_project:
- dependencies[current_project].append(results.group(1))
- continue
-
- # Change all dependencies clsid to name instead.
- for project in dependencies:
- # For each dependencies in this project
- new_dep_array = []
- for dep in dependencies[project]:
- # Look for the project name matching this cldis
- for project_info in projects:
- if projects[project_info][1] == dep:
- new_dep_array.append(project_info)
- dependencies[project] = sorted(new_dep_array)
-
- return (projects, dependencies)
-
-def PrintDependencies(projects, deps):
- print("---------------------------------------")
- print("Dependencies for all projects")
- print("---------------------------------------")
- print("-- --")
-
- for (project, dep_list) in sorted(deps.items()):
- print("Project : %s" % project)
- print("Path : %s" % projects[project][0])
- if dep_list:
- for dep in dep_list:
- print(" - %s" % dep)
- print("")
-
- print("-- --")
-
-def PrintBuildOrder(projects, deps):
- print("---------------------------------------")
- print("Build order ")
- print("---------------------------------------")
- print("-- --")
-
- built = []
- for (project, _) in sorted(deps.items()):
- if project not in built:
- BuildProject(project, built, projects, deps)
-
- print("-- --")
-
-def PrintVCProj(projects):
-
- for project in projects:
- print("-------------------------------------")
- print("-------------------------------------")
- print(project)
- print(project)
- print(project)
- print("-------------------------------------")
- print("-------------------------------------")
-
- project_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]),
- projects[project][2]))
-
- pretty = pretty_vcproj
- argv = [ '',
- project_path,
- '$(SolutionDir)=%s\\' % os.path.dirname(sys.argv[1]),
- ]
- argv.extend(sys.argv[3:])
- pretty.main(argv)
-
-def main():
- # check if we have exactly 1 parameter.
- if len(sys.argv) < 2:
- print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0])
- return 1
-
- (projects, deps) = ParseSolution(sys.argv[1])
- PrintDependencies(projects, deps)
- PrintBuildOrder(projects, deps)
-
- if '--recursive' in sys.argv:
- PrintVCProj(projects)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
deleted file mode 100755
index 24e99282d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
+++ /dev/null
@@ -1,337 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Make the format of a vcproj really pretty.
-
- This script normalize and sort an xml. It also fetches all the properties
- inside linked vsprops and include them explicitly in the vcproj.
-
- It outputs the resulting xml to stdout.
-"""
-
-from __future__ import print_function
-
-import os
-import sys
-
-from xml.dom.minidom import parse
-from xml.dom.minidom import Node
-
-__author__ = 'nsylvain (Nicolas Sylvain)'
-
-try:
- cmp
-except NameError:
- def cmp(x, y):
- return (x > y) - (x < y)
-
-REPLACEMENTS = dict()
-ARGUMENTS = None
-
-
-class CmpTuple(object):
- """Compare function between 2 tuple."""
- def __call__(self, x, y):
- return cmp(x[0], y[0])
-
-
-class CmpNode(object):
- """Compare function between 2 xml nodes."""
-
- def __call__(self, x, y):
- def get_string(node):
- node_string = "node"
- node_string += node.nodeName
- if node.nodeValue:
- node_string += node.nodeValue
-
- if node.attributes:
- # We first sort by name, if present.
- node_string += node.getAttribute("Name")
-
- all_nodes = []
- for (name, value) in node.attributes.items():
- all_nodes.append((name, value))
-
- all_nodes.sort(CmpTuple())
- for (name, value) in all_nodes:
- node_string += name
- node_string += value
-
- return node_string
-
- return cmp(get_string(x), get_string(y))
-
-
-def PrettyPrintNode(node, indent=0):
- if node.nodeType == Node.TEXT_NODE:
- if node.data.strip():
- print('%s%s' % (' '*indent, node.data.strip()))
- return
-
- if node.childNodes:
- node.normalize()
- # Get the number of attributes
- attr_count = 0
- if node.attributes:
- attr_count = node.attributes.length
-
- # Print the main tag
- if attr_count == 0:
- print('%s<%s>' % (' '*indent, node.nodeName))
- else:
- print('%s<%s' % (' '*indent, node.nodeName))
-
- all_attributes = []
- for (name, value) in node.attributes.items():
- all_attributes.append((name, value))
- all_attributes.sort(CmpTuple())
- for (name, value) in all_attributes:
- print('%s %s="%s"' % (' '*indent, name, value))
- print('%s>' % (' '*indent))
- if node.nodeValue:
- print('%s %s' % (' '*indent, node.nodeValue))
-
- for sub_node in node.childNodes:
- PrettyPrintNode(sub_node, indent=indent+2)
- print('%s</%s>' % (' '*indent, node.nodeName))
-
-
-def FlattenFilter(node):
- """Returns a list of all the node and sub nodes."""
- node_list = []
-
- if (node.attributes and
- node.getAttribute('Name') == '_excluded_files'):
- # We don't add the "_excluded_files" filter.
- return []
-
- for current in node.childNodes:
- if current.nodeName == 'Filter':
- node_list.extend(FlattenFilter(current))
- else:
- node_list.append(current)
-
- return node_list
-
-
-def FixFilenames(filenames, current_directory):
- new_list = []
- for filename in filenames:
- if filename:
- for key in REPLACEMENTS:
- filename = filename.replace(key, REPLACEMENTS[key])
- os.chdir(current_directory)
- filename = filename.strip('"\' ')
- if filename.startswith('$'):
- new_list.append(filename)
- else:
- new_list.append(os.path.abspath(filename))
- return new_list
-
-
-def AbsoluteNode(node):
- """Makes all the properties we know about in this node absolute."""
- if node.attributes:
- for (name, value) in node.attributes.items():
- if name in ['InheritedPropertySheets', 'RelativePath',
- 'AdditionalIncludeDirectories',
- 'IntermediateDirectory', 'OutputDirectory',
- 'AdditionalLibraryDirectories']:
- # We want to fix up these paths
- path_list = value.split(';')
- new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1]))
- node.setAttribute(name, ';'.join(new_list))
- if not value:
- node.removeAttribute(name)
-
-
-def CleanupVcproj(node):
- """For each sub node, we call recursively this function."""
- for sub_node in node.childNodes:
- AbsoluteNode(sub_node)
- CleanupVcproj(sub_node)
-
- # Normalize the node, and remove all extranous whitespaces.
- for sub_node in node.childNodes:
- if sub_node.nodeType == Node.TEXT_NODE:
- sub_node.data = sub_node.data.replace("\r", "")
- sub_node.data = sub_node.data.replace("\n", "")
- sub_node.data = sub_node.data.rstrip()
-
- # Fix all the semicolon separated attributes to be sorted, and we also
- # remove the dups.
- if node.attributes:
- for (name, value) in node.attributes.items():
- sorted_list = sorted(value.split(';'))
- unique_list = []
- for i in sorted_list:
- if not unique_list.count(i):
- unique_list.append(i)
- node.setAttribute(name, ';'.join(unique_list))
- if not value:
- node.removeAttribute(name)
-
- if node.childNodes:
- node.normalize()
-
- # For each node, take a copy, and remove it from the list.
- node_array = []
- while node.childNodes and node.childNodes[0]:
- # Take a copy of the node and remove it from the list.
- current = node.childNodes[0]
- node.removeChild(current)
-
- # If the child is a filter, we want to append all its children
- # to this same list.
- if current.nodeName == 'Filter':
- node_array.extend(FlattenFilter(current))
- else:
- node_array.append(current)
-
-
- # Sort the list.
- node_array.sort(CmpNode())
-
- # Insert the nodes in the correct order.
- for new_node in node_array:
- # But don't append empty tool node.
- if new_node.nodeName == 'Tool':
- if new_node.attributes and new_node.attributes.length == 1:
- # This one was empty.
- continue
- if new_node.nodeName == 'UserMacro':
- continue
- node.appendChild(new_node)
-
-
-def GetConfiguationNodes(vcproj):
- #TODO(nsylvain): Find a better way to navigate the xml.
- nodes = []
- for node in vcproj.childNodes:
- if node.nodeName == "Configurations":
- for sub_node in node.childNodes:
- if sub_node.nodeName == "Configuration":
- nodes.append(sub_node)
-
- return nodes
-
-
-def GetChildrenVsprops(filename):
- dom = parse(filename)
- if dom.documentElement.attributes:
- vsprops = dom.documentElement.getAttribute('InheritedPropertySheets')
- return FixFilenames(vsprops.split(';'), os.path.dirname(filename))
- return []
-
-def SeekToNode(node1, child2):
- # A text node does not have properties.
- if child2.nodeType == Node.TEXT_NODE:
- return None
-
- # Get the name of the current node.
- current_name = child2.getAttribute("Name")
- if not current_name:
- # There is no name. We don't know how to merge.
- return None
-
- # Look through all the nodes to find a match.
- for sub_node in node1.childNodes:
- if sub_node.nodeName == child2.nodeName:
- name = sub_node.getAttribute("Name")
- if name == current_name:
- return sub_node
-
- # No match. We give up.
- return None
-
-
-def MergeAttributes(node1, node2):
- # No attributes to merge?
- if not node2.attributes:
- return
-
- for (name, value2) in node2.attributes.items():
- # Don't merge the 'Name' attribute.
- if name == 'Name':
- continue
- value1 = node1.getAttribute(name)
- if value1:
- # The attribute exist in the main node. If it's equal, we leave it
- # untouched, otherwise we concatenate it.
- if value1 != value2:
- node1.setAttribute(name, ';'.join([value1, value2]))
- else:
- # The attribute does not exist in the main node. We append this one.
- node1.setAttribute(name, value2)
-
- # If the attribute was a property sheet attributes, we remove it, since
- # they are useless.
- if name == 'InheritedPropertySheets':
- node1.removeAttribute(name)
-
-
-def MergeProperties(node1, node2):
- MergeAttributes(node1, node2)
- for child2 in node2.childNodes:
- child1 = SeekToNode(node1, child2)
- if child1:
- MergeProperties(child1, child2)
- else:
- node1.appendChild(child2.cloneNode(True))
-
-
-def main(argv):
- """Main function of this vcproj prettifier."""
- global ARGUMENTS
- ARGUMENTS = argv
-
- # check if we have exactly 1 parameter.
- if len(argv) < 2:
- print(('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] '
- '[key2=value2]' % argv[0]))
- return 1
-
- # Parse the keys
- for i in range(2, len(argv)):
- (key, value) = argv[i].split('=')
- REPLACEMENTS[key] = value
-
- # Open the vcproj and parse the xml.
- dom = parse(argv[1])
-
- # First thing we need to do is find the Configuration Node and merge them
- # with the vsprops they include.
- for configuration_node in GetConfiguationNodes(dom.documentElement):
- # Get the property sheets associated with this configuration.
- vsprops = configuration_node.getAttribute('InheritedPropertySheets')
-
- # Fix the filenames to be absolute.
- vsprops_list = FixFilenames(vsprops.strip().split(';'),
- os.path.dirname(argv[1]))
-
- # Extend the list of vsprops with all vsprops contained in the current
- # vsprops.
- for current_vsprops in vsprops_list:
- vsprops_list.extend(GetChildrenVsprops(current_vsprops))
-
- # Now that we have all the vsprops, we need to merge them.
- for current_vsprops in vsprops_list:
- MergeProperties(configuration_node,
- parse(current_vsprops).documentElement)
-
- # Now that everything is merged, we need to cleanup the xml.
- CleanupVcproj(dom.documentElement)
-
- # Finally, we use the prett xml function to print the vcproj back to the
- # user.
- #print dom.toprettyxml(newl="\n")
- PrettyPrintNode(dom.documentElement)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/Find-VisualStudio.cs b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/Find-VisualStudio.cs
deleted file mode 100644
index 0a533f42d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/Find-VisualStudio.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright 2017 - Refael Ackermann
-// Distributed under MIT style license
-// See accompanying file LICENSE at https://github.com/node4good/windows-autoconf
-
-// Usage:
-// powershell -ExecutionPolicy Unrestricted -Command "Add-Type -Path Find-VisualStudio.cs; [VisualStudioConfiguration.Main]::PrintJson()"
-// This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7.
-
-using System;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
-
-namespace VisualStudioConfiguration
-{
- [Flags]
- public enum InstanceState : uint
- {
- None = 0,
- Local = 1,
- Registered = 2,
- NoRebootRequired = 4,
- NoErrors = 8,
- Complete = 4294967295,
- }
-
- [Guid("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumSetupInstances
- {
-
- void Next([MarshalAs(UnmanagedType.U4), In] int celt,
- [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface), Out] ISetupInstance[] rgelt,
- [MarshalAs(UnmanagedType.U4)] out int pceltFetched);
-
- void Skip([MarshalAs(UnmanagedType.U4), In] int celt);
-
- void Reset();
-
- [return: MarshalAs(UnmanagedType.Interface)]
- IEnumSetupInstances Clone();
- }
-
- [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupConfiguration
- {
- }
-
- [Guid("26AAB78C-4A60-49D6-AF3B-3C35BC93365D")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupConfiguration2 : ISetupConfiguration
- {
-
- [return: MarshalAs(UnmanagedType.Interface)]
- IEnumSetupInstances EnumInstances();
-
- [return: MarshalAs(UnmanagedType.Interface)]
- ISetupInstance GetInstanceForCurrentProcess();
-
- [return: MarshalAs(UnmanagedType.Interface)]
- ISetupInstance GetInstanceForPath([MarshalAs(UnmanagedType.LPWStr), In] string path);
-
- [return: MarshalAs(UnmanagedType.Interface)]
- IEnumSetupInstances EnumAllInstances();
- }
-
- [Guid("B41463C3-8866-43B5-BC33-2B0676F7F42E")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupInstance
- {
- }
-
- [Guid("89143C9A-05AF-49B0-B717-72E218A2185C")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupInstance2 : ISetupInstance
- {
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetInstanceId();
-
- [return: MarshalAs(UnmanagedType.Struct)]
- System.Runtime.InteropServices.ComTypes.FILETIME GetInstallDate();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetInstallationName();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetInstallationPath();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetInstallationVersion();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetDisplayName([MarshalAs(UnmanagedType.U4), In] int lcid);
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetDescription([MarshalAs(UnmanagedType.U4), In] int lcid);
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string ResolvePath([MarshalAs(UnmanagedType.LPWStr), In] string pwszRelativePath);
-
- [return: MarshalAs(UnmanagedType.U4)]
- InstanceState GetState();
-
- [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
- ISetupPackageReference[] GetPackages();
-
- ISetupPackageReference GetProduct();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetProductPath();
-
- [return: MarshalAs(UnmanagedType.VariantBool)]
- bool IsLaunchable();
-
- [return: MarshalAs(UnmanagedType.VariantBool)]
- bool IsComplete();
-
- [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
- ISetupPropertyStore GetProperties();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetEnginePath();
- }
-
- [Guid("DA8D8A16-B2B6-4487-A2F1-594CCCCD6BF5")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupPackageReference
- {
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetId();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetVersion();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetChip();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetLanguage();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetBranch();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetType();
-
- [return: MarshalAs(UnmanagedType.BStr)]
- string GetUniqueId();
-
- [return: MarshalAs(UnmanagedType.VariantBool)]
- bool GetIsExtension();
- }
-
- [Guid("c601c175-a3be-44bc-91f6-4568d230fc83")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ISetupPropertyStore
- {
-
- [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
- string[] GetNames();
-
- object GetValue([MarshalAs(UnmanagedType.LPWStr), In] string pwszName);
- }
-
- [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")]
- [CoClass(typeof(SetupConfigurationClass))]
- [ComImport]
- public interface SetupConfiguration : ISetupConfiguration2, ISetupConfiguration
- {
- }
-
- [Guid("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D")]
- [ClassInterface(ClassInterfaceType.None)]
- [ComImport]
- public class SetupConfigurationClass
- {
- }
-
- public static class Main
- {
- public static void PrintJson()
- {
- ISetupConfiguration query = new SetupConfiguration();
- ISetupConfiguration2 query2 = (ISetupConfiguration2)query;
- IEnumSetupInstances e = query2.EnumAllInstances();
-
- int pceltFetched;
- ISetupInstance2[] rgelt = new ISetupInstance2[1];
- List<string> instances = new List<string>();
- while (true)
- {
- e.Next(1, rgelt, out pceltFetched);
- if (pceltFetched <= 0)
- {
- Console.WriteLine(String.Format("[{0}]", string.Join(",", instances.ToArray())));
- return;
- }
-
- instances.Add(InstanceJson(rgelt[0]));
- }
- }
-
- private static string JsonString(string s)
- {
- return "\"" + s.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"";
- }
-
- private static string InstanceJson(ISetupInstance2 setupInstance2)
- {
- // Visual Studio component directory:
- // https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids
-
- StringBuilder json = new StringBuilder();
- json.Append("{");
-
- string path = JsonString(setupInstance2.GetInstallationPath());
- json.Append(String.Format("\"path\":{0},", path));
-
- string version = JsonString(setupInstance2.GetInstallationVersion());
- json.Append(String.Format("\"version\":{0},", version));
-
- List<string> packages = new List<string>();
- foreach (ISetupPackageReference package in setupInstance2.GetPackages())
- {
- string id = JsonString(package.GetId());
- packages.Add(id);
- }
- json.Append(String.Format("\"packages\":[{0}]", string.Join(",", packages.ToArray())));
-
- json.Append("}");
- return json.ToString();
- }
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js
deleted file mode 100644
index c2388fb34..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js
+++ /dev/null
@@ -1,204 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const glob = require('glob')
-const log = require('npmlog')
-const which = require('which')
-const win = process.platform === 'win32'
-
-function build (gyp, argv, callback) {
- var platformMake = 'make'
- if (process.platform === 'aix') {
- platformMake = 'gmake'
- } else if (process.platform.indexOf('bsd') !== -1) {
- platformMake = 'gmake'
- } else if (win && argv.length > 0) {
- argv = argv.map(function (target) {
- return '/t:' + target
- })
- }
-
- var makeCommand = gyp.opts.make || process.env.MAKE || platformMake
- var command = win ? 'msbuild' : makeCommand
- var jobs = gyp.opts.jobs || process.env.JOBS
- var buildType
- var config
- var arch
- var nodeDir
- var guessedSolution
-
- loadConfigGypi()
-
- /**
- * Load the "config.gypi" file that was generated during "configure".
- */
-
- function loadConfigGypi () {
- var configPath = path.resolve('build', 'config.gypi')
-
- fs.readFile(configPath, 'utf8', function (err, data) {
- if (err) {
- if (err.code === 'ENOENT') {
- callback(new Error('You must run `node-gyp configure` first!'))
- } else {
- callback(err)
- }
- return
- }
- config = JSON.parse(data.replace(/#.+\n/, ''))
-
- // get the 'arch', 'buildType', and 'nodeDir' vars from the config
- buildType = config.target_defaults.default_configuration
- arch = config.variables.target_arch
- nodeDir = config.variables.nodedir
-
- if ('debug' in gyp.opts) {
- buildType = gyp.opts.debug ? 'Debug' : 'Release'
- }
- if (!buildType) {
- buildType = 'Release'
- }
-
- log.verbose('build type', buildType)
- log.verbose('architecture', arch)
- log.verbose('node dev dir', nodeDir)
-
- if (win) {
- findSolutionFile()
- } else {
- doWhich()
- }
- })
- }
-
- /**
- * On Windows, find the first build/*.sln file.
- */
-
- function findSolutionFile () {
- glob('build/*.sln', function (err, files) {
- if (err) {
- return callback(err)
- }
- if (files.length === 0) {
- return callback(new Error('Could not find *.sln file. Did you run "configure"?'))
- }
- guessedSolution = files[0]
- log.verbose('found first Solution file', guessedSolution)
- doWhich()
- })
- }
-
- /**
- * Uses node-which to locate the msbuild / make executable.
- */
-
- function doWhich () {
- // On Windows use msbuild provided by node-gyp configure
- if (win) {
- if (!config.variables.msbuild_path) {
- return callback(new Error(
- 'MSBuild is not set, please run `node-gyp configure`.'))
- }
- command = config.variables.msbuild_path
- log.verbose('using MSBuild:', command)
- doBuild()
- return
- }
- // First make sure we have the build command in the PATH
- which(command, function (err, execPath) {
- if (err) {
- // Some other error or 'make' not found on Unix, report that to the user
- callback(err)
- return
- }
- log.verbose('`which` succeeded for `' + command + '`', execPath)
- doBuild()
- })
- }
-
- /**
- * Actually spawn the process and compile the module.
- */
-
- function doBuild () {
- // Enable Verbose build
- var verbose = log.levels[log.level] <= log.levels.verbose
- var j
-
- if (!win && verbose) {
- argv.push('V=1')
- }
-
- if (win && !verbose) {
- argv.push('/clp:Verbosity=minimal')
- }
-
- if (win) {
- // Turn off the Microsoft logo on Windows
- argv.push('/nologo')
- }
-
- // Specify the build type, Release by default
- if (win) {
- // Convert .gypi config target_arch to MSBuild /Platform
- // Since there are many ways to state '32-bit Intel', default to it.
- // N.B. msbuild's Condition string equality tests are case-insensitive.
- var archLower = arch.toLowerCase()
- var p = archLower === 'x64' ? 'x64'
- : (archLower === 'arm' ? 'ARM'
- : (archLower === 'arm64' ? 'ARM64' : 'Win32'))
- argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
- if (jobs) {
- j = parseInt(jobs, 10)
- if (!isNaN(j) && j > 0) {
- argv.push('/m:' + j)
- } else if (jobs.toUpperCase() === 'MAX') {
- argv.push('/m:' + require('os').cpus().length)
- }
- }
- } else {
- argv.push('BUILDTYPE=' + buildType)
- // Invoke the Makefile in the 'build' dir.
- argv.push('-C')
- argv.push('build')
- if (jobs) {
- j = parseInt(jobs, 10)
- if (!isNaN(j) && j > 0) {
- argv.push('--jobs')
- argv.push(j)
- } else if (jobs.toUpperCase() === 'MAX') {
- argv.push('--jobs')
- argv.push(require('os').cpus().length)
- }
- }
- }
-
- if (win) {
- // did the user specify their own .sln file?
- var hasSln = argv.some(function (arg) {
- return path.extname(arg) === '.sln'
- })
- if (!hasSln) {
- argv.unshift(gyp.opts.solution || guessedSolution)
- }
- }
-
- var proc = gyp.spawn(command, argv)
- proc.on('exit', onExit)
- }
-
- function onExit (code, signal) {
- if (code !== 0) {
- return callback(new Error('`' + command + '` failed with exit code: ' + code))
- }
- if (signal) {
- return callback(new Error('`' + command + '` got signal: ' + signal))
- }
- callback()
- }
-}
-
-module.exports = build
-module.exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/clean.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/clean.js
deleted file mode 100644
index dbfa4dbb9..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/clean.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict'
-
-const rm = require('rimraf')
-const log = require('npmlog')
-
-function clean (gyp, argv, callback) {
- // Remove the 'build' dir
- var buildDir = 'build'
-
- log.verbose('clean', 'removing "%s" directory', buildDir)
- rm(buildDir, callback)
-}
-
-module.exports = clean
-module.exports.usage = 'Removes any generated build files and the "out" dir'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/configure.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/configure.js
deleted file mode 100644
index 564564eea..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/configure.js
+++ /dev/null
@@ -1,386 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const path = require('path')
-const log = require('npmlog')
-const os = require('os')
-const mkdirp = require('mkdirp')
-const processRelease = require('./process-release')
-const win = process.platform === 'win32'
-const findNodeDirectory = require('./find-node-directory')
-const msgFormat = require('util').format
-var findPython = require('./find-python')
-if (win) {
- var findVisualStudio = require('./find-visualstudio')
-}
-
-function configure (gyp, argv, callback) {
- var python
- var buildDir = path.resolve('build')
- var configNames = ['config.gypi', 'common.gypi']
- var configs = []
- var nodeDir
- var release = processRelease(argv, gyp, process.version, process.release)
-
- findPython(gyp.opts.python, function (err, found) {
- if (err) {
- callback(err)
- } else {
- python = found
- getNodeDir()
- }
- })
-
- function getNodeDir () {
- // 'python' should be set by now
- process.env.PYTHON = python
-
- if (gyp.opts.nodedir) {
- // --nodedir was specified. use that for the dev files
- nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir())
-
- log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir)
- createBuildDir()
- } else {
- // if no --nodedir specified, ensure node dependencies are installed
- if ('v' + release.version !== process.version) {
- // if --target was given, then determine a target version to compile for
- log.verbose('get node dir', 'compiling against --target node version: %s', release.version)
- } else {
- // if no --target was specified then use the current host node version
- log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version)
- }
-
- if (!release.semver) {
- // could not parse the version string with semver
- return callback(new Error('Invalid version number: ' + release.version))
- }
-
- // If the tarball option is set, always remove and reinstall the headers
- // into devdir. Otherwise only install if they're not already there.
- gyp.opts.ensure = !gyp.opts.tarball
-
- gyp.commands.install([release.version], function (err) {
- if (err) {
- return callback(err)
- }
- log.verbose('get node dir', 'target node version installed:', release.versionDir)
- nodeDir = path.resolve(gyp.devDir, release.versionDir)
- createBuildDir()
- })
- }
- }
-
- function createBuildDir () {
- log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
- mkdirp(buildDir, function (err, isNew) {
- if (err) {
- return callback(err)
- }
- log.verbose('build dir', '"build" dir needed to be created?', isNew)
- if (win) {
- findVisualStudio(release.semver, gyp.opts.msvs_version,
- createConfigFile)
- } else {
- createConfigFile()
- }
- })
- }
-
- function createConfigFile (err, vsInfo) {
- if (err) {
- return callback(err)
- }
-
- var configFilename = 'config.gypi'
- var configPath = path.resolve(buildDir, configFilename)
-
- log.verbose('build/' + configFilename, 'creating config file')
-
- var config = process.config || {}
- var defaults = config.target_defaults
- var variables = config.variables
-
- // default "config.variables"
- if (!variables) {
- variables = config.variables = {}
- }
-
- // default "config.defaults"
- if (!defaults) {
- defaults = config.target_defaults = {}
- }
-
- // don't inherit the "defaults" from node's `process.config` object.
- // doing so could cause problems in cases where the `node` executable was
- // compiled on a different machine (with different lib/include paths) than
- // the machine where the addon is being built to
- defaults.cflags = []
- defaults.defines = []
- defaults.include_dirs = []
- defaults.libraries = []
-
- // set the default_configuration prop
- if ('debug' in gyp.opts) {
- defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release'
- }
-
- if (!defaults.default_configuration) {
- defaults.default_configuration = 'Release'
- }
-
- // set the target_arch variable
- variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
- if (variables.target_arch === 'arm64') {
- defaults.msvs_configuration_platform = 'ARM64'
- }
-
- // set the node development directory
- variables.nodedir = nodeDir
-
- // disable -T "thin" static archives by default
- variables.standalone_static_library = gyp.opts.thin ? 0 : 1
-
- if (win) {
- process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015)
- process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path
- defaults.msbuild_toolset = vsInfo.toolset
- if (vsInfo.sdk) {
- defaults.msvs_windows_target_platform_version = vsInfo.sdk
- }
- if (variables.target_arch === 'arm64') {
- if (vsInfo.versionMajor > 15 ||
- (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) {
- defaults.msvs_enable_marmasm = 1
- } else {
- log.warn('Compiling ARM64 assembly is only available in\n' +
- 'Visual Studio 2017 version 15.9 and above')
- }
- }
- variables.msbuild_path = vsInfo.msBuild
- }
-
- // loop through the rest of the opts and add the unknown ones as variables.
- // this allows for module-specific configure flags like:
- //
- // $ node-gyp configure --shared-libxml2
- Object.keys(gyp.opts).forEach(function (opt) {
- if (opt === 'argv') {
- return
- }
- if (opt in gyp.configDefs) {
- return
- }
- variables[opt.replace(/-/g, '_')] = gyp.opts[opt]
- })
-
- // ensures that any boolean values from `process.config` get stringified
- function boolsToString (k, v) {
- if (typeof v === 'boolean') {
- return String(v)
- }
- return v
- }
-
- log.silly('build/' + configFilename, config)
-
- // now write out the config.gypi file to the build/ dir
- var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
-
- var json = JSON.stringify(config, boolsToString, 2)
- log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
- configs.push(configPath)
- fs.writeFile(configPath, [prefix, json, ''].join('\n'), findConfigs)
- }
-
- function findConfigs (err) {
- if (err) {
- return callback(err)
- }
-
- var name = configNames.shift()
- if (!name) {
- return runGyp()
- }
- var fullPath = path.resolve(name)
-
- log.verbose(name, 'checking for gypi file: %s', fullPath)
- fs.stat(fullPath, function (err) {
- if (err) {
- if (err.code === 'ENOENT') {
- findConfigs() // check next gypi filename
- } else {
- callback(err)
- }
- } else {
- log.verbose(name, 'found gypi file')
- configs.push(fullPath)
- findConfigs()
- }
- })
- }
-
- function runGyp (err) {
- if (err) {
- return callback(err)
- }
-
- if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) {
- if (win) {
- log.verbose('gyp', 'gyp format was not specified; forcing "msvs"')
- // force the 'make' target for non-Windows
- argv.push('-f', 'msvs')
- } else {
- log.verbose('gyp', 'gyp format was not specified; forcing "make"')
- // force the 'make' target for non-Windows
- argv.push('-f', 'make')
- }
- }
-
- // include all the ".gypi" files that were found
- configs.forEach(function (config) {
- argv.push('-I', config)
- })
-
- // For AIX and z/OS we need to set up the path to the exports file
- // which contains the symbols needed for linking.
- var nodeExpFile
- if (process.platform === 'aix' || process.platform === 'os390') {
- var ext = process.platform === 'aix' ? 'exp' : 'x'
- var nodeRootDir = findNodeDirectory()
- var candidates
-
- if (process.platform === 'aix') {
- candidates = [
- 'include/node/node',
- 'out/Release/node',
- 'out/Debug/node',
- 'node'
- ].map(function (file) {
- return file + '.' + ext
- })
- } else {
- candidates = [
- 'out/Release/obj.target/libnode',
- 'out/Debug/obj.target/libnode',
- 'lib/libnode'
- ].map(function (file) {
- return file + '.' + ext
- })
- }
-
- var logprefix = 'find exports file'
- nodeExpFile = findAccessibleSync(logprefix, nodeRootDir, candidates)
- if (nodeExpFile !== undefined) {
- log.verbose(logprefix, 'Found exports file: %s', nodeExpFile)
- } else {
- var msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir)
- log.error(logprefix, 'Could not find exports file')
- return callback(new Error(msg))
- }
- }
-
- // this logic ported from the old `gyp_addon` python file
- var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
- var addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
- var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
- fs.stat(commonGypi, function (err) {
- if (err) {
- commonGypi = path.resolve(nodeDir, 'common.gypi')
- }
-
- var outputDir = 'build'
- if (win) {
- // Windows expects an absolute path
- outputDir = buildDir
- }
- var nodeGypDir = path.resolve(__dirname, '..')
-
- var nodeLibFile = path.join(nodeDir,
- !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
- release.name + '.lib')
-
- argv.push('-I', addonGypi)
- argv.push('-I', commonGypi)
- argv.push('-Dlibrary=shared_library')
- argv.push('-Dvisibility=default')
- argv.push('-Dnode_root_dir=' + nodeDir)
- if (process.platform === 'aix' || process.platform === 'os390') {
- argv.push('-Dnode_exp_file=' + nodeExpFile)
- }
- argv.push('-Dnode_gyp_dir=' + nodeGypDir)
-
- // Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up,
- // resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder
- if (win) {
- nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\')
- }
- argv.push('-Dnode_lib_file=' + nodeLibFile)
- argv.push('-Dmodule_root_dir=' + process.cwd())
- argv.push('-Dnode_engine=' +
- (gyp.opts.node_engine || process.jsEngine || 'v8'))
- argv.push('--depth=.')
- argv.push('--no-parallel')
-
- // tell gyp to write the Makefile/Solution files into output_dir
- argv.push('--generator-output', outputDir)
-
- // tell make to write its output into the same dir
- argv.push('-Goutput_dir=.')
-
- // enforce use of the "binding.gyp" file
- argv.unshift('binding.gyp')
-
- // execute `gyp` from the current target nodedir
- argv.unshift(gypScript)
-
- // make sure python uses files that came with this particular node package
- var pypath = [path.join(__dirname, '..', 'gyp', 'pylib')]
- if (process.env.PYTHONPATH) {
- pypath.push(process.env.PYTHONPATH)
- }
- process.env.PYTHONPATH = pypath.join(win ? ';' : ':')
-
- var cp = gyp.spawn(python, argv)
- cp.on('exit', onCpExit)
- })
- }
-
- function onCpExit (code) {
- if (code !== 0) {
- callback(new Error('`gyp` failed with exit code: ' + code))
- } else {
- // we're done
- callback()
- }
- }
-}
-
-/**
- * Returns the first file or directory from an array of candidates that is
- * readable by the current user, or undefined if none of the candidates are
- * readable.
- */
-function findAccessibleSync (logprefix, dir, candidates) {
- for (var next = 0; next < candidates.length; next++) {
- var candidate = path.resolve(dir, candidates[next])
- try {
- var fd = fs.openSync(candidate, 'r')
- } catch (e) {
- // this candidate was not found or not readable, do nothing
- log.silly(logprefix, 'Could not open %s: %s', candidate, e.message)
- continue
- }
- fs.closeSync(fd)
- log.silly(logprefix, 'Found readable %s', candidate)
- return candidate
- }
-
- return undefined
-}
-
-module.exports = configure
-module.exports.test = {
- findAccessibleSync: findAccessibleSync
-}
-module.exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-node-directory.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-node-directory.js
deleted file mode 100644
index 0dd781a6c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-node-directory.js
+++ /dev/null
@@ -1,63 +0,0 @@
-'use strict'
-
-const path = require('path')
-const log = require('npmlog')
-
-function findNodeDirectory (scriptLocation, processObj) {
- // set dirname and process if not passed in
- // this facilitates regression tests
- if (scriptLocation === undefined) {
- scriptLocation = __dirname
- }
- if (processObj === undefined) {
- processObj = process
- }
-
- // Have a look to see what is above us, to try and work out where we are
- var npmParentDirectory = path.join(scriptLocation, '../../../..')
- log.verbose('node-gyp root', 'npm_parent_directory is ' +
- path.basename(npmParentDirectory))
- var nodeRootDir = ''
-
- log.verbose('node-gyp root', 'Finding node root directory')
- if (path.basename(npmParentDirectory) === 'deps') {
- // We are in a build directory where this script lives in
- // deps/npm/node_modules/node-gyp/lib
- nodeRootDir = path.join(npmParentDirectory, '..')
- log.verbose('node-gyp root', 'in build directory, root = ' +
- nodeRootDir)
- } else if (path.basename(npmParentDirectory) === 'node_modules') {
- // We are in a node install directory where this script lives in
- // lib/node_modules/npm/node_modules/node-gyp/lib or
- // node_modules/npm/node_modules/node-gyp/lib depending on the
- // platform
- if (processObj.platform === 'win32') {
- nodeRootDir = path.join(npmParentDirectory, '..')
- } else {
- nodeRootDir = path.join(npmParentDirectory, '../..')
- }
- log.verbose('node-gyp root', 'in install directory, root = ' +
- nodeRootDir)
- } else {
- // We don't know where we are, try working it out from the location
- // of the node binary
- var nodeDir = path.dirname(processObj.execPath)
- var directoryUp = path.basename(nodeDir)
- if (directoryUp === 'bin') {
- nodeRootDir = path.join(nodeDir, '..')
- } else if (directoryUp === 'Release' || directoryUp === 'Debug') {
- // If we are a recently built node, and the directory structure
- // is that of a repository. If we are on Windows then we only need
- // to go one level up, everything else, two
- if (processObj.platform === 'win32') {
- nodeRootDir = path.join(nodeDir, '..')
- } else {
- nodeRootDir = path.join(nodeDir, '../..')
- }
- }
- // Else return the default blank, "".
- }
- return nodeRootDir
-}
-
-module.exports = findNodeDirectory
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-python.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-python.js
deleted file mode 100644
index 43bf85985..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-python.js
+++ /dev/null
@@ -1,321 +0,0 @@
-'use strict'
-
-const path = require('path')
-const log = require('npmlog')
-const semver = require('semver')
-const cp = require('child_process')
-const extend = require('util')._extend // eslint-disable-line
-const win = process.platform === 'win32'
-const logWithPrefix = require('./util').logWithPrefix
-
-function PythonFinder (configPython, callback) {
- this.callback = callback
- this.configPython = configPython
- this.errorLog = []
-}
-
-PythonFinder.prototype = {
- log: logWithPrefix(log, 'find Python'),
- argsExecutable: ['-c', 'import sys; print(sys.executable);'],
- argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
- semverRange: '2.7.x || >=3.5.0',
-
- // These can be overridden for testing:
- execFile: cp.execFile,
- env: process.env,
- win: win,
- pyLauncher: 'py.exe',
- winDefaultLocations: [
- path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe'),
- path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe')
- ],
-
- // Logs a message at verbose level, but also saves it to be displayed later
- // at error level if an error occurs. This should help diagnose the problem.
- addLog: function addLog (message) {
- this.log.verbose(message)
- this.errorLog.push(message)
- },
-
- // Find Python by trying a sequence of possibilities.
- // Ignore errors, keep trying until Python is found.
- findPython: function findPython () {
- const SKIP = 0; const FAIL = 1
- var toCheck = getChecks.apply(this)
-
- function getChecks () {
- if (this.env.NODE_GYP_FORCE_PYTHON) {
- return [{
- before: () => {
- this.addLog(
- 'checking Python explicitly set from NODE_GYP_FORCE_PYTHON')
- this.addLog('- process.env.NODE_GYP_FORCE_PYTHON is ' +
- `"${this.env.NODE_GYP_FORCE_PYTHON}"`)
- },
- check: this.checkCommand,
- arg: this.env.NODE_GYP_FORCE_PYTHON
- }]
- }
-
- var checks = [
- {
- before: () => {
- if (!this.configPython) {
- this.addLog(
- 'Python is not set from command line or npm configuration')
- return SKIP
- }
- this.addLog('checking Python explicitly set from command line or ' +
- 'npm configuration')
- this.addLog('- "--python=" or "npm config get python" is ' +
- `"${this.configPython}"`)
- },
- check: this.checkCommand,
- arg: this.configPython
- },
- {
- before: () => {
- if (!this.env.PYTHON) {
- this.addLog('Python is not set from environment variable ' +
- 'PYTHON')
- return SKIP
- }
- this.addLog('checking Python explicitly set from environment ' +
- 'variable PYTHON')
- this.addLog(`- process.env.PYTHON is "${this.env.PYTHON}"`)
- },
- check: this.checkCommand,
- arg: this.env.PYTHON
- },
- {
- before: () => { this.addLog('checking if "python3" can be used') },
- check: this.checkCommand,
- arg: 'python3'
- },
- {
- before: () => { this.addLog('checking if "python" can be used') },
- check: this.checkCommand,
- arg: 'python'
- },
- {
- before: () => { this.addLog('checking if "python2" can be used') },
- check: this.checkCommand,
- arg: 'python2'
- }
- ]
-
- if (this.win) {
- for (var i = 0; i < this.winDefaultLocations.length; ++i) {
- const location = this.winDefaultLocations[i]
- checks.push({
- before: () => {
- this.addLog('checking if Python is ' +
- `${location}`)
- },
- check: this.checkExecPath,
- arg: location
- })
- }
- checks.push({
- before: () => {
- this.addLog(
- 'checking if the py launcher can be used to find Python 2')
- },
- check: this.checkPyLauncher
- })
- }
-
- return checks
- }
-
- function runChecks (err) {
- this.log.silly('runChecks: err = %j', (err && err.stack) || err)
-
- const check = toCheck.shift()
- if (!check) {
- return this.fail()
- }
-
- const before = check.before.apply(this)
- if (before === SKIP) {
- return runChecks.apply(this)
- }
- if (before === FAIL) {
- return this.fail()
- }
-
- const args = [runChecks.bind(this)]
- if (check.arg) {
- args.unshift(check.arg)
- }
- check.check.apply(this, args)
- }
-
- runChecks.apply(this)
- },
-
- // Check if command is a valid Python to use.
- // Will exit the Python finder on success.
- // If on Windows, run in a CMD shell to support BAT/CMD launchers.
- checkCommand: function checkCommand (command, errorCallback) {
- var exec = command
- var args = this.argsExecutable
- var shell = false
- if (this.win) {
- // Arguments have to be manually quoted
- exec = `"${exec}"`
- args = args.map(a => `"${a}"`)
- shell = true
- }
-
- this.log.verbose(`- executing "${command}" to get executable path`)
- this.run(exec, args, shell, function (err, execPath) {
- // Possible outcomes:
- // - Error: not in PATH, not executable or execution fails
- // - Gibberish: the next command to check version will fail
- // - Absolute path to executable
- if (err) {
- this.addLog(`- "${command}" is not in PATH or produced an error`)
- return errorCallback(err)
- }
- this.addLog(`- executable path is "${execPath}"`)
- this.checkExecPath(execPath, errorCallback)
- }.bind(this))
- },
-
- // Check if the py launcher can find a valid Python to use.
- // Will exit the Python finder on success.
- // Distributions of Python on Windows by default install with the "py.exe"
- // Python launcher which is more likely to exist than the Python executable
- // being in the $PATH.
- // Because the Python launcher supports all versions of Python, we have to
- // explicitly request a Python 2 version. This is done by supplying "-2" as
- // the first command line argument. Since "py.exe -2" would be an invalid
- // executable for "execFile", we have to use the launcher to figure out
- // where the actual "python.exe" executable is located.
- checkPyLauncher: function checkPyLauncher (errorCallback) {
- this.log.verbose(
- `- executing "${this.pyLauncher}" to get Python 2 executable path`)
- this.run(this.pyLauncher, ['-2', ...this.argsExecutable], false,
- function (err, execPath) {
- // Possible outcomes: same as checkCommand
- if (err) {
- this.addLog(
- `- "${this.pyLauncher}" is not in PATH or produced an error`)
- return errorCallback(err)
- }
- this.addLog(`- executable path is "${execPath}"`)
- this.checkExecPath(execPath, errorCallback)
- }.bind(this))
- },
-
- // Check if a Python executable is the correct version to use.
- // Will exit the Python finder on success.
- checkExecPath: function checkExecPath (execPath, errorCallback) {
- this.log.verbose(`- executing "${execPath}" to get version`)
- this.run(execPath, this.argsVersion, false, function (err, version) {
- // Possible outcomes:
- // - Error: executable can not be run (likely meaning the command wasn't
- // a Python executable and the previous command produced gibberish)
- // - Gibberish: somehow the last command produced an executable path,
- // this will fail when verifying the version
- // - Version of the Python executable
- if (err) {
- this.addLog(`- "${execPath}" could not be run`)
- return errorCallback(err)
- }
- this.addLog(`- version is "${version}"`)
-
- const range = new semver.Range(this.semverRange)
- var valid = false
- try {
- valid = range.test(version)
- } catch (err) {
- this.log.silly('range.test() threw:\n%s', err.stack)
- this.addLog(`- "${execPath}" does not have a valid version`)
- this.addLog('- is it a Python executable?')
- return errorCallback(err)
- }
-
- if (!valid) {
- this.addLog(`- version is ${version} - should be ${this.semverRange}`)
- this.addLog('- THIS VERSION OF PYTHON IS NOT SUPPORTED')
- return errorCallback(new Error(
- `Found unsupported Python version ${version}`))
- }
- this.succeed(execPath, version)
- }.bind(this))
- },
-
- // Run an executable or shell command, trimming the output.
- run: function run (exec, args, shell, callback) {
- var env = extend({}, this.env)
- env.TERM = 'dumb'
- const opts = { env: env, shell: shell }
-
- this.log.silly('execFile: exec = %j', exec)
- this.log.silly('execFile: args = %j', args)
- this.log.silly('execFile: opts = %j', opts)
- try {
- this.execFile(exec, args, opts, execFileCallback.bind(this))
- } catch (err) {
- this.log.silly('execFile: threw:\n%s', err.stack)
- return callback(err)
- }
-
- function execFileCallback (err, stdout, stderr) {
- this.log.silly('execFile result: err = %j', (err && err.stack) || err)
- this.log.silly('execFile result: stdout = %j', stdout)
- this.log.silly('execFile result: stderr = %j', stderr)
- if (err) {
- return callback(err)
- }
- const execPath = stdout.trim()
- callback(null, execPath)
- }
- },
-
- succeed: function succeed (execPath, version) {
- this.log.info(`using Python version ${version} found at "${execPath}"`)
- process.nextTick(this.callback.bind(null, null, execPath))
- },
-
- fail: function fail () {
- const errorLog = this.errorLog.join('\n')
-
- const pathExample = this.win ? 'C:\\Path\\To\\python.exe'
- : '/path/to/pythonexecutable'
- // For Windows 80 col console, use up to the column before the one marked
- // with X (total 79 chars including logger prefix, 58 chars usable here):
- // X
- const info = [
- '**********************************************************',
- 'You need to install the latest version of Python.',
- 'Node-gyp should be able to find and use Python. If not,',
- 'you can try one of the following options:',
- `- Use the switch --python="${pathExample}"`,
- ' (accepted by both node-gyp and npm)',
- '- Set the environment variable PYTHON',
- '- Set the npm configuration variable python:',
- ` npm config set python "${pathExample}"`,
- 'For more information consult the documentation at:',
- 'https://github.com/nodejs/node-gyp#installation',
- '**********************************************************'
- ].join('\n')
-
- this.log.error(`\n${errorLog}\n\n${info}\n`)
- process.nextTick(this.callback.bind(null, new Error(
- 'Could not find any Python installation to use')))
- }
-}
-
-function findPython (configPython, callback) {
- var finder = new PythonFinder(configPython, callback)
- finder.findPython()
-}
-
-module.exports = findPython
-module.exports.test = {
- PythonFinder: PythonFinder,
- findPython: findPython
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-visualstudio.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-visualstudio.js
deleted file mode 100644
index c5d26f9a2..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/find-visualstudio.js
+++ /dev/null
@@ -1,434 +0,0 @@
-'use strict'
-
-const log = require('npmlog')
-const execFile = require('child_process').execFile
-const path = require('path').win32
-const logWithPrefix = require('./util').logWithPrefix
-const regSearchKeys = require('./util').regSearchKeys
-
-function findVisualStudio (nodeSemver, configMsvsVersion, callback) {
- const finder = new VisualStudioFinder(nodeSemver, configMsvsVersion,
- callback)
- finder.findVisualStudio()
-}
-
-function VisualStudioFinder (nodeSemver, configMsvsVersion, callback) {
- this.nodeSemver = nodeSemver
- this.configMsvsVersion = configMsvsVersion
- this.callback = callback
- this.errorLog = []
- this.validVersions = []
-}
-
-VisualStudioFinder.prototype = {
- log: logWithPrefix(log, 'find VS'),
-
- regSearchKeys: regSearchKeys,
-
- // Logs a message at verbose level, but also saves it to be displayed later
- // at error level if an error occurs. This should help diagnose the problem.
- addLog: function addLog (message) {
- this.log.verbose(message)
- this.errorLog.push(message)
- },
-
- findVisualStudio: function findVisualStudio () {
- this.configVersionYear = null
- this.configPath = null
- if (this.configMsvsVersion) {
- this.addLog('msvs_version was set from command line or npm config')
- if (this.configMsvsVersion.match(/^\d{4}$/)) {
- this.configVersionYear = parseInt(this.configMsvsVersion, 10)
- this.addLog(
- `- looking for Visual Studio version ${this.configVersionYear}`)
- } else {
- this.configPath = path.resolve(this.configMsvsVersion)
- this.addLog(
- `- looking for Visual Studio installed in "${this.configPath}"`)
- }
- } else {
- this.addLog('msvs_version not set from command line or npm config')
- }
-
- if (process.env.VCINSTALLDIR) {
- this.envVcInstallDir =
- path.resolve(process.env.VCINSTALLDIR, '..')
- this.addLog('running in VS Command Prompt, installation path is:\n' +
- `"${this.envVcInstallDir}"\n- will only use this version`)
- } else {
- this.addLog('VCINSTALLDIR not set, not running in VS Command Prompt')
- }
-
- this.findVisualStudio2017OrNewer((info) => {
- if (info) {
- return this.succeed(info)
- }
- this.findVisualStudio2015((info) => {
- if (info) {
- return this.succeed(info)
- }
- this.findVisualStudio2013((info) => {
- if (info) {
- return this.succeed(info)
- }
- this.fail()
- })
- })
- })
- },
-
- succeed: function succeed (info) {
- this.log.info(`using VS${info.versionYear} (${info.version}) found at:` +
- `\n"${info.path}"` +
- '\nrun with --verbose for detailed information')
- process.nextTick(this.callback.bind(null, null, info))
- },
-
- fail: function fail () {
- if (this.configMsvsVersion && this.envVcInstallDir) {
- this.errorLog.push(
- 'msvs_version does not match this VS Command Prompt or the',
- 'installation cannot be used.')
- } else if (this.configMsvsVersion) {
- // If msvs_version was specified but finding VS failed, print what would
- // have been accepted
- this.errorLog.push('')
- if (this.validVersions) {
- this.errorLog.push('valid versions for msvs_version:')
- this.validVersions.forEach((version) => {
- this.errorLog.push(`- "${version}"`)
- })
- } else {
- this.errorLog.push('no valid versions for msvs_version were found')
- }
- }
-
- const errorLog = this.errorLog.join('\n')
-
- // For Windows 80 col console, use up to the column before the one marked
- // with X (total 79 chars including logger prefix, 62 chars usable here):
- // X
- const infoLog = [
- '**************************************************************',
- 'You need to install the latest version of Visual Studio',
- 'including the "Desktop development with C++" workload.',
- 'For more information consult the documentation at:',
- 'https://github.com/nodejs/node-gyp#on-windows',
- '**************************************************************'
- ].join('\n')
-
- this.log.error(`\n${errorLog}\n\n${infoLog}\n`)
- process.nextTick(this.callback.bind(null, new Error(
- 'Could not find any Visual Studio installation to use')))
- },
-
- // Invoke the PowerShell script to get information about Visual Studio 2017
- // or newer installations
- findVisualStudio2017OrNewer: function findVisualStudio2017OrNewer (cb) {
- var ps = path.join(process.env.SystemRoot, 'System32',
- 'WindowsPowerShell', 'v1.0', 'powershell.exe')
- var csFile = path.join(__dirname, 'Find-VisualStudio.cs')
- var psArgs = [
- '-ExecutionPolicy',
- 'Unrestricted',
- '-NoProfile',
- '-Command',
- '&{Add-Type -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}'
- ]
-
- this.log.silly('Running', ps, psArgs)
- var child = execFile(ps, psArgs, { encoding: 'utf8' },
- (err, stdout, stderr) => {
- this.parseData(err, stdout, stderr, cb)
- })
- child.stdin.end()
- },
-
- // Parse the output of the PowerShell script and look for an installation
- // of Visual Studio 2017 or newer to use
- parseData: function parseData (err, stdout, stderr, cb) {
- this.log.silly('PS stderr = %j', stderr)
-
- const failPowershell = () => {
- this.addLog(
- 'could not use PowerShell to find Visual Studio 2017 or newer')
- cb(null)
- }
-
- if (err) {
- this.log.silly('PS err = %j', err && (err.stack || err))
- return failPowershell()
- }
-
- var vsInfo
- try {
- vsInfo = JSON.parse(stdout)
- } catch (e) {
- this.log.silly('PS stdout = %j', stdout)
- this.log.silly(e)
- return failPowershell()
- }
-
- if (!Array.isArray(vsInfo)) {
- this.log.silly('PS stdout = %j', stdout)
- return failPowershell()
- }
-
- vsInfo = vsInfo.map((info) => {
- this.log.silly(`processing installation: "${info.path}"`)
- info.path = path.resolve(info.path)
- var ret = this.getVersionInfo(info)
- ret.path = info.path
- ret.msBuild = this.getMSBuild(info, ret.versionYear)
- ret.toolset = this.getToolset(info, ret.versionYear)
- ret.sdk = this.getSDK(info)
- return ret
- })
- this.log.silly('vsInfo:', vsInfo)
-
- // Remove future versions or errors parsing version number
- vsInfo = vsInfo.filter((info) => {
- if (info.versionYear) {
- return true
- }
- this.addLog(`unknown version "${info.version}" found at "${info.path}"`)
- return false
- })
-
- // Sort to place newer versions first
- vsInfo.sort((a, b) => b.versionYear - a.versionYear)
-
- for (var i = 0; i < vsInfo.length; ++i) {
- const info = vsInfo[i]
- this.addLog(`checking VS${info.versionYear} (${info.version}) found ` +
- `at:\n"${info.path}"`)
-
- if (info.msBuild) {
- this.addLog('- found "Visual Studio C++ core features"')
- } else {
- this.addLog('- "Visual Studio C++ core features" missing')
- continue
- }
-
- if (info.toolset) {
- this.addLog(`- found VC++ toolset: ${info.toolset}`)
- } else {
- this.addLog('- missing any VC++ toolset')
- continue
- }
-
- if (info.sdk) {
- this.addLog(`- found Windows SDK: ${info.sdk}`)
- } else {
- this.addLog('- missing any Windows SDK')
- continue
- }
-
- if (!this.checkConfigVersion(info.versionYear, info.path)) {
- continue
- }
-
- return cb(info)
- }
-
- this.addLog(
- 'could not find a version of Visual Studio 2017 or newer to use')
- cb(null)
- },
-
- // Helper - process version information
- getVersionInfo: function getVersionInfo (info) {
- const match = /^(\d+)\.(\d+)\..*/.exec(info.version)
- if (!match) {
- this.log.silly('- failed to parse version:', info.version)
- return {}
- }
- this.log.silly('- version match = %j', match)
- var ret = {
- version: info.version,
- versionMajor: parseInt(match[1], 10),
- versionMinor: parseInt(match[2], 10)
- }
- if (ret.versionMajor === 15) {
- ret.versionYear = 2017
- return ret
- }
- if (ret.versionMajor === 16) {
- ret.versionYear = 2019
- return ret
- }
- this.log.silly('- unsupported version:', ret.versionMajor)
- return {}
- },
-
- // Helper - process MSBuild information
- getMSBuild: function getMSBuild (info, versionYear) {
- const pkg = 'Microsoft.VisualStudio.VC.MSBuild.Base'
- if (info.packages.indexOf(pkg) !== -1) {
- this.log.silly('- found VC.MSBuild.Base')
- if (versionYear === 2017) {
- return path.join(info.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe')
- }
- if (versionYear === 2019) {
- return path.join(info.path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe')
- }
- }
- return null
- },
-
- // Helper - process toolset information
- getToolset: function getToolset (info, versionYear) {
- const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
- const express = 'Microsoft.VisualStudio.WDExpress'
-
- if (info.packages.indexOf(pkg) !== -1) {
- this.log.silly('- found VC.Tools.x86.x64')
- } else if (info.packages.indexOf(express) !== -1) {
- this.log.silly('- found Visual Studio Express (looking for toolset)')
- } else {
- return null
- }
-
- if (versionYear === 2017) {
- return 'v141'
- } else if (versionYear === 2019) {
- return 'v142'
- }
- this.log.silly('- invalid versionYear:', versionYear)
- return null
- },
-
- // Helper - process Windows SDK information
- getSDK: function getSDK (info) {
- const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK'
- const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'
-
- var Win10SDKVer = 0
- info.packages.forEach((pkg) => {
- if (!pkg.startsWith(win10SDKPrefix)) {
- return
- }
- const parts = pkg.split('.')
- if (parts.length > 5 && parts[5] !== 'Desktop') {
- this.log.silly('- ignoring non-Desktop Win10SDK:', pkg)
- return
- }
- const foundSdkVer = parseInt(parts[4], 10)
- if (isNaN(foundSdkVer)) {
- // Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb
- this.log.silly('- failed to parse Win10SDK number:', pkg)
- return
- }
- this.log.silly('- found Win10SDK:', foundSdkVer)
- Win10SDKVer = Math.max(Win10SDKVer, foundSdkVer)
- })
-
- if (Win10SDKVer !== 0) {
- return `10.0.${Win10SDKVer}.0`
- } else if (info.packages.indexOf(win8SDK) !== -1) {
- this.log.silly('- found Win8SDK')
- return '8.1'
- }
- return null
- },
-
- // Find an installation of Visual Studio 2015 to use
- findVisualStudio2015: function findVisualStudio2015 (cb) {
- return this.findOldVS({
- version: '14.0',
- versionMajor: 14,
- versionMinor: 0,
- versionYear: 2015,
- toolset: 'v140'
- }, cb)
- },
-
- // Find an installation of Visual Studio 2013 to use
- findVisualStudio2013: function findVisualStudio2013 (cb) {
- if (this.nodeSemver.major >= 9) {
- this.addLog(
- 'not looking for VS2013 as it is only supported up to Node.js 8')
- return cb(null)
- }
- return this.findOldVS({
- version: '12.0',
- versionMajor: 12,
- versionMinor: 0,
- versionYear: 2013,
- toolset: 'v120'
- }, cb)
- },
-
- // Helper - common code for VS2013 and VS2015
- findOldVS: function findOldVS (info, cb) {
- const regVC7 = ['HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7',
- 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7']
- const regMSBuild = 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions'
-
- this.addLog(`looking for Visual Studio ${info.versionYear}`)
- this.regSearchKeys(regVC7, info.version, [], (err, res) => {
- if (err) {
- this.addLog('- not found')
- return cb(null)
- }
-
- const vsPath = path.resolve(res, '..')
- this.addLog(`- found in "${vsPath}"`)
-
- const msBuildRegOpts = process.arch === 'ia32' ? [] : ['/reg:32']
- this.regSearchKeys([`${regMSBuild}\\${info.version}`],
- 'MSBuildToolsPath', msBuildRegOpts, (err, res) => {
- if (err) {
- this.addLog(
- '- could not find MSBuild in registry for this version')
- return cb(null)
- }
-
- const msBuild = path.join(res, 'MSBuild.exe')
- this.addLog(`- MSBuild in "${msBuild}"`)
-
- if (!this.checkConfigVersion(info.versionYear, vsPath)) {
- return cb(null)
- }
-
- info.path = vsPath
- info.msBuild = msBuild
- info.sdk = null
- cb(info)
- })
- })
- },
-
- // After finding a usable version of Visual Stuido:
- // - add it to validVersions to be displayed at the end if a specific
- // version was requested and not found;
- // - check if this is the version that was requested.
- // - check if this matches the Visual Studio Command Prompt
- checkConfigVersion: function checkConfigVersion (versionYear, vsPath) {
- this.validVersions.push(versionYear)
- this.validVersions.push(vsPath)
-
- if (this.configVersionYear && this.configVersionYear !== versionYear) {
- this.addLog('- msvs_version does not match this version')
- return false
- }
- if (this.configPath &&
- path.relative(this.configPath, vsPath) !== '') {
- this.addLog('- msvs_version does not point to this installation')
- return false
- }
- if (this.envVcInstallDir &&
- path.relative(this.envVcInstallDir, vsPath) !== '') {
- this.addLog('- does not match this Visual Studio Command Prompt')
- return false
- }
-
- return true
- }
-}
-
-module.exports = findVisualStudio
-module.exports.test = {
- VisualStudioFinder: VisualStudioFinder,
- findVisualStudio: findVisualStudio
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/install.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/install.js
deleted file mode 100644
index c919c1058..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/install.js
+++ /dev/null
@@ -1,448 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const os = require('os')
-const tar = require('tar')
-const path = require('path')
-const crypto = require('crypto')
-const log = require('npmlog')
-const semver = require('semver')
-const request = require('request')
-const mkdir = require('mkdirp')
-const processRelease = require('./process-release')
-const win = process.platform === 'win32'
-const getProxyFromURI = require('./proxy')
-
-function install (fs, gyp, argv, callback) {
- var release = processRelease(argv, gyp, process.version, process.release)
-
- // ensure no double-callbacks happen
- function cb (err) {
- if (cb.done) {
- return
- }
- cb.done = true
- if (err) {
- log.warn('install', 'got an error, rolling back install')
- // roll-back the install if anything went wrong
- gyp.commands.remove([release.versionDir], function () {
- callback(err)
- })
- } else {
- callback(null, release.version)
- }
- }
-
- // Determine which node dev files version we are installing
- log.verbose('install', 'input version string %j', release.version)
-
- if (!release.semver) {
- // could not parse the version string with semver
- return callback(new Error('Invalid version number: ' + release.version))
- }
-
- if (semver.lt(release.version, '0.8.0')) {
- return callback(new Error('Minimum target version is `0.8.0` or greater. Got: ' + release.version))
- }
-
- // 0.x.y-pre versions are not published yet and cannot be installed. Bail.
- if (release.semver.prerelease[0] === 'pre') {
- log.verbose('detected "pre" node version', release.version)
- if (gyp.opts.nodedir) {
- log.verbose('--nodedir flag was passed; skipping install', gyp.opts.nodedir)
- callback()
- } else {
- callback(new Error('"pre" versions of node cannot be installed, use the --nodedir flag instead'))
- }
- return
- }
-
- // flatten version into String
- log.verbose('install', 'installing version: %s', release.versionDir)
-
- // the directory where the dev files will be installed
- var devDir = path.resolve(gyp.devDir, release.versionDir)
-
- // If '--ensure' was passed, then don't *always* install the version;
- // check if it is already installed, and only install when needed
- if (gyp.opts.ensure) {
- log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed')
- fs.stat(devDir, function (err) {
- if (err) {
- if (err.code === 'ENOENT') {
- log.verbose('install', 'version not already installed, continuing with install', release.version)
- go()
- } else if (err.code === 'EACCES') {
- eaccesFallback(err)
- } else {
- cb(err)
- }
- return
- }
- log.verbose('install', 'version is already installed, need to check "installVersion"')
- var installVersionFile = path.resolve(devDir, 'installVersion')
- fs.readFile(installVersionFile, 'ascii', function (err, ver) {
- if (err && err.code !== 'ENOENT') {
- return cb(err)
- }
- var installVersion = parseInt(ver, 10) || 0
- log.verbose('got "installVersion"', installVersion)
- log.verbose('needs "installVersion"', gyp.package.installVersion)
- if (installVersion < gyp.package.installVersion) {
- log.verbose('install', 'version is no good; reinstalling')
- go()
- } else {
- log.verbose('install', 'version is good')
- cb()
- }
- })
- })
- } else {
- go()
- }
-
- function getContentSha (res, callback) {
- var shasum = crypto.createHash('sha256')
- res.on('data', function (chunk) {
- shasum.update(chunk)
- }).on('end', function () {
- callback(null, shasum.digest('hex'))
- })
- }
-
- function go () {
- log.verbose('ensuring nodedir is created', devDir)
-
- // first create the dir for the node dev files
- mkdir(devDir, function (err, created) {
- if (err) {
- if (err.code === 'EACCES') {
- eaccesFallback(err)
- } else {
- cb(err)
- }
- return
- }
-
- if (created) {
- log.verbose('created nodedir', created)
- }
-
- // now download the node tarball
- var tarPath = gyp.opts.tarball
- var badDownload = false
- var extractCount = 0
- var contentShasums = {}
- var expectShasums = {}
-
- // checks if a file to be extracted from the tarball is valid.
- // only .h header files and the gyp files get extracted
- function isValid (path) {
- var isValid = valid(path)
- if (isValid) {
- log.verbose('extracted file from tarball', path)
- extractCount++
- } else {
- // invalid
- log.silly('ignoring from tarball', path)
- }
- return isValid
- }
-
- // download the tarball and extract!
- if (tarPath) {
- return tar.extract({
- file: tarPath,
- strip: 1,
- filter: isValid,
- cwd: devDir
- }).then(afterTarball, cb)
- }
-
- try {
- var req = download(gyp, process.env, release.tarballUrl)
- } catch (e) {
- return cb(e)
- }
-
- // something went wrong downloading the tarball?
- req.on('error', function (err) {
- if (err.code === 'ENOTFOUND') {
- return cb(new Error('This is most likely not a problem with node-gyp or the package itself and\n' +
- 'is related to network connectivity. In most cases you are behind a proxy or have bad \n' +
- 'network settings.'))
- }
- badDownload = true
- cb(err)
- })
-
- req.on('close', function () {
- if (extractCount === 0) {
- cb(new Error('Connection closed while downloading tarball file'))
- }
- })
-
- req.on('response', function (res) {
- if (res.statusCode !== 200) {
- badDownload = true
- cb(new Error(res.statusCode + ' response downloading ' + release.tarballUrl))
- return
- }
- // content checksum
- getContentSha(res, function (_, checksum) {
- var filename = path.basename(release.tarballUrl).trim()
- contentShasums[filename] = checksum
- log.verbose('content checksum', filename, checksum)
- })
-
- // start unzipping and untaring
- res.pipe(tar.extract({
- strip: 1,
- cwd: devDir,
- filter: isValid
- }).on('close', afterTarball).on('error', cb))
- })
-
- // invoked after the tarball has finished being extracted
- function afterTarball () {
- if (badDownload) {
- return
- }
- if (extractCount === 0) {
- return cb(new Error('There was a fatal problem while downloading/extracting the tarball'))
- }
- log.verbose('tarball', 'done parsing tarball')
- var async = 0
-
- if (win) {
- // need to download node.lib
- async++
- downloadNodeLib(deref)
- }
-
- // write the "installVersion" file
- async++
- var installVersionPath = path.resolve(devDir, 'installVersion')
- fs.writeFile(installVersionPath, gyp.package.installVersion + '\n', deref)
-
- // Only download SHASUMS.txt if we downloaded something in need of SHA verification
- if (!tarPath || win) {
- // download SHASUMS.txt
- async++
- downloadShasums(deref)
- }
-
- if (async === 0) {
- // no async tasks required
- cb()
- }
-
- function deref (err) {
- if (err) {
- return cb(err)
- }
-
- async--
- if (!async) {
- log.verbose('download contents checksum', JSON.stringify(contentShasums))
- // check content shasums
- for (var k in contentShasums) {
- log.verbose('validating download checksum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k])
- if (contentShasums[k] !== expectShasums[k]) {
- cb(new Error(k + ' local checksum ' + contentShasums[k] + ' not match remote ' + expectShasums[k]))
- return
- }
- }
- cb()
- }
- }
- }
-
- function downloadShasums (done) {
- log.verbose('check download content checksum, need to download `SHASUMS256.txt`...')
- log.verbose('checksum url', release.shasumsUrl)
- try {
- var req = download(gyp, process.env, release.shasumsUrl)
- } catch (e) {
- return cb(e)
- }
-
- req.on('error', done)
- req.on('response', function (res) {
- if (res.statusCode !== 200) {
- done(new Error(res.statusCode + ' status code downloading checksum'))
- return
- }
-
- var chunks = []
- res.on('data', function (chunk) {
- chunks.push(chunk)
- })
- res.on('end', function () {
- var lines = Buffer.concat(chunks).toString().trim().split('\n')
- lines.forEach(function (line) {
- var items = line.trim().split(/\s+/)
- if (items.length !== 2) {
- return
- }
-
- // 0035d18e2dcf9aad669b1c7c07319e17abfe3762 ./node-v0.11.4.tar.gz
- var name = items[1].replace(/^\.\//, '')
- expectShasums[name] = items[0]
- })
-
- log.verbose('checksum data', JSON.stringify(expectShasums))
- done()
- })
- })
- }
-
- function downloadNodeLib (done) {
- log.verbose('on Windows; need to download `' + release.name + '.lib`...')
- var archs = ['ia32', 'x64', 'arm64']
- var async = archs.length
- archs.forEach(function (arch) {
- var dir = path.resolve(devDir, arch)
- var targetLibPath = path.resolve(dir, release.name + '.lib')
- var libUrl = release[arch].libUrl
- var libPath = release[arch].libPath
- var name = arch + ' ' + release.name + '.lib'
- log.verbose(name, 'dir', dir)
- log.verbose(name, 'url', libUrl)
-
- mkdir(dir, function (err) {
- if (err) {
- return done(err)
- }
- log.verbose('streaming', name, 'to:', targetLibPath)
-
- try {
- var req = download(gyp, process.env, libUrl, cb)
- } catch (e) {
- return cb(e)
- }
-
- req.on('error', done)
- req.on('response', function (res) {
- if (res.statusCode === 403 || res.statusCode === 404) {
- if (arch === 'arm64') {
- // Arm64 is a newer platform on Windows and not all node distributions provide it.
- log.verbose(`${name} was not found in ${libUrl}`)
- } else {
- log.warn(`${name} was not found in ${libUrl}`)
- }
- return
- } else if (res.statusCode !== 200) {
- done(new Error(res.statusCode + ' status code downloading ' + name))
- return
- }
-
- getContentSha(res, function (_, checksum) {
- contentShasums[libPath] = checksum
- log.verbose('content checksum', libPath, checksum)
- })
-
- var ws = fs.createWriteStream(targetLibPath)
- ws.on('error', cb)
- req.pipe(ws)
- })
- req.on('end', function () { --async || done() })
- })
- })
- } // downloadNodeLib()
- }) // mkdir()
- } // go()
-
- /**
- * Checks if a given filename is "valid" for this installation.
- */
-
- function valid (file) {
- // header files
- var extname = path.extname(file)
- return extname === '.h' || extname === '.gypi'
- }
-
- /**
- * The EACCES fallback is a workaround for npm's `sudo` behavior, where
- * it drops the permissions before invoking any child processes (like
- * node-gyp). So what happens is the "nobody" user doesn't have
- * permission to create the dev dir. As a fallback, make the tmpdir() be
- * the dev dir for this installation. This is not ideal, but at least
- * the compilation will succeed...
- */
-
- function eaccesFallback (err) {
- var noretry = '--node_gyp_internal_noretry'
- if (argv.indexOf(noretry) !== -1) {
- return cb(err)
- }
- var tmpdir = os.tmpdir()
- gyp.devDir = path.resolve(tmpdir, '.node-gyp')
- var userString = ''
- try {
- // os.userInfo can fail on some systems, it's not critical here
- userString = ` ("${os.userInfo().username}")`
- } catch (e) {}
- log.warn('EACCES', 'current user%s does not have permission to access the dev dir "%s"', userString, devDir)
- log.warn('EACCES', 'attempting to reinstall using temporary dev dir "%s"', gyp.devDir)
- if (process.cwd() === tmpdir) {
- log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
- gyp.todo.push({ name: 'remove', args: argv })
- }
- gyp.commands.install([noretry].concat(argv), cb)
- }
-}
-
-function download (gyp, env, url) {
- log.http('GET', url)
-
- var requestOpts = {
- uri: url,
- headers: {
- 'User-Agent': 'node-gyp v' + gyp.version + ' (node ' + process.version + ')',
- Connection: 'keep-alive'
- }
- }
-
- var cafile = gyp.opts.cafile
- if (cafile) {
- requestOpts.ca = readCAFile(cafile)
- }
-
- // basic support for a proxy server
- var proxyUrl = getProxyFromURI(gyp, env, url)
- if (proxyUrl) {
- if (/^https?:\/\//i.test(proxyUrl)) {
- log.verbose('download', 'using proxy url: "%s"', proxyUrl)
- requestOpts.proxy = proxyUrl
- } else {
- log.warn('download', 'ignoring invalid "proxy" config setting: "%s"', proxyUrl)
- }
- }
-
- var req = request(requestOpts)
- req.on('response', function (res) {
- log.http(res.statusCode, url)
- })
-
- return req
-}
-
-function readCAFile (filename) {
- // The CA file can contain multiple certificates so split on certificate
- // boundaries. [\S\s]*? is used to match everything including newlines.
- var ca = fs.readFileSync(filename, 'utf8')
- var re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g
- return ca.match(re)
-}
-
-module.exports = function (gyp, argv, callback) {
- return install(fs, gyp, argv, callback)
-}
-module.exports.test = {
- download: download,
- install: install,
- readCAFile: readCAFile
-}
-module.exports.usage = 'Install node development files for the specified node version.'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/list.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/list.js
deleted file mode 100644
index 405ebc0d8..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/list.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const log = require('npmlog')
-
-function list (gyp, args, callback) {
- var devDir = gyp.devDir
- log.verbose('list', 'using node-gyp dir:', devDir)
-
- fs.readdir(devDir, onreaddir)
-
- function onreaddir (err, versions) {
- if (err && err.code !== 'ENOENT') {
- return callback(err)
- }
-
- if (Array.isArray(versions)) {
- versions = versions.filter(function (v) { return v !== 'current' })
- } else {
- versions = []
- }
- callback(null, versions)
- }
-}
-
-module.exports = list
-module.exports.usage = 'Prints a listing of the currently installed node development files'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/node-gyp.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/node-gyp.js
deleted file mode 100644
index 81fc59091..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/node-gyp.js
+++ /dev/null
@@ -1,210 +0,0 @@
-'use strict'
-
-const path = require('path')
-const nopt = require('nopt')
-const log = require('npmlog')
-const childProcess = require('child_process')
-const EE = require('events').EventEmitter
-const inherits = require('util').inherits
-const commands = [
- // Module build commands
- 'build',
- 'clean',
- 'configure',
- 'rebuild',
- // Development Header File management commands
- 'install',
- 'list',
- 'remove'
-]
-const aliases = {
- ls: 'list',
- rm: 'remove'
-}
-
-// differentiate node-gyp's logs from npm's
-log.heading = 'gyp'
-
-function gyp () {
- return new Gyp()
-}
-
-function Gyp () {
- var self = this
-
- this.devDir = ''
- this.commands = {}
-
- commands.forEach(function (command) {
- self.commands[command] = function (argv, callback) {
- log.verbose('command', command, argv)
- return require('./' + command)(self, argv, callback)
- }
- })
-}
-inherits(Gyp, EE)
-exports.Gyp = Gyp
-var proto = Gyp.prototype
-
-/**
- * Export the contents of the package.json.
- */
-
-proto.package = require('../package.json')
-
-/**
- * nopt configuration definitions
- */
-
-proto.configDefs = {
- help: Boolean, // everywhere
- arch: String, // 'configure'
- cafile: String, // 'install'
- debug: Boolean, // 'build'
- directory: String, // bin
- make: String, // 'build'
- msvs_version: String, // 'configure'
- ensure: Boolean, // 'install'
- solution: String, // 'build' (windows only)
- proxy: String, // 'install'
- noproxy: String, // 'install'
- devdir: String, // everywhere
- nodedir: String, // 'configure'
- loglevel: String, // everywhere
- python: String, // 'configure'
- 'dist-url': String, // 'install'
- tarball: String, // 'install'
- jobs: String, // 'build'
- thin: String // 'configure'
-}
-
-/**
- * nopt shorthands
- */
-
-proto.shorthands = {
- release: '--no-debug',
- C: '--directory',
- debug: '--debug',
- j: '--jobs',
- silly: '--loglevel=silly',
- verbose: '--loglevel=verbose',
- silent: '--loglevel=silent'
-}
-
-/**
- * expose the command aliases for the bin file to use.
- */
-
-proto.aliases = aliases
-
-/**
- * Parses the given argv array and sets the 'opts',
- * 'argv' and 'command' properties.
- */
-
-proto.parseArgv = function parseOpts (argv) {
- this.opts = nopt(this.configDefs, this.shorthands, argv)
- this.argv = this.opts.argv.remain.slice()
-
- var commands = this.todo = []
-
- // create a copy of the argv array with aliases mapped
- argv = this.argv.map(function (arg) {
- // is this an alias?
- if (arg in this.aliases) {
- arg = this.aliases[arg]
- }
- return arg
- }, this)
-
- // process the mapped args into "command" objects ("name" and "args" props)
- argv.slice().forEach(function (arg) {
- if (arg in this.commands) {
- var args = argv.splice(0, argv.indexOf(arg))
- argv.shift()
- if (commands.length > 0) {
- commands[commands.length - 1].args = args
- }
- commands.push({ name: arg, args: [] })
- }
- }, this)
- if (commands.length > 0) {
- commands[commands.length - 1].args = argv.splice(0)
- }
-
- // support for inheriting config env variables from npm
- var npmConfigPrefix = 'npm_config_'
- Object.keys(process.env).forEach(function (name) {
- if (name.indexOf(npmConfigPrefix) !== 0) {
- return
- }
- var val = process.env[name]
- if (name === npmConfigPrefix + 'loglevel') {
- log.level = val
- } else {
- // add the user-defined options to the config
- name = name.substring(npmConfigPrefix.length)
- // gyp@741b7f1 enters an infinite loop when it encounters
- // zero-length options so ensure those don't get through.
- if (name) {
- this.opts[name] = val
- }
- }
- }, this)
-
- if (this.opts.loglevel) {
- log.level = this.opts.loglevel
- }
- log.resume()
-}
-
-/**
- * Spawns a child process and emits a 'spawn' event.
- */
-
-proto.spawn = function spawn (command, args, opts) {
- if (!opts) {
- opts = {}
- }
- if (!opts.silent && !opts.stdio) {
- opts.stdio = [0, 1, 2]
- }
- var cp = childProcess.spawn(command, args, opts)
- log.info('spawn', command)
- log.info('spawn args', args)
- return cp
-}
-
-/**
- * Returns the usage instructions for node-gyp.
- */
-
-proto.usage = function usage () {
- var str = [
- '',
- ' Usage: node-gyp <command> [options]',
- '',
- ' where <command> is one of:',
- commands.map(function (c) {
- return ' - ' + c + ' - ' + require('./' + c).usage
- }).join('\n'),
- '',
- 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'),
- 'node@' + process.versions.node
- ].join('\n')
- return str
-}
-
-/**
- * Version number getter.
- */
-
-Object.defineProperty(proto, 'version', {
- get: function () {
- return this.package.version
- },
- enumerable: true
-})
-
-module.exports = exports = gyp
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/process-release.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/process-release.js
deleted file mode 100644
index 95b55e442..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/process-release.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/* eslint-disable node/no-deprecated-api */
-
-'use strict'
-
-const semver = require('semver')
-const url = require('url')
-const path = require('path')
-const log = require('npmlog')
-
-// versions where -headers.tar.gz started shipping
-const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42'
-const bitsre = /\/win-(x86|x64|arm64)\//
-const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should
-// have been "x86"
-
-// Captures all the logic required to determine download URLs, local directory and
-// file names. Inputs come from command-line switches (--target, --dist-url),
-// `process.version` and `process.release` where it exists.
-function processRelease (argv, gyp, defaultVersion, defaultRelease) {
- var version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
- var versionSemver = semver.parse(version)
- var overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
- var isDefaultVersion
- var isNamedForLegacyIojs
- var name
- var distBaseUrl
- var baseUrl
- var libUrl32
- var libUrl64
- var libUrlArm64
- var tarballUrl
- var canGetHeaders
-
- if (!versionSemver) {
- // not a valid semver string, nothing we can do
- return { version: version }
- }
- // flatten version into String
- version = versionSemver.version
-
- // defaultVersion should come from process.version so ought to be valid semver
- isDefaultVersion = version === semver.parse(defaultVersion).version
-
- // can't use process.release if we're using --target=x.y.z
- if (!isDefaultVersion) {
- defaultRelease = null
- }
-
- if (defaultRelease) {
- // v3 onward, has process.release
- name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes
- } else {
- // old node or alternative --target=
- // semver.satisfies() doesn't like prerelease tags so test major directly
- isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4
- // isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3)
- // as previously this logic was used to ensure "iojs" was used to download iojs releases
- // and "node" for node releases. Unfortunately the logic was broad enough that electron@3
- // published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has
- // been EOL for a while (late 2019) we should remove this hack.
- name = isNamedForLegacyIojs ? 'iojs' : 'node'
- }
-
- // check for the nvm.sh standard mirror env variables
- if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) {
- overrideDistUrl = process.env.NODEJS_ORG_MIRROR
- }
-
- if (overrideDistUrl) {
- log.verbose('download', 'using dist-url', overrideDistUrl)
- }
-
- if (overrideDistUrl) {
- distBaseUrl = overrideDistUrl.replace(/\/+$/, '')
- } else {
- distBaseUrl = 'https://nodejs.org/dist'
- }
- distBaseUrl += '/v' + version + '/'
-
- // new style, based on process.release so we have a lot of the data we need
- if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) {
- baseUrl = url.resolve(defaultRelease.headersUrl, './')
- libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major)
- libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major)
- libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major)
- tarballUrl = defaultRelease.headersUrl
- } else {
- // older versions without process.release are captured here and we have to make
- // a lot of assumptions, additionally if you --target=x.y.z then we can't use the
- // current process.release
- baseUrl = distBaseUrl
- libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major)
- libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major)
- libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major)
-
- // making the bold assumption that anything with a version number >3.0.0 will
- // have a *-headers.tar.gz file in its dist location, even some frankenstein
- // custom version
- canGetHeaders = semver.satisfies(versionSemver, headersTarballRange)
- tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz')
- }
-
- return {
- version: version,
- semver: versionSemver,
- name: name,
- baseUrl: baseUrl,
- tarballUrl: tarballUrl,
- shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'),
- versionDir: (name !== 'node' ? name + '-' : '') + version,
- ia32: {
- libUrl: libUrl32,
- libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path))
- },
- x64: {
- libUrl: libUrl64,
- libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path))
- },
- arm64: {
- libUrl: libUrlArm64,
- libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path))
- }
- }
-}
-
-function normalizePath (p) {
- return path.normalize(p).replace(/\\/g, '/')
-}
-
-function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
- var base = url.resolve(defaultUrl, './')
- var hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
-
- if (!hasLibUrl) {
- // let's assume it's a baseUrl then
- if (versionMajor >= 1) {
- return url.resolve(base, 'win-' + arch + '/' + name + '.lib')
- }
- // prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/
- return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib')
- }
-
- // else we have a proper url to a .lib, just make sure it's the right arch
- return defaultUrl.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/')
-}
-
-module.exports = processRelease
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/proxy.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/proxy.js
deleted file mode 100644
index 92d9ed2f7..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/proxy.js
+++ /dev/null
@@ -1,92 +0,0 @@
-'use strict'
-// Taken from https://github.com/request/request/blob/212570b/lib/getProxyFromURI.js
-
-const url = require('url')
-
-function formatHostname (hostname) {
- // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
- return hostname.replace(/^\.*/, '.').toLowerCase()
-}
-
-function parseNoProxyZone (zone) {
- zone = zone.trim().toLowerCase()
-
- var zoneParts = zone.split(':', 2)
- var zoneHost = formatHostname(zoneParts[0])
- var zonePort = zoneParts[1]
- var hasPort = zone.indexOf(':') > -1
-
- return { hostname: zoneHost, port: zonePort, hasPort: hasPort }
-}
-
-function uriInNoProxy (uri, noProxy) {
- var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
- var hostname = formatHostname(uri.hostname)
- var noProxyList = noProxy.split(',')
-
- // iterate through the noProxyList until it finds a match.
- return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) {
- var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
- var hostnameMatched = (
- isMatchedAt > -1 &&
- (isMatchedAt === hostname.length - noProxyZone.hostname.length)
- )
-
- if (noProxyZone.hasPort) {
- return (port === noProxyZone.port) && hostnameMatched
- }
-
- return hostnameMatched
- })
-}
-
-function getProxyFromURI (gyp, env, uri) {
- // If a string URI/URL was given, parse it into a URL object
- if (typeof uri === 'string') {
- // eslint-disable-next-line
- uri = url.parse(uri)
- }
-
- // Decide the proper request proxy to use based on the request URI object and the
- // environmental variables (NO_PROXY, HTTP_PROXY, etc.)
- // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html)
-
- var noProxy = gyp.opts.noproxy || env.NO_PROXY || env.no_proxy || env.npm_config_noproxy || ''
-
- // if the noProxy is a wildcard then return null
-
- if (noProxy === '*') {
- return null
- }
-
- // if the noProxy is not empty and the uri is found return null
-
- if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
- return null
- }
-
- // Check for HTTP or HTTPS Proxy in environment Else default to null
-
- if (uri.protocol === 'http:') {
- return gyp.opts.proxy ||
- env.HTTP_PROXY ||
- env.http_proxy ||
- env.npm_config_proxy || null
- }
-
- if (uri.protocol === 'https:') {
- return gyp.opts.proxy ||
- env.HTTPS_PROXY ||
- env.https_proxy ||
- env.HTTP_PROXY ||
- env.http_proxy ||
- env.npm_config_proxy || null
- }
-
- // if none of that works, return null
- // (What uri protocol are you using then?)
-
- return null
-}
-
-module.exports = getProxyFromURI
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/rebuild.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/rebuild.js
deleted file mode 100644
index a1c5b27cb..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/rebuild.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-function rebuild (gyp, argv, callback) {
- gyp.todo.push(
- { name: 'clean', args: [] }
- , { name: 'configure', args: argv }
- , { name: 'build', args: [] }
- )
- process.nextTick(callback)
-}
-
-module.exports = rebuild
-module.exports.usage = 'Runs "clean", "configure" and "build" all at once'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/remove.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/remove.js
deleted file mode 100644
index 8c945e565..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/remove.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict'
-
-const fs = require('fs')
-const rm = require('rimraf')
-const path = require('path')
-const log = require('npmlog')
-const semver = require('semver')
-
-function remove (gyp, argv, callback) {
- var devDir = gyp.devDir
- log.verbose('remove', 'using node-gyp dir:', devDir)
-
- // get the user-specified version to remove
- var version = argv[0] || gyp.opts.target
- log.verbose('remove', 'removing target version:', version)
-
- if (!version) {
- return callback(new Error('You must specify a version number to remove. Ex: "' + process.version + '"'))
- }
-
- var versionSemver = semver.parse(version)
- if (versionSemver) {
- // flatten the version Array into a String
- version = versionSemver.version
- }
-
- var versionPath = path.resolve(gyp.devDir, version)
- log.verbose('remove', 'removing development files for version:', version)
-
- // first check if its even installed
- fs.stat(versionPath, function (err) {
- if (err) {
- if (err.code === 'ENOENT') {
- callback(null, 'version was already uninstalled: ' + version)
- } else {
- callback(err)
- }
- return
- }
- // Go ahead and delete the dir
- rm(versionPath, callback)
- })
-}
-
-module.exports = exports = remove
-module.exports.usage = 'Removes the node development files for the specified version'
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/util.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/util.js
deleted file mode 100644
index 3e23c628e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/util.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict'
-
-const log = require('npmlog')
-const execFile = require('child_process').execFile
-const path = require('path')
-
-function logWithPrefix (log, prefix) {
- function setPrefix (logFunction) {
- return (...args) => logFunction.apply(null, [ prefix, ...args ]) // eslint-disable-line
- }
- return {
- silly: setPrefix(log.silly),
- verbose: setPrefix(log.verbose),
- info: setPrefix(log.info),
- warn: setPrefix(log.warn),
- error: setPrefix(log.error)
- }
-}
-
-function regGetValue (key, value, addOpts, cb) {
- const outReValue = value.replace(/\W/g, '.')
- const outRe = new RegExp(`^\\s+${outReValue}\\s+REG_\\w+\\s+(\\S.*)$`, 'im')
- const reg = path.join(process.env.SystemRoot, 'System32', 'reg.exe')
- const regArgs = ['query', key, '/v', value].concat(addOpts)
-
- log.silly('reg', 'running', reg, regArgs)
- const child = execFile(reg, regArgs, { encoding: 'utf8' },
- function (err, stdout, stderr) {
- log.silly('reg', 'reg.exe stdout = %j', stdout)
- if (err || stderr.trim() !== '') {
- log.silly('reg', 'reg.exe err = %j', err && (err.stack || err))
- log.silly('reg', 'reg.exe stderr = %j', stderr)
- return cb(err, stderr)
- }
-
- const result = outRe.exec(stdout)
- if (!result) {
- log.silly('reg', 'error parsing stdout')
- return cb(new Error('Could not parse output of reg.exe'))
- }
- log.silly('reg', 'found: %j', result[1])
- cb(null, result[1])
- })
- child.stdin.end()
-}
-
-function regSearchKeys (keys, value, addOpts, cb) {
- var i = 0
- const search = () => {
- log.silly('reg-search', 'looking for %j in %j', value, keys[i])
- regGetValue(keys[i], value, addOpts, (err, res) => {
- ++i
- if (err && i < keys.length) { return search() }
- cb(err, res)
- })
- }
- search()
-}
-
-module.exports = {
- logWithPrefix: logWithPrefix,
- regGetValue: regGetValue,
- regSearchKeys: regSearchKeys
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/macOS_Catalina.md b/node_modules/@npmcli/run-script/node_modules/node-gyp/macOS_Catalina.md
deleted file mode 100644
index 530cbf25c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/macOS_Catalina.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# Installation notes for macOS Catalina (v10.15)
-
-_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._
-
-**Upgrading to macOS Catalina may cause normal `node-gyp` installations to fail.**
-
-### Is my Mac running macOS Catalina?
-Let's first make sure that your Mac is running Catalina:
-```
-% sw_vers
- ProductName: Mac OS X
- ProductVersion: 10.15
- BuildVersion: 19A602
-```
-If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-
-
-### The acid test
-To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run:
-1. `/usr/sbin/pkgutil --packages | grep CL`
- * `com.apple.pkg.CLTools_Executables` should be listed. If it isn't, this test failed.
-2. `/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables`
- * `version: 11.0.0` (or later) should be listed. If it isn't, this test failed.
-
-If both tests succeeded, _you are done_! You should be ready to install `node-gyp`.
-
-If either test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
-
-### Solutions
-There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable.
-
-1. With the full Xcode (~7.6 GB download) from the `App Store` app.
-2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`
-3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.**
-
-### Installing `node-gyp` using the full Xcode
-1. `xcodebuild -version` should show `Xcode 11.1` or later.
- * If not, then install/upgrade Xcode from the App Store app.
-2. Open the Xcode app and...
- * Under __Preferences > Locations__ select the tools if their location is empty.
- * Allow Xcode app to do an essential install of the most recent compiler tools.
-3. Once all installations are _complete_, quit out of Xcode.
-4. `sudo xcodebuild -license accept` # If you agree with the licensing terms.
-5. `softwareupdate -l` # No listing is a good sign.
- * If Xcode or Tools upgrades are listed, use "Software Upgrade" to install them.
-6. `xcode-select -version` # Should return `xcode-select version 2370` or later.
-7. `xcode-select -print-path` # Should return `/Applications/Xcode.app/Contents/Developer`
-8. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready.
-9. If the _acid test_ does _not_ pass then...
-10. `sudo xcode-select --reset` # Enter root password. No output is normal.
-11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_.
-
-### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install`
-1. If the _acid test_ has not succeeded, then try `xcode-select --install`
-2. Wait until the install process is _complete_.
-3. `softwareupdate -l` # No listing is a good sign.
- * If Xcode or Tools upgrades are listed, use "Software Update" to install them.
-4. `xcode-select -version` # Should return `xcode-select version 2370` or later.
-5. `xcode-select -print-path` # Should return `/Library/Developer/CommandLineTools`
-6. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready.
-7. If the _acid test_ does _not_ pass then...
-8. `sudo xcode-select --reset` # Enter root password. No output is normal.
-9. Repeat step 5 above. Is the path different this time? Repeat the _acid test_.
-
-### Installing `node-gyp` using the Xcode Command Line Tools via manual download
-1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from developer.apple.com/download. As of MacOS 10.15.2, that's Command_Line_Tools_for_Xcode_11.3.dmg
-2. Install the package.
-3. Run the _acid test_.
-
-### I did all that and the acid test still does not pass :-(
-1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal.
-2. `xcode-select --install`
-3. If the [_acid test_](#The-acid-test) still does _not_ pass then...
-4. `npm explore npm -g -- npm install node-gyp@latest`
-5. `npm explore npm -g -- npm explore npm-lifecycle -- npm install node-gyp@latest`
-6. If the _acid test_ still does _not_ pass then...
-7. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve.
-
-Lessons learned from:
-* https://github.com/nodejs/node-gyp/issues/1779
-* https://github.com/nodejs/node-gyp/issues/1861
-* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
-* Thanks to @rrrix for discovering Solution 3
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/package.json b/node_modules/@npmcli/run-script/node_modules/node-gyp/package.json
deleted file mode 100644
index 72beb1c32..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_from": "node-gyp@^6.1.0",
- "_id": "node-gyp@6.1.0",
- "_inBundle": false,
- "_integrity": "sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw==",
- "_location": "/@npmcli/run-script/node-gyp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "node-gyp@^6.1.0",
- "name": "node-gyp",
- "escapedName": "node-gyp",
- "rawSpec": "^6.1.0",
- "saveSpec": null,
- "fetchSpec": "^6.1.0"
- },
- "_requiredBy": [
- "/@npmcli/run-script"
- ],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz",
- "_shasum": "64e31c61a4695ad304c1d5b82cf6b7c79cc79f3f",
- "_spec": "node-gyp@^6.1.0",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script",
- "author": {
- "name": "Nathan Rajlich",
- "email": "nathan@tootallnate.net",
- "url": "http://tootallnate.net"
- },
- "bin": {
- "node-gyp": "bin/node-gyp.js"
- },
- "bugs": {
- "url": "https://github.com/nodejs/node-gyp/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "env-paths": "^2.2.0",
- "glob": "^7.1.4",
- "graceful-fs": "^4.2.2",
- "mkdirp": "^0.5.1",
- "nopt": "^4.0.1",
- "npmlog": "^4.1.2",
- "request": "^2.88.0",
- "rimraf": "^2.6.3",
- "semver": "^5.7.1",
- "tar": "^4.4.12",
- "which": "^1.3.1"
- },
- "deprecated": false,
- "description": "Node.js native addon build tool",
- "devDependencies": {
- "bindings": "^1.5.0",
- "nan": "^2.14.0",
- "require-inject": "^1.4.4",
- "standard": "^14.3.1",
- "tap": "~12.7.0"
- },
- "engines": {
- "node": ">= 6.0.0"
- },
- "homepage": "https://github.com/nodejs/node-gyp#readme",
- "installVersion": 9,
- "keywords": [
- "native",
- "addon",
- "module",
- "c",
- "c++",
- "bindings",
- "gyp"
- ],
- "license": "MIT",
- "main": "./lib/node-gyp.js",
- "name": "node-gyp",
- "preferGlobal": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/node-gyp.git"
- },
- "scripts": {
- "lint": "standard */*.js test/**/*.js",
- "test": "npm run lint && tap --timeout=120 test/test-*"
- },
- "version": "6.1.0"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/src/win_delay_load_hook.cc b/node_modules/@npmcli/run-script/node_modules/node-gyp/src/win_delay_load_hook.cc
deleted file mode 100644
index 169f8029f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/src/win_delay_load_hook.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * When this file is linked to a DLL, it sets up a delay-load hook that
- * intervenes when the DLL is trying to load the host executable
- * dynamically. Instead of trying to locate the .exe file it'll just
- * return a handle to the process image.
- *
- * This allows compiled addons to work when the host executable is renamed.
- */
-
-#ifdef _MSC_VER
-
-#pragma managed(push, off)
-
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-
-#include <windows.h>
-
-#include <delayimp.h>
-#include <string.h>
-
-static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
- HMODULE m;
- if (event != dliNotePreLoadLibrary)
- return NULL;
-
- if (_stricmp(info->szDll, HOST_BINARY) != 0)
- return NULL;
-
- m = GetModuleHandle(NULL);
- return (FARPROC) m;
-}
-
-decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;
-
-#pragma managed(pop)
-
-#endif
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/common.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/common.js
deleted file mode 100644
index b714ee290..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/common.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const envPaths = require('env-paths')
-
-module.exports.devDir = () => envPaths('node-gyp', { suffix: '' }).cache
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt
deleted file mode 100644
index 244f6b079..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_BuildTools_minimal.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","PortableFacades","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Editors","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt
deleted file mode 100644
index dd5e77daf..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Community_workload.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb","Win10SDK_IpOverUsb","Microsoft.VisualStudio.Component.VC.ATL.ARM64","Microsoft.VisualCpp.ATL.ARM64","Microsoft.VisualStudio.Component.VC.ATL.ARM","Microsoft.VisualCpp.ATL.ARM","Microsoft.VisualStudio.Component.VC.Tools.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.Icecap.Analysis","Microsoft.VisualCpp.CRT.Redist.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.Store","Microsoft.VisualCpp.CRT.arm.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM.Resources","Microsoft.VisualCpp.Premium.Tools.ARM.Base","Microsoft.VisualCpp.Premium.Tools.ARM.Base.Resources","Microsoft.VisualCpp.PGO.ARM","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualStudio.Product.Community","Microsoft.VisualCpp.Tools.Hostx86.Targetarm","Microsoft.VisualStudio.Component.VC.Tools.ARM64","Microsoft.VisualStudio.VC.MSBuild.Arm64","Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ARM64.Store","Microsoft.VisualCpp.CRT.ARM64.Desktop","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.Icecap.Analysis.Resources","Microsoft.VisualCpp.VCTip.hostX86.targetARM","Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM64","Microsoft.VisualCpp.Tools.Core","Microsoft.VisualCpp.PGO.ARM64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualCpp.Premium.Tools.ARM64.Base","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.CRT.Redist.ARM64","Microsoft.VisualCpp.CRT.arm.OneCore.Desktop","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Component.WixToolset.VisualStudioExtension.Dev15","WixToolset.VisualStudioExtension.Dev15","Microsoft.VisualCpp.MFC.X64","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.Component.Windows10SDK.17763","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","MLGen","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Component.TestTools.Core","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.NuGet.Licenses","SQLCommon","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.HTMLHelpWorkshop.Msi","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.VCTip.hostX64.targetARM","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualCpp.Tools.HostX64.TargetARM.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.Component.MSBuild","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualCpp.Tools.Hostx86.Targetarm64","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualCpp.VCTip.hostX86.targetARM64","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualCpp.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualStudio.RazorExtension","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualCpp.MFC.Source","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.MFC.Redist.X86","Microsoft.VisualStudio.WebToolsExtensions.Chip","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualCpp.MFC.Redist.X64","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualCpp.MFC.MBCS","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Component.TextTemplating","Win10SDK_10.0.17763","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualCpp.MFC.MBCS.X64","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualCpp.MFC.Headers","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualCpp.CRT.Headers","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64","Microsoft.VisualCpp.VCTip.hostX64.targetARM64","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.Icecap.Collection.Msi","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.Tools.HostX64.TargetARM64.Resources","Microsoft.VisualStudio.Component.VC.ATLMFC","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualStudio.Component.Graphics.Win81","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.MFC.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.CredentialProvider","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.Component.NuGet","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualCpp.PGO.Headers","Microsoft.DiagnosticsHub.Collection","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualStudio.Branding.Community","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.WebToolsExtensions.Common","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.NuGet.Core","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.DiaSymReader.Native","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Component.Roslyn.LanguageServices","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.InteractiveWindow","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.Debugger.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","sqlsysclrtypes","Microsoft.VisualStudio.ProTools","Component.Microsoft.VisualStudio.RazorExtension","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.Build.Dependencies","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","sqlsysclrtypes","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.Component.Windows10SDK.17134","Microsoft.VisualStudio.PackageGroup.Core","PortableFacades","Microsoft.DiaSymReader","Microsoft.DiagnosticsHub.Runtime","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.Community","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.ServiceHub","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.TeamExplorer","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.GraphProvider","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents","Microsoft.CodeAnalysis.VisualStudio.Setup.Interactive.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.NuGet.Build.Tasks","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.Build","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.MinShell.Interop","Microsoft.Build.FileTracker.Msi","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.CoreEditor","Win10SDK_10.0.17134","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.VC.Ide.MFC","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.Devenv","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.MefHosting","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualCpp.MFC.X86","Microsoft.VisualStudio.Log.Resources","Microsoft.Icecap.Analysis.Targeted","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.VisualStudio.Initializer","Microsoft.Net.PackageGroup.4.6.Redist"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt
deleted file mode 100644
index c4b3b5f2b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Express.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\WDExpress","version":"15.9.28307.858","packages":["Microsoft.VisualStudio.Product.WDExpress","Microsoft.VisualStudio.Workload.WDExpress","Microsoft.VisualStudio.Component.Windows10SDK.17763","MLGen","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.Windows10SDK.14393","Win10SDK_10.0.14393.795","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.Component.VC.Tools.ARM64","Microsoft.VisualStudio.VC.MSBuild.Arm64","Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.ARM64","Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ARM64.Store","Microsoft.VisualCpp.CRT.ARM64.Desktop","Microsoft.VisualCpp.Tools.Hostx86.Targetarm64","Microsoft.VisualCpp.VCTip.hostX86.targetARM64","Microsoft.VisualCpp.Tools.HostX86.TargetARM64.Resources","Microsoft.VisualStudio.Component.VC.Tools.ARM","Microsoft.VisualCpp.Tools.Hostx86.Targetarm","Microsoft.VisualCpp.VCTip.hostX86.targetARM","Microsoft.VisualCpp.Tools.HostX86.TargetARM.Resources","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.OneCore.Desktop","Microsoft.VisualCpp.CRT.arm.Store","Microsoft.VisualCpp.CRT.arm.Desktop","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.JavaScript.LanguageService","Microsoft.VisualStudio.JavaScript.LanguageService.Resources","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.Component.VC.CLI.Support","Microsoft.VisualCpp.CLI.X86","Microsoft.VisualCpp.CLI.X64","Microsoft.VisualCpp.CLI.Source","Microsoft.VisualCpp.CLI.ARM64","Microsoft.VisualCpp.CLI.ARM","Microsoft.VisualStudio.VC.Templates.CLR","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Templates.CLR.Resources","Microsoft.Component.VC.Runtime.OSSupport","Microsoft.Windows.UniversalCRT.Tools.Msi","Microsoft.Windows.UniversalCRT.Tools.Msi","Microsoft.Windows.UniversalCRT.ExtensionSDK.Msi","Microsoft.Windows.UniversalCRT.HeadersLibsSources.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.Component.HelpViewer","Microsoft.HelpViewer","Microsoft.VisualStudio.Help.Configuration.Msi","Microsoft.VisualStudio.Component.SQL.DataSources","Microsoft.VisualStudio.Component.SQL.SSDT","Microsoft.VisualStudio.Component.SQL.CMDUtils","sqlcmdlnutils","Microsoft.VisualStudio.Component.Common.Azure.Tools","Microsoft.VisualStudio.Azure.CommonAzureTools","SSDT","Microsoft.VisualStudio.Component.SQL.ADAL","sql_adalsql","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime","Microsoft.VisualStudio.Component.SQL.NCLI","sqllocaldb","sqlncli","Microsoft.VisualStudio.Component.EntityFramework","Microsoft.VisualStudio.PackageGroup.DslRuntime","Microsoft.VisualStudio.Dsl.Core","Microsoft.VisualStudio.Dsl.GraphObject","Microsoft.VisualStudio.Dsl.Core.Resources","Microsoft.VisualStudio.EntityFrameworkTools","Microsoft.VisualStudio.EntityFrameworkTools.Msi","Microsoft.VisualStudio.Component.Roslyn.LanguageServices","Microsoft.VisualStudio.InteractiveWindow","Microsoft.DiaSymReader.Native","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources","Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents","Microsoft.CodeAnalysis.VisualStudio.Setup.Interactive.Resources","Microsoft.Net.ComponentGroup.TargetingPacks.Common","Microsoft.Net.Component.4.6.TargetingPack","Microsoft.Net.4.6.TargetingPack","Microsoft.Net.Component.4.5.2.TargetingPack","Microsoft.Net.4.5.2.TargetingPack","Microsoft.Net.Component.4.5.1.TargetingPack","Microsoft.Net.4.5.1.TargetingPack","Microsoft.Net.Component.4.5.TargetingPack","Microsoft.Net.4.5.TargetingPack","Microsoft.Net.Component.4.TargetingPack","Microsoft.Net.4.TargetingPack","Microsoft.Net.ComponentGroup.DevelopmentPrerequisites","Microsoft.Net.Component.4.6.1.TargetingPack","Microsoft.Net.4.6.1.TargetingPack","Microsoft.Net.Cumulative.TargetingPack.Resources","Microsoft.Net.Component.4.6.1.SDK","Microsoft.Net.4.6.1.SDK","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.Component.VisualStudioData","Microsoft.VisualStudio.Component.SQL.CLR","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.XamlDiagnostics","Microsoft.VisualStudio.XamlDiagnostics.Resources","Microsoft.VisualStudio.XamlDesigner","Microsoft.VisualStudio.XamlDesigner.Resources","Microsoft.VisualStudio.XamlDesigner.Executables","Microsoft.VisualStudio.XamlShared","Microsoft.VisualStudio.XamlShared.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.Managed","Microsoft.VisualStudio.PackageGroup.IntelliTrace.Core","Microsoft.IntelliTrace.Core","Microsoft.IntelliTrace.Core.Targeted","Microsoft.IntelliTrace.ProfilerProxy.Msi.x64","Microsoft.IntelliTrace.ProfilerProxy.Msi","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.TestWindow.SourceBasedTestDiscovery","Microsoft.VisualStudio.TestWindow.Dotnet","Microsoft.VisualStudio.TestTools.TestGeneration","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.TestTools.Enterprise","Microsoft.VisualStudio.PackageGroup.TestTools.MSTestV2.Managed","Microsoft.VisualStudio.TestTools.MSTestV2.WizardExtension.UnitTest","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.Component.ClickOnce","Microsoft.VisualStudio.PackageGroup.ClickOnce.MSBuild","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.ClickOnce.SignTool.Msi","Microsoft.SQL.ClickOnceBootstrapper.Msi","Microsoft.Net.ClickOnceBootstrapper","Microsoft.ClickOnce.BootStrapper.Msi.Resources","Microsoft.ClickOnce.BootStrapper.Msi","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.ClickOnce.Resources","Microsoft.VisualStudio.ClickOnce","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.VisualStudio.TemplateEngine","Microsoft.VisualStudio.WebToolsExtensions.Common","Microsoft.NET.Sdk","Microsoft.VisualStudio.PackageGroup.TestTools.Templates.Managed","Microsoft.VisualStudio.TestTools.Templates.Managed","Microsoft.VisualStudio.TestTools.Templates.Managed.Resources","Microsoft.VisualStudio.Templates.VB.MSTestv2.Desktop.UnitTest","Microsoft.VisualStudio.Templates.CS.MSTestv2.Desktop.UnitTest","Microsoft.VisualStudio.Templates.VB.Wpf","Microsoft.VisualStudio.Templates.VB.Wpf.Resources","Microsoft.VisualStudio.Templates.VB.Winforms","Microsoft.VisualStudio.Templates.VB.ManagedCore","Microsoft.VisualStudio.Templates.VB.Shared","Microsoft.VisualStudio.Templates.VB.Shared.Resources","Microsoft.VisualStudio.Templates.VB.ManagedCore.Resources","Microsoft.VisualStudio.Templates.CS.GettingStarted.Desktop.Package","Microsoft.VisualStudio.Templates.GetStarted.Desktop.Setup","Microsoft.VisualStudio.Templates.CS.GettingStarted.Console.Package","Microsoft.VisualStudio.Templates.GetStarted.Resources","Microsoft.VisualStudio.Templates.GetStarted.Common.Setup","Microsoft.VisualStudio.Templates.GetStarted.Console.Setup","Microsoft.VisualStudio.Templates.CS.Wpf","Microsoft.VisualStudio.Templates.CS.Wpf.Resources","Microsoft.VisualStudio.Templates.CS.Winforms","Microsoft.VisualStudio.Templates.CS.ManagedCore","Microsoft.VisualStudio.Templates.CS.Shared","Microsoft.VisualStudio.Templates.Editorconfig.Wizard.Setup","Templates.Editorconfig.SolutionFile.Setup","Microsoft.VisualStudio.Templates.CS.Shared.Resources","Microsoft.VisualStudio.Templates.CS.ManagedCore.Resources","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","PortableFacades","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer","Microsoft.TeamFoundation.OfficeIntegration","Microsoft.TeamFoundation.OfficeIntegration.Resources","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.WDExpress","Microsoft.VisualStudio.WDExpress.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.6.Redist","Microsoft.VisualStudio.Branding.WDExpress"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt
deleted file mode 100644
index fc0a257f4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2017_Unusable.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildToolsUnusable","version":"15.9.28307.665","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers.Resources","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.6.1.Redist","Microsoft.Net.4.6.1.FullRedist.NonThreshold","Microsoft.Windows.UniversalCRT.Msu.81","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt
deleted file mode 100644
index f07d25416..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_BuildTools_minimal.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Product.BuildTools","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VisualC.Logging","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.DiaSymReader","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.VisualStudio.Editors","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.VisualStudio.Component.Windows10SDK.17134","Win10SDK_10.0.17134","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.Workload.MSBuildTools","Microsoft.VisualStudio.Component.CoreBuildTools","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.BuildTools.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Component.MSBuild","Microsoft.PythonTools.BuildCore.Vsix","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.NativeImageSupport","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.BuildTools"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt
deleted file mode 100644
index 50071c25f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Community_workload.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community","version":"16.1.28922.388","packages":["Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling.ExternalDependencies","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies","Microsoft.DiagnosticsHub.Runtime.ExternalDependencies.Targeted","Microsoft.DiagnosticsHub.Collection.ExternalDependencies.x64","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Component.IntelliCode","Microsoft.VisualStudio.IntelliCode","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.LiveShareApi","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.DiagnosticsHub.KB2882822.Win7","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.VisualC.Logging","Microsoft.WebTools.Shared","Microsoft.WebTools.DotNet.Core.ItemTemplates","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.Windows.UniversalCRT.Msu.7","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Microsoft.VisualStudio.NuGet.PowershellBindingRedirect","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Remote.DbgHelp.Win8","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.DbgHelp.Win8","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Product.Community","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.PackageGroup.NuGet","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.OpenFolder.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.PerfLib","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.Net.4.7.2.FullRedist","Microsoft.VisualStudio.Branding.Community"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt
deleted file mode 100644
index 806509e7c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/VS_2019_Preview.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{"path":"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview","version":"16.0.28608.199","packages":["Microsoft.VisualStudio.Product.Enterprise","Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest","Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest","Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest","Microsoft.VisualStudio.Component.VC.ATL","Microsoft.VisualStudio.VC.Ide.ATL","Microsoft.VisualStudio.VC.Ide.ATL.Resources","Microsoft.VisualCpp.ATL.X86","Microsoft.VisualCpp.ATL.X64","Microsoft.VisualCpp.ATL.Source","Microsoft.VisualCpp.ATL.Headers","Microsoft.VisualStudio.Component.VC.CMake.Project","Microsoft.VisualStudio.VC.CMake","Microsoft.VisualStudio.VC.CMake.Project","Microsoft.VisualStudio.VC.ExternalBuildFramework","Microsoft.VisualStudio.Component.VC.DiagnosticTools","Microsoft.VisualStudio.Component.Graphics.Tools","Microsoft.VisualStudio.Graphics.Viewers","Microsoft.VisualStudio.Graphics.Viewers.Resources","Microsoft.VisualStudio.Graphics.EnableTools","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Msi","Microsoft.VisualStudio.Graphics.Analyzer","Microsoft.VisualStudio.Graphics.Analyzer.Targeted","Microsoft.VisualStudio.Graphics.Analyzer.Resources","Microsoft.VisualStudio.Graphics.Appid","Microsoft.VisualStudio.Graphics.Appid.Resources","Microsoft.VisualStudio.Component.Windows10SDK.17763","Win10SDK_10.0.17763","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","Microsoft.VisualCpp.CodeAnalysis.Extensions","Microsoft.VisualCpp.CodeAnalysis.Extensions.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X86.Resources","Microsoft.VisualCpp.CodeAnalysis.Extensions.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64","Microsoft.VisualCpp.CodeAnalysis.ConcurrencyCheck.X64.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX86","Microsoft.VisualCpp.VCTip.HostX64.TargetX86","Microsoft.VisualCpp.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Tools.HostX64.TargetX64","Microsoft.VisualCpp.VCTip.HostX64.TargetX64","Microsoft.VisualCpp.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64","Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86.Resources","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64","Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64.Resources","Microsoft.VisualCpp.PGO.X86","Microsoft.VisualCpp.PGO.X64","Microsoft.VisualCpp.PGO.Headers","Microsoft.VisualCpp.CRT.x86.Store","Microsoft.VisualCpp.CRT.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.x64.Store","Microsoft.VisualCpp.CRT.x64.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop","Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop","Microsoft.VisualStudio.PackageGroup.VC.Tools.x86","Microsoft.VisualCpp.Tools.HostX86.TargetX64","Microsoft.VisualCpp.VCTip.hostX86.targetX64","Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Resources","Microsoft.VisualCpp.Tools.HostX86.TargetX86","Microsoft.VisualCpp.VCTip.hostX86.targetX86","Microsoft.VisualCpp.Tools.HostX86.TargetX86.Resources","Microsoft.VisualCpp.Tools.Core.Resources","Microsoft.VisualCpp.Tools.Core.x86","Microsoft.VisualCpp.DIA.SDK","Microsoft.VisualCpp.CRT.x86.Desktop","Microsoft.VisualCpp.CRT.x64.Desktop","Microsoft.VisualCpp.CRT.Source","Microsoft.VisualCpp.CRT.Redist.X86","Microsoft.VisualCpp.CRT.Redist.X64","Microsoft.VisualCpp.CRT.Redist.Resources","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.RuntimeDebug.14","Microsoft.VisualCpp.CRT.Headers","Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core","Microsoft.VisualStudio.PackageGroup.TestTools.Native","Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native","Microsoft.VisualStudio.Component.ClassDesigner","Microsoft.VisualStudio.ClassDesigner","Microsoft.VisualStudio.ClassDesigner.Resources","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualCpp.Redist.14.Latest","Microsoft.VisualStudio.VC.Templates.UnitTest","Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP","Microsoft.VisualStudio.VC.Templates.UnitTest.Resources","Microsoft.VisualStudio.VC.Templates.Desktop","Microsoft.VisualStudio.Component.VC.CoreIde","Microsoft.VisualStudio.VC.Ide.Pro","Microsoft.VisualStudio.VC.Ide.Pro.Resources","Microsoft.VisualStudio.VC.Templates.Pro","Microsoft.VisualStudio.VC.Templates.Pro.Resources","Microsoft.VisualStudio.VC.Items.Pro","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced","Microsoft.VisualStudio.VC.Ide.x64","Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express","Microsoft.VisualStudio.VC.MSBuild.X64.v142","Microsoft.VisualStudio.VC.MSBuild.X64","Microsoft.VS.VC.MSBuild.X64.Resources","Microsoft.VisualStudio.VC.MSBuild.ARM.v142","Microsoft.VisualStudio.VC.MSBuild.ARM","Microsoft.VisualStudio.VC.MSBuild.x86.v142","Microsoft.VisualStudio.VC.MSBuild.X86","Microsoft.VisualStudio.VC.MSBuild.Base","Microsoft.VisualStudio.VC.MSBuild.Base.Resources","Microsoft.VisualStudio.VC.Ide.WinXPlus","Microsoft.VisualStudio.VC.Ide.Dskx","Microsoft.VisualStudio.VC.Ide.Dskx.Resources","Microsoft.VisualStudio.VC.Ide.Base","Microsoft.VisualStudio.VC.Ide.LanguageService","Microsoft.VisualStudio.VC.Ide.Core","Microsoft.VisualStudio.VC.Ide.Core.Resources","Microsoft.VisualStudio.VC.Ide.VCPkgDatabase","Microsoft.VisualStudio.VC.Ide.Progression.Enterprise","Microsoft.VisualStudio.VC.Ide.ProjectSystem","Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine","Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources","Microsoft.VisualStudio.VC.Ide.LanguageService.Resources","Microsoft.VisualStudio.VC.Ide.Base.Resources","Microsoft.VisualStudio.Component.CodeMap","Microsoft.VisualStudio.Component.GraphDocument","Microsoft.VisualStudio.Vmp","Microsoft.VisualStudio.GraphDocument","Microsoft.VisualStudio.GraphDocument.Resources","Microsoft.VisualStudio.CodeMap","Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime","Microsoft.VisualStudio.Component.SQL.NCLI","sqllocaldb","sqlncli","Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions","Microsoft.VisualStudio.WebToolsExtensions","Microsoft.VisualStudio.WebTools","Microsoft.VisualStudio.WebTools.Resources","Microsoft.VisualStudio.WebTools.MSBuild","Microsoft.VisualStudio.PackageGroup.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Msi","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.Debugger.Script.Resources","Microsoft.VisualStudio.VC.Ide.MDD","Microsoft.VisualStudio.Component.NuGet","Microsoft.CredentialProvider","Component.Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.LiveShare","Microsoft.VisualStudio.Component.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi","Microsoft.VisualStudio.Debugger.JustInTime","Microsoft.VisualStudio.Debugger.JustInTime.Msi","Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd","Microsoft.IntelliTrace.DiagnosticsHubAgent.Targeted","Microsoft.IntelliTrace.Debugger","Microsoft.IntelliTrace.Debugger.Targeted","Microsoft.IntelliTrace.FrontEnd","Microsoft.DiagnosticsHub.Instrumentation","Microsoft.DiagnosticsHub.CpuSampling","Microsoft.DiagnosticsHub.CpuSampling.Targeted","Microsoft.PackageGroup.DiagnosticsHub.Platform","Microsoft.DiagnosticsHub.Collection.StopService.Uninstall","Microsoft.DiagnosticsHub.Runtime","Microsoft.DiagnosticsHub.Runtime.Targeted","Microsoft.DiagnosticsHub.Runtime.Resources","Microsoft.DiagnosticsHub.Collection","Microsoft.DiagnosticsHub.Collection.Service","Microsoft.DiagnosticsHub.Collection.StopService.Install","Microsoft.VisualStudio.Dsl.GraphObject","Microsoft.Net.4.TargetingPack","Microsoft.VisualStudio.VC.Ide.ResourceEditor","Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources","Microsoft.VisualStudio.NuGet.Licenses","Microsoft.WebTools.Shared","Microsoft.VisualStudio.WebToolsExtensions.DotNet.Core.ItemTemplates","Microsoft.VisualStudio.Component.TextTemplating","Microsoft.VisualStudio.TextTemplating.MSBuild","Microsoft.VisualStudio.TextTemplating.Integration","Microsoft.VisualStudio.TextTemplating.Core","Microsoft.VisualStudio.TextTemplating.Integration.Resources","Microsoft.VisualStudio.ProTools","sqlsysclrtypes","sqlsysclrtypes","SQLCommon","Microsoft.VisualStudio.ProTools.Resources","Microsoft.VisualStudio.NuGet.Core","Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage","Microsoft.VisualStudio.PackageGroup.IntelliTrace.Core","Microsoft.IntelliTrace.Core","Microsoft.IntelliTrace.Core.Concord","Microsoft.IntelliTrace.Core.Targeted","Microsoft.IntelliTrace.ProfilerProxy.Msi.x64","Microsoft.IntelliTrace.ProfilerProxy.Msi","Microsoft.VisualStudio.TestTools.DynamicCodeCoverage","Microsoft.VisualStudio.TestTools.CodeCoverage.Msi","Microsoft.VisualStudio.TestTools.CodeCoverage","Microsoft.Icecap.Analysis","Microsoft.Icecap.Analysis.Targeted","Microsoft.Icecap.Analysis.Resources","Microsoft.Icecap.Analysis.Resources.Targeted","Microsoft.Icecap.Collection.Msi","Microsoft.Icecap.Collection.Msi.Targeted","Microsoft.Icecap.Collection.Msi.Resources","Microsoft.Icecap.Collection.Msi.Resources.Targeted","Microsoft.VisualStudio.PackageGroup.TestTools.Core","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI","Microsoft.VisualStudio.TestTools.Pex.Common","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy","Microsoft.VisualStudio.PackageGroup.MinShell.Interop","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi","Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestTools","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Remote","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Premium","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common","Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources","Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent","Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.TestTools.TestWIExtension","Microsoft.VisualStudio.TestTools.TestPlatform.IDE","Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors","Microsoft.VisualStudio.TestTools.NE.Msi.Targeted","Microsoft.VisualStudio.TestTools.NetworkEmulation","Microsoft.VisualStudio.TestTools.DataCollectors","Microsoft.VisualCpp.CRT.ClickOnce.Msi","Microsoft.VisualStudio.WebTools.WSP.FSA","Microsoft.VisualStudio.WebTools.WSP.FSA.Resources","Microsoft.VisualStudio.Component.Static.Analysis.Tools","Microsoft.VisualCpp.Redist.14","Microsoft.VisualCpp.Redist.14","Microsoft.VisualStudio.StaticAnalysis","Microsoft.VisualStudio.StaticAnalysis.Resources","Microsoft.VisualStudio.PackageGroup.Community","Microsoft.VisualStudio.Community.Extra.Resources","Microsoft.VisualStudio.Community.Extra","Microsoft.VisualStudio.PackageGroup.Core","Microsoft.VisualStudio.CodeSense","Microsoft.VisualStudio.CodeSense.Community","Microsoft.VisualStudio.TestTools.TeamFoundationClient","Microsoft.VisualStudio.PackageGroup.Debugger.Core","Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Runtime","Microsoft.VisualStudio.Debugger.TimeTravel.Agent","Microsoft.VisualStudio.Debugger.TimeTravel.Record","Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost","Microsoft.VisualStudio.VC.Ide.Debugger","Microsoft.VisualStudio.VC.Ide.Debugger.Concord","Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources","Microsoft.VisualStudio.VC.Ide.Debugger.Resources","Microsoft.VisualStudio.VC.Ide.Common","Microsoft.VisualStudio.VC.Ide.Common.Resources","Microsoft.VisualStudio.Debugger.Parallel","Microsoft.VisualStudio.Debugger.Parallel.Resources","Microsoft.VisualStudio.Debugger.CollectionAgents","Microsoft.VisualStudio.Debugger.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed","Microsoft.VisualStudio.Debugger.Concord.Managed.Resources","Microsoft.VisualStudio.Debugger.Managed.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote","Microsoft.VisualStudio.Debugger.Concord.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger.Remote.Resources","Microsoft.VisualStudio.Debugger","Microsoft.VisualStudio.Debugger.Package.DiagHub.Client.VSx86","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.Debugger.Remote.DiagHub.Client","Microsoft.VisualStudio.VC.MSVCDis","Microsoft.VisualStudio.ScriptedHost","Microsoft.VisualStudio.ScriptedHost.Targeted","Microsoft.VisualStudio.ScriptedHost.Resources","Microsoft.IntelliTrace.DiagnosticsHub","Microsoft.VisualStudio.Debugger.Concord","Microsoft.VisualStudio.Debugger.Concord.Resources","Microsoft.VisualStudio.Debugger.Resources","Microsoft.PackageGroup.ClientDiagnostics","Microsoft.VisualStudio.AppResponsiveness","Microsoft.VisualStudio.AppResponsiveness.Targeted","Microsoft.VisualStudio.AppResponsiveness.Resources","Microsoft.VisualStudio.ClientDiagnostics","Microsoft.VisualStudio.ClientDiagnostics.Targeted","Microsoft.VisualStudio.ClientDiagnostics.Resources","Microsoft.VisualStudio.PackageGroup.ProfessionalCore","Microsoft.VisualStudio.Professional","Microsoft.VisualStudio.Professional.Msi","Microsoft.VisualStudio.PackageGroup.EnterpriseCore","Microsoft.VisualStudio.Enterprise.Msi","Microsoft.VisualStudio.Enterprise","Microsoft.ShDocVw","Microsoft.VisualStudio.PackageGroup.CommunityCore","Microsoft.VisualStudio.ProjectSystem.Full","Microsoft.VisualStudio.ProjectSystem","Microsoft.VisualStudio.Community.x86","Microsoft.VisualStudio.Community.x64","Microsoft.VisualStudio.Community","Microsoft.IntelliTrace.CollectorCab","Microsoft.VisualStudio.Community.Resources","Microsoft.VisualStudio.WebSiteProject.DTE","Microsoft.MSHtml","Microsoft.VisualStudio.Platform.CallHierarchy","Microsoft.VisualStudio.Community.Msi.Resources","Microsoft.VisualStudio.Community.Msi","Microsoft.VisualStudio.Devenv.Msi","Microsoft.VisualStudio.MinShell.Interop.Msi","Microsoft.VisualStudio.Editors","Microsoft.VisualStudio.Net.Eula.Resources","Microsoft.CodeAnalysis.ExpressionEvaluator","Microsoft.CodeAnalysis.VisualStudio.Setup","Microsoft.Component.MSBuild","Microsoft.NuGet.Build.Tasks","Microsoft.VisualStudio.Component.Roslyn.Compiler","Microsoft.CodeAnalysis.Compilers","Microsoft.VisualStudio.Workload.CoreEditor","Microsoft.VisualStudio.Component.CoreEditor","Microsoft.VisualStudio.PackageGroup.CoreEditor","Microsoft.VisualCpp.Tools.Common.UtilsPrereq","Microsoft.VisualCpp.Tools.Common.Utils","Microsoft.VisualCpp.Tools.Common.Utils.Resources","Microsoft.VisualStudio.PackageGroup.VsDevCmd","Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk","Microsoft.VisualStudio.VsDevCmd.Core.WinSdk","Microsoft.VisualStudio.VsDevCmd.Core.DotNet","Microsoft.VisualStudio.VC.DevCmd","Microsoft.VisualStudio.VC.DevCmd.Resources","Microsoft.VisualStudio.VirtualTree","Microsoft.VisualStudio.PackageGroup.Progression","Microsoft.VisualStudio.PerformanceProvider","Microsoft.VisualStudio.GraphModel","Microsoft.VisualStudio.GraphProvider","Microsoft.DiaSymReader","Microsoft.Build.Dependencies","Microsoft.Build.FileTracker.Msi","Microsoft.Build","Microsoft.VisualStudio.TextMateGrammars","Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common","Microsoft.VisualStudio.TeamExplorer","Microsoft.ServiceHub","Microsoft.VisualStudio.ProjectServices","Microsoft.VisualStudio.SLNX.VSIX","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.FileHandler.Msi","Microsoft.VisualStudio.PackageGroup.MinShell","Microsoft.VisualStudio.MinShell.Interop","Microsoft.VisualStudio.Log","Microsoft.VisualStudio.Log.Targeted","Microsoft.VisualStudio.Log.Resources","Microsoft.VisualStudio.Finalizer","Microsoft.VisualStudio.Devenv","Microsoft.VisualStudio.Devenv.Resources","Microsoft.VisualStudio.CoreEditor","Microsoft.VisualStudio.Platform.NavigateTo","Microsoft.VisualStudio.Connected","Microsoft.VisualStudio.Connected.Resources","Microsoft.VisualStudio.MinShell","Microsoft.VisualStudio.Setup.Configuration","Microsoft.VisualStudio.Platform.Search","Microsoft.VisualStudio.MinShell.Platform","Microsoft.VisualStudio.MinShell.Platform.Resources","Microsoft.VisualStudio.MefHosting","Microsoft.VisualStudio.MefHosting.Resources","Microsoft.VisualStudio.Initializer","Microsoft.VisualStudio.ExtensionManager","Microsoft.VisualStudio.Platform.Editor","Microsoft.VisualStudio.MinShell.x86","Microsoft.VisualStudio.NativeImageSupport","Microsoft.VisualStudio.MinShell.Msi","Microsoft.VisualStudio.MinShell.Msi.Resources","Microsoft.VisualStudio.LanguageServer","Microsoft.VisualStudio.Devenv.Config","Microsoft.VisualStudio.MinShell.Resources","Microsoft.Net.PackageGroup.4.7.2.Redist","Microsoft.VisualStudio.Branding.Enterprise"]}]
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca-bundle.crt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca-bundle.crt
deleted file mode 100644
index fb1dea98a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca-bundle.crt
+++ /dev/null
@@ -1,40 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDJjCCAg4CAhnOMA0GCSqGSIb3DQEBBQUAMH0xCzAJBgNVBAYTAlVTMQswCQYD
-VQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcGA1UECgwQU3Ryb25n
-TG9vcCwgSW5jLjESMBAGA1UECwwJU3Ryb25nT3BzMRowGAYDVQQDDBFjYS5zdHJv
-bmdsb29wLmNvbTAeFw0xNTEyMDgyMzM1MzNaFw00MzA0MjQyMzM1MzNaMBkxFzAV
-BgNVBAMMDnN0cm9uZ2xvb3AuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
-CgKCAQEAwOYI7OZ2FX/YjRgLZoDQlbPc5UZXU/j0e1wwiJNPtPEax9Y5Uoza0Pnt
-Ikzkc2SfvQ+IJrhXo385tI0W5juuqbHnE7UrjUuPjUX6NHevkxcs/flmjan5wnZM
-cPsGhH71WDuUEEflvZihf2Se2x+xgZtMhc5XGmVmRuZFYKvkgUhA2/w8/QrK+jPT
-n9QRJxZjWNh2RBdC1B7u4jffSmOSUljYFH1I2eTeY+Rdi6YUIYSU9gEoZxsv3Tia
-SomfMF5jt2Mouo6MzA+IhLvvFjcrcph1Qxgi9RkfdCMMd+Ipm9YWELkyG1bDRpQy
-0iyHD4gvVsAqz1Y2KdRSdc3Kt+nTqwIDAQABoxkwFzAVBgNVHREEDjAMhwQAAAAA
-hwR/AAABMA0GCSqGSIb3DQEBBQUAA4IBAQAhy4J0hML3NgmDRHdL5/iTucBe22Mf
-jJjg2aifD1S187dHm+Il4qZNO2plWwAhN0h704f+8wpsaALxUvBIu6nvlvcMP5PH
-jGN5JLe2Km3UaPvYOQU2SgacLilu+uBcIo2JSHLV6O7ziqUj5Gior6YxDLCtEZie
-Ea8aX5/YjuACtEMJ1JjRqjgkM66XAoUe0E8onOK3FgTIO3tGoTJwRp0zS50pFuP0
-PsZtT04ck6mmXEXXknNoAyBCvPypfms9OHqcUIW9fiQnrGbS/Ri4QSQYj0DtFk/1
-na4fY1gf3zTHxH8259b/TOOaPfTnCEsOQtjUrWNR4xhmVZ+HJy4yytUW
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDbzCCAlcCAmm6MA0GCSqGSIb3DQEBCwUAMH0xCzAJBgNVBAYTAlVTMQswCQYD
-VQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcGA1UECgwQU3Ryb25n
-TG9vcCwgSW5jLjESMBAGA1UECwwJU3Ryb25nT3BzMRowGAYDVQQDDBFjYS5zdHJv
-bmdsb29wLmNvbTAeFw0xNTEyMDgyMzM1MzNaFw00MzA0MjQyMzM1MzNaMH0xCzAJ
-BgNVBAYTAlVTMQswCQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZ
-MBcGA1UECgwQU3Ryb25nTG9vcCwgSW5jLjESMBAGA1UECwwJU3Ryb25nT3BzMRow
-GAYDVQQDDBFjYS5zdHJvbmdsb29wLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBANfj86jkvvYDjHBgiqWhk9Cj+bqiMq3MqnV0CBO4iuK33Fo6XssE
-H+yVdXlIBFbFe6t655MdBVOR2Sfj7WqNh96vhu6PyDHiwcQlTaiLU6nhIed1J4Wv
-lvnJHFmp8Wbtx5AgLT4UYu03ftvXEl2DLi3vhSL2tRM1ebXHB/KPbRWkb25DPX0P
-foOHot3f2dgNe2x6kponf7E/QDmAu3s7Nlkfh+ryDhgGU7wocXEhXbprNqRqOGNo
-xbXgUI+/9XDxYT/7Gn5LF/fPjtN+aB0SKMnTsDhprVlZie83mlqJ46fOOrR+vrsQ
-mi/1m/TadrARtZoIExC/cQRdVM05EK4tUa8CAwEAATANBgkqhkiG9w0BAQsFAAOC
-AQEAQ7k5WhyhDTIGYCNzRnrMHWSzGqa1y4tJMW06wafJNRqTm1cthq1ibc6Hfq5a
-K10K0qMcgauRTfQ1MWrVCTW/KnJ1vkhiTOH+RvxapGn84gSaRmV6KZen0+gMsgae
-KEGe/3Hn+PmDVV+PTamHgPACfpTww38WHIe/7Ce9gHfG7MZ8cKHNZhDy0IAYPln+
-YRwMLd7JNQffHAbWb2CE1mcea4H/12U8JZW5tHCF6y9V+7IuDzqwIrLKcW3lG17n
-VUG6ODF/Ryqn3V5X+TL91YyXi6c34y34IpC7MQDV/67U7+5Bp5CfeDPWW2wVSrW+
-uGZtfEvhbNm6m2i4UNmpCXxUZQ==
------END CERTIFICATE-----
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca.crt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca.crt
deleted file mode 100644
index aaf97575b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/ca.crt
+++ /dev/null
@@ -1,21 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDZDCCAkwCCQCAzfCLqrJvuTANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV
-UzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsMCG5vZGUt
-Z3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGJ1aWxkQG5v
-ZGVqcy5vcmcwHhcNMTkwNjIyMDYyMjMzWhcNMjIwNDExMDYyMjMzWjB0MQswCQYD
-VQQGEwJVUzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsM
-CG5vZGUtZ3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGJ1
-aWxkQG5vZGVqcy5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDS
-CHjvtVW4HdbbUwZ/ZV9s6U4x0KSoyNQrsCZjB8kRpFPe50DS5mfmu2SNBGYKRgzk
-4QEEwFB9N2o8YTWsCefSRl6ti4ToPZqulU4hhRKYrEGtMJcRzi3IN7s200JaO3UH
-01Su8ruO0NESb5zEU1Ykfh8Lub8TGEAINmgI61d/5d5Aq3kDjUHQJt1Ekw03Ylnu
-juQyCGZxLxnngu0mIvwzyL/UeeUgsfQLzvppUk6In7tC1zzMjSPWo0c8qu6KvrW4
-bKYnkZkzdQifzbpO5ERMEsh5HWq0uHa6+dgcVHFvlhdqF4Uat87ygNplVf0txsZB
-MNVqbz1k6xkZYMnzDoydAgMBAAEwDQYJKoZIhvcNAQELBQADggEBADspZGtKpWxy
-J1W3FA1aeQhMvequQTcMRz4avkm4K4HfTdV1iVD4CbvdezBphouBlyLVLDFJP7RZ
-m7dBJVgBwnxufoFLne8cR2MGqDRoySbFT1AtDJdxabE6Fg+QGUpgOQfeBJ6ANlSB
-+qJ+HG4QA+Ouh5hxz9mgYwkIsMUABHiwENdZ/kT8Edw4xKgd3uH0YP4iiePMD66c
-rzW3uXH5J1jnKgBlpxtog4P6dHCcoq+PZJ17W5bdXNyqC1LPzQqniZ2BNcEZ4ix3
-slAZAOWD1zLLGJhBPMV1fa0sHNBWc6oicr3YK/IDb0cp9kiLvnUu1pHy+LWQGqtC
-rceJuGsnJEQ=
------END CERTIFICATE-----
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.crt b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.crt
deleted file mode 100644
index 5d0c440e0..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.crt
+++ /dev/null
@@ -1,21 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDYjCCAkoCCQCSlmGR7KzZGTANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJV
-UzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsMCG5vZGUt
-Z3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGJ1aWxkQG5v
-ZGVqcy5vcmcwHhcNMTkwNjIyMDYyNTU1WhcNMjkwNjE5MDYyNTU1WjByMQswCQYD
-VQQGEwJVUzELMAkGA1UECAwCQ0ExEDAOBgNVBAoMB05vZGUuanMxETAPBgNVBAsM
-CG5vZGUtZ3lwMRIwEAYDVQQDDAlsb2NhbGhvc3QxHTAbBgkqhkiG9w0BCQEWDmJ1
-aWxkQGlvanMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6S1E
-2WchgmbJYqCnpN7310ZgHjIOqeJe6MpSue2u6z6mTNd5izgvQNaANmn3xLFCS5zs
-uZaTvdPYPkcmSQzb1YcZSUYnAxZifjYARc6kb5GSBl3q+O70ELyFrimXfZ4JI+bd
-IG9KiHY17DlvZZZj/csGYVWWg0mkeH3O5LPX6/DXQVh/9+gZ02/cdIBCAtZHQwqx
-7tF/qZA/kD4GZNFpU1DYHzf9H6g9htoCqmNHQWrV2T9yFybt6mbZp9kglBmyKYCc
-7hmQnb7N/mHn1yIuwhBsirCJTfKH86gN81u8M3+SVHA2VUHDllcNhpDWlmInXA+I
-tHdGZHCp95ohqpCPgQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCdvYj6CD0ZLwT2
-3t1r+deC3TJuHlNVSeKeT7wIfFnh2FW5riGV0q/w6eXPLTHjuiS6YmpAAbdNUgX/
-sq64FqI2RLpX6pgY5yB0SKopMcJxMLKqmF4zHpIHxtYN5EmN3PR0vehneBR/nZ2T
-3ikvWD5JeXlm7Dfw+tjijdxM/sEoDWErGup4mMKMd1s5s830p+ITJUa50d0DLFdH
-mqPSbUZF8mMPwGJd+nu1Ht3gTLtK7+gYJgGtXMJmGC0Qg77EJHDB2NbotgDGNmSU
-1H9BpAeFHHIcbh2Rr7kkTvnh/c03vFe+CsDZmezcmRpRzW1fKj3YbfqBxU4XwJrL
-a5T/N9xU
------END CERTIFICATE-----
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.key b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.key
deleted file mode 100644
index a8447391e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/server.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEA6S1E2WchgmbJYqCnpN7310ZgHjIOqeJe6MpSue2u6z6mTNd5
-izgvQNaANmn3xLFCS5zsuZaTvdPYPkcmSQzb1YcZSUYnAxZifjYARc6kb5GSBl3q
-+O70ELyFrimXfZ4JI+bdIG9KiHY17DlvZZZj/csGYVWWg0mkeH3O5LPX6/DXQVh/
-9+gZ02/cdIBCAtZHQwqx7tF/qZA/kD4GZNFpU1DYHzf9H6g9htoCqmNHQWrV2T9y
-Fybt6mbZp9kglBmyKYCc7hmQnb7N/mHn1yIuwhBsirCJTfKH86gN81u8M3+SVHA2
-VUHDllcNhpDWlmInXA+ItHdGZHCp95ohqpCPgQIDAQABAoIBABW8R4ewalo6dJlB
-+n6O3jFt+PW3mtBRLqGqgm2cb0q0a1IMX+MPWLBFjmwEErl+AH0F4rcmBx2Ryr17
-amEy1qcf0caXyHksNAApznqzWXag7iizxnxv4cZRnHBwphNqkNWM5p3oYd04j6w2
-amDg1O9KZozaKo6QZclpiMiezwjKG+PVZLT8p7afswjv+yDWPDByhlcGiye9QD1T
-VuZ0QCoXp6N/8JxW0gdkLp9NqFvGeGFzJ5h6L+d7A6BWw8akXrBRHHcKkyvVYBfd
-myhSzSK4FPFMaxaEY/65FlVSyAO6ezGm3Umx4g7mkFjLdwKWaIOjkBkPeFgl3Pp4
-7Lo5X3UCgYEA/FrrIwmEU5ayulBVScEMKeavu5eNY4r0Sqbpov2oyTdYe8G49Pzy
-ryMXfunY43moLKpajGwgTKRGvdqFtK08AAkaCssiAPkP3rZuZvMTF4sLo/vlWrjP
-3er+tUqj22BzXi5XV0BAvH8Y3TL8KQ3he/8JxDvkC811/DQ9Y/Da3U8CgYEA7Itw
-UM37URma08Bj9VTMoL9ZCyURewX+ZLDb2+O8sXGXJs28i1RkE6PTBlnRmedn+Jjk
-byzQ5Cs5wA5uMbhYTA7kgXOs1bvgQqmlLmyL6FfHkucoMhr2Di7VeGf4OxE26JZ8
-JdY4+1MOyI3A2rR8WU+GmHxy0ay4K2xe6W0vsi8CgYBoGLEKIPDe8jkDtgOYivOT
-jT9MaLXALB+dc8DIpU4swpHTaxP6qyUIrbcReTEolJSU6Ci16BxiwRkVU8D3yMYJ
-VbfSX/zE3fh37FUaToa/nXHN0SjJBZdpeXhcHE//PIgaf48zxKNvnhYJmPB/luQ+
-m/PRaMsnOzfCM2JniYEe7QKBgGwjnxhB4tgDtaWCue/pcZc3gzS2IJS2e8N6mzie
-l6Ajhu+FdOHZldrotUuc+la61OxwsVYmDeWR4VftAPGYDj3PPSX1RRl9R5wSRGLB
-2wBASQvew6CMdNqtDIh8N56BUzHnwh/mHKzBHuwO6hDSHFsUITtLAY7bwGKRq55Z
-fUmfAoGBANOYFyoJoDLcl+Jd750lyqfCifcGtkRdmZMtrPXaYnD8ZGme9vz1vsK/
-4iUkV3mi7Z9s1LXMa/tPPfKdVhCM1PXost3/si0+u1Bz5yKqEPXlyy2ltpIVyGu8
-yiy7y75asp8Iii/1cgtwyp9+VeSif8wJ+MHQoGdGxvAQP80R3EjF
------END RSA PRIVATE KEY-----
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/test-charmap.py b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/test-charmap.py
deleted file mode 100644
index b338f915b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/fixtures/test-charmap.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from __future__ import print_function
-import sys
-import locale
-
-try:
- reload(sys)
-except NameError: # Python 3
- pass
-
-def main():
- encoding = locale.getdefaultlocale()[1]
- if not encoding:
- return False
-
- try:
- sys.setdefaultencoding(encoding)
- except AttributeError: # Python 3
- pass
-
- textmap = {
- 'cp936': u'\u4e2d\u6587',
- 'cp1252': u'Lat\u012Bna',
- 'cp932': u'\u306b\u307b\u3093\u3054'
- }
- if encoding in textmap:
- print(textmap[encoding])
- return True
-
-if __name__ == '__main__':
- print(main())
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/process-exec-sync.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/process-exec-sync.js
deleted file mode 100644
index 21763bc26..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/process-exec-sync.js
+++ /dev/null
@@ -1,140 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs')
-const childProcess = require('child_process')
-
-function startsWith (str, search, pos) {
- if (String.prototype.startsWith) {
- return str.startsWith(search, pos)
- }
-
- return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search
-}
-
-function processExecSync (file, args, options) {
- var child, error, timeout, tmpdir, command
- command = makeCommand(file, args)
-
- /*
- this function emulates child_process.execSync for legacy node <= 0.10.x
- derived from https://github.com/gvarsanyi/sync-exec/blob/master/js/sync-exec.js
- */
-
- options = options || {}
- // init timeout
- timeout = Date.now() + options.timeout
- // init tmpdir
- var osTempBase = '/tmp'
- var os = determineOS()
- osTempBase = '/tmp'
-
- if (process.env.TMP) {
- osTempBase = process.env.TMP
- }
-
- if (osTempBase[osTempBase.length - 1] !== '/') {
- osTempBase += '/'
- }
-
- tmpdir = osTempBase + 'processExecSync.' + Date.now() + Math.random()
- fs.mkdirSync(tmpdir)
-
- // init command
- if (os === 'linux') {
- command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir +
- '/stderr); echo $? > ' + tmpdir + '/status'
- } else {
- command = '(' + command + ' > ' + tmpdir + '/stdout 2> ' + tmpdir +
- '/stderr) | echo %errorlevel% > ' + tmpdir + '/status | exit'
- }
-
- // init child
- child = childProcess.exec(command, options)
-
- var maxTry = 100000 // increases the test time by 6 seconds on win-2016-node-0.10
- var tryCount = 0
- while (tryCount < maxTry) {
- try {
- var x = fs.readFileSync(tmpdir + '/status')
- if (x.toString() === '0') {
- break
- }
- } catch (ignore) {}
- tryCount++
- if (Date.now() > timeout) {
- error = child
- break
- }
- }
-
- ['stdout', 'stderr', 'status'].forEach(function (file) {
- child[file] = fs.readFileSync(tmpdir + '/' + file, options.encoding)
- setTimeout(unlinkFile, 500, tmpdir + '/' + file)
- })
-
- child.status = Number(child.status)
- if (child.status !== 0) {
- error = child
- }
-
- try {
- fs.rmdirSync(tmpdir)
- } catch (ignore) {}
- if (error) {
- throw error
- }
- return child.stdout
-}
-
-function makeCommand (file, args) {
- var command, quote
- command = file
- if (args.length > 0) {
- for (var i in args) {
- command = command + ' '
- if (args[i][0] === '-') {
- command = command + args[i]
- } else {
- if (!quote) {
- command = command + '"'
- quote = true
- }
- command = command + args[i]
- if (quote) {
- if (args.length === (parseInt(i) + 1)) {
- command = command + '"'
- }
- }
- }
- }
- }
- return command
-}
-
-function determineOS () {
- var os = ''
- var tmpVar = ''
- if (process.env.OSTYPE) {
- tmpVar = process.env.OSTYPE
- } else if (process.env.OS) {
- tmpVar = process.env.OS
- } else {
- // default is linux
- tmpVar = 'linux'
- }
-
- if (startsWith(tmpVar, 'linux')) {
- os = 'linux'
- }
- if (startsWith(tmpVar, 'win')) {
- os = 'win'
- }
-
- return os
-}
-
-function unlinkFile (file) {
- fs.unlinkSync(file)
-}
-
-module.exports = processExecSync
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/simple-proxy.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/simple-proxy.js
deleted file mode 100644
index cb0dfcfec..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/simple-proxy.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-
-const http = require('http')
-const https = require('https')
-const server = http.createServer(handler)
-const port = +process.argv[2]
-const prefix = process.argv[3]
-const upstream = process.argv[4]
-var calls = 0
-
-server.listen(port)
-
-function handler (req, res) {
- if (req.url.indexOf(prefix) !== 0) {
- throw new Error('request url [' + req.url + '] does not start with [' + prefix + ']')
- }
-
- var upstreamUrl = upstream + req.url.substring(prefix.length)
- https.get(upstreamUrl, function (ures) {
- ures.on('end', function () {
- if (++calls === 2) {
- server.close()
- }
- })
- ures.pipe(res)
- })
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-addon.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-addon.js
deleted file mode 100644
index f79eff73c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-addon.js
+++ /dev/null
@@ -1,150 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const path = require('path')
-const fs = require('graceful-fs')
-const childProcess = require('child_process')
-const os = require('os')
-const addonPath = path.resolve(__dirname, 'node_modules', 'hello_world')
-const nodeGyp = path.resolve(__dirname, '..', 'bin', 'node-gyp.js')
-const execFileSync = childProcess.execFileSync || require('./process-exec-sync')
-const execFile = childProcess.execFile
-
-function runHello (hostProcess) {
- if (!hostProcess) {
- hostProcess = process.execPath
- }
- var testCode = "console.log(require('hello_world').hello())"
- return execFileSync(hostProcess, ['-e', testCode], { cwd: __dirname }).toString()
-}
-
-function getEncoding () {
- var code = 'import locale;print(locale.getdefaultlocale()[1])'
- return execFileSync('python', ['-c', code]).toString().trim()
-}
-
-function checkCharmapValid () {
- var data
- try {
- data = execFileSync('python', ['fixtures/test-charmap.py'],
- { cwd: __dirname })
- } catch (err) {
- return false
- }
- var lines = data.toString().trim().split('\n')
- return lines.pop() === 'True'
-}
-
-test('build simple addon', function (t) {
- t.plan(3)
-
- // Set the loglevel otherwise the output disappears when run via 'npm test'
- var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose']
- var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) {
- var logLines = stderr.toString().trim().split(/\r?\n/)
- var lastLine = logLines[logLines.length - 1]
- t.strictEqual(err, null)
- t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
- t.strictEqual(runHello().trim(), 'world')
- })
- proc.stdout.setEncoding('utf-8')
- proc.stderr.setEncoding('utf-8')
-})
-
-test('build simple addon in path with non-ascii characters', function (t) {
- t.plan(1)
-
- if (!checkCharmapValid()) {
- return t.skip('python console app can\'t encode non-ascii character.')
- }
-
- var testDirNames = {
- cp936: '文件夹',
- cp1252: 'Latīna',
- cp932: 'フォルダ'
- }
- // Select non-ascii characters by current encoding
- var testDirName = testDirNames[getEncoding()]
- // If encoding is UTF-8 or other then no need to test
- if (!testDirName) {
- return t.skip('no need to test')
- }
-
- t.plan(3)
-
- var data
- var configPath = path.join(addonPath, 'build', 'config.gypi')
- try {
- data = fs.readFileSync(configPath, 'utf8')
- } catch (err) {
- t.error(err)
- return
- }
- var config = JSON.parse(data.replace(/#.+\n/, ''))
- var nodeDir = config.variables.nodedir
- var testNodeDir = path.join(addonPath, testDirName)
- // Create symbol link to path with non-ascii characters
- try {
- fs.symlinkSync(nodeDir, testNodeDir, 'dir')
- } catch (err) {
- switch (err.code) {
- case 'EEXIST': break
- case 'EPERM':
- t.error(err, 'Please try to running console as an administrator')
- return
- default:
- t.error(err)
- return
- }
- }
-
- var cmd = [
- nodeGyp,
- 'rebuild',
- '-C',
- addonPath,
- '--loglevel=verbose',
- '-nodedir=' + testNodeDir
- ]
- var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) {
- try {
- fs.unlink(testNodeDir)
- } catch (err) {
- t.error(err)
- }
-
- var logLines = stderr.toString().trim().split(/\r?\n/)
- var lastLine = logLines[logLines.length - 1]
- t.strictEqual(err, null)
- t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
- t.strictEqual(runHello().trim(), 'world')
- })
- proc.stdout.setEncoding('utf-8')
- proc.stderr.setEncoding('utf-8')
-})
-
-test('addon works with renamed host executable', function (t) {
- // No `fs.copyFileSync` before node8.
- if (process.version.substr(1).split('.')[0] < 8) {
- t.skip('skipping test for old node version')
- t.end()
- return
- }
-
- t.plan(3)
-
- var notNodePath = path.join(os.tmpdir(), 'notnode' + path.extname(process.execPath))
- fs.copyFileSync(process.execPath, notNodePath)
-
- var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose']
- var proc = execFile(process.execPath, cmd, function (err, stdout, stderr) {
- var logLines = stderr.toString().trim().split(/\r?\n/)
- var lastLine = logLines[logLines.length - 1]
- t.strictEqual(err, null)
- t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
- t.strictEqual(runHello(notNodePath).trim(), 'world')
- fs.unlinkSync(notNodePath)
- })
- proc.stdout.setEncoding('utf-8')
- proc.stderr.setEncoding('utf-8')
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-configure-python.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-configure-python.js
deleted file mode 100644
index d08f9e5ed..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-configure-python.js
+++ /dev/null
@@ -1,78 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const path = require('path')
-const devDir = require('./common').devDir()
-const gyp = require('../lib/node-gyp')
-const requireInject = require('require-inject')
-const configure = requireInject('../lib/configure', {
- 'graceful-fs': {
- openSync: function () { return 0 },
- closeSync: function () { },
- writeFile: function (file, data, cb) { cb() },
- stat: function (file, cb) { cb(null, {}) }
- }
-})
-
-const EXPECTED_PYPATH = path.join(__dirname, '..', 'gyp', 'pylib')
-const SEPARATOR = process.platform === 'win32' ? ';' : ':'
-const SPAWN_RESULT = { on: function () { } }
-
-require('npmlog').level = 'warn'
-
-test('configure PYTHONPATH with no existing env', function (t) {
- t.plan(1)
-
- delete process.env.PYTHONPATH
-
- var prog = gyp()
- prog.parseArgv([])
- prog.spawn = function () {
- t.equal(process.env.PYTHONPATH, EXPECTED_PYPATH)
- return SPAWN_RESULT
- }
- prog.devDir = devDir
- configure(prog, [], t.fail)
-})
-
-test('configure PYTHONPATH with existing env of one dir', function (t) {
- t.plan(2)
-
- var existingPath = path.join('a', 'b')
- process.env.PYTHONPATH = existingPath
-
- var prog = gyp()
- prog.parseArgv([])
- prog.spawn = function () {
- t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR))
-
- var dirs = process.env.PYTHONPATH.split(SEPARATOR)
- t.deepEqual(dirs, [EXPECTED_PYPATH, existingPath])
-
- return SPAWN_RESULT
- }
- prog.devDir = devDir
- configure(prog, [], t.fail)
-})
-
-test('configure PYTHONPATH with existing env of multiple dirs', function (t) {
- t.plan(2)
-
- var pythonDir1 = path.join('a', 'b')
- var pythonDir2 = path.join('b', 'c')
- var existingPath = [pythonDir1, pythonDir2].join(SEPARATOR)
- process.env.PYTHONPATH = existingPath
-
- var prog = gyp()
- prog.parseArgv([])
- prog.spawn = function () {
- t.equal(process.env.PYTHONPATH, [EXPECTED_PYPATH, existingPath].join(SEPARATOR))
-
- var dirs = process.env.PYTHONPATH.split(SEPARATOR)
- t.deepEqual(dirs, [EXPECTED_PYPATH, pythonDir1, pythonDir2])
-
- return SPAWN_RESULT
- }
- prog.devDir = devDir
- configure(prog, [], t.fail)
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-download.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-download.js
deleted file mode 100644
index fe373e328..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-download.js
+++ /dev/null
@@ -1,268 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const fs = require('fs')
-const path = require('path')
-const http = require('http')
-const https = require('https')
-const install = require('../lib/install')
-const semver = require('semver')
-const devDir = require('./common').devDir()
-const rimraf = require('rimraf')
-const gyp = require('../lib/node-gyp')
-const log = require('npmlog')
-
-log.level = 'warn'
-
-test('download over http', function (t) {
- t.plan(2)
-
- var server = http.createServer(function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('ok')
- server.close()
- })
-
- var host = 'localhost'
- server.listen(0, host, function () {
- var port = this.address().port
- var gyp = {
- opts: {},
- version: '42'
- }
- var url = 'http://' + host + ':' + port
- var req = install.test.download(gyp, {}, url)
- req.on('response', function (res) {
- var body = ''
- res.setEncoding('utf8')
- res.on('data', function (data) {
- body += data
- })
- res.on('end', function () {
- t.strictEqual(body, 'ok')
- })
- })
- })
-})
-
-test('download over https with custom ca', function (t) {
- t.plan(3)
-
- var cert = fs.readFileSync(path.join(__dirname, 'fixtures/server.crt'), 'utf8')
- var key = fs.readFileSync(path.join(__dirname, 'fixtures/server.key'), 'utf8')
-
- var cafile = path.join(__dirname, '/fixtures/ca.crt')
- var ca = install.test.readCAFile(cafile)
- t.strictEqual(ca.length, 1)
-
- var options = { ca: ca, cert: cert, key: key }
- var server = https.createServer(options, function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('ok')
- server.close()
- })
-
- server.on('clientError', function (err) {
- throw err
- })
-
- var host = 'localhost'
- server.listen(8000, host, function () {
- var port = this.address().port
- var gyp = {
- opts: { cafile: cafile },
- version: '42'
- }
- var url = 'https://' + host + ':' + port
- var req = install.test.download(gyp, {}, url)
- req.on('response', function (res) {
- var body = ''
- res.setEncoding('utf8')
- res.on('data', function (data) {
- body += data
- })
- res.on('end', function () {
- t.strictEqual(body, 'ok')
- })
- })
- })
-})
-
-test('download over http with proxy', function (t) {
- t.plan(2)
-
- var server = http.createServer(function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('ok')
- pserver.close(function () {
- server.close()
- })
- })
-
- var pserver = http.createServer(function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('proxy ok')
- server.close(function () {
- pserver.close()
- })
- })
-
- var host = 'localhost'
- server.listen(0, host, function () {
- var port = this.address().port
- pserver.listen(port + 1, host, function () {
- var gyp = {
- opts: {
- proxy: 'http://' + host + ':' + (port + 1)
- },
- version: '42'
- }
- var url = 'http://' + host + ':' + port
- var req = install.test.download(gyp, {}, url)
- req.on('response', function (res) {
- var body = ''
- res.setEncoding('utf8')
- res.on('data', function (data) {
- body += data
- })
- res.on('end', function () {
- t.strictEqual(body, 'proxy ok')
- })
- })
- })
- })
-})
-
-test('download over http with noproxy', function (t) {
- t.plan(2)
-
- var server = http.createServer(function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('ok')
- pserver.close(function () {
- server.close()
- })
- })
-
- var pserver = http.createServer(function (req, res) {
- t.strictEqual(req.headers['user-agent'],
- 'node-gyp v42 (node ' + process.version + ')')
- res.end('proxy ok')
- server.close(function () {
- pserver.close()
- })
- })
-
- var host = 'localhost'
- server.listen(0, host, function () {
- var port = this.address().port
- pserver.listen(port + 1, host, function () {
- var gyp = {
- opts: {
- proxy: 'http://' + host + ':' + (port + 1),
- noproxy: 'localhost'
- },
- version: '42'
- }
- var url = 'http://' + host + ':' + port
- var req = install.test.download(gyp, {}, url)
- req.on('response', function (res) {
- var body = ''
- res.setEncoding('utf8')
- res.on('data', function (data) {
- body += data
- })
- res.on('end', function () {
- t.strictEqual(body, 'ok')
- })
- })
- })
- })
-})
-
-test('download with missing cafile', function (t) {
- t.plan(1)
- var gyp = {
- opts: { cafile: 'no.such.file' }
- }
- try {
- install.test.download(gyp, {}, 'http://bad/')
- } catch (e) {
- t.ok(/no.such.file/.test(e.message))
- }
-})
-
-test('check certificate splitting', function (t) {
- var cas = install.test.readCAFile(path.join(__dirname, 'fixtures/ca-bundle.crt'))
- t.plan(2)
- t.strictEqual(cas.length, 2)
- t.notStrictEqual(cas[0], cas[1])
-})
-
-// only run this test if we are running a version of Node with predictable version path behavior
-
-test('download headers (actual)', function (t) {
- if (process.env.FAST_TEST ||
- process.release.name !== 'node' ||
- semver.prerelease(process.version) !== null ||
- semver.satisfies(process.version, '<10')) {
- return t.skip('Skipping actual download of headers due to test environment configuration')
- }
-
- t.plan(17)
-
- const expectedDir = path.join(devDir, process.version.replace(/^v/, ''))
- rimraf(expectedDir, (err) => {
- t.ifError(err)
-
- const prog = gyp()
- prog.parseArgv([])
- prog.devDir = devDir
- log.level = 'warn'
- install(prog, [], (err) => {
- t.ifError(err)
-
- fs.readFile(path.join(expectedDir, 'installVersion'), 'utf8', (err, data) => {
- t.ifError(err)
- t.strictEqual(data, '9\n', 'correct installVersion')
- })
-
- fs.readdir(path.join(expectedDir, 'include/node'), (err, list) => {
- t.ifError(err)
-
- t.ok(list.includes('common.gypi'))
- t.ok(list.includes('config.gypi'))
- t.ok(list.includes('node.h'))
- t.ok(list.includes('node_version.h'))
- t.ok(list.includes('openssl'))
- t.ok(list.includes('uv'))
- t.ok(list.includes('uv.h'))
- t.ok(list.includes('v8-platform.h'))
- t.ok(list.includes('v8.h'))
- t.ok(list.includes('zlib.h'))
- })
-
- fs.readFile(path.join(expectedDir, 'include/node/node_version.h'), 'utf8', (err, contents) => {
- t.ifError(err)
-
- const lines = contents.split('\n')
-
- // extract the 3 version parts from the defines to build a valid version string and
- // and check them against our current env version
- const version = ['major', 'minor', 'patch'].reduce((version, type) => {
- const re = new RegExp(`^#define\\sNODE_${type.toUpperCase()}_VERSION`)
- const line = lines.find((l) => re.test(l))
- const i = line ? parseInt(line.replace(/^[^0-9]+([0-9]+).*$/, '$1'), 10) : 'ERROR'
- return `${version}${type !== 'major' ? '.' : 'v'}${i}`
- }, '')
-
- t.strictEqual(version, process.version)
- })
- })
- })
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-accessible-sync.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-accessible-sync.js
deleted file mode 100644
index 0a2e584c4..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-accessible-sync.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const path = require('path')
-const requireInject = require('require-inject')
-const configure = requireInject('../lib/configure', {
- 'graceful-fs': {
- closeSync: function () { return undefined },
- openSync: function (path) {
- if (readableFiles.some(function (f) { return f === path })) {
- return 0
- } else {
- var error = new Error('ENOENT - not found')
- throw error
- }
- }
- }
-})
-
-const dir = path.sep + 'testdir'
-const readableFile = 'readable_file'
-const anotherReadableFile = 'another_readable_file'
-const readableFileInDir = 'somedir' + path.sep + readableFile
-const readableFiles = [
- path.resolve(dir, readableFile),
- path.resolve(dir, anotherReadableFile),
- path.resolve(dir, readableFileInDir)
-]
-
-test('find accessible - empty array', function (t) {
- t.plan(1)
-
- var candidates = []
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, undefined)
-})
-
-test('find accessible - single item array, readable', function (t) {
- t.plan(1)
-
- var candidates = [readableFile]
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, path.resolve(dir, readableFile))
-})
-
-test('find accessible - single item array, readable in subdir', function (t) {
- t.plan(1)
-
- var candidates = [readableFileInDir]
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, path.resolve(dir, readableFileInDir))
-})
-
-test('find accessible - single item array, unreadable', function (t) {
- t.plan(1)
-
- var candidates = ['unreadable_file']
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, undefined)
-})
-
-test('find accessible - multi item array, no matches', function (t) {
- t.plan(1)
-
- var candidates = ['non_existent_file', 'unreadable_file']
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, undefined)
-})
-
-test('find accessible - multi item array, single match', function (t) {
- t.plan(1)
-
- var candidates = ['non_existent_file', readableFile]
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, path.resolve(dir, readableFile))
-})
-
-test('find accessible - multi item array, return first match', function (t) {
- t.plan(1)
-
- var candidates = ['non_existent_file', anotherReadableFile, readableFile]
- var found = configure.test.findAccessibleSync('test', dir, candidates)
- t.strictEqual(found, path.resolve(dir, anotherReadableFile))
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-node-directory.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-node-directory.js
deleted file mode 100644
index f1380d162..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-node-directory.js
+++ /dev/null
@@ -1,119 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const path = require('path')
-const findNodeDirectory = require('../lib/find-node-directory')
-
-const platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix']
-
-// we should find the directory based on the directory
-// the script is running in and it should match the layout
-// in a build tree where npm is installed in
-// .... /deps/npm
-test('test find-node-directory - node install', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] }
- t.equal(
- findNodeDirectory('/x/deps/npm/node_modules/node-gyp/lib', processObj),
- path.join('/x'))
- }
-})
-
-// we should find the directory based on the directory
-// the script is running in and it should match the layout
-// in an installed tree where npm is installed in
-// .... /lib/node_modules/npm or .../node_modules/npm
-// depending on the patform
-test('test find-node-directory - node build', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] }
- if (platforms[next] === 'win32') {
- t.equal(
- findNodeDirectory('/y/node_modules/npm/node_modules/node-gyp/lib',
- processObj), path.join('/y'))
- } else {
- t.equal(
- findNodeDirectory('/y/lib/node_modules/npm/node_modules/node-gyp/lib',
- processObj), path.join('/y'))
- }
- }
-})
-
-// we should find the directory based on the execPath
-// for node and match because it was in the bin directory
-test('test find-node-directory - node in bin directory', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] }
- t.equal(
- findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj),
- path.join('/x/y'))
- }
-})
-
-// we should find the directory based on the execPath
-// for node and match because it was in the Release directory
-test('test find-node-directory - node in build release dir', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj
- if (platforms[next] === 'win32') {
- processObj = { execPath: '/x/y/Release/node', platform: platforms[next] }
- } else {
- processObj = {
- execPath: '/x/y/out/Release/node',
- platform: platforms[next]
- }
- }
-
- t.equal(
- findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj),
- path.join('/x/y'))
- }
-})
-
-// we should find the directory based on the execPath
-// for node and match because it was in the Debug directory
-test('test find-node-directory - node in Debug release dir', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj
- if (platforms[next] === 'win32') {
- processObj = { execPath: '/a/b/Debug/node', platform: platforms[next] }
- } else {
- processObj = { execPath: '/a/b/out/Debug/node', platform: platforms[next] }
- }
-
- t.equal(
- findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj),
- path.join('/a/b'))
- }
-})
-
-// we should not find it as it will not match based on the execPath nor
-// the directory from which the script is running
-test('test find-node-directory - not found', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj = { execPath: '/x/y/z/y', platform: next }
- t.equal(findNodeDirectory('/a/b/c/d', processObj), '')
- }
-})
-
-// we should find the directory based on the directory
-// the script is running in and it should match the layout
-// in a build tree where npm is installed in
-// .... /deps/npm
-// same test as above but make sure additional directory entries
-// don't cause an issue
-test('test find-node-directory - node install', function (t) {
- t.plan(platforms.length)
- for (var next = 0; next < platforms.length; next++) {
- var processObj = { execPath: '/x/y/bin/node', platform: platforms[next] }
- t.equal(
- findNodeDirectory('/x/y/z/a/b/c/deps/npm/node_modules/node-gyp/lib',
- processObj), path.join('/x/y/z/a/b/c'))
- }
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-python.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-python.js
deleted file mode 100644
index 6ca522a04..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-python.js
+++ /dev/null
@@ -1,231 +0,0 @@
-'use strict'
-
-delete process.env.PYTHON
-
-const test = require('tap').test
-const findPython = require('../lib/find-python')
-const execFile = require('child_process').execFile
-const PythonFinder = findPython.test.PythonFinder
-
-require('npmlog').level = 'warn'
-
-test('find python', function (t) {
- t.plan(4)
-
- findPython.test.findPython(null, function (err, found) {
- t.strictEqual(err, null)
- var proc = execFile(found, ['-V'], function (err, stdout, stderr) {
- t.strictEqual(err, null)
- if (/Python 2/.test(stderr)) {
- t.strictEqual(stdout, '')
- t.ok(/Python 2/.test(stderr))
- } else {
- t.ok(/Python 3/.test(stdout))
- t.strictEqual(stderr, '')
- }
- })
- proc.stdout.setEncoding('utf-8')
- proc.stderr.setEncoding('utf-8')
- })
-})
-
-function poison (object, property) {
- function fail () {
- console.error(Error(`Property ${property} should not have been accessed.`))
- process.abort()
- }
- var descriptor = {
- configurable: false,
- enumerable: false,
- get: fail,
- set: fail
- }
- Object.defineProperty(object, property, descriptor)
-}
-
-function TestPythonFinder () {
- PythonFinder.apply(this, arguments)
-}
-TestPythonFinder.prototype = Object.create(PythonFinder.prototype)
-// Silence npmlog - remove for debugging
-TestPythonFinder.prototype.log = {
- silly: () => {},
- verbose: () => {},
- info: () => {},
- warn: () => {},
- error: () => {}
-}
-delete TestPythonFinder.prototype.env.NODE_GYP_FORCE_PYTHON
-
-test('find python - python', function (t) {
- t.plan(6)
-
- var f = new TestPythonFinder('python', done)
- f.execFile = function (program, args, opts, cb) {
- f.execFile = function (program, args, opts, cb) {
- poison(f, 'execFile')
- t.strictEqual(program, '/path/python')
- t.ok(/sys\.version_info/.test(args[1]))
- cb(null, '2.7.15')
- }
- t.strictEqual(program,
- process.platform === 'win32' ? '"python"' : 'python')
- t.ok(/sys\.executable/.test(args[1]))
- cb(null, '/path/python')
- }
- f.findPython()
-
- function done (err, python) {
- t.strictEqual(err, null)
- t.strictEqual(python, '/path/python')
- }
-})
-
-test('find python - python too old', function (t) {
- t.plan(2)
-
- var f = new TestPythonFinder(null, done)
- f.execFile = function (program, args, opts, cb) {
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(null, '/path/python')
- } else if (/sys\.version_info/.test(args[args.length - 1])) {
- cb(null, '2.3.4')
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err) {
- t.ok(/Could not find any Python/.test(err))
- t.ok(/not supported/i.test(f.errorLog))
- }
-})
-
-test('find python - no python', function (t) {
- t.plan(2)
-
- var f = new TestPythonFinder(null, done)
- f.execFile = function (program, args, opts, cb) {
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(new Error('not found'))
- } else if (/sys\.version_info/.test(args[args.length - 1])) {
- cb(new Error('not a Python executable'))
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err) {
- t.ok(/Could not find any Python/.test(err))
- t.ok(/not in PATH/.test(f.errorLog))
- }
-})
-
-test('find python - no python2, no python, unix', function (t) {
- t.plan(2)
-
- var f = new TestPythonFinder(null, done)
- f.checkPyLauncher = t.fail
- f.win = false
-
- f.execFile = function (program, args, opts, cb) {
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(new Error('not found'))
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err) {
- t.ok(/Could not find any Python/.test(err))
- t.ok(/not in PATH/.test(f.errorLog))
- }
-})
-
-test('find python - no python, use python launcher', function (t) {
- t.plan(4)
-
- var f = new TestPythonFinder(null, done)
- f.win = true
-
- f.execFile = function (program, args, opts, cb) {
- if (program === 'py.exe') {
- t.notEqual(args.indexOf('-2'), -1)
- t.notEqual(args.indexOf('-c'), -1)
- return cb(null, 'Z:\\snake.exe')
- }
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(new Error('not found'))
- } else if (f.winDefaultLocations.includes(program)) {
- cb(new Error('not found'))
- } else if (/sys\.version_info/.test(args[args.length - 1])) {
- if (program === 'Z:\\snake.exe') {
- cb(null, '2.7.14')
- } else {
- t.fail()
- }
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err, python) {
- t.strictEqual(err, null)
- t.strictEqual(python, 'Z:\\snake.exe')
- }
-})
-
-test('find python - no python, no python launcher, good guess', function (t) {
- t.plan(2)
-
- var re = /C:[\\/]Python37[\\/]python[.]exe/
- var f = new TestPythonFinder(null, done)
- f.win = true
-
- f.execFile = function (program, args, opts, cb) {
- if (program === 'py.exe') {
- return cb(new Error('not found'))
- }
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(new Error('not found'))
- } else if (re.test(program) &&
- /sys\.version_info/.test(args[args.length - 1])) {
- cb(null, '3.7.3')
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err, python) {
- t.strictEqual(err, null)
- t.ok(re.test(python))
- }
-})
-
-test('find python - no python, no python launcher, bad guess', function (t) {
- t.plan(2)
-
- var f = new TestPythonFinder(null, done)
- f.win = true
-
- f.execFile = function (program, args, opts, cb) {
- if (/sys\.executable/.test(args[args.length - 1])) {
- cb(new Error('not found'))
- } else if (/sys\.version_info/.test(args[args.length - 1])) {
- cb(new Error('not a Python executable'))
- } else {
- t.fail()
- }
- }
- f.findPython()
-
- function done (err) {
- t.ok(/Could not find any Python/.test(err))
- t.ok(/not in PATH/.test(f.errorLog))
- }
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-visualstudio.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-visualstudio.js
deleted file mode 100644
index 1327cf884..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-find-visualstudio.js
+++ /dev/null
@@ -1,676 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const fs = require('fs')
-const path = require('path')
-const findVisualStudio = require('../lib/find-visualstudio')
-const VisualStudioFinder = findVisualStudio.test.VisualStudioFinder
-
-const semverV1 = { major: 1, minor: 0, patch: 0 }
-
-delete process.env.VCINSTALLDIR
-
-function poison (object, property) {
- function fail () {
- console.error(Error(`Property ${property} should not have been accessed.`))
- process.abort()
- }
- var descriptor = {
- configurable: false,
- enumerable: false,
- get: fail,
- set: fail
- }
- Object.defineProperty(object, property, descriptor)
-}
-
-function TestVisualStudioFinder () { VisualStudioFinder.apply(this, arguments) }
-TestVisualStudioFinder.prototype = Object.create(VisualStudioFinder.prototype)
-// Silence npmlog - remove for debugging
-TestVisualStudioFinder.prototype.log = {
- silly: () => {},
- verbose: () => {},
- info: () => {},
- warn: () => {},
- error: () => {}
-}
-
-test('VS2013', function (t) {
- t.plan(4)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\MSBuild12\\MSBuild.exe',
- path: 'C:\\VS2013',
- sdk: null,
- toolset: 'v120',
- version: '12.0',
- versionMajor: 12,
- versionMinor: 0,
- versionYear: 2013
- })
- })
-
- finder.findVisualStudio2017OrNewer = (cb) => {
- finder.parseData(new Error(), '', '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- continue
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\VS2013\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\MSBuild12\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
-})
-
-test('VS2013 should not be found on new node versions', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder({
- major: 10,
- minor: 0,
- patch: 0
- }, null, (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
-
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- continue
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
-})
-
-test('VS2015', function (t) {
- t.plan(4)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\MSBuild14\\MSBuild.exe',
- path: 'C:\\VS2015',
- sdk: null,
- toolset: 'v140',
- version: '14.0',
- versionMajor: 14,
- versionMinor: 0,
- versionYear: 2015
- })
- })
-
- finder.findVisualStudio2017OrNewer = (cb) => {
- finder.parseData(new Error(), '', '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\VS2015\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\MSBuild14\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
-})
-
-test('error from PowerShell', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(new Error(), '', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('empty output from PowerShell', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(null, '', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('output from PowerShell not JSON', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(null, 'AAAABBBB', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('wrong JSON from PowerShell', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(null, '{}', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('empty JSON from PowerShell', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(null, '[]', '', (info) => {
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('future version', function (t) {
- t.plan(3)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- finder.parseData(null, JSON.stringify([{
- packages: [
- 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
- 'Microsoft.VisualStudio.Component.Windows10SDK.17763',
- 'Microsoft.VisualStudio.VC.MSBuild.Base'
- ],
- path: 'C:\\VS',
- version: '9999.9999.9999.9999'
- }]), '', (info) => {
- t.ok(/unknown version/i.test(finder.errorLog[0]), 'expect error')
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[1]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('single unusable VS2017', function (t) {
- t.plan(3)
-
- const finder = new TestVisualStudioFinder(semverV1, null, null)
-
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', (info) => {
- t.ok(/checking/i.test(finder.errorLog[0]), 'expect error')
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[2]), 'expect error')
- t.false(info, 'no data')
- })
-})
-
-test('minimal VS2017 Build Tools', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools',
- sdk: '10.0.17134.0',
- toolset: 'v141',
- version: '15.9.28307.665',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2017_BuildTools_minimal.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-test('VS2017 Community with C++ workload', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'Community\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community',
- sdk: '10.0.17763.0',
- toolset: 'v141',
- version: '15.9.28307.665',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2017_Community_workload.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-test('VS2017 Express', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'WDExpress\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\WDExpress',
- sdk: '10.0.17763.0',
- toolset: 'v141',
- version: '15.9.28307.858',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Express.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-test('VS2019 Preview with C++ workload', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'Preview\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview',
- sdk: '10.0.17763.0',
- toolset: 'v142',
- version: '16.0.28608.199',
- versionMajor: 16,
- versionMinor: 0,
- versionYear: 2019
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_Preview.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-test('minimal VS2019 Build Tools', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools',
- sdk: '10.0.17134.0',
- toolset: 'v142',
- version: '16.1.28922.388',
- versionMajor: 16,
- versionMinor: 1,
- versionYear: 2019
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_BuildTools_minimal.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-test('VS2019 Community with C++ workload', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'Community\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community',
- sdk: '10.0.17763.0',
- toolset: 'v142',
- version: '16.1.28922.388',
- versionMajor: 16,
- versionMinor: 1,
- versionYear: 2019
- })
- })
-
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_Community_workload.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
-})
-
-function allVsVersions (t, finder) {
- finder.findVisualStudio2017OrNewer = (cb) => {
- const data0 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Unusable.txt')))
- const data1 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_BuildTools_minimal.txt')))
- const data2 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Community_workload.txt')))
- const data3 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Express.txt')))
- const data4 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_Preview.txt')))
- const data5 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_BuildTools_minimal.txt')))
- const data6 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_Community_workload.txt')))
- const data = JSON.stringify(data0.concat(data1, data2, data3, data4,
- data5, data6))
- finder.parseData(null, data, '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- continue
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- return cb(null, 'C:\\VS2013\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath':
- return cb(null, 'C:\\MSBuild12\\')
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- return cb(null, 'C:\\VS2015\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath':
- return cb(null, 'C:\\MSBuild14\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
-}
-
-test('fail when looking for invalid path', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, 'AABB', (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2013 by version number', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, '2013', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2013)
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2013 by installation path', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2013',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2013')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2015 by version number', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, '2015', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2015)
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2015 by installation path', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2017 by version number', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, '2017', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2017)
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2017 by installation path', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2019 by version number', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, '2019', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2019)
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('look for VS2019 by installation path', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('msvs_version match should be case insensitive', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1,
- 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('latest version should be found by default', function (t) {
- t.plan(2)
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2019)
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('run on a usable VS Command Prompt', function (t) {
- t.plan(2)
-
- process.env.VCINSTALLDIR = 'C:\\VS2015\\VC'
- // VSINSTALLDIR is not defined on Visual C++ Build Tools 2015
- delete process.env.VSINSTALLDIR
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('VCINSTALLDIR match should be case insensitive', function (t) {
- t.plan(2)
-
- process.env.VCINSTALLDIR =
- 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS\\VC'
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('run on a unusable VS Command Prompt', function (t) {
- t.plan(2)
-
- process.env.VCINSTALLDIR =
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildToolsUnusable\\VC'
-
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('run on a VS Command Prompt with matching msvs_version', function (t) {
- t.plan(2)
-
- process.env.VCINSTALLDIR = 'C:\\VS2015\\VC'
-
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
-
-test('run on a VS Command Prompt with mismatched msvs_version', function (t) {
- t.plan(2)
-
- process.env.VCINSTALLDIR =
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC'
-
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
-
- allVsVersions(t, finder)
- finder.findVisualStudio()
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-install.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-install.js
deleted file mode 100644
index c3317155e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-install.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const install = require('../lib/install').test.install
-
-require('npmlog').level = 'error' // we expect a warning
-
-test('EACCES retry once', function (t) {
- t.plan(3)
-
- var fs = {}
- fs.stat = function (path, cb) {
- var err = new Error()
- err.code = 'EACCES'
- cb(err)
- t.ok(true)
- }
-
- var gyp = {}
- gyp.devDir = __dirname
- gyp.opts = {}
- gyp.opts.ensure = true
- gyp.commands = {}
- gyp.commands.install = function (argv, cb) {
- install(fs, gyp, argv, cb)
- }
- gyp.commands.remove = function (argv, cb) {
- cb()
- }
-
- gyp.commands.install([], function (err) {
- t.ok(true)
- if (/"pre" versions of node cannot be installed/.test(err.message)) {
- t.ok(true)
- t.ok(true)
- }
- })
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-options.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-options.js
deleted file mode 100644
index 252baa203..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-options.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const gyp = require('../lib/node-gyp')
-
-test('options in environment', function (t) {
- t.plan(1)
-
- // `npm test` dumps a ton of npm_config_* variables in the environment.
- Object.keys(process.env)
- .filter(function (key) { return /^npm_config_/.test(key) })
- .forEach(function (key) { delete process.env[key] })
-
- // Zero-length keys should get filtered out.
- process.env.npm_config_ = '42'
- // Other keys should get added.
- process.env.npm_config_x = '42'
- // Except loglevel.
- process.env.npm_config_loglevel = 'debug'
-
- var g = gyp()
- g.parseArgv(['rebuild']) // Also sets opts.argv.
-
- t.deepEqual(Object.keys(g.opts).sort(), ['argv', 'x'])
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-process-release.js b/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-process-release.js
deleted file mode 100644
index c3ee0703c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/node-gyp/test/test-process-release.js
+++ /dev/null
@@ -1,434 +0,0 @@
-'use strict'
-
-const test = require('tap').test
-const processRelease = require('../lib/process-release')
-
-test('test process release - process.version = 0.8.20', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.8.20', null)
-
- t.equal(release.semver.version, '0.8.20')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.8.20',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.8.20/',
- tarballUrl: 'https://nodejs.org/dist/v0.8.20/node-v0.8.20.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.8.20/SHASUMS256.txt',
- versionDir: '0.8.20',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.8.20/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.8.20/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-test('test process release - process.version = 0.10.21', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.10.21', null)
-
- t.equal(release.semver.version, '0.10.21')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.10.21',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.10.21/',
- tarballUrl: 'https://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.10.21/SHASUMS256.txt',
- versionDir: '0.10.21',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.10.21/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.10.21/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-// prior to -headers.tar.gz
-test('test process release - process.version = 0.12.9', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.12.9', null)
-
- t.equal(release.semver.version, '0.12.9')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.12.9',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.12.9/',
- tarballUrl: 'https://nodejs.org/dist/v0.12.9/node-v0.12.9.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.12.9/SHASUMS256.txt',
- versionDir: '0.12.9',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.12.9/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.12.9/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-// prior to -headers.tar.gz
-test('test process release - process.version = 0.10.41', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.10.41', null)
-
- t.equal(release.semver.version, '0.10.41')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.10.41',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.10.41/',
- tarballUrl: 'https://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.10.41/SHASUMS256.txt',
- versionDir: '0.10.41',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.10.41/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.10.41/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-// has -headers.tar.gz
-test('test process release - process.release ~ node@0.10.42', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.10.42', null)
-
- t.equal(release.semver.version, '0.10.42')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.10.42',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.10.42/',
- tarballUrl: 'https://nodejs.org/dist/v0.10.42/node-v0.10.42-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.10.42/SHASUMS256.txt',
- versionDir: '0.10.42',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.10.42/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.10.42/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-// has -headers.tar.gz
-test('test process release - process.release ~ node@0.12.10', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v0.12.10', null)
-
- t.equal(release.semver.version, '0.12.10')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.12.10',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.12.10/',
- tarballUrl: 'https://nodejs.org/dist/v0.12.10/node-v0.12.10-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.12.10/SHASUMS256.txt',
- versionDir: '0.12.10',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.12.10/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.12.10/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.1.23', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v4.1.23', {
- name: 'node',
- headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v4.1.23/',
- tarballUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v4.1.23/SHASUMS256.txt',
- versionDir: '4.1.23',
- ia32: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.1.23 / corp build', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v4.1.23', {
- name: 'node',
- headersUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'node',
- baseUrl: 'https://some.custom.location/',
- tarballUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz',
- shasumsUrl: 'https://some.custom.location/SHASUMS256.txt',
- versionDir: '4.1.23',
- ia32: { libUrl: 'https://some.custom.location/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://some.custom.location/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://some.custom.location/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@12.8.0 Windows', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v12.8.0', {
- name: 'node',
- sourceUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz',
- headersUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
- libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib'
- })
-
- t.equal(release.semver.version, '12.8.0')
- delete release.semver
-
- t.deepEqual(release, {
- version: '12.8.0',
- name: 'node',
- baseUrl: 'https://nodejs.org/download/release/v12.8.0/',
- tarballUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/download/release/v12.8.0/SHASUMS256.txt',
- versionDir: '12.8.0',
- ia32: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@12.8.0 Windows ARM64', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v12.8.0', {
- name: 'node',
- sourceUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz',
- headersUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
- libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib'
- })
-
- t.equal(release.semver.version, '12.8.0')
- delete release.semver
-
- t.deepEqual(release, {
- version: '12.8.0',
- name: 'node',
- baseUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/',
- tarballUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
- shasumsUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/SHASUMS256.txt',
- versionDir: '12.8.0',
- ia32: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.1.23 --target=0.10.40', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: { target: '0.10.40' } }, 'v4.1.23', {
- name: 'node',
- headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '0.10.40')
- delete release.semver
-
- t.deepEqual(release, {
- version: '0.10.40',
- name: 'node',
- baseUrl: 'https://nodejs.org/dist/v0.10.40/',
- tarballUrl: 'https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz',
- shasumsUrl: 'https://nodejs.org/dist/v0.10.40/SHASUMS256.txt',
- versionDir: '0.10.40',
- ia32: { libUrl: 'https://nodejs.org/dist/v0.10.40/node.lib', libPath: 'node.lib' },
- x64: { libUrl: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', libPath: 'x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/dist/v0.10.40/arm64/node.lib', libPath: 'arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.1.23 --dist-url=https://foo.bar/baz', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: { 'dist-url': 'https://foo.bar/baz' } }, 'v4.1.23', {
- name: 'node',
- headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'node',
- baseUrl: 'https://foo.bar/baz/v4.1.23/',
- tarballUrl: 'https://foo.bar/baz/v4.1.23/node-v4.1.23-headers.tar.gz',
- shasumsUrl: 'https://foo.bar/baz/v4.1.23/SHASUMS256.txt',
- versionDir: '4.1.23',
- ia32: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ frankenstein@4.1.23', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v4.1.23', {
- name: 'frankenstein',
- headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'frankenstein',
- baseUrl: 'https://frankensteinjs.org/dist/v4.1.23/',
- tarballUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz',
- shasumsUrl: 'https://frankensteinjs.org/dist/v4.1.23/SHASUMS256.txt',
- versionDir: 'frankenstein-4.1.23',
- ia32: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' },
- x64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' },
- arm64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' }
- })
-})
-
-test('test process release - process.release ~ frankenstein@4.1.23 --dist-url=http://foo.bar/baz/', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: { 'dist-url': 'http://foo.bar/baz/' } }, 'v4.1.23', {
- name: 'frankenstein',
- headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'frankenstein',
- baseUrl: 'http://foo.bar/baz/v4.1.23/',
- tarballUrl: 'http://foo.bar/baz/v4.1.23/frankenstein-v4.1.23-headers.tar.gz',
- shasumsUrl: 'http://foo.bar/baz/v4.1.23/SHASUMS256.txt',
- versionDir: 'frankenstein-4.1.23',
- ia32: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' },
- x64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' },
- arm64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.0.0-rc.4', function (t) {
- t.plan(2)
-
- var release = processRelease([], { opts: {} }, 'v4.0.0-rc.4', {
- name: 'node',
- headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.0.0-rc.4')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.0.0-rc.4',
- name: 'node',
- baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
- tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
- versionDir: '4.0.0-rc.4',
- ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0]', function (t) {
- t.plan(2)
-
- // note the missing 'v' on the arg, it should normalise when checking
- // whether we're on the default or not
- var release = processRelease(['4.0.0-rc.4'], { opts: {} }, 'v4.0.0-rc.4', {
- name: 'node',
- headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.0.0-rc.4')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.0.0-rc.4',
- name: 'node',
- baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
- tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
- versionDir: '4.0.0-rc.4',
- ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]', function (t) {
- t.plan(2)
-
- // additional arguments can be passed in on the commandline that should be ignored if they
- // are not specifying a valid version @ position 0
- var release = processRelease(['this is no version!'], { opts: {} }, 'v4.0.0-rc.4', {
- name: 'node',
- headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.0.0-rc.4')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.0.0-rc.4',
- name: 'node',
- baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
- tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
- shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
- versionDir: '4.0.0-rc.4',
- ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-})
-
-test('test process release - NODEJS_ORG_MIRROR', function (t) {
- t.plan(2)
-
- process.env.NODEJS_ORG_MIRROR = 'http://foo.bar'
-
- var release = processRelease([], { opts: {} }, 'v4.1.23', {
- name: 'node',
- headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
- })
-
- t.equal(release.semver.version, '4.1.23')
- delete release.semver
-
- t.deepEqual(release, {
- version: '4.1.23',
- name: 'node',
- baseUrl: 'http://foo.bar/v4.1.23/',
- tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz',
- shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt',
- versionDir: '4.1.23',
- ia32: { libUrl: 'http://foo.bar/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
- x64: { libUrl: 'http://foo.bar/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
- arm64: { libUrl: 'http://foo.bar/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
- })
-
- delete process.env.NODEJS_ORG_MIRROR
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/CHANGELOG.md b/node_modules/@npmcli/run-script/node_modules/semver/CHANGELOG.md
deleted file mode 100644
index 66304fdd2..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/CHANGELOG.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# changes log
-
-## 5.7
-
-* Add `minVersion` method
-
-## 5.6
-
-* Move boolean `loose` param to an options object, with
- backwards-compatibility protection.
-* Add ability to opt out of special prerelease version handling with
- the `includePrerelease` option flag.
-
-## 5.5
-
-* Add version coercion capabilities
-
-## 5.4
-
-* Add intersection checking
-
-## 5.3
-
-* Add `minSatisfying` method
-
-## 5.2
-
-* Add `prerelease(v)` that returns prerelease components
-
-## 5.1
-
-* Add Backus-Naur for ranges
-* Remove excessively cute inspection methods
-
-## 5.0
-
-* Remove AMD/Browserified build artifacts
-* Fix ltr and gtr when using the `*` range
-* Fix for range `*` with a prerelease identifier
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/README.md b/node_modules/@npmcli/run-script/node_modules/semver/README.md
deleted file mode 100644
index f8dfa5a0d..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/README.md
+++ /dev/null
@@ -1,412 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Install
-
-```bash
-npm install --save semver
-````
-
-## Usage
-
-As a node module:
-
-```js
-const semver = require('semver')
-
-semver.valid('1.2.3') // '1.2.3'
-semver.valid('a.b.c') // null
-semver.clean(' =v1.2.3 ') // '1.2.3'
-semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
-semver.gt('1.2.3', '9.8.7') // false
-semver.lt('1.2.3', '9.8.7') // true
-semver.minVersion('>=1.0.0') // '1.0.0'
-semver.valid(semver.coerce('v2')) // '2.0.0'
-semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
-```
-
-As a command-line utility:
-
-```
-$ semver -h
-
-A JavaScript implementation of the https://semver.org/ specification
-Copyright Isaac Z. Schlueter
-
-Usage: semver [options] <version> [<version> [...]]
-Prints valid versions sorted by SemVer precedence
-
-Options:
--r --range <range>
- Print versions that match the specified range.
-
--i --increment [<level>]
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
---preid <identifier>
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
--l --loose
- Interpret versions and ranges loosely
-
--p --include-prerelease
- Always include prerelease versions in range matching
-
--c --coerce
- Coerce a string into SemVer if possible
- (does not imply --loose)
-
-Program exits successfully if any valid version satisfies
-all supplied ranges, and prints all satisfying versions.
-
-If no satisfying versions are found, then exits failure.
-
-Versions are printed in ascending order, so supplying
-multiple versions to the utility will just sort them.
-```
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<https://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-Note that this behavior can be suppressed (treating all prerelease
-versions as if they were normal versions, for the purpose of range
-matching) by setting the `includePrerelease` flag on the options
-object to any
-[functions](https://github.com/npm/node-semver#functions) that do
-range matching.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-semver.inc('1.2.3', 'prerelease', 'beta')
-// '1.2.4-beta.0'
-```
-
-command-line example:
-
-```bash
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```bash
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `options` object argument. All
-options in this object are `false` by default. The options supported
-are:
-
-- `loose` Be more forgiving about not-quite-valid semver strings.
- (Any resulting output will always be 100% strict compliant, of
- course.) For backwards compatibility reasons, if the `options`
- argument is a boolean value instead of an object, it is interpreted
- to be the `loose` param.
-- `includePrerelease` Set to suppress the [default
- behavior](https://github.com/npm/node-semver#prerelease-tags) of
- excluding prerelease tagged versions from ranges unless they are
- explicitly opted into.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
- or comparators intersect.
-* `parse(v)`: Attempt to parse a string as a semantic version, returning either
- a `SemVer` object or `null`.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-### Comparators
-
-* `intersects(comparator)`: Return true if the comparators intersect
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minVersion(range)`: Return the lowest version that can possibly match
- the given range.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-* `intersects(range)`: Return true if any of the ranges comparators intersect
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
-
-### Coercion
-
-* `coerce(version)`: Coerces a string to semver if possible
-
-This aims to provide a very forgiving translation of a non-semver string to
-semver. It looks for the first digit in a string, and consumes all
-remaining characters which satisfy at least a partial semver (e.g., `1`,
-`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
-versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
-surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
-`3.4.0`). Only text which lacks digits will fail coercion (`version one`
-is not valid). The maximum length for any semver component considered for
-coercion is 16 characters; longer components will be ignored
-(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
-semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
-components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/bin/semver b/node_modules/@npmcli/run-script/node_modules/semver/bin/semver
deleted file mode 100755
index 801e77f13..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
-
-var versions = []
-
-var range = []
-
-var inc = null
-
-var version = require('../package.json').version
-
-var loose = false
-
-var includePrerelease = false
-
-var coerce = false
-
-var identifier
-
-var semver = require('../semver')
-
-var reverse = false
-
-var options = {}
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var indexOfEqualSign = a.indexOf('=')
- if (indexOfEqualSign !== -1) {
- a = a.slice(0, indexOfEqualSign)
- argv.unshift(a.slice(indexOfEqualSign + 1))
- }
- switch (a) {
- case '-rv': case '-rev': case '--rev': case '--reverse':
- reverse = true
- break
- case '-l': case '--loose':
- loose = true
- break
- case '-p': case '--include-prerelease':
- includePrerelease = true
- break
- case '-v': case '--version':
- versions.push(argv.shift())
- break
- case '-i': case '--inc': case '--increment':
- switch (argv[0]) {
- case 'major': case 'minor': case 'patch': case 'prerelease':
- case 'premajor': case 'preminor': case 'prepatch':
- inc = argv.shift()
- break
- default:
- inc = 'patch'
- break
- }
- break
- case '--preid':
- identifier = argv.shift()
- break
- case '-r': case '--range':
- range.push(argv.shift())
- break
- case '-c': case '--coerce':
- coerce = true
- break
- case '-h': case '--help': case '-?':
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- var options = { loose: loose, includePrerelease: includePrerelease }
-
- versions = versions.map(function (v) {
- return coerce ? (semver.coerce(v) || { version: v }).version : v
- }).filter(function (v) {
- return semver.valid(v)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length)) { return failInc() }
-
- for (var i = 0, l = range.length; i < l; i++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], options)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error('--inc can only be used on a single version with no range')
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? 'rcompare' : 'compare'
- versions.sort(function (a, b) {
- return semver[compare](a, b, options)
- }).map(function (v) {
- return semver.clean(v, options)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, options, identifier) : v
- }).forEach(function (v, i, _) { console.log(v) })
-}
-
-function help () {
- console.log(['SemVer ' + version,
- '',
- 'A JavaScript implementation of the https://semver.org/ specification',
- 'Copyright Isaac Z. Schlueter',
- '',
- 'Usage: semver [options] <version> [<version> [...]]',
- 'Prints valid versions sorted by SemVer precedence',
- '',
- 'Options:',
- '-r --range <range>',
- ' Print versions that match the specified range.',
- '',
- '-i --increment [<level>]',
- ' Increment a version by the specified level. Level can',
- ' be one of: major, minor, patch, premajor, preminor,',
- " prepatch, or prerelease. Default level is 'patch'.",
- ' Only one version may be specified.',
- '',
- '--preid <identifier>',
- ' Identifier to be used to prefix premajor, preminor,',
- ' prepatch or prerelease version increments.',
- '',
- '-l --loose',
- ' Interpret versions and ranges loosely',
- '',
- '-p --include-prerelease',
- ' Always include prerelease versions in range matching',
- '',
- '-c --coerce',
- ' Coerce a string into SemVer if possible',
- ' (does not imply --loose)',
- '',
- 'Program exits successfully if any valid version satisfies',
- 'all supplied ranges, and prints all satisfying versions.',
- '',
- 'If no satisfying versions are found, then exits failure.',
- '',
- 'Versions are printed in ascending order, so supplying',
- 'multiple versions to the utility will just sort them.'
- ].join('\n'))
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/package.json b/node_modules/@npmcli/run-script/node_modules/semver/package.json
deleted file mode 100644
index e0e770274..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "_from": "semver@^5.7.1",
- "_id": "semver@5.7.1",
- "_inBundle": false,
- "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "_location": "/@npmcli/run-script/semver",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "semver@^5.7.1",
- "name": "semver",
- "escapedName": "semver",
- "rawSpec": "^5.7.1",
- "saveSpec": null,
- "fetchSpec": "^5.7.1"
- },
- "_requiredBy": [
- "/@npmcli/run-script/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "_shasum": "a954f931aeba508d307bbf069eff0c01c96116f7",
- "_spec": "semver@^5.7.1",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/run-script/node_modules/node-gyp",
- "bin": {
- "semver": "bin/semver"
- },
- "bugs": {
- "url": "https://github.com/npm/node-semver/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "The semantic version parser used by npm.",
- "devDependencies": {
- "tap": "^13.0.0-rc.18"
- },
- "files": [
- "bin",
- "range.bnf",
- "semver.js"
- ],
- "homepage": "https://github.com/npm/node-semver#readme",
- "license": "ISC",
- "main": "semver.js",
- "name": "semver",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-semver.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true
- },
- "version": "5.7.1"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/range.bnf b/node_modules/@npmcli/run-script/node_modules/semver/range.bnf
deleted file mode 100644
index d4c6ae0d7..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | [1-9] ( [0-9] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/semver.js b/node_modules/@npmcli/run-script/node_modules/semver/semver.js
deleted file mode 100644
index d315d5d68..000000000
--- a/node_modules/@npmcli/run-script/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1483 +0,0 @@
-exports = module.exports = SemVer
-
-var debug
-/* istanbul ignore next */
-if (typeof process === 'object' &&
- process.env &&
- process.env.NODE_DEBUG &&
- /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
- debug = function () {
- var args = Array.prototype.slice.call(arguments, 0)
- args.unshift('SEMVER')
- console.log.apply(console, args)
- }
-} else {
- debug = function () {}
-}
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0'
-
-var MAX_LENGTH = 256
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
- /* istanbul ignore next */ 9007199254740991
-
-// Max safe segment length for coercion.
-var MAX_SAFE_COMPONENT_LENGTH = 16
-
-// The actual regexps go on exports.re
-var re = exports.re = []
-var src = exports.src = []
-var R = 0
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
-var NUMERICIDENTIFIERLOOSE = R++
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')'
-
-var MAINVERSIONLOOSE = R++
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')'
-
-var PRERELEASEIDENTIFIERLOOSE = R++
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')'
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
-
-var PRERELEASELOOSE = R++
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?'
-
-src[FULL] = '^' + FULLPLAIN + '$'
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?'
-
-var LOOSE = R++
-src[LOOSE] = '^' + LOOSEPLAIN + '$'
-
-var GTLT = R++
-src[GTLT] = '((?:<|>)?=?)'
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
-var XRANGEIDENTIFIER = R++
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
-
-var XRANGEPLAIN = R++
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?'
-
-var XRANGEPLAINLOOSE = R++
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?'
-
-var XRANGE = R++
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
-var XRANGELOOSE = R++
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
-
-// Coercion.
-// Extract anything that could conceivably be a part of a valid semver
-var COERCE = R++
-src[COERCE] = '(?:^|[^\\d])' +
- '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
- '(?:$|[^\\d])'
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++
-src[LONETILDE] = '(?:~>?)'
-
-var TILDETRIM = R++
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
-var tildeTrimReplace = '$1~'
-
-var TILDE = R++
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
-var TILDELOOSE = R++
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++
-src[LONECARET] = '(?:\\^)'
-
-var CARETTRIM = R++
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
-var caretTrimReplace = '$1^'
-
-var CARET = R++
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
-var CARETLOOSE = R++
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
-var COMPARATOR = R++
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
-var comparatorTrimReplace = '$1$2$3'
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$'
-
-var HYPHENRANGELOOSE = R++
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$'
-
-// Star ranges basically just allow anything at all.
-var STAR = R++
-src[STAR] = '(<|>)?=?\\s*\\*'
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i])
- if (!re[i]) {
- re[i] = new RegExp(src[i])
- }
-}
-
-exports.parse = parse
-function parse (version, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- if (version.length > MAX_LENGTH) {
- return null
- }
-
- var r = options.loose ? re[LOOSE] : re[FULL]
- if (!r.test(version)) {
- return null
- }
-
- try {
- return new SemVer(version, options)
- } catch (er) {
- return null
- }
-}
-
-exports.valid = valid
-function valid (version, options) {
- var v = parse(version, options)
- return v ? v.version : null
-}
-
-exports.clean = clean
-function clean (version, options) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), options)
- return s ? s.version : null
-}
-
-exports.SemVer = SemVer
-
-function SemVer (version, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
- if (version instanceof SemVer) {
- if (version.loose === options.loose) {
- return version
- } else {
- version = version.version
- }
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version)
- }
-
- if (version.length > MAX_LENGTH) {
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
- }
-
- if (!(this instanceof SemVer)) {
- return new SemVer(version, options)
- }
-
- debug('SemVer', version, options)
- this.options = options
- this.loose = !!options.loose
-
- var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
-
- if (!m) {
- throw new TypeError('Invalid Version: ' + version)
- }
-
- this.raw = version
-
- // these are actually numbers
- this.major = +m[1]
- this.minor = +m[2]
- this.patch = +m[3]
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
- throw new TypeError('Invalid major version')
- }
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
- throw new TypeError('Invalid minor version')
- }
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
- throw new TypeError('Invalid patch version')
- }
-
- // numberify any prerelease numeric ids
- if (!m[4]) {
- this.prerelease = []
- } else {
- this.prerelease = m[4].split('.').map(function (id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
- return num
- }
- }
- return id
- })
- }
-
- this.build = m[5] ? m[5].split('.') : []
- this.format()
-}
-
-SemVer.prototype.format = function () {
- this.version = this.major + '.' + this.minor + '.' + this.patch
- if (this.prerelease.length) {
- this.version += '-' + this.prerelease.join('.')
- }
- return this.version
-}
-
-SemVer.prototype.toString = function () {
- return this.version
-}
-
-SemVer.prototype.compare = function (other) {
- debug('SemVer.compare', this.version, this.options, other)
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- return this.compareMain(other) || this.comparePre(other)
-}
-
-SemVer.prototype.compareMain = function (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch)
-}
-
-SemVer.prototype.comparePre = function (other) {
- if (!(other instanceof SemVer)) {
- other = new SemVer(other, this.options)
- }
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length) {
- return -1
- } else if (!this.prerelease.length && other.prerelease.length) {
- return 1
- } else if (!this.prerelease.length && !other.prerelease.length) {
- return 0
- }
-
- var i = 0
- do {
- var a = this.prerelease[i]
- var b = other.prerelease[i]
- debug('prerelease compare', i, a, b)
- if (a === undefined && b === undefined) {
- return 0
- } else if (b === undefined) {
- return 1
- } else if (a === undefined) {
- return -1
- } else if (a === b) {
- continue
- } else {
- return compareIdentifiers(a, b)
- }
- } while (++i)
-}
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function (release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor = 0
- this.major++
- this.inc('pre', identifier)
- break
- case 'preminor':
- this.prerelease.length = 0
- this.patch = 0
- this.minor++
- this.inc('pre', identifier)
- break
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0
- this.inc('patch', identifier)
- this.inc('pre', identifier)
- break
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0) {
- this.inc('patch', identifier)
- }
- this.inc('pre', identifier)
- break
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 ||
- this.patch !== 0 ||
- this.prerelease.length === 0) {
- this.major++
- }
- this.minor = 0
- this.patch = 0
- this.prerelease = []
- break
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0) {
- this.minor++
- }
- this.patch = 0
- this.prerelease = []
- break
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0) {
- this.patch++
- }
- this.prerelease = []
- break
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0) {
- this.prerelease = [0]
- } else {
- var i = this.prerelease.length
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++
- i = -2
- }
- }
- if (i === -1) {
- // didn't increment anything
- this.prerelease.push(0)
- }
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1])) {
- this.prerelease = [identifier, 0]
- }
- } else {
- this.prerelease = [identifier, 0]
- }
- }
- break
-
- default:
- throw new Error('invalid increment argument: ' + release)
- }
- this.format()
- this.raw = this.version
- return this
-}
-
-exports.inc = inc
-function inc (version, release, loose, identifier) {
- if (typeof (loose) === 'string') {
- identifier = loose
- loose = undefined
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version
- } catch (er) {
- return null
- }
-}
-
-exports.diff = diff
-function diff (version1, version2) {
- if (eq(version1, version2)) {
- return null
- } else {
- var v1 = parse(version1)
- var v2 = parse(version2)
- var prefix = ''
- if (v1.prerelease.length || v2.prerelease.length) {
- prefix = 'pre'
- var defaultResult = 'prerelease'
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return prefix + key
- }
- }
- }
- return defaultResult // may be undefined
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers
-
-var numeric = /^[0-9]+$/
-function compareIdentifiers (a, b) {
- var anum = numeric.test(a)
- var bnum = numeric.test(b)
-
- if (anum && bnum) {
- a = +a
- b = +b
- }
-
- return a === b ? 0
- : (anum && !bnum) ? -1
- : (bnum && !anum) ? 1
- : a < b ? -1
- : 1
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers
-function rcompareIdentifiers (a, b) {
- return compareIdentifiers(b, a)
-}
-
-exports.major = major
-function major (a, loose) {
- return new SemVer(a, loose).major
-}
-
-exports.minor = minor
-function minor (a, loose) {
- return new SemVer(a, loose).minor
-}
-
-exports.patch = patch
-function patch (a, loose) {
- return new SemVer(a, loose).patch
-}
-
-exports.compare = compare
-function compare (a, b, loose) {
- return new SemVer(a, loose).compare(new SemVer(b, loose))
-}
-
-exports.compareLoose = compareLoose
-function compareLoose (a, b) {
- return compare(a, b, true)
-}
-
-exports.rcompare = rcompare
-function rcompare (a, b, loose) {
- return compare(b, a, loose)
-}
-
-exports.sort = sort
-function sort (list, loose) {
- return list.sort(function (a, b) {
- return exports.compare(a, b, loose)
- })
-}
-
-exports.rsort = rsort
-function rsort (list, loose) {
- return list.sort(function (a, b) {
- return exports.rcompare(a, b, loose)
- })
-}
-
-exports.gt = gt
-function gt (a, b, loose) {
- return compare(a, b, loose) > 0
-}
-
-exports.lt = lt
-function lt (a, b, loose) {
- return compare(a, b, loose) < 0
-}
-
-exports.eq = eq
-function eq (a, b, loose) {
- return compare(a, b, loose) === 0
-}
-
-exports.neq = neq
-function neq (a, b, loose) {
- return compare(a, b, loose) !== 0
-}
-
-exports.gte = gte
-function gte (a, b, loose) {
- return compare(a, b, loose) >= 0
-}
-
-exports.lte = lte
-function lte (a, b, loose) {
- return compare(a, b, loose) <= 0
-}
-
-exports.cmp = cmp
-function cmp (a, op, b, loose) {
- switch (op) {
- case '===':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a === b
-
- case '!==':
- if (typeof a === 'object')
- a = a.version
- if (typeof b === 'object')
- b = b.version
- return a !== b
-
- case '':
- case '=':
- case '==':
- return eq(a, b, loose)
-
- case '!=':
- return neq(a, b, loose)
-
- case '>':
- return gt(a, b, loose)
-
- case '>=':
- return gte(a, b, loose)
-
- case '<':
- return lt(a, b, loose)
-
- case '<=':
- return lte(a, b, loose)
-
- default:
- throw new TypeError('Invalid operator: ' + op)
- }
-}
-
-exports.Comparator = Comparator
-function Comparator (comp, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (comp instanceof Comparator) {
- if (comp.loose === !!options.loose) {
- return comp
- } else {
- comp = comp.value
- }
- }
-
- if (!(this instanceof Comparator)) {
- return new Comparator(comp, options)
- }
-
- debug('comparator', comp, options)
- this.options = options
- this.loose = !!options.loose
- this.parse(comp)
-
- if (this.semver === ANY) {
- this.value = ''
- } else {
- this.value = this.operator + this.semver.version
- }
-
- debug('comp', this)
-}
-
-var ANY = {}
-Comparator.prototype.parse = function (comp) {
- var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
- var m = comp.match(r)
-
- if (!m) {
- throw new TypeError('Invalid comparator: ' + comp)
- }
-
- this.operator = m[1]
- if (this.operator === '=') {
- this.operator = ''
- }
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2]) {
- this.semver = ANY
- } else {
- this.semver = new SemVer(m[2], this.options.loose)
- }
-}
-
-Comparator.prototype.toString = function () {
- return this.value
-}
-
-Comparator.prototype.test = function (version) {
- debug('Comparator.test', version, this.options.loose)
-
- if (this.semver === ANY) {
- return true
- }
-
- if (typeof version === 'string') {
- version = new SemVer(version, this.options)
- }
-
- return cmp(version, this.operator, this.semver, this.options)
-}
-
-Comparator.prototype.intersects = function (comp, options) {
- if (!(comp instanceof Comparator)) {
- throw new TypeError('a Comparator is required')
- }
-
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- var rangeTmp
-
- if (this.operator === '') {
- rangeTmp = new Range(comp.value, options)
- return satisfies(this.value, rangeTmp, options)
- } else if (comp.operator === '') {
- rangeTmp = new Range(this.value, options)
- return satisfies(comp.semver, rangeTmp, options)
- }
-
- var sameDirectionIncreasing =
- (this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '>=' || comp.operator === '>')
- var sameDirectionDecreasing =
- (this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '<=' || comp.operator === '<')
- var sameSemVer = this.semver.version === comp.semver.version
- var differentDirectionsInclusive =
- (this.operator === '>=' || this.operator === '<=') &&
- (comp.operator === '>=' || comp.operator === '<=')
- var oppositeDirectionsLessThan =
- cmp(this.semver, '<', comp.semver, options) &&
- ((this.operator === '>=' || this.operator === '>') &&
- (comp.operator === '<=' || comp.operator === '<'))
- var oppositeDirectionsGreaterThan =
- cmp(this.semver, '>', comp.semver, options) &&
- ((this.operator === '<=' || this.operator === '<') &&
- (comp.operator === '>=' || comp.operator === '>'))
-
- return sameDirectionIncreasing || sameDirectionDecreasing ||
- (sameSemVer && differentDirectionsInclusive) ||
- oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
-}
-
-exports.Range = Range
-function Range (range, options) {
- if (!options || typeof options !== 'object') {
- options = {
- loose: !!options,
- includePrerelease: false
- }
- }
-
- if (range instanceof Range) {
- if (range.loose === !!options.loose &&
- range.includePrerelease === !!options.includePrerelease) {
- return range
- } else {
- return new Range(range.raw, options)
- }
- }
-
- if (range instanceof Comparator) {
- return new Range(range.value, options)
- }
-
- if (!(this instanceof Range)) {
- return new Range(range, options)
- }
-
- this.options = options
- this.loose = !!options.loose
- this.includePrerelease = !!options.includePrerelease
-
- // First, split based on boolean or ||
- this.raw = range
- this.set = range.split(/\s*\|\|\s*/).map(function (range) {
- return this.parseRange(range.trim())
- }, this).filter(function (c) {
- // throw out any that are not relevant for whatever reason
- return c.length
- })
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range)
- }
-
- this.format()
-}
-
-Range.prototype.format = function () {
- this.range = this.set.map(function (comps) {
- return comps.join(' ').trim()
- }).join('||').trim()
- return this.range
-}
-
-Range.prototype.toString = function () {
- return this.range
-}
-
-Range.prototype.parseRange = function (range) {
- var loose = this.options.loose
- range = range.trim()
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
- range = range.replace(hr, hyphenReplace)
- debug('hyphen replace', range)
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
- debug('comparator trim', range, re[COMPARATORTRIM])
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace)
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace)
-
- // normalize spaces
- range = range.split(/\s+/).join(' ')
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
- var set = range.split(' ').map(function (comp) {
- return parseComparator(comp, this.options)
- }, this).join(' ').split(/\s+/)
- if (this.options.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function (comp) {
- return !!comp.match(compRe)
- })
- }
- set = set.map(function (comp) {
- return new Comparator(comp, this.options)
- }, this)
-
- return set
-}
-
-Range.prototype.intersects = function (range, options) {
- if (!(range instanceof Range)) {
- throw new TypeError('a Range is required')
- }
-
- return this.set.some(function (thisComparators) {
- return thisComparators.every(function (thisComparator) {
- return range.set.some(function (rangeComparators) {
- return rangeComparators.every(function (rangeComparator) {
- return thisComparator.intersects(rangeComparator, options)
- })
- })
- })
- })
-}
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators
-function toComparators (range, options) {
- return new Range(range, options).set.map(function (comp) {
- return comp.map(function (c) {
- return c.value
- }).join(' ').trim().split(' ')
- })
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator (comp, options) {
- debug('comp', comp, options)
- comp = replaceCarets(comp, options)
- debug('caret', comp)
- comp = replaceTildes(comp, options)
- debug('tildes', comp)
- comp = replaceXRanges(comp, options)
- debug('xrange', comp)
- comp = replaceStars(comp, options)
- debug('stars', comp)
- return comp
-}
-
-function isX (id) {
- return !id || id.toLowerCase() === 'x' || id === '*'
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes (comp, options) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceTilde(comp, options)
- }).join(' ')
-}
-
-function replaceTilde (comp, options) {
- var r = options.loose ? re[TILDELOOSE] : re[TILDE]
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr)
- var ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (isX(p)) {
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- } else if (pr) {
- debug('replaceTilde pr', pr)
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + (+m + 1) + '.0'
- } else {
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
-
- debug('tilde return', ret)
- return ret
- })
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets (comp, options) {
- return comp.trim().split(/\s+/).map(function (comp) {
- return replaceCaret(comp, options)
- }).join(' ')
-}
-
-function replaceCaret (comp, options) {
- debug('caret', comp, options)
- var r = options.loose ? re[CARETLOOSE] : re[CARET]
- return comp.replace(r, function (_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr)
- var ret
-
- if (isX(M)) {
- ret = ''
- } else if (isX(m)) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (isX(p)) {
- if (M === '0') {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- } else {
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
- }
- } else if (pr) {
- debug('replaceCaret pr', pr)
- if (M === '0') {
- if (m === '0') {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + m + '.' + (+p + 1)
- } else {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
- } else {
- ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
- ' <' + (+M + 1) + '.0.0'
- }
- } else {
- debug('no pr')
- if (M === '0') {
- if (m === '0') {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1)
- } else {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0'
- }
- } else {
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0'
- }
- }
-
- debug('caret return', ret)
- return ret
- })
-}
-
-function replaceXRanges (comp, options) {
- debug('replaceXRanges', comp, options)
- return comp.split(/\s+/).map(function (comp) {
- return replaceXRange(comp, options)
- }).join(' ')
-}
-
-function replaceXRange (comp, options) {
- comp = comp.trim()
- var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
- return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr)
- var xM = isX(M)
- var xm = xM || isX(m)
- var xp = xm || isX(p)
- var anyX = xp
-
- if (gtlt === '=' && anyX) {
- gtlt = ''
- }
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0'
- } else {
- // nothing is forbidden
- ret = '*'
- }
- } else if (gtlt && anyX) {
- // we know patch is an x, because we have any x at all.
- // replace X with 0
- if (xm) {
- m = 0
- }
- p = 0
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>='
- if (xm) {
- M = +M + 1
- m = 0
- p = 0
- } else {
- m = +m + 1
- p = 0
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<'
- if (xm) {
- M = +M + 1
- } else {
- m = +m + 1
- }
- }
-
- ret = gtlt + M + '.' + m + '.' + p
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
- }
-
- debug('xRange return', ret)
-
- return ret
- })
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars (comp, options) {
- debug('replaceStars', comp, options)
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '')
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace ($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
- if (isX(fM)) {
- from = ''
- } else if (isX(fm)) {
- from = '>=' + fM + '.0.0'
- } else if (isX(fp)) {
- from = '>=' + fM + '.' + fm + '.0'
- } else {
- from = '>=' + from
- }
-
- if (isX(tM)) {
- to = ''
- } else if (isX(tm)) {
- to = '<' + (+tM + 1) + '.0.0'
- } else if (isX(tp)) {
- to = '<' + tM + '.' + (+tm + 1) + '.0'
- } else if (tpr) {
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
- } else {
- to = '<=' + to
- }
-
- return (from + ' ' + to).trim()
-}
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function (version) {
- if (!version) {
- return false
- }
-
- if (typeof version === 'string') {
- version = new SemVer(version, this.options)
- }
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version, this.options)) {
- return true
- }
- }
- return false
-}
-
-function testSet (set, version, options) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version)) {
- return false
- }
- }
-
- if (version.prerelease.length && !options.includePrerelease) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (i = 0; i < set.length; i++) {
- debug(set[i].semver)
- if (set[i].semver === ANY) {
- continue
- }
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch) {
- return true
- }
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false
- }
-
- return true
-}
-
-exports.satisfies = satisfies
-function satisfies (version, range, options) {
- try {
- range = new Range(range, options)
- } catch (er) {
- return false
- }
- return range.test(version)
-}
-
-exports.maxSatisfying = maxSatisfying
-function maxSatisfying (versions, range, options) {
- var max = null
- var maxSV = null
- try {
- var rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!max || maxSV.compare(v) === -1) {
- // compare(max, v, true)
- max = v
- maxSV = new SemVer(max, options)
- }
- }
- })
- return max
-}
-
-exports.minSatisfying = minSatisfying
-function minSatisfying (versions, range, options) {
- var min = null
- var minSV = null
- try {
- var rangeObj = new Range(range, options)
- } catch (er) {
- return null
- }
- versions.forEach(function (v) {
- if (rangeObj.test(v)) {
- // satisfies(v, range, options)
- if (!min || minSV.compare(v) === 1) {
- // compare(min, v, true)
- min = v
- minSV = new SemVer(min, options)
- }
- }
- })
- return min
-}
-
-exports.minVersion = minVersion
-function minVersion (range, loose) {
- range = new Range(range, loose)
-
- var minver = new SemVer('0.0.0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = new SemVer('0.0.0-0')
- if (range.test(minver)) {
- return minver
- }
-
- minver = null
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i]
-
- comparators.forEach(function (comparator) {
- // Clone to avoid manipulating the comparator's semver object.
- var compver = new SemVer(comparator.semver.version)
- switch (comparator.operator) {
- case '>':
- if (compver.prerelease.length === 0) {
- compver.patch++
- } else {
- compver.prerelease.push(0)
- }
- compver.raw = compver.format()
- /* fallthrough */
- case '':
- case '>=':
- if (!minver || gt(minver, compver)) {
- minver = compver
- }
- break
- case '<':
- case '<=':
- /* Ignore maximum versions */
- break
- /* istanbul ignore next */
- default:
- throw new Error('Unexpected operation: ' + comparator.operator)
- }
- })
- }
-
- if (minver && range.test(minver)) {
- return minver
- }
-
- return null
-}
-
-exports.validRange = validRange
-function validRange (range, options) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, options).range || '*'
- } catch (er) {
- return null
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr
-function ltr (version, range, options) {
- return outside(version, range, '<', options)
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr
-function gtr (version, range, options) {
- return outside(version, range, '>', options)
-}
-
-exports.outside = outside
-function outside (version, range, hilo, options) {
- version = new SemVer(version, options)
- range = new Range(range, options)
-
- var gtfn, ltefn, ltfn, comp, ecomp
- switch (hilo) {
- case '>':
- gtfn = gt
- ltefn = lte
- ltfn = lt
- comp = '>'
- ecomp = '>='
- break
- case '<':
- gtfn = lt
- ltefn = gte
- ltfn = gt
- comp = '<'
- ecomp = '<='
- break
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"')
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, options)) {
- return false
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i]
-
- var high = null
- var low = null
-
- comparators.forEach(function (comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator
- low = low || comparator
- if (gtfn(comparator.semver, high.semver, options)) {
- high = comparator
- } else if (ltfn(comparator.semver, low.semver, options)) {
- low = comparator
- }
- })
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false
- }
- }
- return true
-}
-
-exports.prerelease = prerelease
-function prerelease (version, options) {
- var parsed = parse(version, options)
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
-}
-
-exports.intersects = intersects
-function intersects (r1, r2, options) {
- r1 = new Range(r1, options)
- r2 = new Range(r2, options)
- return r1.intersects(r2)
-}
-
-exports.coerce = coerce
-function coerce (version) {
- if (version instanceof SemVer) {
- return version
- }
-
- if (typeof version !== 'string') {
- return null
- }
-
- var match = version.match(re[COERCE])
-
- if (match == null) {
- return null
- }
-
- return parse(match[1] +
- '.' + (match[2] || '0') +
- '.' + (match[3] || '0'))
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/README.md b/node_modules/@npmcli/run-script/node_modules/tar/README.md
deleted file mode 100644
index 034e4865c..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/README.md
+++ /dev/null
@@ -1,954 +0,0 @@
-# node-tar
-
-[![Build Status](https://travis-ci.org/npm/node-tar.svg?branch=master)](https://travis-ci.org/npm/node-tar)
-
-[Fast](./benchmarks) and full-featured Tar for Node.js
-
-The API is designed to mimic the behavior of `tar(1)` on unix systems.
-If you are familiar with how tar works, most of this will hopefully be
-straightforward for you. If not, then hopefully this module can teach
-you useful unix skills that may come in handy someday :)
-
-## Background
-
-A "tar file" or "tarball" is an archive of file system entries
-(directories, files, links, etc.) The name comes from "tape archive".
-If you run `man tar` on almost any Unix command line, you'll learn
-quite a bit about what it can do, and its history.
-
-Tar has 5 main top-level commands:
-
-* `c` Create an archive
-* `r` Replace entries within an archive
-* `u` Update entries within an archive (ie, replace if they're newer)
-* `t` List out the contents of an archive
-* `x` Extract an archive to disk
-
-The other flags and options modify how this top level function works.
-
-## High-Level API
-
-These 5 functions are the high-level API. All of them have a
-single-character name (for unix nerds familiar with `tar(1)`) as well
-as a long name (for everyone else).
-
-All the high-level functions take the following arguments, all three
-of which are optional and may be omitted.
-
-1. `options` - An optional object specifying various options
-2. `paths` - An array of paths to add or extract
-3. `callback` - Called when the command is completed, if async. (If
- sync or no file specified, providing a callback throws a
- `TypeError`.)
-
-If the command is sync (ie, if `options.sync=true`), then the
-callback is not allowed, since the action will be completed immediately.
-
-If a `file` argument is specified, and the command is async, then a
-`Promise` is returned. In this case, if async, a callback may be
-provided which is called when the command is completed.
-
-If a `file` option is not specified, then a stream is returned. For
-`create`, this is a readable stream of the generated archive. For
-`list` and `extract` this is a writable stream that an archive should
-be written into. If a file is not specified, then a callback is not
-allowed, because you're already getting a stream to work with.
-
-`replace` and `update` only work on existing archives, and so require
-a `file` argument.
-
-Sync commands without a file argument return a stream that acts on its
-input immediately in the same tick. For readable streams, this means
-that all of the data is immediately available by calling
-`stream.read()`. For writable streams, it will be acted upon as soon
-as it is provided, but this can be at any time.
-
-### Warnings
-
-Some things cause tar to emit a warning, but should usually not cause
-the entire operation to fail. There are three ways to handle
-warnings:
-
-1. **Ignore them** (default) Invalid entries won't be put in the
- archive, and invalid entries won't be unpacked. This is usually
- fine, but can hide failures that you might care about.
-2. **Notice them** Add an `onwarn` function to the options, or listen
- to the `'warn'` event on any tar stream. The function will get
- called as `onwarn(message, data)`. Handle as appropriate.
-3. **Explode them.** Set `strict: true` in the options object, and
- `warn` messages will be emitted as `'error'` events instead. If
- there's no `error` handler, this causes the program to crash. If
- used with a promise-returning/callback-taking method, then it'll
- send the error to the promise/callback.
-
-### Examples
-
-The API mimics the `tar(1)` command line functionality, with aliases
-for more human-readable option and function names. The goal is that
-if you know how to use `tar(1)` in Unix, then you know how to use
-`require('tar')` in JavaScript.
-
-To replicate `tar czf my-tarball.tgz files and folders`, you'd do:
-
-```js
-tar.c(
- {
- gzip: <true|gzip options>,
- file: 'my-tarball.tgz'
- },
- ['some', 'files', 'and', 'folders']
-).then(_ => { .. tarball has been created .. })
-```
-
-To replicate `tar cz files and folders > my-tarball.tgz`, you'd do:
-
-```js
-tar.c( // or tar.create
- {
- gzip: <true|gzip options>
- },
- ['some', 'files', 'and', 'folders']
-).pipe(fs.createWriteStream('my-tarball.tgz'))
-```
-
-To replicate `tar xf my-tarball.tgz` you'd do:
-
-```js
-tar.x( // or tar.extract(
- {
- file: 'my-tarball.tgz'
- }
-).then(_=> { .. tarball has been dumped in cwd .. })
-```
-
-To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`:
-
-```js
-fs.createReadStream('my-tarball.tgz').pipe(
- tar.x({
- strip: 1,
- C: 'some-dir' // alias for cwd:'some-dir', also ok
- })
-)
-```
-
-To replicate `tar tf my-tarball.tgz`, do this:
-
-```js
-tar.t({
- file: 'my-tarball.tgz',
- onentry: entry => { .. do whatever with it .. }
-})
-```
-
-To replicate `cat my-tarball.tgz | tar t` do:
-
-```js
-fs.createReadStream('my-tarball.tgz')
- .pipe(tar.t())
- .on('entry', entry => { .. do whatever with it .. })
-```
-
-To do anything synchronous, add `sync: true` to the options. Note
-that sync functions don't take a callback and don't return a promise.
-When the function returns, it's already done. Sync methods without a
-file argument return a sync stream, which flushes immediately. But,
-of course, it still won't be done until you `.end()` it.
-
-To filter entries, add `filter: <function>` to the options.
-Tar-creating methods call the filter with `filter(path, stat)`.
-Tar-reading methods (including extraction) call the filter with
-`filter(path, entry)`. The filter is called in the `this`-context of
-the `Pack` or `Unpack` stream object.
-
-The arguments list to `tar t` and `tar x` specify a list of filenames
-to extract or list, so they're equivalent to a filter that tests if
-the file is in the list.
-
-For those who _aren't_ fans of tar's single-character command names:
-
-```
-tar.c === tar.create
-tar.r === tar.replace (appends to archive, file is required)
-tar.u === tar.update (appends if newer, file is required)
-tar.x === tar.extract
-tar.t === tar.list
-```
-
-Keep reading for all the command descriptions and options, as well as
-the low-level API that they are built on.
-
-### tar.c(options, fileList, callback) [alias: tar.create]
-
-Create a tarball archive.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Write the tarball archive to the specified filename. If this
- is specified, then the callback will be fired when the file has been
- written, and a promise will be returned that resolves when the file
- is written. If a filename is not specified, then a Readable Stream
- will be returned which will emit the file data. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`. If this is set,
- and a file is not provided, then the resulting stream will already
- have the data ready to `read` or `emit('data')` as soon as you
- request it.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `mode` The mode to set on the created file archive
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-
-The following options are mostly internal, but can be modified in some
-advanced use cases, such as re-using caches between runs.
-
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `readdirCache` A Map object that caches calls to `readdir`.
-- `jobs` A number specifying how many concurrent jobs to run.
- Defaults to 4.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-
-### tar.x(options, fileList, callback) [alias: tar.extract]
-
-Extract a tarball archive.
-
-The `fileList` is an array of paths to extract from the tarball. If
-no paths are provided, then all the entries are extracted.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Note that all directories that are created will be forced to be
-writable, readable, and listable by their owner, to avoid cases where
-a directory prevents extraction of child entries by virtue of its
-mode.
-
-Most extraction errors will cause a `warn` event to be emitted. If
-the `cwd` is missing, or not a directory, then the extraction will
-fail completely.
-
-The following options are supported:
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. If provided, this must exist and must be a
- directory. [Alias: `C`]
-- `file` The archive file to extract. If not specified, then a
- Writable stream is returned where the archive data should be
- written. [Alias: `f`]
-- `sync` Create files and directories synchronously.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being unpacked. Return `true` to unpack the entry from the
- archive, or `false` to skip it.
-- `newer` Set to true to keep the existing file on disk if it's newer
- than the file in the archive. [Alias: `keep-newer`,
- `keep-newer-files`]
-- `keep` Do not overwrite existing files. In particular, if a file
- appears more than once in an archive, later copies will not
- overwrite earlier copies. [Alias: `k`, `keep-existing`]
-- `preservePaths` Allow absolute paths, paths containing `..`, and
- extracting through symbolic links. By default, `/` is stripped from
- absolute paths, `..` paths are not extracted, and any file whose
- location would be modified by a symbolic link is not extracted.
- [Alias: `P`]
-- `unlink` Unlink files before creating them. Without this option,
- tar overwrites existing files, which preserves existing hardlinks.
- With this option, existing hardlinks will be broken, as will any
- symlink that would affect the location of an extracted file. [Alias:
- `U`]
-- `strip` Remove the specified number of leading path elements.
- Pathnames with fewer elements will be silently skipped. Note that
- the pathname is edited after applying the filter, but before
- security checks. [Alias: `strip-components`, `stripComponents`]
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `preserveOwner` If true, tar will set the `uid` and `gid` of
- extracted entries to the `uid` and `gid` fields in the archive.
- This defaults to true when run as root, and false otherwise. If
- false, then files and directories will be set with the owner and
- group of the user running the process. This is similar to `-p` in
- `tar(1)`, but ACLs and other system-specific data is never unpacked
- in this implementation, and modes are set by default already.
- [Alias: `p`]
-- `uid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified user id, regardless of the `uid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `gid` option.
-- `gid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified group id, regardless of the `gid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `uid` option.
-- `noMtime` Set to true to omit writing `mtime` value for extracted
- entries. [Alias: `m`, `no-mtime`]
-- `transform` Provide a function that takes an `entry` object, and
- returns a stream, or any falsey value. If a stream is provided,
- then that stream's data will be written instead of the contents of
- the archive entry. If a falsey value is provided, then the entry is
- written to disk as normal. (To exclude items from extraction, use
- the `filter` option described above.)
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-
-The following options are mostly internal, but can be modified in some
-advanced use cases, such as re-using caches between runs.
-
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `umask` Filter the modes of entries like `process.umask()`.
-- `dmode` Default mode for directories
-- `fmode` Default mode for files
-- `dirCache` A Map object of which directories exist.
-- `maxMetaEntrySize` The maximum size of meta entries that is
- supported. Defaults to 1 MB.
-
-Note that using an asynchronous stream type with the `transform`
-option will cause undefined behavior in sync extractions.
-[MiniPass](http://npm.im/minipass)-based streams are designed for this
-use case.
-
-### tar.t(options, fileList, callback) [alias: tar.list]
-
-List the contents of a tarball archive.
-
-The `fileList` is an array of paths to list from the tarball. If
-no paths are provided, then all the entries are listed.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Returns an event emitter that emits `entry` events with
-`tar.ReadEntry` objects. However, they don't emit `'data'` or `'end'`
-events. (If you want to get actual readable entries, use the
-`tar.Parse` class instead.)
-
-The following options are supported:
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. [Alias: `C`]
-- `file` The archive file to list. If not specified, then a
- Writable stream is returned where the archive data should be
- written. [Alias: `f`]
-- `sync` Read the specified file synchronously. (This has no effect
- when a file option isn't specified, because entries are emitted as
- fast as they are parsed from the stream anyway.)
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being listed. Return `true` to emit the entry from the
- archive, or `false` to skip it.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter. This is important for when both `file` and
- `sync` are set, because it will be called synchronously.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noResume` By default, `entry` streams are resumed immediately after
- the call to `onentry`. Set `noResume: true` to suppress this
- behavior. Note that by opting into this, the stream will never
- complete until the entry data is consumed.
-
-### tar.u(options, fileList, callback) [alias: tar.update]
-
-Add files to an archive if they are newer than the entry already in
-the tarball archive.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Required. Write the tarball archive to the specified
- filename. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for adding entries to the
- archive. Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-### tar.r(options, fileList, callback) [alias: tar.replace]
-
-Add files to an existing archive. Because later entries override
-earlier entries, this effectively replaces any existing entries.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Required. Write the tarball archive to the specified
- filename. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for adding entries to the
- archive. Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-
-## Low-Level API
-
-### class tar.Pack
-
-A readable tar stream.
-
-Has all the standard readable stream interface stuff. `'data'` and
-`'end'` events, `read()` method, `pause()` and `resume()`, etc.
-
-#### constructor(options)
-
-The following options are supported:
-
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()`
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `readdirCache` A Map object that caches calls to `readdir`.
-- `jobs` A number specifying how many concurrent jobs to run.
- Defaults to 4.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories.
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such.
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-#### add(path)
-
-Adds an entry to the archive. Returns the Pack stream.
-
-#### write(path)
-
-Adds an entry to the archive. Returns true if flushed.
-
-#### end()
-
-Finishes the archive.
-
-### class tar.Pack.Sync
-
-Synchronous version of `tar.Pack`.
-
-### class tar.Unpack
-
-A writable stream that unpacks a tar archive onto the file system.
-
-All the normal writable stream stuff is supported. `write()` and
-`end()` methods, `'drain'` events, etc.
-
-Note that all directories that are created will be forced to be
-writable, readable, and listable by their owner, to avoid cases where
-a directory prevents extraction of child entries by virtue of its
-mode.
-
-`'close'` is emitted when it's done writing stuff to the file system.
-
-Most unpack errors will cause a `warn` event to be emitted. If the
-`cwd` is missing, or not a directory, then an error will be emitted.
-
-#### constructor(options)
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. If provided, this must exist and must be a
- directory.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being unpacked. Return `true` to unpack the entry from the
- archive, or `false` to skip it.
-- `newer` Set to true to keep the existing file on disk if it's newer
- than the file in the archive.
-- `keep` Do not overwrite existing files. In particular, if a file
- appears more than once in an archive, later copies will not
- overwrite earlier copies.
-- `preservePaths` Allow absolute paths, paths containing `..`, and
- extracting through symbolic links. By default, `/` is stripped from
- absolute paths, `..` paths are not extracted, and any file whose
- location would be modified by a symbolic link is not extracted.
-- `unlink` Unlink files before creating them. Without this option,
- tar overwrites existing files, which preserves existing hardlinks.
- With this option, existing hardlinks will be broken, as will any
- symlink that would affect the location of an extracted file.
-- `strip` Remove the specified number of leading path elements.
- Pathnames with fewer elements will be silently skipped. Note that
- the pathname is edited after applying the filter, but before
- security checks.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `umask` Filter the modes of entries like `process.umask()`.
-- `dmode` Default mode for directories
-- `fmode` Default mode for files
-- `dirCache` A Map object of which directories exist.
-- `maxMetaEntrySize` The maximum size of meta entries that is
- supported. Defaults to 1 MB.
-- `preserveOwner` If true, tar will set the `uid` and `gid` of
- extracted entries to the `uid` and `gid` fields in the archive.
- This defaults to true when run as root, and false otherwise. If
- false, then files and directories will be set with the owner and
- group of the user running the process. This is similar to `-p` in
- `tar(1)`, but ACLs and other system-specific data is never unpacked
- in this implementation, and modes are set by default already.
-- `win32` True if on a windows platform. Causes behavior where
- filenames containing `<|>?` chars are converted to
- windows-compatible values while being unpacked.
-- `uid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified user id, regardless of the `uid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `gid` option.
-- `gid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified group id, regardless of the `gid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `uid` option.
-- `noMtime` Set to true to omit writing `mtime` value for extracted
- entries.
-- `transform` Provide a function that takes an `entry` object, and
- returns a stream, or any falsey value. If a stream is provided,
- then that stream's data will be written instead of the contents of
- the archive entry. If a falsey value is provided, then the entry is
- written to disk as normal. (To exclude items from extraction, use
- the `filter` option described above.)
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-
-### class tar.Unpack.Sync
-
-Synchronous version of `tar.Unpack`.
-
-Note that using an asynchronous stream type with the `transform`
-option will cause undefined behavior in sync unpack streams.
-[MiniPass](http://npm.im/minipass)-based streams are designed for this
-use case.
-
-### class tar.Parse
-
-A writable stream that parses a tar archive stream. All the standard
-writable stream stuff is supported.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Emits `'entry'` events with `tar.ReadEntry` objects, which are
-themselves readable streams that you can pipe wherever.
-
-Each `entry` will not emit until the one before it is flushed through,
-so make sure to either consume the data (with `on('data', ...)` or
-`.pipe(...)`) or throw it away with `.resume()` to keep the stream
-flowing.
-
-#### constructor(options)
-
-Returns an event emitter that emits `entry` events with
-`tar.ReadEntry` objects.
-
-The following options are supported:
-
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being listed. Return `true` to emit the entry from the
- archive, or `false` to skip it.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-
-#### abort(message, error)
-
-Stop all parsing activities. This is called when there are zlib
-errors. It also emits a warning with the message and error provided.
-
-### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass)
-
-A representation of an entry that is being read out of a tar archive.
-
-It has the following fields:
-
-- `extended` The extended metadata object provided to the constructor.
-- `globalExtended` The global extended metadata object provided to the
- constructor.
-- `remain` The number of bytes remaining to be written into the
- stream.
-- `blockRemain` The number of 512-byte blocks remaining to be written
- into the stream.
-- `ignore` Whether this entry should be ignored.
-- `meta` True if this represents metadata about the next entry, false
- if it represents a filesystem object.
-- All the fields from the header, extended header, and global extended
- header are added to the ReadEntry object. So it has `path`, `type`,
- `size, `mode`, and so on.
-
-#### constructor(header, extended, globalExtended)
-
-Create a new ReadEntry object with the specified header, extended
-header, and global extended header values.
-
-### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass)
-
-A representation of an entry that is being written from the file
-system into a tar archive.
-
-Emits data for the Header, and for the Pax Extended Header if one is
-required, as well as any body data.
-
-Creating a WriteEntry for a directory does not also create
-WriteEntry objects for all of the directory contents.
-
-It has the following fields:
-
-- `path` The path field that will be written to the archive. By
- default, this is also the path from the cwd to the file system
- object.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `myuid` If supported, the uid of the user running the current
- process.
-- `myuser` The `env.USER` string if set, or `''`. Set as the entry
- `uname` field if the file's `uid` matches `this.myuid`.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 1 MB.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `absolute` The absolute path to the entry on the filesystem. By
- default, this is `path.resolve(this.cwd, this.path)`, but it can be
- overridden explicitly.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `win32` True if on a windows platform. Causes behavior where paths
- replace `\` with `/` and filenames containing the windows-compatible
- forms of `<|>?:` characters are converted to actual `<|>?:` characters
- in the archive.
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-
-
-#### constructor(path, options)
-
-`path` is the path of the entry as it is written in the archive.
-
-The following options are supported:
-
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 1 MB.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `absolute` The absolute path to the entry on the filesystem. By
- default, this is `path.resolve(this.cwd, this.path)`, but it can be
- overridden explicitly.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `win32` True if on a windows platform. Causes behavior where paths
- replace `\` with `/`.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-- `umask` Set to restrict the modes on the entries in the archive,
- somewhat like how umask works on file creation. Defaults to
- `process.umask()` on unix systems, or `0o22` on Windows.
-
-#### warn(message, data)
-
-If strict, emit an error with the provided message.
-
-Othewise, emit a `'warn'` event with the provided message and data.
-
-### class tar.WriteEntry.Sync
-
-Synchronous version of tar.WriteEntry
-
-### class tar.WriteEntry.Tar
-
-A version of tar.WriteEntry that gets its data from a tar.ReadEntry
-instead of from the filesystem.
-
-#### constructor(readEntry, options)
-
-`readEntry` is the entry being read out of another archive.
-
-The following options are supported:
-
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary other
- time-based operations.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `onwarn` A function that will get called with `(message, data)` for
- any warnings encountered.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-
-### class tar.Header
-
-A class for reading and writing header blocks.
-
-It has the following fields:
-
-- `nullBlock` True if decoding a block which is entirely composed of
- `0x00` null bytes. (Useful because tar files are terminated by
- at least 2 null blocks.)
-- `cksumValid` True if the checksum in the header is valid, false
- otherwise.
-- `needPax` True if the values, as encoded, will require a Pax
- extended header.
-- `path` The path of the entry.
-- `mode` The 4 lowest-order octal digits of the file mode. That is,
- read/write/execute permissions for world, group, and owner, and the
- setuid, setgid, and sticky bits.
-- `uid` Numeric user id of the file owner
-- `gid` Numeric group id of the file owner
-- `size` Size of the file in bytes
-- `mtime` Modified time of the file
-- `cksum` The checksum of the header. This is generated by adding all
- the bytes of the header block, treating the checksum field itself as
- all ascii space characters (that is, `0x20`).
-- `type` The human-readable name of the type of entry this represents,
- or the alphanumeric key if unknown.
-- `typeKey` The alphanumeric key for the type of entry this header
- represents.
-- `linkpath` The target of Link and SymbolicLink entries.
-- `uname` Human-readable user name of the file owner
-- `gname` Human-readable group name of the file owner
-- `devmaj` The major portion of the device number. Always `0` for
- files, directories, and links.
-- `devmin` The minor portion of the device number. Always `0` for
- files, directories, and links.
-- `atime` File access time.
-- `ctime` File change time.
-
-#### constructor(data, [offset=0])
-
-`data` is optional. It is either a Buffer that should be interpreted
-as a tar Header starting at the specified offset and continuing for
-512 bytes, or a data object of keys and values to set on the header
-object, and eventually encode as a tar Header.
-
-#### decode(block, offset)
-
-Decode the provided buffer starting at the specified offset.
-
-Buffer length must be greater than 512 bytes.
-
-#### set(data)
-
-Set the fields in the data object.
-
-#### encode(buffer, offset)
-
-Encode the header fields into the buffer at the specified offset.
-
-Returns `this.needPax` to indicate whether a Pax Extended Header is
-required to properly encode the specified data.
-
-### class tar.Pax
-
-An object representing a set of key-value pairs in an Pax extended
-header entry.
-
-It has the following fields. Where the same name is used, they have
-the same semantics as the tar.Header field of the same name.
-
-- `global` True if this represents a global extended header, or false
- if it is for a single entry.
-- `atime`
-- `charset`
-- `comment`
-- `ctime`
-- `gid`
-- `gname`
-- `linkpath`
-- `mtime`
-- `path`
-- `size`
-- `uid`
-- `uname`
-- `dev`
-- `ino`
-- `nlink`
-
-#### constructor(object, global)
-
-Set the fields set in the object. `global` is a boolean that defaults
-to false.
-
-#### encode()
-
-Return a Buffer containing the header and body for the Pax extended
-header entry, or `null` if there is nothing to encode.
-
-#### encodeBody()
-
-Return a string representing the body of the pax extended header
-entry.
-
-#### encodeField(fieldName)
-
-Return a string representing the key/value encoding for the specified
-fieldName, or `''` if the field is unset.
-
-### tar.Pax.parse(string, extended, global)
-
-Return a new Pax object created by parsing the contents of the string
-provided.
-
-If the `extended` object is set, then also add the fields from that
-object. (This is necessary because multiple metadata entries can
-occur in sequence.)
-
-### tar.types
-
-A translation table for the `type` field in tar headers.
-
-#### tar.types.name.get(code)
-
-Get the human-readable name for a given alphanumeric code.
-
-#### tar.types.code.get(name)
-
-Get the alphanumeric code for a given human-readable name.
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/index.js b/node_modules/@npmcli/run-script/node_modules/tar/index.js
deleted file mode 100644
index c9ae06e79..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict'
-
-// high-level commands
-exports.c = exports.create = require('./lib/create.js')
-exports.r = exports.replace = require('./lib/replace.js')
-exports.t = exports.list = require('./lib/list.js')
-exports.u = exports.update = require('./lib/update.js')
-exports.x = exports.extract = require('./lib/extract.js')
-
-// classes
-exports.Pack = require('./lib/pack.js')
-exports.Unpack = require('./lib/unpack.js')
-exports.Parse = require('./lib/parse.js')
-exports.ReadEntry = require('./lib/read-entry.js')
-exports.WriteEntry = require('./lib/write-entry.js')
-exports.Header = require('./lib/header.js')
-exports.Pax = require('./lib/pax.js')
-exports.types = require('./lib/types.js')
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/buffer.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/buffer.js
deleted file mode 100644
index 7876d5b3e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/buffer.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from
-// or Buffer.alloc, and Buffer in node 10 deprecated the ctor.
-// .M, this is fine .\^/M..
-let B = Buffer
-/* istanbul ignore next */
-if (!B.alloc) {
- B = require('safe-buffer').Buffer
-}
-module.exports = B
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/create.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/create.js
deleted file mode 100644
index a37aa52e6..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/create.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-// tar -c
-const hlo = require('./high-level-opt.js')
-
-const Pack = require('./pack.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const t = require('./list.js')
-const path = require('path')
-
-const c = module.exports = (opt_, files, cb) => {
- if (typeof files === 'function')
- cb = files
-
- if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- return opt.file && opt.sync ? createFileSync(opt, files)
- : opt.file ? createFile(opt, files, cb)
- : opt.sync ? createSync(opt, files)
- : create(opt, files)
-}
-
-const createFileSync = (opt, files) => {
- const p = new Pack.Sync(opt)
- const stream = new fsm.WriteStreamSync(opt.file, {
- mode: opt.mode || 0o666
- })
- p.pipe(stream)
- addFilesSync(p, files)
-}
-
-const createFile = (opt, files, cb) => {
- const p = new Pack(opt)
- const stream = new fsm.WriteStream(opt.file, {
- mode: opt.mode || 0o666
- })
- p.pipe(stream)
-
- const promise = new Promise((res, rej) => {
- stream.on('error', rej)
- stream.on('close', res)
- p.on('error', rej)
- })
-
- addFilesAsync(p, files)
-
- return cb ? promise.then(cb, cb) : promise
-}
-
-const addFilesSync = (p, files) => {
- files.forEach(file => {
- if (file.charAt(0) === '@')
- t({
- file: path.resolve(p.cwd, file.substr(1)),
- sync: true,
- noResume: true,
- onentry: entry => p.add(entry)
- })
- else
- p.add(file)
- })
- p.end()
-}
-
-const addFilesAsync = (p, files) => {
- while (files.length) {
- const file = files.shift()
- if (file.charAt(0) === '@')
- return t({
- file: path.resolve(p.cwd, file.substr(1)),
- noResume: true,
- onentry: entry => p.add(entry)
- }).then(_ => addFilesAsync(p, files))
- else
- p.add(file)
- }
- p.end()
-}
-
-const createSync = (opt, files) => {
- const p = new Pack.Sync(opt)
- addFilesSync(p, files)
- return p
-}
-
-const create = (opt, files) => {
- const p = new Pack(opt)
- addFilesAsync(p, files)
- return p
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/extract.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/extract.js
deleted file mode 100644
index cbb458a0a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/extract.js
+++ /dev/null
@@ -1,112 +0,0 @@
-'use strict'
-
-// tar -x
-const hlo = require('./high-level-opt.js')
-const Unpack = require('./unpack.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-
-const x = module.exports = (opt_, files, cb) => {
- if (typeof opt_ === 'function')
- cb = opt_, files = null, opt_ = {}
- else if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (typeof files === 'function')
- cb = files, files = null
-
- if (!files)
- files = []
- else
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- if (files.length)
- filesFilter(opt, files)
-
- return opt.file && opt.sync ? extractFileSync(opt)
- : opt.file ? extractFile(opt, cb)
- : opt.sync ? extractSync(opt)
- : extract(opt)
-}
-
-// construct a filter that limits the file entries listed
-// include child entries if a dir is included
-const filesFilter = (opt, files) => {
- const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
- const filter = opt.filter
-
- const mapHas = (file, r) => {
- const root = r || path.parse(file).root || '.'
- const ret = file === root ? false
- : map.has(file) ? map.get(file)
- : mapHas(path.dirname(file), root)
-
- map.set(file, ret)
- return ret
- }
-
- opt.filter = filter
- ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
- : file => mapHas(file.replace(/\/+$/, ''))
-}
-
-const extractFileSync = opt => {
- const u = new Unpack.Sync(opt)
-
- const file = opt.file
- let threw = true
- let fd
- const stat = fs.statSync(file)
- // This trades a zero-byte read() syscall for a stat
- // However, it will usually result in less memory allocation
- const readSize = opt.maxReadSize || 16*1024*1024
- const stream = new fsm.ReadStreamSync(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.pipe(u)
-}
-
-const extractFile = (opt, cb) => {
- const u = new Unpack(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
-
- const file = opt.file
- const p = new Promise((resolve, reject) => {
- u.on('error', reject)
- u.on('close', resolve)
-
- // This trades a zero-byte read() syscall for a stat
- // However, it will usually result in less memory allocation
- fs.stat(file, (er, stat) => {
- if (er)
- reject(er)
- else {
- const stream = new fsm.ReadStream(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.on('error', reject)
- stream.pipe(u)
- }
- })
- })
- return cb ? p.then(cb, cb) : p
-}
-
-const extractSync = opt => {
- return new Unpack.Sync(opt)
-}
-
-const extract = opt => {
- return new Unpack(opt)
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/header.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/header.js
deleted file mode 100644
index d29c3b990..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/header.js
+++ /dev/null
@@ -1,289 +0,0 @@
-'use strict'
-// parse a 512-byte header block to a data object, or vice-versa
-// encode returns `true` if a pax extended header is needed, because
-// the data could not be faithfully encoded in a simple header.
-// (Also, check header.needPax to see if it needs a pax header.)
-
-const Buffer = require('./buffer.js')
-const types = require('./types.js')
-const pathModule = require('path').posix
-const large = require('./large-numbers.js')
-
-const SLURP = Symbol('slurp')
-const TYPE = Symbol('type')
-
-class Header {
- constructor (data, off, ex, gex) {
- this.cksumValid = false
- this.needPax = false
- this.nullBlock = false
-
- this.block = null
- this.path = null
- this.mode = null
- this.uid = null
- this.gid = null
- this.size = null
- this.mtime = null
- this.cksum = null
- this[TYPE] = '0'
- this.linkpath = null
- this.uname = null
- this.gname = null
- this.devmaj = 0
- this.devmin = 0
- this.atime = null
- this.ctime = null
-
- if (Buffer.isBuffer(data))
- this.decode(data, off || 0, ex, gex)
- else if (data)
- this.set(data)
- }
-
- decode (buf, off, ex, gex) {
- if (!off)
- off = 0
-
- if (!buf || !(buf.length >= off + 512))
- throw new Error('need 512 bytes for header')
-
- this.path = decString(buf, off, 100)
- this.mode = decNumber(buf, off + 100, 8)
- this.uid = decNumber(buf, off + 108, 8)
- this.gid = decNumber(buf, off + 116, 8)
- this.size = decNumber(buf, off + 124, 12)
- this.mtime = decDate(buf, off + 136, 12)
- this.cksum = decNumber(buf, off + 148, 12)
-
- // if we have extended or global extended headers, apply them now
- // See https://github.com/npm/node-tar/pull/187
- this[SLURP](ex)
- this[SLURP](gex, true)
-
- // old tar versions marked dirs as a file with a trailing /
- this[TYPE] = decString(buf, off + 156, 1)
- if (this[TYPE] === '')
- this[TYPE] = '0'
- if (this[TYPE] === '0' && this.path.substr(-1) === '/')
- this[TYPE] = '5'
-
- // tar implementations sometimes incorrectly put the stat(dir).size
- // as the size in the tarball, even though Directory entries are
- // not able to have any body at all. In the very rare chance that
- // it actually DOES have a body, we weren't going to do anything with
- // it anyway, and it'll just be a warning about an invalid header.
- if (this[TYPE] === '5')
- this.size = 0
-
- this.linkpath = decString(buf, off + 157, 100)
- if (buf.slice(off + 257, off + 265).toString() === 'ustar\u000000') {
- this.uname = decString(buf, off + 265, 32)
- this.gname = decString(buf, off + 297, 32)
- this.devmaj = decNumber(buf, off + 329, 8)
- this.devmin = decNumber(buf, off + 337, 8)
- if (buf[off + 475] !== 0) {
- // definitely a prefix, definitely >130 chars.
- const prefix = decString(buf, off + 345, 155)
- this.path = prefix + '/' + this.path
- } else {
- const prefix = decString(buf, off + 345, 130)
- if (prefix)
- this.path = prefix + '/' + this.path
- this.atime = decDate(buf, off + 476, 12)
- this.ctime = decDate(buf, off + 488, 12)
- }
- }
-
- let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
- sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
- sum += buf[i]
- }
- this.cksumValid = sum === this.cksum
- if (this.cksum === null && sum === 8 * 0x20)
- this.nullBlock = true
- }
-
- [SLURP] (ex, global) {
- for (let k in ex) {
- // we slurp in everything except for the path attribute in
- // a global extended header, because that's weird.
- if (ex[k] !== null && ex[k] !== undefined &&
- !(global && k === 'path'))
- this[k] = ex[k]
- }
- }
-
- encode (buf, off) {
- if (!buf) {
- buf = this.block = Buffer.alloc(512)
- off = 0
- }
-
- if (!off)
- off = 0
-
- if (!(buf.length >= off + 512))
- throw new Error('need 512 bytes for header')
-
- const prefixSize = this.ctime || this.atime ? 130 : 155
- const split = splitPrefix(this.path || '', prefixSize)
- const path = split[0]
- const prefix = split[1]
- this.needPax = split[2]
-
- this.needPax = encString(buf, off, 100, path) || this.needPax
- this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax
- this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax
- this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax
- this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax
- this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax
- buf[off + 156] = this[TYPE].charCodeAt(0)
- this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax
- buf.write('ustar\u000000', off + 257, 8)
- this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax
- this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax
- this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax
- this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax
- this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax
- if (buf[off + 475] !== 0)
- this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax
- else {
- this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax
- this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax
- this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax
- }
-
- let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
- sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
- sum += buf[i]
- }
- this.cksum = sum
- encNumber(buf, off + 148, 8, this.cksum)
- this.cksumValid = true
-
- return this.needPax
- }
-
- set (data) {
- for (let i in data) {
- if (data[i] !== null && data[i] !== undefined)
- this[i] = data[i]
- }
- }
-
- get type () {
- return types.name.get(this[TYPE]) || this[TYPE]
- }
-
- get typeKey () {
- return this[TYPE]
- }
-
- set type (type) {
- if (types.code.has(type))
- this[TYPE] = types.code.get(type)
- else
- this[TYPE] = type
- }
-}
-
-const splitPrefix = (p, prefixSize) => {
- const pathSize = 100
- let pp = p
- let prefix = ''
- let ret
- const root = pathModule.parse(p).root || '.'
-
- if (Buffer.byteLength(pp) < pathSize)
- ret = [pp, prefix, false]
- else {
- // first set prefix to the dir, and path to the base
- prefix = pathModule.dirname(pp)
- pp = pathModule.basename(pp)
-
- do {
- // both fit!
- if (Buffer.byteLength(pp) <= pathSize &&
- Buffer.byteLength(prefix) <= prefixSize)
- ret = [pp, prefix, false]
-
- // prefix fits in prefix, but path doesn't fit in path
- else if (Buffer.byteLength(pp) > pathSize &&
- Buffer.byteLength(prefix) <= prefixSize)
- ret = [pp.substr(0, pathSize - 1), prefix, true]
-
- else {
- // make path take a bit from prefix
- pp = pathModule.join(pathModule.basename(prefix), pp)
- prefix = pathModule.dirname(prefix)
- }
- } while (prefix !== root && !ret)
-
- // at this point, found no resolution, just truncate
- if (!ret)
- ret = [p.substr(0, pathSize - 1), '', true]
- }
- return ret
-}
-
-const decString = (buf, off, size) =>
- buf.slice(off, off + size).toString('utf8').replace(/\0.*/, '')
-
-const decDate = (buf, off, size) =>
- numToDate(decNumber(buf, off, size))
-
-const numToDate = num => num === null ? null : new Date(num * 1000)
-
-const decNumber = (buf, off, size) =>
- buf[off] & 0x80 ? large.parse(buf.slice(off, off + size))
- : decSmallNumber(buf, off, size)
-
-const nanNull = value => isNaN(value) ? null : value
-
-const decSmallNumber = (buf, off, size) =>
- nanNull(parseInt(
- buf.slice(off, off + size)
- .toString('utf8').replace(/\0.*$/, '').trim(), 8))
-
-// the maximum encodable as a null-terminated octal, by field size
-const MAXNUM = {
- 12: 0o77777777777,
- 8 : 0o7777777
-}
-
-const encNumber = (buf, off, size, number) =>
- number === null ? false :
- number > MAXNUM[size] || number < 0
- ? (large.encode(number, buf.slice(off, off + size)), true)
- : (encSmallNumber(buf, off, size, number), false)
-
-const encSmallNumber = (buf, off, size, number) =>
- buf.write(octalString(number, size), off, size, 'ascii')
-
-const octalString = (number, size) =>
- padOctal(Math.floor(number).toString(8), size)
-
-const padOctal = (string, size) =>
- (string.length === size - 1 ? string
- : new Array(size - string.length - 1).join('0') + string + ' ') + '\0'
-
-const encDate = (buf, off, size, date) =>
- date === null ? false :
- encNumber(buf, off, size, date.getTime() / 1000)
-
-// enough to fill the longest string we've got
-const NULLS = new Array(156).join('\0')
-// pad with nulls, return true if it's longer or non-ascii
-const encString = (buf, off, size, string) =>
- string === null ? false :
- (buf.write(string + NULLS, off, size, 'utf8'),
- string.length !== Buffer.byteLength(string) || string.length > size)
-
-module.exports = Header
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/high-level-opt.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/high-level-opt.js
deleted file mode 100644
index 7333db915..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/high-level-opt.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict'
-
-// turn tar(1) style args like `C` into the more verbose things like `cwd`
-
-const argmap = new Map([
- ['C', 'cwd'],
- ['f', 'file'],
- ['z', 'gzip'],
- ['P', 'preservePaths'],
- ['U', 'unlink'],
- ['strip-components', 'strip'],
- ['stripComponents', 'strip'],
- ['keep-newer', 'newer'],
- ['keepNewer', 'newer'],
- ['keep-newer-files', 'newer'],
- ['keepNewerFiles', 'newer'],
- ['k', 'keep'],
- ['keep-existing', 'keep'],
- ['keepExisting', 'keep'],
- ['m', 'noMtime'],
- ['no-mtime', 'noMtime'],
- ['p', 'preserveOwner'],
- ['L', 'follow'],
- ['h', 'follow']
-])
-
-const parse = module.exports = opt => opt ? Object.keys(opt).map(k => [
- argmap.has(k) ? argmap.get(k) : k, opt[k]
-]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/large-numbers.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/large-numbers.js
deleted file mode 100644
index 3e5c99255..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/large-numbers.js
+++ /dev/null
@@ -1,97 +0,0 @@
-'use strict'
-// Tar can encode large and negative numbers using a leading byte of
-// 0xff for negative, and 0x80 for positive.
-
-const encode = exports.encode = (num, buf) => {
- if (!Number.isSafeInteger(num))
- // The number is so large that javascript cannot represent it with integer
- // precision.
- throw TypeError('cannot encode number outside of javascript safe integer range')
- else if (num < 0)
- encodeNegative(num, buf)
- else
- encodePositive(num, buf)
- return buf
-}
-
-const encodePositive = (num, buf) => {
- buf[0] = 0x80
-
- for (var i = buf.length; i > 1; i--) {
- buf[i-1] = num & 0xff
- num = Math.floor(num / 0x100)
- }
-}
-
-const encodeNegative = (num, buf) => {
- buf[0] = 0xff
- var flipped = false
- num = num * -1
- for (var i = buf.length; i > 1; i--) {
- var byte = num & 0xff
- num = Math.floor(num / 0x100)
- if (flipped)
- buf[i-1] = onesComp(byte)
- else if (byte === 0)
- buf[i-1] = 0
- else {
- flipped = true
- buf[i-1] = twosComp(byte)
- }
- }
-}
-
-const parse = exports.parse = (buf) => {
- var post = buf[buf.length - 1]
- var pre = buf[0]
- var value;
- if (pre === 0x80)
- value = pos(buf.slice(1, buf.length))
- else if (pre === 0xff)
- value = twos(buf)
- else
- throw TypeError('invalid base256 encoding')
-
- if (!Number.isSafeInteger(value))
- // The number is so large that javascript cannot represent it with integer
- // precision.
- throw TypeError('parsed number outside of javascript safe integer range')
-
- return value
-}
-
-const twos = (buf) => {
- var len = buf.length
- var sum = 0
- var flipped = false
- for (var i = len - 1; i > -1; i--) {
- var byte = buf[i]
- var f
- if (flipped)
- f = onesComp(byte)
- else if (byte === 0)
- f = byte
- else {
- flipped = true
- f = twosComp(byte)
- }
- if (f !== 0)
- sum -= f * Math.pow(256, len - i - 1)
- }
- return sum
-}
-
-const pos = (buf) => {
- var len = buf.length
- var sum = 0
- for (var i = len - 1; i > -1; i--) {
- var byte = buf[i]
- if (byte !== 0)
- sum += byte * Math.pow(256, len - i - 1)
- }
- return sum
-}
-
-const onesComp = byte => (0xff ^ byte) & 0xff
-
-const twosComp = byte => ((0xff ^ byte) + 1) & 0xff
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/list.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/list.js
deleted file mode 100644
index 250ebe001..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/list.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict'
-
-const Buffer = require('./buffer.js')
-
-// XXX: This shares a lot in common with extract.js
-// maybe some DRY opportunity here?
-
-// tar -t
-const hlo = require('./high-level-opt.js')
-const Parser = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-
-const t = module.exports = (opt_, files, cb) => {
- if (typeof opt_ === 'function')
- cb = opt_, files = null, opt_ = {}
- else if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (typeof files === 'function')
- cb = files, files = null
-
- if (!files)
- files = []
- else
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- if (files.length)
- filesFilter(opt, files)
-
- if (!opt.noResume)
- onentryFunction(opt)
-
- return opt.file && opt.sync ? listFileSync(opt)
- : opt.file ? listFile(opt, cb)
- : list(opt)
-}
-
-const onentryFunction = opt => {
- const onentry = opt.onentry
- opt.onentry = onentry ? e => {
- onentry(e)
- e.resume()
- } : e => e.resume()
-}
-
-// construct a filter that limits the file entries listed
-// include child entries if a dir is included
-const filesFilter = (opt, files) => {
- const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
- const filter = opt.filter
-
- const mapHas = (file, r) => {
- const root = r || path.parse(file).root || '.'
- const ret = file === root ? false
- : map.has(file) ? map.get(file)
- : mapHas(path.dirname(file), root)
-
- map.set(file, ret)
- return ret
- }
-
- opt.filter = filter
- ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
- : file => mapHas(file.replace(/\/+$/, ''))
-}
-
-const listFileSync = opt => {
- const p = list(opt)
- const file = opt.file
- let threw = true
- let fd
- try {
- const stat = fs.statSync(file)
- const readSize = opt.maxReadSize || 16*1024*1024
- if (stat.size < readSize) {
- p.end(fs.readFileSync(file))
- } else {
- let pos = 0
- const buf = Buffer.allocUnsafe(readSize)
- fd = fs.openSync(file, 'r')
- while (pos < stat.size) {
- let bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
- pos += bytesRead
- p.write(buf.slice(0, bytesRead))
- }
- p.end()
- }
- threw = false
- } finally {
- if (threw && fd)
- try { fs.closeSync(fd) } catch (er) {}
- }
-}
-
-const listFile = (opt, cb) => {
- const parse = new Parser(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
-
- const file = opt.file
- const p = new Promise((resolve, reject) => {
- parse.on('error', reject)
- parse.on('end', resolve)
-
- fs.stat(file, (er, stat) => {
- if (er)
- reject(er)
- else {
- const stream = new fsm.ReadStream(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.on('error', reject)
- stream.pipe(parse)
- }
- })
- })
- return cb ? p.then(cb, cb) : p
-}
-
-const list = opt => new Parser(opt)
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/mkdir.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/mkdir.js
deleted file mode 100644
index c6a154c24..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/mkdir.js
+++ /dev/null
@@ -1,206 +0,0 @@
-'use strict'
-// wrapper around mkdirp for tar's needs.
-
-// TODO: This should probably be a class, not functionally
-// passing around state in a gazillion args.
-
-const mkdirp = require('mkdirp')
-const fs = require('fs')
-const path = require('path')
-const chownr = require('chownr')
-
-class SymlinkError extends Error {
- constructor (symlink, path) {
- super('Cannot extract through symbolic link')
- this.path = path
- this.symlink = symlink
- }
-
- get name () {
- return 'SylinkError'
- }
-}
-
-class CwdError extends Error {
- constructor (path, code) {
- super(code + ': Cannot cd into \'' + path + '\'')
- this.path = path
- this.code = code
- }
-
- get name () {
- return 'CwdError'
- }
-}
-
-const mkdir = module.exports = (dir, opt, cb) => {
- // if there's any overlap between mask and mode,
- // then we'll need an explicit chmod
- const umask = opt.umask
- const mode = opt.mode | 0o0700
- const needChmod = (mode & umask) !== 0
-
- const uid = opt.uid
- const gid = opt.gid
- const doChown = typeof uid === 'number' &&
- typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
-
- const preserve = opt.preserve
- const unlink = opt.unlink
- const cache = opt.cache
- const cwd = opt.cwd
-
- const done = (er, created) => {
- if (er)
- cb(er)
- else {
- cache.set(dir, true)
- if (created && doChown)
- chownr(created, uid, gid, er => done(er))
- else if (needChmod)
- fs.chmod(dir, mode, cb)
- else
- cb()
- }
- }
-
- if (cache && cache.get(dir) === true)
- return done()
-
- if (dir === cwd)
- return fs.stat(dir, (er, st) => {
- if (er || !st.isDirectory())
- er = new CwdError(dir, er && er.code || 'ENOTDIR')
- done(er)
- })
-
- if (preserve)
- return mkdirp(dir, mode, done)
-
- const sub = path.relative(cwd, dir)
- const parts = sub.split(/\/|\\/)
- mkdir_(cwd, parts, mode, cache, unlink, cwd, null, done)
-}
-
-const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => {
- if (!parts.length)
- return cb(null, created)
- const p = parts.shift()
- const part = base + '/' + p
- if (cache.get(part))
- return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
-}
-
-const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
- if (er) {
- if (er.path && path.dirname(er.path) === cwd &&
- (er.code === 'ENOTDIR' || er.code === 'ENOENT'))
- return cb(new CwdError(cwd, er.code))
-
- fs.lstat(part, (statEr, st) => {
- if (statEr)
- cb(statEr)
- else if (st.isDirectory())
- mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- else if (unlink)
- fs.unlink(part, er => {
- if (er)
- return cb(er)
- fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
- })
- else if (st.isSymbolicLink())
- return cb(new SymlinkError(part, part + '/' + parts.join('/')))
- else
- cb(er)
- })
- } else {
- created = created || part
- mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- }
-}
-
-const mkdirSync = module.exports.sync = (dir, opt) => {
- // if there's any overlap between mask and mode,
- // then we'll need an explicit chmod
- const umask = opt.umask
- const mode = opt.mode | 0o0700
- const needChmod = (mode & umask) !== 0
-
- const uid = opt.uid
- const gid = opt.gid
- const doChown = typeof uid === 'number' &&
- typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
-
- const preserve = opt.preserve
- const unlink = opt.unlink
- const cache = opt.cache
- const cwd = opt.cwd
-
- const done = (created) => {
- cache.set(dir, true)
- if (created && doChown)
- chownr.sync(created, uid, gid)
- if (needChmod)
- fs.chmodSync(dir, mode)
- }
-
- if (cache && cache.get(dir) === true)
- return done()
-
- if (dir === cwd) {
- let ok = false
- let code = 'ENOTDIR'
- try {
- ok = fs.statSync(dir).isDirectory()
- } catch (er) {
- code = er.code
- } finally {
- if (!ok)
- throw new CwdError(dir, code)
- }
- done()
- return
- }
-
- if (preserve)
- return done(mkdirp.sync(dir, mode))
-
- const sub = path.relative(cwd, dir)
- const parts = sub.split(/\/|\\/)
- let created = null
- for (let p = parts.shift(), part = cwd;
- p && (part += '/' + p);
- p = parts.shift()) {
-
- if (cache.get(part))
- continue
-
- try {
- fs.mkdirSync(part, mode)
- created = created || part
- cache.set(part, true)
- } catch (er) {
- if (er.path && path.dirname(er.path) === cwd &&
- (er.code === 'ENOTDIR' || er.code === 'ENOENT'))
- return new CwdError(cwd, er.code)
-
- const st = fs.lstatSync(part)
- if (st.isDirectory()) {
- cache.set(part, true)
- continue
- } else if (unlink) {
- fs.unlinkSync(part)
- fs.mkdirSync(part, mode)
- created = created || part
- cache.set(part, true)
- continue
- } else if (st.isSymbolicLink())
- return new SymlinkError(part, part + '/' + parts.join('/'))
- }
- }
-
- return done(created)
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/mode-fix.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/mode-fix.js
deleted file mode 100644
index 3363a3b15..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/mode-fix.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-module.exports = (mode, isDir) => {
- mode &= 0o7777
- // if dirs are readable, then they should be listable
- if (isDir) {
- if (mode & 0o400)
- mode |= 0o100
- if (mode & 0o40)
- mode |= 0o10
- if (mode & 0o4)
- mode |= 0o1
- }
- return mode
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/pack.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/pack.js
deleted file mode 100644
index 857cea910..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/pack.js
+++ /dev/null
@@ -1,404 +0,0 @@
-'use strict'
-
-const Buffer = require('./buffer.js')
-
-// A readable tar stream creator
-// Technically, this is a transform stream that you write paths into,
-// and tar format comes out of.
-// The `add()` method is like `write()` but returns this,
-// and end() return `this` as well, so you can
-// do `new Pack(opt).add('files').add('dir').end().pipe(output)
-// You could also do something like:
-// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))
-
-class PackJob {
- constructor (path, absolute) {
- this.path = path || './'
- this.absolute = absolute
- this.entry = null
- this.stat = null
- this.readdir = null
- this.pending = false
- this.ignore = false
- this.piped = false
- }
-}
-
-const MiniPass = require('minipass')
-const zlib = require('minizlib')
-const ReadEntry = require('./read-entry.js')
-const WriteEntry = require('./write-entry.js')
-const WriteEntrySync = WriteEntry.Sync
-const WriteEntryTar = WriteEntry.Tar
-const Yallist = require('yallist')
-const EOF = Buffer.alloc(1024)
-const ONSTAT = Symbol('onStat')
-const ENDED = Symbol('ended')
-const QUEUE = Symbol('queue')
-const CURRENT = Symbol('current')
-const PROCESS = Symbol('process')
-const PROCESSING = Symbol('processing')
-const PROCESSJOB = Symbol('processJob')
-const JOBS = Symbol('jobs')
-const JOBDONE = Symbol('jobDone')
-const ADDFSENTRY = Symbol('addFSEntry')
-const ADDTARENTRY = Symbol('addTarEntry')
-const STAT = Symbol('stat')
-const READDIR = Symbol('readdir')
-const ONREADDIR = Symbol('onreaddir')
-const PIPE = Symbol('pipe')
-const ENTRY = Symbol('entry')
-const ENTRYOPT = Symbol('entryOpt')
-const WRITEENTRYCLASS = Symbol('writeEntryClass')
-const WRITE = Symbol('write')
-const ONDRAIN = Symbol('ondrain')
-
-const fs = require('fs')
-const path = require('path')
-const warner = require('./warn-mixin.js')
-
-const Pack = warner(class Pack extends MiniPass {
- constructor (opt) {
- super(opt)
- opt = opt || Object.create(null)
- this.opt = opt
- this.cwd = opt.cwd || process.cwd()
- this.maxReadSize = opt.maxReadSize
- this.preservePaths = !!opt.preservePaths
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.prefix = (opt.prefix || '').replace(/(\\|\/)+$/, '')
- this.linkCache = opt.linkCache || new Map()
- this.statCache = opt.statCache || new Map()
- this.readdirCache = opt.readdirCache || new Map()
-
- this[WRITEENTRYCLASS] = WriteEntry
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- this.zip = null
- if (opt.gzip) {
- if (typeof opt.gzip !== 'object')
- opt.gzip = {}
- this.zip = new zlib.Gzip(opt.gzip)
- this.zip.on('data', chunk => super.write(chunk))
- this.zip.on('end', _ => super.end())
- this.zip.on('drain', _ => this[ONDRAIN]())
- this.on('resume', _ => this.zip.resume())
- } else
- this.on('drain', this[ONDRAIN])
-
- this.portable = !!opt.portable
- this.noDirRecurse = !!opt.noDirRecurse
- this.follow = !!opt.follow
- this.noMtime = !!opt.noMtime
- this.mtime = opt.mtime || null
-
- this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
-
- this[QUEUE] = new Yallist
- this[JOBS] = 0
- this.jobs = +opt.jobs || 4
- this[PROCESSING] = false
- this[ENDED] = false
- }
-
- [WRITE] (chunk) {
- return super.write(chunk)
- }
-
- add (path) {
- this.write(path)
- return this
- }
-
- end (path) {
- if (path)
- this.write(path)
- this[ENDED] = true
- this[PROCESS]()
- return this
- }
-
- write (path) {
- if (this[ENDED])
- throw new Error('write after end')
-
- if (path instanceof ReadEntry)
- this[ADDTARENTRY](path)
- else
- this[ADDFSENTRY](path)
- return this.flowing
- }
-
- [ADDTARENTRY] (p) {
- const absolute = path.resolve(this.cwd, p.path)
- if (this.prefix)
- p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '')
-
- // in this case, we don't have to wait for the stat
- if (!this.filter(p.path, p))
- p.resume()
- else {
- const job = new PackJob(p.path, absolute, false)
- job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))
- job.entry.on('end', _ => this[JOBDONE](job))
- this[JOBS] += 1
- this[QUEUE].push(job)
- }
-
- this[PROCESS]()
- }
-
- [ADDFSENTRY] (p) {
- const absolute = path.resolve(this.cwd, p)
- if (this.prefix)
- p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '')
-
- this[QUEUE].push(new PackJob(p, absolute))
- this[PROCESS]()
- }
-
- [STAT] (job) {
- job.pending = true
- this[JOBS] += 1
- const stat = this.follow ? 'stat' : 'lstat'
- fs[stat](job.absolute, (er, stat) => {
- job.pending = false
- this[JOBS] -= 1
- if (er)
- this.emit('error', er)
- else
- this[ONSTAT](job, stat)
- })
- }
-
- [ONSTAT] (job, stat) {
- this.statCache.set(job.absolute, stat)
- job.stat = stat
-
- // now we have the stat, we can filter it.
- if (!this.filter(job.path, stat))
- job.ignore = true
-
- this[PROCESS]()
- }
-
- [READDIR] (job) {
- job.pending = true
- this[JOBS] += 1
- fs.readdir(job.absolute, (er, entries) => {
- job.pending = false
- this[JOBS] -= 1
- if (er)
- return this.emit('error', er)
- this[ONREADDIR](job, entries)
- })
- }
-
- [ONREADDIR] (job, entries) {
- this.readdirCache.set(job.absolute, entries)
- job.readdir = entries
- this[PROCESS]()
- }
-
- [PROCESS] () {
- if (this[PROCESSING])
- return
-
- this[PROCESSING] = true
- for (let w = this[QUEUE].head;
- w !== null && this[JOBS] < this.jobs;
- w = w.next) {
- this[PROCESSJOB](w.value)
- if (w.value.ignore) {
- const p = w.next
- this[QUEUE].removeNode(w)
- w.next = p
- }
- }
-
- this[PROCESSING] = false
-
- if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
- if (this.zip)
- this.zip.end(EOF)
- else {
- super.write(EOF)
- super.end()
- }
- }
- }
-
- get [CURRENT] () {
- return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value
- }
-
- [JOBDONE] (job) {
- this[QUEUE].shift()
- this[JOBS] -= 1
- this[PROCESS]()
- }
-
- [PROCESSJOB] (job) {
- if (job.pending)
- return
-
- if (job.entry) {
- if (job === this[CURRENT] && !job.piped)
- this[PIPE](job)
- return
- }
-
- if (!job.stat) {
- if (this.statCache.has(job.absolute))
- this[ONSTAT](job, this.statCache.get(job.absolute))
- else
- this[STAT](job)
- }
- if (!job.stat)
- return
-
- // filtered out!
- if (job.ignore)
- return
-
- if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
- if (this.readdirCache.has(job.absolute))
- this[ONREADDIR](job, this.readdirCache.get(job.absolute))
- else
- this[READDIR](job)
- if (!job.readdir)
- return
- }
-
- // we know it doesn't have an entry, because that got checked above
- job.entry = this[ENTRY](job)
- if (!job.entry) {
- job.ignore = true
- return
- }
-
- if (job === this[CURRENT] && !job.piped)
- this[PIPE](job)
- }
-
- [ENTRYOPT] (job) {
- return {
- onwarn: (msg, data) => {
- this.warn(msg, data)
- },
- noPax: this.noPax,
- cwd: this.cwd,
- absolute: job.absolute,
- preservePaths: this.preservePaths,
- maxReadSize: this.maxReadSize,
- strict: this.strict,
- portable: this.portable,
- linkCache: this.linkCache,
- statCache: this.statCache,
- noMtime: this.noMtime,
- mtime: this.mtime
- }
- }
-
- [ENTRY] (job) {
- this[JOBS] += 1
- try {
- return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job))
- .on('end', () => this[JOBDONE](job))
- .on('error', er => this.emit('error', er))
- } catch (er) {
- this.emit('error', er)
- }
- }
-
- [ONDRAIN] () {
- if (this[CURRENT] && this[CURRENT].entry)
- this[CURRENT].entry.resume()
- }
-
- // like .pipe() but using super, because our write() is special
- [PIPE] (job) {
- job.piped = true
-
- if (job.readdir)
- job.readdir.forEach(entry => {
- const p = this.prefix ?
- job.path.slice(this.prefix.length + 1) || './'
- : job.path
-
- const base = p === './' ? '' : p.replace(/\/*$/, '/')
- this[ADDFSENTRY](base + entry)
- })
-
- const source = job.entry
- const zip = this.zip
-
- if (zip)
- source.on('data', chunk => {
- if (!zip.write(chunk))
- source.pause()
- })
- else
- source.on('data', chunk => {
- if (!super.write(chunk))
- source.pause()
- })
- }
-
- pause () {
- if (this.zip)
- this.zip.pause()
- return super.pause()
- }
-})
-
-class PackSync extends Pack {
- constructor (opt) {
- super(opt)
- this[WRITEENTRYCLASS] = WriteEntrySync
- }
-
- // pause/resume are no-ops in sync streams.
- pause () {}
- resume () {}
-
- [STAT] (job) {
- const stat = this.follow ? 'statSync' : 'lstatSync'
- this[ONSTAT](job, fs[stat](job.absolute))
- }
-
- [READDIR] (job, stat) {
- this[ONREADDIR](job, fs.readdirSync(job.absolute))
- }
-
- // gotta get it all in this tick
- [PIPE] (job) {
- const source = job.entry
- const zip = this.zip
-
- if (job.readdir)
- job.readdir.forEach(entry => {
- const p = this.prefix ?
- job.path.slice(this.prefix.length + 1) || './'
- : job.path
-
- const base = p === './' ? '' : p.replace(/\/*$/, '/')
- this[ADDFSENTRY](base + entry)
- })
-
- if (zip)
- source.on('data', chunk => {
- zip.write(chunk)
- })
- else
- source.on('data', chunk => {
- super[WRITE](chunk)
- })
- }
-}
-
-Pack.Sync = PackSync
-
-module.exports = Pack
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/parse.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/parse.js
deleted file mode 100644
index 43d4383dd..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/parse.js
+++ /dev/null
@@ -1,428 +0,0 @@
-'use strict'
-
-// this[BUFFER] is the remainder of a chunk if we're waiting for
-// the full 512 bytes of a header to come in. We will Buffer.concat()
-// it to the next write(), which is a mem copy, but a small one.
-//
-// this[QUEUE] is a Yallist of entries that haven't been emitted
-// yet this can only get filled up if the user keeps write()ing after
-// a write() returns false, or does a write() with more than one entry
-//
-// We don't buffer chunks, we always parse them and either create an
-// entry, or push it into the active entry. The ReadEntry class knows
-// to throw data away if .ignore=true
-//
-// Shift entry off the buffer when it emits 'end', and emit 'entry' for
-// the next one in the list.
-//
-// At any time, we're pushing body chunks into the entry at WRITEENTRY,
-// and waiting for 'end' on the entry at READENTRY
-//
-// ignored entries get .resume() called on them straight away
-
-const warner = require('./warn-mixin.js')
-const path = require('path')
-const Header = require('./header.js')
-const EE = require('events')
-const Yallist = require('yallist')
-const maxMetaEntrySize = 1024 * 1024
-const Entry = require('./read-entry.js')
-const Pax = require('./pax.js')
-const zlib = require('minizlib')
-const Buffer = require('./buffer.js')
-
-const gzipHeader = Buffer.from([0x1f, 0x8b])
-const STATE = Symbol('state')
-const WRITEENTRY = Symbol('writeEntry')
-const READENTRY = Symbol('readEntry')
-const NEXTENTRY = Symbol('nextEntry')
-const PROCESSENTRY = Symbol('processEntry')
-const EX = Symbol('extendedHeader')
-const GEX = Symbol('globalExtendedHeader')
-const META = Symbol('meta')
-const EMITMETA = Symbol('emitMeta')
-const BUFFER = Symbol('buffer')
-const QUEUE = Symbol('queue')
-const ENDED = Symbol('ended')
-const EMITTEDEND = Symbol('emittedEnd')
-const EMIT = Symbol('emit')
-const UNZIP = Symbol('unzip')
-const CONSUMECHUNK = Symbol('consumeChunk')
-const CONSUMECHUNKSUB = Symbol('consumeChunkSub')
-const CONSUMEBODY = Symbol('consumeBody')
-const CONSUMEMETA = Symbol('consumeMeta')
-const CONSUMEHEADER = Symbol('consumeHeader')
-const CONSUMING = Symbol('consuming')
-const BUFFERCONCAT = Symbol('bufferConcat')
-const MAYBEEND = Symbol('maybeEnd')
-const WRITING = Symbol('writing')
-const ABORTED = Symbol('aborted')
-const DONE = Symbol('onDone')
-
-const noop = _ => true
-
-module.exports = warner(class Parser extends EE {
- constructor (opt) {
- opt = opt || {}
- super(opt)
-
- if (opt.ondone)
- this.on(DONE, opt.ondone)
- else
- this.on(DONE, _ => {
- this.emit('prefinish')
- this.emit('finish')
- this.emit('end')
- this.emit('close')
- })
-
- this.strict = !!opt.strict
- this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize
- this.filter = typeof opt.filter === 'function' ? opt.filter : noop
-
- // have to set this so that streams are ok piping into it
- this.writable = true
- this.readable = false
-
- this[QUEUE] = new Yallist()
- this[BUFFER] = null
- this[READENTRY] = null
- this[WRITEENTRY] = null
- this[STATE] = 'begin'
- this[META] = ''
- this[EX] = null
- this[GEX] = null
- this[ENDED] = false
- this[UNZIP] = null
- this[ABORTED] = false
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
- if (typeof opt.onentry === 'function')
- this.on('entry', opt.onentry)
- }
-
- [CONSUMEHEADER] (chunk, position) {
- let header
- try {
- header = new Header(chunk, position, this[EX], this[GEX])
- } catch (er) {
- return this.warn('invalid entry', er)
- }
-
- if (header.nullBlock)
- this[EMIT]('nullBlock')
- else if (!header.cksumValid)
- this.warn('invalid entry', header)
- else if (!header.path)
- this.warn('invalid: path is required', header)
- else {
- const type = header.type
- if (/^(Symbolic)?Link$/.test(type) && !header.linkpath)
- this.warn('invalid: linkpath required', header)
- else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath)
- this.warn('invalid: linkpath forbidden', header)
- else {
- const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX])
-
- if (entry.meta) {
- if (entry.size > this.maxMetaEntrySize) {
- entry.ignore = true
- this[EMIT]('ignoredEntry', entry)
- this[STATE] = 'ignore'
- } else if (entry.size > 0) {
- this[META] = ''
- entry.on('data', c => this[META] += c)
- this[STATE] = 'meta'
- }
- } else {
-
- this[EX] = null
- entry.ignore = entry.ignore || !this.filter(entry.path, entry)
- if (entry.ignore) {
- this[EMIT]('ignoredEntry', entry)
- this[STATE] = entry.remain ? 'ignore' : 'begin'
- } else {
- if (entry.remain)
- this[STATE] = 'body'
- else {
- this[STATE] = 'begin'
- entry.end()
- }
-
- if (!this[READENTRY]) {
- this[QUEUE].push(entry)
- this[NEXTENTRY]()
- } else
- this[QUEUE].push(entry)
- }
- }
- }
- }
- }
-
- [PROCESSENTRY] (entry) {
- let go = true
-
- if (!entry) {
- this[READENTRY] = null
- go = false
- } else if (Array.isArray(entry))
- this.emit.apply(this, entry)
- else {
- this[READENTRY] = entry
- this.emit('entry', entry)
- if (!entry.emittedEnd) {
- entry.on('end', _ => this[NEXTENTRY]())
- go = false
- }
- }
-
- return go
- }
-
- [NEXTENTRY] () {
- do {} while (this[PROCESSENTRY](this[QUEUE].shift()))
-
- if (!this[QUEUE].length) {
- // At this point, there's nothing in the queue, but we may have an
- // entry which is being consumed (readEntry).
- // If we don't, then we definitely can handle more data.
- // If we do, and either it's flowing, or it has never had any data
- // written to it, then it needs more.
- // The only other possibility is that it has returned false from a
- // write() call, so we wait for the next drain to continue.
- const re = this[READENTRY]
- const drainNow = !re || re.flowing || re.size === re.remain
- if (drainNow) {
- if (!this[WRITING])
- this.emit('drain')
- } else
- re.once('drain', _ => this.emit('drain'))
- }
- }
-
- [CONSUMEBODY] (chunk, position) {
- // write up to but no more than writeEntry.blockRemain
- const entry = this[WRITEENTRY]
- const br = entry.blockRemain
- const c = (br >= chunk.length && position === 0) ? chunk
- : chunk.slice(position, position + br)
-
- entry.write(c)
-
- if (!entry.blockRemain) {
- this[STATE] = 'begin'
- this[WRITEENTRY] = null
- entry.end()
- }
-
- return c.length
- }
-
- [CONSUMEMETA] (chunk, position) {
- const entry = this[WRITEENTRY]
- const ret = this[CONSUMEBODY](chunk, position)
-
- // if we finished, then the entry is reset
- if (!this[WRITEENTRY])
- this[EMITMETA](entry)
-
- return ret
- }
-
- [EMIT] (ev, data, extra) {
- if (!this[QUEUE].length && !this[READENTRY])
- this.emit(ev, data, extra)
- else
- this[QUEUE].push([ev, data, extra])
- }
-
- [EMITMETA] (entry) {
- this[EMIT]('meta', this[META])
- switch (entry.type) {
- case 'ExtendedHeader':
- case 'OldExtendedHeader':
- this[EX] = Pax.parse(this[META], this[EX], false)
- break
-
- case 'GlobalExtendedHeader':
- this[GEX] = Pax.parse(this[META], this[GEX], true)
- break
-
- case 'NextFileHasLongPath':
- case 'OldGnuLongPath':
- this[EX] = this[EX] || Object.create(null)
- this[EX].path = this[META].replace(/\0.*/, '')
- break
-
- case 'NextFileHasLongLinkpath':
- this[EX] = this[EX] || Object.create(null)
- this[EX].linkpath = this[META].replace(/\0.*/, '')
- break
-
- /* istanbul ignore next */
- default: throw new Error('unknown meta: ' + entry.type)
- }
- }
-
- abort (msg, error) {
- this[ABORTED] = true
- this.warn(msg, error)
- this.emit('abort', error)
- this.emit('error', error)
- }
-
- write (chunk) {
- if (this[ABORTED])
- return
-
- // first write, might be gzipped
- if (this[UNZIP] === null && chunk) {
- if (this[BUFFER]) {
- chunk = Buffer.concat([this[BUFFER], chunk])
- this[BUFFER] = null
- }
- if (chunk.length < gzipHeader.length) {
- this[BUFFER] = chunk
- return true
- }
- for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
- if (chunk[i] !== gzipHeader[i])
- this[UNZIP] = false
- }
- if (this[UNZIP] === null) {
- const ended = this[ENDED]
- this[ENDED] = false
- this[UNZIP] = new zlib.Unzip()
- this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))
- this[UNZIP].on('error', er =>
- this.abort(er.message, er))
- this[UNZIP].on('end', _ => {
- this[ENDED] = true
- this[CONSUMECHUNK]()
- })
- this[WRITING] = true
- const ret = this[UNZIP][ended ? 'end' : 'write' ](chunk)
- this[WRITING] = false
- return ret
- }
- }
-
- this[WRITING] = true
- if (this[UNZIP])
- this[UNZIP].write(chunk)
- else
- this[CONSUMECHUNK](chunk)
- this[WRITING] = false
-
- // return false if there's a queue, or if the current entry isn't flowing
- const ret =
- this[QUEUE].length ? false :
- this[READENTRY] ? this[READENTRY].flowing :
- true
-
- // if we have no queue, then that means a clogged READENTRY
- if (!ret && !this[QUEUE].length)
- this[READENTRY].once('drain', _ => this.emit('drain'))
-
- return ret
- }
-
- [BUFFERCONCAT] (c) {
- if (c && !this[ABORTED])
- this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c
- }
-
- [MAYBEEND] () {
- if (this[ENDED] &&
- !this[EMITTEDEND] &&
- !this[ABORTED] &&
- !this[CONSUMING]) {
- this[EMITTEDEND] = true
- const entry = this[WRITEENTRY]
- if (entry && entry.blockRemain) {
- const have = this[BUFFER] ? this[BUFFER].length : 0
- this.warn('Truncated input (needed ' + entry.blockRemain +
- ' more bytes, only ' + have + ' available)', entry)
- if (this[BUFFER])
- entry.write(this[BUFFER])
- entry.end()
- }
- this[EMIT](DONE)
- }
- }
-
- [CONSUMECHUNK] (chunk) {
- if (this[CONSUMING]) {
- this[BUFFERCONCAT](chunk)
- } else if (!chunk && !this[BUFFER]) {
- this[MAYBEEND]()
- } else {
- this[CONSUMING] = true
- if (this[BUFFER]) {
- this[BUFFERCONCAT](chunk)
- const c = this[BUFFER]
- this[BUFFER] = null
- this[CONSUMECHUNKSUB](c)
- } else {
- this[CONSUMECHUNKSUB](chunk)
- }
-
- while (this[BUFFER] && this[BUFFER].length >= 512 && !this[ABORTED]) {
- const c = this[BUFFER]
- this[BUFFER] = null
- this[CONSUMECHUNKSUB](c)
- }
- this[CONSUMING] = false
- }
-
- if (!this[BUFFER] || this[ENDED])
- this[MAYBEEND]()
- }
-
- [CONSUMECHUNKSUB] (chunk) {
- // we know that we are in CONSUMING mode, so anything written goes into
- // the buffer. Advance the position and put any remainder in the buffer.
- let position = 0
- let length = chunk.length
- while (position + 512 <= length && !this[ABORTED]) {
- switch (this[STATE]) {
- case 'begin':
- this[CONSUMEHEADER](chunk, position)
- position += 512
- break
-
- case 'ignore':
- case 'body':
- position += this[CONSUMEBODY](chunk, position)
- break
-
- case 'meta':
- position += this[CONSUMEMETA](chunk, position)
- break
-
- /* istanbul ignore next */
- default:
- throw new Error('invalid state: ' + this[STATE])
- }
- }
-
- if (position < length) {
- if (this[BUFFER])
- this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]])
- else
- this[BUFFER] = chunk.slice(position)
- }
- }
-
- end (chunk) {
- if (!this[ABORTED]) {
- if (this[UNZIP])
- this[UNZIP].end(chunk)
- else {
- this[ENDED] = true
- this.write(chunk)
- }
- }
- }
-})
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/pax.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/pax.js
deleted file mode 100644
index 9d7e4aba5..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/pax.js
+++ /dev/null
@@ -1,146 +0,0 @@
-'use strict'
-const Buffer = require('./buffer.js')
-const Header = require('./header.js')
-const path = require('path')
-
-class Pax {
- constructor (obj, global) {
- this.atime = obj.atime || null
- this.charset = obj.charset || null
- this.comment = obj.comment || null
- this.ctime = obj.ctime || null
- this.gid = obj.gid || null
- this.gname = obj.gname || null
- this.linkpath = obj.linkpath || null
- this.mtime = obj.mtime || null
- this.path = obj.path || null
- this.size = obj.size || null
- this.uid = obj.uid || null
- this.uname = obj.uname || null
- this.dev = obj.dev || null
- this.ino = obj.ino || null
- this.nlink = obj.nlink || null
- this.global = global || false
- }
-
- encode () {
- const body = this.encodeBody()
- if (body === '')
- return null
-
- const bodyLen = Buffer.byteLength(body)
- // round up to 512 bytes
- // add 512 for header
- const bufLen = 512 * Math.ceil(1 + bodyLen / 512)
- const buf = Buffer.allocUnsafe(bufLen)
-
- // 0-fill the header section, it might not hit every field
- for (let i = 0; i < 512; i++) {
- buf[i] = 0
- }
-
- new Header({
- // XXX split the path
- // then the path should be PaxHeader + basename, but less than 99,
- // prepend with the dirname
- path: ('PaxHeader/' + path.basename(this.path)).slice(0, 99),
- mode: this.mode || 0o644,
- uid: this.uid || null,
- gid: this.gid || null,
- size: bodyLen,
- mtime: this.mtime || null,
- type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',
- linkpath: '',
- uname: this.uname || '',
- gname: this.gname || '',
- devmaj: 0,
- devmin: 0,
- atime: this.atime || null,
- ctime: this.ctime || null
- }).encode(buf)
-
- buf.write(body, 512, bodyLen, 'utf8')
-
- // null pad after the body
- for (let i = bodyLen + 512; i < buf.length; i++) {
- buf[i] = 0
- }
-
- return buf
- }
-
- encodeBody () {
- return (
- this.encodeField('path') +
- this.encodeField('ctime') +
- this.encodeField('atime') +
- this.encodeField('dev') +
- this.encodeField('ino') +
- this.encodeField('nlink') +
- this.encodeField('charset') +
- this.encodeField('comment') +
- this.encodeField('gid') +
- this.encodeField('gname') +
- this.encodeField('linkpath') +
- this.encodeField('mtime') +
- this.encodeField('size') +
- this.encodeField('uid') +
- this.encodeField('uname')
- )
- }
-
- encodeField (field) {
- if (this[field] === null || this[field] === undefined)
- return ''
- const v = this[field] instanceof Date ? this[field].getTime() / 1000
- : this[field]
- const s = ' ' +
- (field === 'dev' || field === 'ino' || field === 'nlink'
- ? 'SCHILY.' : '') +
- field + '=' + v + '\n'
- const byteLen = Buffer.byteLength(s)
- // the digits includes the length of the digits in ascii base-10
- // so if it's 9 characters, then adding 1 for the 9 makes it 10
- // which makes it 11 chars.
- let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1
- if (byteLen + digits >= Math.pow(10, digits))
- digits += 1
- const len = digits + byteLen
- return len + s
- }
-}
-
-Pax.parse = (string, ex, g) => new Pax(merge(parseKV(string), ex), g)
-
-const merge = (a, b) =>
- b ? Object.keys(a).reduce((s, k) => (s[k] = a[k], s), b) : a
-
-const parseKV = string =>
- string
- .replace(/\n$/, '')
- .split('\n')
- .reduce(parseKVLine, Object.create(null))
-
-const parseKVLine = (set, line) => {
- const n = parseInt(line, 10)
-
- // XXX Values with \n in them will fail this.
- // Refactor to not be a naive line-by-line parse.
- if (n !== Buffer.byteLength(line) + 1)
- return set
-
- line = line.substr((n + ' ').length)
- const kv = line.split('=')
- const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, '$1')
- if (!k)
- return set
-
- const v = kv.join('=')
- set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k)
- ? new Date(v * 1000)
- : /^[0-9]+$/.test(v) ? +v
- : v
- return set
-}
-
-module.exports = Pax
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/read-entry.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/read-entry.js
deleted file mode 100644
index 8acee94ba..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/read-entry.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict'
-const types = require('./types.js')
-const MiniPass = require('minipass')
-
-const SLURP = Symbol('slurp')
-module.exports = class ReadEntry extends MiniPass {
- constructor (header, ex, gex) {
- super()
- // read entries always start life paused. this is to avoid the
- // situation where Minipass's auto-ending empty streams results
- // in an entry ending before we're ready for it.
- this.pause()
- this.extended = ex
- this.globalExtended = gex
- this.header = header
- this.startBlockSize = 512 * Math.ceil(header.size / 512)
- this.blockRemain = this.startBlockSize
- this.remain = header.size
- this.type = header.type
- this.meta = false
- this.ignore = false
- switch (this.type) {
- case 'File':
- case 'OldFile':
- case 'Link':
- case 'SymbolicLink':
- case 'CharacterDevice':
- case 'BlockDevice':
- case 'Directory':
- case 'FIFO':
- case 'ContiguousFile':
- case 'GNUDumpDir':
- break
-
- case 'NextFileHasLongLinkpath':
- case 'NextFileHasLongPath':
- case 'OldGnuLongPath':
- case 'GlobalExtendedHeader':
- case 'ExtendedHeader':
- case 'OldExtendedHeader':
- this.meta = true
- break
-
- // NOTE: gnutar and bsdtar treat unrecognized types as 'File'
- // it may be worth doing the same, but with a warning.
- default:
- this.ignore = true
- }
-
- this.path = header.path
- this.mode = header.mode
- if (this.mode)
- this.mode = this.mode & 0o7777
- this.uid = header.uid
- this.gid = header.gid
- this.uname = header.uname
- this.gname = header.gname
- this.size = header.size
- this.mtime = header.mtime
- this.atime = header.atime
- this.ctime = header.ctime
- this.linkpath = header.linkpath
- this.uname = header.uname
- this.gname = header.gname
-
- if (ex) this[SLURP](ex)
- if (gex) this[SLURP](gex, true)
- }
-
- write (data) {
- const writeLen = data.length
- if (writeLen > this.blockRemain)
- throw new Error('writing more to entry than is appropriate')
-
- const r = this.remain
- const br = this.blockRemain
- this.remain = Math.max(0, r - writeLen)
- this.blockRemain = Math.max(0, br - writeLen)
- if (this.ignore)
- return true
-
- if (r >= writeLen)
- return super.write(data)
-
- // r < writeLen
- return super.write(data.slice(0, r))
- }
-
- [SLURP] (ex, global) {
- for (let k in ex) {
- // we slurp in everything except for the path attribute in
- // a global extended header, because that's weird.
- if (ex[k] !== null && ex[k] !== undefined &&
- !(global && k === 'path'))
- this[k] = ex[k]
- }
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/replace.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/replace.js
deleted file mode 100644
index 571cee94a..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/replace.js
+++ /dev/null
@@ -1,220 +0,0 @@
-'use strict'
-const Buffer = require('./buffer.js')
-
-// tar -r
-const hlo = require('./high-level-opt.js')
-const Pack = require('./pack.js')
-const Parse = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const t = require('./list.js')
-const path = require('path')
-
-// starting at the head of the file, read a Header
-// If the checksum is invalid, that's our position to start writing
-// If it is, jump forward by the specified size (round up to 512)
-// and try again.
-// Write the new Pack stream starting there.
-
-const Header = require('./header.js')
-
-const r = module.exports = (opt_, files, cb) => {
- const opt = hlo(opt_)
-
- if (!opt.file)
- throw new TypeError('file is required')
-
- if (opt.gzip)
- throw new TypeError('cannot append to compressed archives')
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- return opt.sync ? replaceSync(opt, files)
- : replace(opt, files, cb)
-}
-
-const replaceSync = (opt, files) => {
- const p = new Pack.Sync(opt)
-
- let threw = true
- let fd
- let position
-
- try {
- try {
- fd = fs.openSync(opt.file, 'r+')
- } catch (er) {
- if (er.code === 'ENOENT')
- fd = fs.openSync(opt.file, 'w+')
- else
- throw er
- }
-
- const st = fs.fstatSync(fd)
- const headBuf = Buffer.alloc(512)
-
- POSITION: for (position = 0; position < st.size; position += 512) {
- for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
- bytes = fs.readSync(
- fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos
- )
-
- if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b)
- throw new Error('cannot append to compressed archives')
-
- if (!bytes)
- break POSITION
- }
-
- let h = new Header(headBuf)
- if (!h.cksumValid)
- break
- let entryBlockSize = 512 * Math.ceil(h.size / 512)
- if (position + entryBlockSize + 512 > st.size)
- break
- // the 512 for the header we just parsed will be added as well
- // also jump ahead all the blocks for the body
- position += entryBlockSize
- if (opt.mtimeCache)
- opt.mtimeCache.set(h.path, h.mtime)
- }
- threw = false
-
- streamSync(opt, p, position, fd, files)
- } finally {
- if (threw)
- try { fs.closeSync(fd) } catch (er) {}
- }
-}
-
-const streamSync = (opt, p, position, fd, files) => {
- const stream = new fsm.WriteStreamSync(opt.file, {
- fd: fd,
- start: position
- })
- p.pipe(stream)
- addFilesSync(p, files)
-}
-
-const replace = (opt, files, cb) => {
- files = Array.from(files)
- const p = new Pack(opt)
-
- const getPos = (fd, size, cb_) => {
- const cb = (er, pos) => {
- if (er)
- fs.close(fd, _ => cb_(er))
- else
- cb_(null, pos)
- }
-
- let position = 0
- if (size === 0)
- return cb(null, 0)
-
- let bufPos = 0
- const headBuf = Buffer.alloc(512)
- const onread = (er, bytes) => {
- if (er)
- return cb(er)
- bufPos += bytes
- if (bufPos < 512 && bytes)
- return fs.read(
- fd, headBuf, bufPos, headBuf.length - bufPos,
- position + bufPos, onread
- )
-
- if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b)
- return cb(new Error('cannot append to compressed archives'))
-
- // truncated header
- if (bufPos < 512)
- return cb(null, position)
-
- const h = new Header(headBuf)
- if (!h.cksumValid)
- return cb(null, position)
-
- const entryBlockSize = 512 * Math.ceil(h.size / 512)
- if (position + entryBlockSize + 512 > size)
- return cb(null, position)
-
- position += entryBlockSize + 512
- if (position >= size)
- return cb(null, position)
-
- if (opt.mtimeCache)
- opt.mtimeCache.set(h.path, h.mtime)
- bufPos = 0
- fs.read(fd, headBuf, 0, 512, position, onread)
- }
- fs.read(fd, headBuf, 0, 512, position, onread)
- }
-
- const promise = new Promise((resolve, reject) => {
- p.on('error', reject)
- let flag = 'r+'
- const onopen = (er, fd) => {
- if (er && er.code === 'ENOENT' && flag === 'r+') {
- flag = 'w+'
- return fs.open(opt.file, flag, onopen)
- }
-
- if (er)
- return reject(er)
-
- fs.fstat(fd, (er, st) => {
- if (er)
- return reject(er)
- getPos(fd, st.size, (er, position) => {
- if (er)
- return reject(er)
- const stream = new fsm.WriteStream(opt.file, {
- fd: fd,
- start: position
- })
- p.pipe(stream)
- stream.on('error', reject)
- stream.on('close', resolve)
- addFilesAsync(p, files)
- })
- })
- }
- fs.open(opt.file, flag, onopen)
- })
-
- return cb ? promise.then(cb, cb) : promise
-}
-
-const addFilesSync = (p, files) => {
- files.forEach(file => {
- if (file.charAt(0) === '@')
- t({
- file: path.resolve(p.cwd, file.substr(1)),
- sync: true,
- noResume: true,
- onentry: entry => p.add(entry)
- })
- else
- p.add(file)
- })
- p.end()
-}
-
-const addFilesAsync = (p, files) => {
- while (files.length) {
- const file = files.shift()
- if (file.charAt(0) === '@')
- return t({
- file: path.resolve(p.cwd, file.substr(1)),
- noResume: true,
- onentry: entry => p.add(entry)
- }).then(_ => addFilesAsync(p, files))
- else
- p.add(file)
- }
- p.end()
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/types.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/types.js
deleted file mode 100644
index df425652b..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/types.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-// map types from key to human-friendly name
-exports.name = new Map([
- ['0', 'File'],
- // same as File
- ['', 'OldFile'],
- ['1', 'Link'],
- ['2', 'SymbolicLink'],
- // Devices and FIFOs aren't fully supported
- // they are parsed, but skipped when unpacking
- ['3', 'CharacterDevice'],
- ['4', 'BlockDevice'],
- ['5', 'Directory'],
- ['6', 'FIFO'],
- // same as File
- ['7', 'ContiguousFile'],
- // pax headers
- ['g', 'GlobalExtendedHeader'],
- ['x', 'ExtendedHeader'],
- // vendor-specific stuff
- // skip
- ['A', 'SolarisACL'],
- // like 5, but with data, which should be skipped
- ['D', 'GNUDumpDir'],
- // metadata only, skip
- ['I', 'Inode'],
- // data = link path of next file
- ['K', 'NextFileHasLongLinkpath'],
- // data = path of next file
- ['L', 'NextFileHasLongPath'],
- // skip
- ['M', 'ContinuationFile'],
- // like L
- ['N', 'OldGnuLongPath'],
- // skip
- ['S', 'SparseFile'],
- // skip
- ['V', 'TapeVolumeHeader'],
- // like x
- ['X', 'OldExtendedHeader']
-])
-
-// map the other direction
-exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]]))
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/unpack.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/unpack.js
deleted file mode 100644
index fc765096e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/unpack.js
+++ /dev/null
@@ -1,621 +0,0 @@
-'use strict'
-
-const assert = require('assert')
-const EE = require('events').EventEmitter
-const Parser = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-const mkdir = require('./mkdir.js')
-const mkdirSync = mkdir.sync
-const wc = require('./winchars.js')
-
-const ONENTRY = Symbol('onEntry')
-const CHECKFS = Symbol('checkFs')
-const ISREUSABLE = Symbol('isReusable')
-const MAKEFS = Symbol('makeFs')
-const FILE = Symbol('file')
-const DIRECTORY = Symbol('directory')
-const LINK = Symbol('link')
-const SYMLINK = Symbol('symlink')
-const HARDLINK = Symbol('hardlink')
-const UNSUPPORTED = Symbol('unsupported')
-const UNKNOWN = Symbol('unknown')
-const CHECKPATH = Symbol('checkPath')
-const MKDIR = Symbol('mkdir')
-const ONERROR = Symbol('onError')
-const PENDING = Symbol('pending')
-const PEND = Symbol('pend')
-const UNPEND = Symbol('unpend')
-const ENDED = Symbol('ended')
-const MAYBECLOSE = Symbol('maybeClose')
-const SKIP = Symbol('skip')
-const DOCHOWN = Symbol('doChown')
-const UID = Symbol('uid')
-const GID = Symbol('gid')
-const crypto = require('crypto')
-
-// Unlinks on Windows are not atomic.
-//
-// This means that if you have a file entry, followed by another
-// file entry with an identical name, and you cannot re-use the file
-// (because it's a hardlink, or because unlink:true is set, or it's
-// Windows, which does not have useful nlink values), then the unlink
-// will be committed to the disk AFTER the new file has been written
-// over the old one, deleting the new file.
-//
-// To work around this, on Windows systems, we rename the file and then
-// delete the renamed file. It's a sloppy kludge, but frankly, I do not
-// know of a better way to do this, given windows' non-atomic unlink
-// semantics.
-//
-// See: https://github.com/npm/node-tar/issues/183
-/* istanbul ignore next */
-const unlinkFile = (path, cb) => {
- if (process.platform !== 'win32')
- return fs.unlink(path, cb)
-
- const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
- fs.rename(path, name, er => {
- if (er)
- return cb(er)
- fs.unlink(name, cb)
- })
-}
-
-/* istanbul ignore next */
-const unlinkFileSync = path => {
- if (process.platform !== 'win32')
- return fs.unlinkSync(path)
-
- const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
- fs.renameSync(path, name)
- fs.unlinkSync(name)
-}
-
-// this.gid, entry.gid, this.processUid
-const uint32 = (a, b, c) =>
- a === a >>> 0 ? a
- : b === b >>> 0 ? b
- : c
-
-class Unpack extends Parser {
- constructor (opt) {
- if (!opt)
- opt = {}
-
- opt.ondone = _ => {
- this[ENDED] = true
- this[MAYBECLOSE]()
- }
-
- super(opt)
-
- this.transform = typeof opt.transform === 'function' ? opt.transform : null
-
- this.writable = true
- this.readable = false
-
- this[PENDING] = 0
- this[ENDED] = false
-
- this.dirCache = opt.dirCache || new Map()
-
- if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {
- // need both or neither
- if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number')
- throw new TypeError('cannot set owner without number uid and gid')
- if (opt.preserveOwner)
- throw new TypeError(
- 'cannot preserve owner in archive and also set owner explicitly')
- this.uid = opt.uid
- this.gid = opt.gid
- this.setOwner = true
- } else {
- this.uid = null
- this.gid = null
- this.setOwner = false
- }
-
- // default true for root
- if (opt.preserveOwner === undefined && typeof opt.uid !== 'number')
- this.preserveOwner = process.getuid && process.getuid() === 0
- else
- this.preserveOwner = !!opt.preserveOwner
-
- this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ?
- process.getuid() : null
- this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ?
- process.getgid() : null
-
- // mostly just for testing, but useful in some cases.
- // Forcibly trigger a chown on every entry, no matter what
- this.forceChown = opt.forceChown === true
-
- // turn ><?| in filenames into 0xf000-higher encoded forms
- this.win32 = !!opt.win32 || process.platform === 'win32'
-
- // do not unpack over files that are newer than what's in the archive
- this.newer = !!opt.newer
-
- // do not unpack over ANY files
- this.keep = !!opt.keep
-
- // do not set mtime/atime of extracted entries
- this.noMtime = !!opt.noMtime
-
- // allow .., absolute path entries, and unpacking through symlinks
- // without this, warn and skip .., relativize absolutes, and error
- // on symlinks in extraction path
- this.preservePaths = !!opt.preservePaths
-
- // unlink files and links before writing. This breaks existing hard
- // links, and removes symlink directories rather than erroring
- this.unlink = !!opt.unlink
-
- this.cwd = path.resolve(opt.cwd || process.cwd())
- this.strip = +opt.strip || 0
- this.processUmask = process.umask()
- this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask
- // default mode for dirs created as parents
- this.dmode = opt.dmode || (0o0777 & (~this.umask))
- this.fmode = opt.fmode || (0o0666 & (~this.umask))
- this.on('entry', entry => this[ONENTRY](entry))
- }
-
- [MAYBECLOSE] () {
- if (this[ENDED] && this[PENDING] === 0) {
- this.emit('prefinish')
- this.emit('finish')
- this.emit('end')
- this.emit('close')
- }
- }
-
- [CHECKPATH] (entry) {
- if (this.strip) {
- const parts = entry.path.split(/\/|\\/)
- if (parts.length < this.strip)
- return false
- entry.path = parts.slice(this.strip).join('/')
-
- if (entry.type === 'Link') {
- const linkparts = entry.linkpath.split(/\/|\\/)
- if (linkparts.length >= this.strip)
- entry.linkpath = linkparts.slice(this.strip).join('/')
- }
- }
-
- if (!this.preservePaths) {
- const p = entry.path
- if (p.match(/(^|\/|\\)\.\.(\\|\/|$)/)) {
- this.warn('path contains \'..\'', p)
- return false
- }
-
- // absolutes on posix are also absolutes on win32
- // so we only need to test this one to get both
- if (path.win32.isAbsolute(p)) {
- const parsed = path.win32.parse(p)
- this.warn('stripping ' + parsed.root + ' from absolute path', p)
- entry.path = p.substr(parsed.root.length)
- }
- }
-
- // only encode : chars that aren't drive letter indicators
- if (this.win32) {
- const parsed = path.win32.parse(entry.path)
- entry.path = parsed.root === '' ? wc.encode(entry.path)
- : parsed.root + wc.encode(entry.path.substr(parsed.root.length))
- }
-
- if (path.isAbsolute(entry.path))
- entry.absolute = entry.path
- else
- entry.absolute = path.resolve(this.cwd, entry.path)
-
- return true
- }
-
- [ONENTRY] (entry) {
- if (!this[CHECKPATH](entry))
- return entry.resume()
-
- assert.equal(typeof entry.absolute, 'string')
-
- switch (entry.type) {
- case 'Directory':
- case 'GNUDumpDir':
- if (entry.mode)
- entry.mode = entry.mode | 0o700
-
- case 'File':
- case 'OldFile':
- case 'ContiguousFile':
- case 'Link':
- case 'SymbolicLink':
- return this[CHECKFS](entry)
-
- case 'CharacterDevice':
- case 'BlockDevice':
- case 'FIFO':
- return this[UNSUPPORTED](entry)
- }
- }
-
- [ONERROR] (er, entry) {
- // Cwd has to exist, or else nothing works. That's serious.
- // Other errors are warnings, which raise the error in strict
- // mode, but otherwise continue on.
- if (er.name === 'CwdError')
- this.emit('error', er)
- else {
- this.warn(er.message, er)
- this[UNPEND]()
- entry.resume()
- }
- }
-
- [MKDIR] (dir, mode, cb) {
- mkdir(dir, {
- uid: this.uid,
- gid: this.gid,
- processUid: this.processUid,
- processGid: this.processGid,
- umask: this.processUmask,
- preserve: this.preservePaths,
- unlink: this.unlink,
- cache: this.dirCache,
- cwd: this.cwd,
- mode: mode
- }, cb)
- }
-
- [DOCHOWN] (entry) {
- // in preserve owner mode, chown if the entry doesn't match process
- // in set owner mode, chown if setting doesn't match process
- return this.forceChown ||
- this.preserveOwner &&
- ( typeof entry.uid === 'number' && entry.uid !== this.processUid ||
- typeof entry.gid === 'number' && entry.gid !== this.processGid )
- ||
- ( typeof this.uid === 'number' && this.uid !== this.processUid ||
- typeof this.gid === 'number' && this.gid !== this.processGid )
- }
-
- [UID] (entry) {
- return uint32(this.uid, entry.uid, this.processUid)
- }
-
- [GID] (entry) {
- return uint32(this.gid, entry.gid, this.processGid)
- }
-
- [FILE] (entry) {
- const mode = entry.mode & 0o7777 || this.fmode
- const stream = new fsm.WriteStream(entry.absolute, {
- mode: mode,
- autoClose: false
- })
- stream.on('error', er => this[ONERROR](er, entry))
-
- let actions = 1
- const done = er => {
- if (er)
- return this[ONERROR](er, entry)
-
- if (--actions === 0)
- fs.close(stream.fd, _ => this[UNPEND]())
- }
-
- stream.on('finish', _ => {
- // if futimes fails, try utimes
- // if utimes fails, fail with the original error
- // same for fchown/chown
- const abs = entry.absolute
- const fd = stream.fd
-
- if (entry.mtime && !this.noMtime) {
- actions++
- const atime = entry.atime || new Date()
- const mtime = entry.mtime
- fs.futimes(fd, atime, mtime, er =>
- er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er))
- : done())
- }
-
- if (this[DOCHOWN](entry)) {
- actions++
- const uid = this[UID](entry)
- const gid = this[GID](entry)
- fs.fchown(fd, uid, gid, er =>
- er ? fs.chown(abs, uid, gid, er2 => done(er2 && er))
- : done())
- }
-
- done()
- })
-
- const tx = this.transform ? this.transform(entry) || entry : entry
- if (tx !== entry) {
- tx.on('error', er => this[ONERROR](er, entry))
- entry.pipe(tx)
- }
- tx.pipe(stream)
- }
-
- [DIRECTORY] (entry) {
- const mode = entry.mode & 0o7777 || this.dmode
- this[MKDIR](entry.absolute, mode, er => {
- if (er)
- return this[ONERROR](er, entry)
-
- let actions = 1
- const done = _ => {
- if (--actions === 0) {
- this[UNPEND]()
- entry.resume()
- }
- }
-
- if (entry.mtime && !this.noMtime) {
- actions++
- fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done)
- }
-
- if (this[DOCHOWN](entry)) {
- actions++
- fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done)
- }
-
- done()
- })
- }
-
- [UNSUPPORTED] (entry) {
- this.warn('unsupported entry type: ' + entry.type, entry)
- entry.resume()
- }
-
- [SYMLINK] (entry) {
- this[LINK](entry, entry.linkpath, 'symlink')
- }
-
- [HARDLINK] (entry) {
- this[LINK](entry, path.resolve(this.cwd, entry.linkpath), 'link')
- }
-
- [PEND] () {
- this[PENDING]++
- }
-
- [UNPEND] () {
- this[PENDING]--
- this[MAYBECLOSE]()
- }
-
- [SKIP] (entry) {
- this[UNPEND]()
- entry.resume()
- }
-
- // Check if we can reuse an existing filesystem entry safely and
- // overwrite it, rather than unlinking and recreating
- // Windows doesn't report a useful nlink, so we just never reuse entries
- [ISREUSABLE] (entry, st) {
- return entry.type === 'File' &&
- !this.unlink &&
- st.isFile() &&
- st.nlink <= 1 &&
- process.platform !== 'win32'
- }
-
- // check if a thing is there, and if so, try to clobber it
- [CHECKFS] (entry) {
- this[PEND]()
- this[MKDIR](path.dirname(entry.absolute), this.dmode, er => {
- if (er)
- return this[ONERROR](er, entry)
- fs.lstat(entry.absolute, (er, st) => {
- if (st && (this.keep || this.newer && st.mtime > entry.mtime))
- this[SKIP](entry)
- else if (er || this[ISREUSABLE](entry, st))
- this[MAKEFS](null, entry)
- else if (st.isDirectory()) {
- if (entry.type === 'Directory') {
- if (!entry.mode || (st.mode & 0o7777) === entry.mode)
- this[MAKEFS](null, entry)
- else
- fs.chmod(entry.absolute, entry.mode, er => this[MAKEFS](er, entry))
- } else
- fs.rmdir(entry.absolute, er => this[MAKEFS](er, entry))
- } else
- unlinkFile(entry.absolute, er => this[MAKEFS](er, entry))
- })
- })
- }
-
- [MAKEFS] (er, entry) {
- if (er)
- return this[ONERROR](er, entry)
-
- switch (entry.type) {
- case 'File':
- case 'OldFile':
- case 'ContiguousFile':
- return this[FILE](entry)
-
- case 'Link':
- return this[HARDLINK](entry)
-
- case 'SymbolicLink':
- return this[SYMLINK](entry)
-
- case 'Directory':
- case 'GNUDumpDir':
- return this[DIRECTORY](entry)
- }
- }
-
- [LINK] (entry, linkpath, link) {
- // XXX: get the type ('file' or 'dir') for windows
- fs[link](linkpath, entry.absolute, er => {
- if (er)
- return this[ONERROR](er, entry)
- this[UNPEND]()
- entry.resume()
- })
- }
-}
-
-class UnpackSync extends Unpack {
- constructor (opt) {
- super(opt)
- }
-
- [CHECKFS] (entry) {
- const er = this[MKDIR](path.dirname(entry.absolute), this.dmode)
- if (er)
- return this[ONERROR](er, entry)
- try {
- const st = fs.lstatSync(entry.absolute)
- if (this.keep || this.newer && st.mtime > entry.mtime)
- return this[SKIP](entry)
- else if (this[ISREUSABLE](entry, st))
- return this[MAKEFS](null, entry)
- else {
- try {
- if (st.isDirectory()) {
- if (entry.type === 'Directory') {
- if (entry.mode && (st.mode & 0o7777) !== entry.mode)
- fs.chmodSync(entry.absolute, entry.mode)
- } else
- fs.rmdirSync(entry.absolute)
- } else
- unlinkFileSync(entry.absolute)
- return this[MAKEFS](null, entry)
- } catch (er) {
- return this[ONERROR](er, entry)
- }
- }
- } catch (er) {
- return this[MAKEFS](null, entry)
- }
- }
-
- [FILE] (entry) {
- const mode = entry.mode & 0o7777 || this.fmode
-
- const oner = er => {
- try { fs.closeSync(fd) } catch (_) {}
- if (er)
- this[ONERROR](er, entry)
- }
-
- let stream
- let fd
- try {
- fd = fs.openSync(entry.absolute, 'w', mode)
- } catch (er) {
- return oner(er)
- }
- const tx = this.transform ? this.transform(entry) || entry : entry
- if (tx !== entry) {
- tx.on('error', er => this[ONERROR](er, entry))
- entry.pipe(tx)
- }
-
- tx.on('data', chunk => {
- try {
- fs.writeSync(fd, chunk, 0, chunk.length)
- } catch (er) {
- oner(er)
- }
- })
-
- tx.on('end', _ => {
- let er = null
- // try both, falling futimes back to utimes
- // if either fails, handle the first error
- if (entry.mtime && !this.noMtime) {
- const atime = entry.atime || new Date()
- const mtime = entry.mtime
- try {
- fs.futimesSync(fd, atime, mtime)
- } catch (futimeser) {
- try {
- fs.utimesSync(entry.absolute, atime, mtime)
- } catch (utimeser) {
- er = futimeser
- }
- }
- }
-
- if (this[DOCHOWN](entry)) {
- const uid = this[UID](entry)
- const gid = this[GID](entry)
-
- try {
- fs.fchownSync(fd, uid, gid)
- } catch (fchowner) {
- try {
- fs.chownSync(entry.absolute, uid, gid)
- } catch (chowner) {
- er = er || fchowner
- }
- }
- }
-
- oner(er)
- })
- }
-
- [DIRECTORY] (entry) {
- const mode = entry.mode & 0o7777 || this.dmode
- const er = this[MKDIR](entry.absolute, mode)
- if (er)
- return this[ONERROR](er, entry)
- if (entry.mtime && !this.noMtime) {
- try {
- fs.utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime)
- } catch (er) {}
- }
- if (this[DOCHOWN](entry)) {
- try {
- fs.chownSync(entry.absolute, this[UID](entry), this[GID](entry))
- } catch (er) {}
- }
- entry.resume()
- }
-
- [MKDIR] (dir, mode) {
- try {
- return mkdir.sync(dir, {
- uid: this.uid,
- gid: this.gid,
- processUid: this.processUid,
- processGid: this.processGid,
- umask: this.processUmask,
- preserve: this.preservePaths,
- unlink: this.unlink,
- cache: this.dirCache,
- cwd: this.cwd,
- mode: mode
- })
- } catch (er) {
- return er
- }
- }
-
- [LINK] (entry, linkpath, link) {
- try {
- fs[link + 'Sync'](linkpath, entry.absolute)
- entry.resume()
- } catch (er) {
- return this[ONERROR](er, entry)
- }
- }
-}
-
-Unpack.Sync = UnpackSync
-module.exports = Unpack
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/update.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/update.js
deleted file mode 100644
index 16c3e93ed..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/update.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict'
-
-// tar -u
-
-const hlo = require('./high-level-opt.js')
-const r = require('./replace.js')
-// just call tar.r with the filter and mtimeCache
-
-const u = module.exports = (opt_, files, cb) => {
- const opt = hlo(opt_)
-
- if (!opt.file)
- throw new TypeError('file is required')
-
- if (opt.gzip)
- throw new TypeError('cannot append to compressed archives')
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- mtimeFilter(opt)
- return r(opt, files, cb)
-}
-
-const mtimeFilter = opt => {
- const filter = opt.filter
-
- if (!opt.mtimeCache)
- opt.mtimeCache = new Map()
-
- opt.filter = filter ? (path, stat) =>
- filter(path, stat) && !(opt.mtimeCache.get(path) > stat.mtime)
- : (path, stat) => !(opt.mtimeCache.get(path) > stat.mtime)
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/warn-mixin.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/warn-mixin.js
deleted file mode 100644
index 94a4b9b99..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/warn-mixin.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-module.exports = Base => class extends Base {
- warn (msg, data) {
- if (!this.strict)
- this.emit('warn', msg, data)
- else if (data instanceof Error)
- this.emit('error', data)
- else {
- const er = new Error(msg)
- er.data = data
- this.emit('error', er)
- }
- }
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/winchars.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/winchars.js
deleted file mode 100644
index cf6ea0606..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/winchars.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-
-// When writing files on Windows, translate the characters to their
-// 0xf000 higher-encoded versions.
-
-const raw = [
- '|',
- '<',
- '>',
- '?',
- ':'
-]
-
-const win = raw.map(char =>
- String.fromCharCode(0xf000 + char.charCodeAt(0)))
-
-const toWin = new Map(raw.map((char, i) => [char, win[i]]))
-const toRaw = new Map(win.map((char, i) => [char, raw[i]]))
-
-module.exports = {
- encode: s => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s),
- decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/lib/write-entry.js b/node_modules/@npmcli/run-script/node_modules/tar/lib/write-entry.js
deleted file mode 100644
index 0c019006f..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/lib/write-entry.js
+++ /dev/null
@@ -1,422 +0,0 @@
-'use strict'
-const Buffer = require('./buffer.js')
-const MiniPass = require('minipass')
-const Pax = require('./pax.js')
-const Header = require('./header.js')
-const ReadEntry = require('./read-entry.js')
-const fs = require('fs')
-const path = require('path')
-
-const types = require('./types.js')
-const maxReadSize = 16 * 1024 * 1024
-const PROCESS = Symbol('process')
-const FILE = Symbol('file')
-const DIRECTORY = Symbol('directory')
-const SYMLINK = Symbol('symlink')
-const HARDLINK = Symbol('hardlink')
-const HEADER = Symbol('header')
-const READ = Symbol('read')
-const LSTAT = Symbol('lstat')
-const ONLSTAT = Symbol('onlstat')
-const ONREAD = Symbol('onread')
-const ONREADLINK = Symbol('onreadlink')
-const OPENFILE = Symbol('openfile')
-const ONOPENFILE = Symbol('onopenfile')
-const CLOSE = Symbol('close')
-const MODE = Symbol('mode')
-const warner = require('./warn-mixin.js')
-const winchars = require('./winchars.js')
-
-const modeFix = require('./mode-fix.js')
-
-const WriteEntry = warner(class WriteEntry extends MiniPass {
- constructor (p, opt) {
- opt = opt || {}
- super(opt)
- if (typeof p !== 'string')
- throw new TypeError('path is required')
- this.path = p
- // suppress atime, ctime, uid, gid, uname, gname
- this.portable = !!opt.portable
- // until node has builtin pwnam functions, this'll have to do
- this.myuid = process.getuid && process.getuid()
- this.myuser = process.env.USER || ''
- this.maxReadSize = opt.maxReadSize || maxReadSize
- this.linkCache = opt.linkCache || new Map()
- this.statCache = opt.statCache || new Map()
- this.preservePaths = !!opt.preservePaths
- this.cwd = opt.cwd || process.cwd()
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.noMtime = !!opt.noMtime
- this.mtime = opt.mtime || null
-
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- if (!this.preservePaths && path.win32.isAbsolute(p)) {
- // absolutes on posix are also absolutes on win32
- // so we only need to test this one to get both
- const parsed = path.win32.parse(p)
- this.warn('stripping ' + parsed.root + ' from absolute path', p)
- this.path = p.substr(parsed.root.length)
- }
-
- this.win32 = !!opt.win32 || process.platform === 'win32'
- if (this.win32) {
- this.path = winchars.decode(this.path.replace(/\\/g, '/'))
- p = p.replace(/\\/g, '/')
- }
-
- this.absolute = opt.absolute || path.resolve(this.cwd, p)
-
- if (this.path === '')
- this.path = './'
-
- if (this.statCache.has(this.absolute))
- this[ONLSTAT](this.statCache.get(this.absolute))
- else
- this[LSTAT]()
- }
-
- [LSTAT] () {
- fs.lstat(this.absolute, (er, stat) => {
- if (er)
- return this.emit('error', er)
- this[ONLSTAT](stat)
- })
- }
-
- [ONLSTAT] (stat) {
- this.statCache.set(this.absolute, stat)
- this.stat = stat
- if (!stat.isFile())
- stat.size = 0
- this.type = getType(stat)
- this.emit('stat', stat)
- this[PROCESS]()
- }
-
- [PROCESS] () {
- switch (this.type) {
- case 'File': return this[FILE]()
- case 'Directory': return this[DIRECTORY]()
- case 'SymbolicLink': return this[SYMLINK]()
- // unsupported types are ignored.
- default: return this.end()
- }
- }
-
- [MODE] (mode) {
- return modeFix(mode, this.type === 'Directory')
- }
-
- [HEADER] () {
- if (this.type === 'Directory' && this.portable)
- this.noMtime = true
-
- this.header = new Header({
- path: this.path,
- linkpath: this.linkpath,
- // only the permissions and setuid/setgid/sticky bitflags
- // not the higher-order bits that specify file type
- mode: this[MODE](this.stat.mode),
- uid: this.portable ? null : this.stat.uid,
- gid: this.portable ? null : this.stat.gid,
- size: this.stat.size,
- mtime: this.noMtime ? null : this.mtime || this.stat.mtime,
- type: this.type,
- uname: this.portable ? null :
- this.stat.uid === this.myuid ? this.myuser : '',
- atime: this.portable ? null : this.stat.atime,
- ctime: this.portable ? null : this.stat.ctime
- })
-
- if (this.header.encode() && !this.noPax)
- this.write(new Pax({
- atime: this.portable ? null : this.header.atime,
- ctime: this.portable ? null : this.header.ctime,
- gid: this.portable ? null : this.header.gid,
- mtime: this.noMtime ? null : this.mtime || this.header.mtime,
- path: this.path,
- linkpath: this.linkpath,
- size: this.header.size,
- uid: this.portable ? null : this.header.uid,
- uname: this.portable ? null : this.header.uname,
- dev: this.portable ? null : this.stat.dev,
- ino: this.portable ? null : this.stat.ino,
- nlink: this.portable ? null : this.stat.nlink
- }).encode())
- this.write(this.header.block)
- }
-
- [DIRECTORY] () {
- if (this.path.substr(-1) !== '/')
- this.path += '/'
- this.stat.size = 0
- this[HEADER]()
- this.end()
- }
-
- [SYMLINK] () {
- fs.readlink(this.absolute, (er, linkpath) => {
- if (er)
- return this.emit('error', er)
- this[ONREADLINK](linkpath)
- })
- }
-
- [ONREADLINK] (linkpath) {
- this.linkpath = linkpath
- this[HEADER]()
- this.end()
- }
-
- [HARDLINK] (linkpath) {
- this.type = 'Link'
- this.linkpath = path.relative(this.cwd, linkpath)
- this.stat.size = 0
- this[HEADER]()
- this.end()
- }
-
- [FILE] () {
- if (this.stat.nlink > 1) {
- const linkKey = this.stat.dev + ':' + this.stat.ino
- if (this.linkCache.has(linkKey)) {
- const linkpath = this.linkCache.get(linkKey)
- if (linkpath.indexOf(this.cwd) === 0)
- return this[HARDLINK](linkpath)
- }
- this.linkCache.set(linkKey, this.absolute)
- }
-
- this[HEADER]()
- if (this.stat.size === 0)
- return this.end()
-
- this[OPENFILE]()
- }
-
- [OPENFILE] () {
- fs.open(this.absolute, 'r', (er, fd) => {
- if (er)
- return this.emit('error', er)
- this[ONOPENFILE](fd)
- })
- }
-
- [ONOPENFILE] (fd) {
- const blockLen = 512 * Math.ceil(this.stat.size / 512)
- const bufLen = Math.min(blockLen, this.maxReadSize)
- const buf = Buffer.allocUnsafe(bufLen)
- this[READ](fd, buf, 0, buf.length, 0, this.stat.size, blockLen)
- }
-
- [READ] (fd, buf, offset, length, pos, remain, blockRemain) {
- fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {
- if (er)
- return this[CLOSE](fd, _ => this.emit('error', er))
- this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead)
- })
- }
-
- [CLOSE] (fd, cb) {
- fs.close(fd, cb)
- }
-
- [ONREAD] (fd, buf, offset, length, pos, remain, blockRemain, bytesRead) {
- if (bytesRead <= 0 && remain > 0) {
- const er = new Error('encountered unexpected EOF')
- er.path = this.absolute
- er.syscall = 'read'
- er.code = 'EOF'
- this[CLOSE](fd, _ => _)
- return this.emit('error', er)
- }
-
- if (bytesRead > remain) {
- const er = new Error('did not encounter expected EOF')
- er.path = this.absolute
- er.syscall = 'read'
- er.code = 'EOF'
- this[CLOSE](fd, _ => _)
- return this.emit('error', er)
- }
-
- // null out the rest of the buffer, if we could fit the block padding
- if (bytesRead === remain) {
- for (let i = bytesRead; i < length && bytesRead < blockRemain; i++) {
- buf[i + offset] = 0
- bytesRead ++
- remain ++
- }
- }
-
- const writeBuf = offset === 0 && bytesRead === buf.length ?
- buf : buf.slice(offset, offset + bytesRead)
- remain -= bytesRead
- blockRemain -= bytesRead
- pos += bytesRead
- offset += bytesRead
-
- this.write(writeBuf)
-
- if (!remain) {
- if (blockRemain)
- this.write(Buffer.alloc(blockRemain))
- this.end()
- this[CLOSE](fd, _ => _)
- return
- }
-
- if (offset >= length) {
- buf = Buffer.allocUnsafe(length)
- offset = 0
- }
- length = buf.length - offset
- this[READ](fd, buf, offset, length, pos, remain, blockRemain)
- }
-})
-
-class WriteEntrySync extends WriteEntry {
- constructor (path, opt) {
- super(path, opt)
- }
-
- [LSTAT] () {
- this[ONLSTAT](fs.lstatSync(this.absolute))
- }
-
- [SYMLINK] () {
- this[ONREADLINK](fs.readlinkSync(this.absolute))
- }
-
- [OPENFILE] () {
- this[ONOPENFILE](fs.openSync(this.absolute, 'r'))
- }
-
- [READ] (fd, buf, offset, length, pos, remain, blockRemain) {
- let threw = true
- try {
- const bytesRead = fs.readSync(fd, buf, offset, length, pos)
- this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead)
- threw = false
- } finally {
- if (threw)
- try { this[CLOSE](fd) } catch (er) {}
- }
- }
-
- [CLOSE] (fd) {
- fs.closeSync(fd)
- }
-}
-
-const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
- constructor (readEntry, opt) {
- opt = opt || {}
- super(opt)
- this.preservePaths = !!opt.preservePaths
- this.portable = !!opt.portable
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.noMtime = !!opt.noMtime
-
- this.readEntry = readEntry
- this.type = readEntry.type
- if (this.type === 'Directory' && this.portable)
- this.noMtime = true
-
- this.path = readEntry.path
- this.mode = this[MODE](readEntry.mode)
- this.uid = this.portable ? null : readEntry.uid
- this.gid = this.portable ? null : readEntry.gid
- this.uname = this.portable ? null : readEntry.uname
- this.gname = this.portable ? null : readEntry.gname
- this.size = readEntry.size
- this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
- this.atime = this.portable ? null : readEntry.atime
- this.ctime = this.portable ? null : readEntry.ctime
- this.linkpath = readEntry.linkpath
-
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- if (path.isAbsolute(this.path) && !this.preservePaths) {
- const parsed = path.parse(this.path)
- this.warn(
- 'stripping ' + parsed.root + ' from absolute path',
- this.path
- )
- this.path = this.path.substr(parsed.root.length)
- }
-
- this.remain = readEntry.size
- this.blockRemain = readEntry.startBlockSize
-
- this.header = new Header({
- path: this.path,
- linkpath: this.linkpath,
- // only the permissions and setuid/setgid/sticky bitflags
- // not the higher-order bits that specify file type
- mode: this.mode,
- uid: this.portable ? null : this.uid,
- gid: this.portable ? null : this.gid,
- size: this.size,
- mtime: this.noMtime ? null : this.mtime,
- type: this.type,
- uname: this.portable ? null : this.uname,
- atime: this.portable ? null : this.atime,
- ctime: this.portable ? null : this.ctime
- })
-
- if (this.header.encode() && !this.noPax)
- super.write(new Pax({
- atime: this.portable ? null : this.atime,
- ctime: this.portable ? null : this.ctime,
- gid: this.portable ? null : this.gid,
- mtime: this.noMtime ? null : this.mtime,
- path: this.path,
- linkpath: this.linkpath,
- size: this.size,
- uid: this.portable ? null : this.uid,
- uname: this.portable ? null : this.uname,
- dev: this.portable ? null : this.readEntry.dev,
- ino: this.portable ? null : this.readEntry.ino,
- nlink: this.portable ? null : this.readEntry.nlink
- }).encode())
-
- super.write(this.header.block)
- readEntry.pipe(this)
- }
-
- [MODE] (mode) {
- return modeFix(mode, this.type === 'Directory')
- }
-
- write (data) {
- const writeLen = data.length
- if (writeLen > this.blockRemain)
- throw new Error('writing more to entry than is appropriate')
- this.blockRemain -= writeLen
- return super.write(data)
- }
-
- end () {
- if (this.blockRemain)
- this.write(Buffer.alloc(this.blockRemain))
- return super.end()
- }
-})
-
-WriteEntry.Sync = WriteEntrySync
-WriteEntry.Tar = WriteEntryTar
-
-const getType = stat =>
- stat.isFile() ? 'File'
- : stat.isDirectory() ? 'Directory'
- : stat.isSymbolicLink() ? 'SymbolicLink'
- : 'Unsupported'
-
-module.exports = WriteEntry
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/package.json b/node_modules/@npmcli/run-script/node_modules/tar/package.json
deleted file mode 100644
index 68e35f702..000000000
--- a/node_modules/@npmcli/run-script/node_modules/tar/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "_from": "tar@^4.4.12",
- "_id": "tar@4.4.13",
- "_inBundle": false,
- "_integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
- "_location": "/@npmcli/run-script/tar",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "tar@^4.4.12",
- "name": "tar",
- "escapedName": "tar",
- "rawSpec": "^4.4.12",
- "saveSpec": null,
- "fetchSpec": "^4.4.12"
- },
- "_requiredBy": [
- "/@npmcli/run-script/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
- "_shasum": "43b364bc52888d555298637b10d60790254ab525",
- "_spec": "tar@^4.4.12",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script/node_modules/node-gyp",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/node-tar/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "chownr": "^1.1.1",
- "fs-minipass": "^1.2.5",
- "minipass": "^2.8.6",
- "minizlib": "^1.2.1",
- "mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.3"
- },
- "deprecated": false,
- "description": "tar for node",
- "devDependencies": {
- "chmodr": "^1.2.0",
- "end-of-stream": "^1.4.1",
- "events-to-array": "^1.1.2",
- "mutate-fs": "^2.1.1",
- "rimraf": "^2.6.3",
- "tap": "^14.6.5",
- "tar-fs": "^1.16.3",
- "tar-stream": "^1.6.2"
- },
- "engines": {
- "node": ">=4.5"
- },
- "files": [
- "index.js",
- "lib/"
- ],
- "homepage": "https://github.com/npm/node-tar#readme",
- "license": "ISC",
- "name": "tar",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-tar.git"
- },
- "scripts": {
- "bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done",
- "genparse": "node scripts/generate-parse-fixtures.js",
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "coverage-map": "map.js",
- "check-coverage": true
- },
- "version": "4.4.13"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/which/CHANGELOG.md b/node_modules/@npmcli/run-script/node_modules/which/CHANGELOG.md
deleted file mode 100644
index 3d83d2694..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/CHANGELOG.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# Changes
-
-
-## 1.3.1
-
-* update deps
-* update travis
-
-## v1.3.0
-
-* Add nothrow option to which.sync
-* update tap
-
-## v1.2.14
-
-* appveyor: drop node 5 and 0.x
-* travis-ci: add node 6, drop 0.x
-
-## v1.2.13
-
-* test: Pass missing option to pass on windows
-* update tap
-* update isexe to 2.0.0
-* neveragain.tech pledge request
-
-## v1.2.12
-
-* Removed unused require
-
-## v1.2.11
-
-* Prevent changelog script from being included in package
-
-## v1.2.10
-
-* Use env.PATH only, not env.Path
-
-## v1.2.9
-
-* fix for paths starting with ../
-* Remove unused `is-absolute` module
-
-## v1.2.8
-
-* bullet items in changelog that contain (but don't start with) #
-
-## v1.2.7
-
-* strip 'update changelog' changelog entries out of changelog
-
-## v1.2.6
-
-* make the changelog bulleted
-
-## v1.2.5
-
-* make a changelog, and keep it up to date
-* don't include tests in package
-* Properly handle relative-path executables
-* appveyor
-* Attach error code to Not Found error
-* Make tests pass on Windows
-
-## v1.2.4
-
-* Fix typo
-
-## v1.2.3
-
-* update isexe, fix regression in pathExt handling
-
-## v1.2.2
-
-* update deps, use isexe module, test windows
-
-## v1.2.1
-
-* Sometimes windows PATH entries are quoted
-* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
-* doc cli
-
-## v1.2.0
-
-* Add support for opt.all and -as cli flags
-* test the bin
-* update travis
-* Allow checking for multiple programs in bin/which
-* tap 2
-
-## v1.1.2
-
-* travis
-* Refactored and fixed undefined error on Windows
-* Support strict mode
-
-## v1.1.1
-
-* test +g exes against secondary groups, if available
-* Use windows exe semantics on cygwin & msys
-* cwd should be first in path on win32, not last
-* Handle lower-case 'env.Path' on Windows
-* Update docs
-* use single-quotes
-
-## v1.1.0
-
-* Add tests, depend on is-absolute
-
-## v1.0.9
-
-* which.js: root is allowed to execute files owned by anyone
-
-## v1.0.8
-
-* don't use graceful-fs
-
-## v1.0.7
-
-* add license to package.json
-
-## v1.0.6
-
-* isc license
-
-## 1.0.5
-
-* Awful typo
-
-## 1.0.4
-
-* Test for path absoluteness properly
-* win: Allow '' as a pathext if cmd has a . in it
-
-## 1.0.3
-
-* Remove references to execPath
-* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
-* Make `isExe()` always return true on Windows.
-* MIT
-
-## 1.0.2
-
-* Only files can be exes
-
-## 1.0.1
-
-* Respect the PATHEXT env for win32 support
-* should 0755 the bin
-* binary
-* guts
-* package
-* 1st
diff --git a/node_modules/@npmcli/run-script/node_modules/which/LICENSE b/node_modules/@npmcli/run-script/node_modules/which/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@npmcli/run-script/node_modules/which/README.md b/node_modules/@npmcli/run-script/node_modules/which/README.md
deleted file mode 100644
index 8c0b0cbf7..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# which
-
-Like the unix `which` utility.
-
-Finds the first instance of a specified executable in the PATH
-environment variable. Does not cache the results, so `hash -r` is not
-needed when the PATH changes.
-
-## USAGE
-
-```javascript
-var which = require('which')
-
-// async usage
-which('node', function (er, resolvedPath) {
- // er is returned if no "node" is found on the PATH
- // if it is found, then the absolute path to the exec is returned
-})
-
-// sync usage
-// throws if not found
-var resolved = which.sync('node')
-
-// if nothrow option is used, returns null if not found
-resolved = which.sync('node', {nothrow: true})
-
-// Pass options to override the PATH and PATHEXT environment vars.
-which('node', { path: someOtherPath }, function (er, resolved) {
- if (er)
- throw er
- console.log('found at %j', resolved)
-})
-```
-
-## CLI USAGE
-
-Same as the BSD `which(1)` binary.
-
-```
-usage: which [-as] program ...
-```
-
-## OPTIONS
-
-You may pass an options object as the second argument.
-
-- `path`: Use instead of the `PATH` environment variable.
-- `pathExt`: Use instead of the `PATHEXT` environment variable.
-- `all`: Return all matches, instead of just the first one. Note that
- this means the function returns an array of strings instead of a
- single string.
diff --git a/node_modules/@npmcli/run-script/node_modules/which/bin/which b/node_modules/@npmcli/run-script/node_modules/which/bin/which
deleted file mode 100755
index 7cee3729e..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/bin/which
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env node
-var which = require("../")
-if (process.argv.length < 3)
- usage()
-
-function usage () {
- console.error('usage: which [-as] program ...')
- process.exit(1)
-}
-
-var all = false
-var silent = false
-var dashdash = false
-var args = process.argv.slice(2).filter(function (arg) {
- if (dashdash || !/^-/.test(arg))
- return true
-
- if (arg === '--') {
- dashdash = true
- return false
- }
-
- var flags = arg.substr(1).split('')
- for (var f = 0; f < flags.length; f++) {
- var flag = flags[f]
- switch (flag) {
- case 's':
- silent = true
- break
- case 'a':
- all = true
- break
- default:
- console.error('which: illegal option -- ' + flag)
- usage()
- }
- }
- return false
-})
-
-process.exit(args.reduce(function (pv, current) {
- try {
- var f = which.sync(current, { all: all })
- if (all)
- f = f.join('\n')
- if (!silent)
- console.log(f)
- return pv;
- } catch (e) {
- return 1;
- }
-}, 0))
diff --git a/node_modules/@npmcli/run-script/node_modules/which/package.json b/node_modules/@npmcli/run-script/node_modules/which/package.json
deleted file mode 100644
index 06aa3cb09..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "which@^1.3.1",
- "_id": "which@1.3.1",
- "_inBundle": false,
- "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "_location": "/@npmcli/run-script/which",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "which@^1.3.1",
- "name": "which",
- "escapedName": "which",
- "rawSpec": "^1.3.1",
- "saveSpec": null,
- "fetchSpec": "^1.3.1"
- },
- "_requiredBy": [
- "/@npmcli/run-script/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a",
- "_spec": "which@^1.3.1",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/@npmcli/run-script/node_modules/node-gyp",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "bin": {
- "which": "bin/which"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-which/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "deprecated": false,
- "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.6.2",
- "tap": "^12.0.1"
- },
- "files": [
- "which.js",
- "bin/which"
- ],
- "homepage": "https://github.com/isaacs/node-which#readme",
- "license": "ISC",
- "main": "which.js",
- "name": "which",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-which.git"
- },
- "scripts": {
- "changelog": "bash gen-changelog.sh",
- "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}",
- "test": "tap test/*.js --cov"
- },
- "version": "1.3.1"
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/which/which.js b/node_modules/@npmcli/run-script/node_modules/which/which.js
deleted file mode 100644
index 4347f91a1..000000000
--- a/node_modules/@npmcli/run-script/node_modules/which/which.js
+++ /dev/null
@@ -1,135 +0,0 @@
-module.exports = which
-which.sync = whichSync
-
-var isWindows = process.platform === 'win32' ||
- process.env.OSTYPE === 'cygwin' ||
- process.env.OSTYPE === 'msys'
-
-var path = require('path')
-var COLON = isWindows ? ';' : ':'
-var isexe = require('isexe')
-
-function getNotFoundError (cmd) {
- var er = new Error('not found: ' + cmd)
- er.code = 'ENOENT'
-
- return er
-}
-
-function getPathInfo (cmd, opt) {
- var colon = opt.colon || COLON
- var pathEnv = opt.path || process.env.PATH || ''
- var pathExt = ['']
-
- pathEnv = pathEnv.split(colon)
-
- var pathExtExe = ''
- if (isWindows) {
- pathEnv.unshift(process.cwd())
- pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
- pathExt = pathExtExe.split(colon)
-
-
- // Always test the cmd itself first. isexe will check to make sure
- // it's found in the pathExt set.
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
- pathExt.unshift('')
- }
-
- // If it has a slash, then we don't bother searching the pathenv.
- // just check the file itself, and that's it.
- if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
- pathEnv = ['']
-
- return {
- env: pathEnv,
- ext: pathExt,
- extExe: pathExtExe
- }
-}
-
-function which (cmd, opt, cb) {
- if (typeof opt === 'function') {
- cb = opt
- opt = {}
- }
-
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
-
- ;(function F (i, l) {
- if (i === l) {
- if (opt.all && found.length)
- return cb(null, found)
- else
- return cb(getNotFoundError(cmd))
- }
-
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
-
- var p = path.join(pathPart, cmd)
- if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- ;(function E (ii, ll) {
- if (ii === ll) return F(i + 1, l)
- var ext = pathExt[ii]
- isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
- if (!er && is) {
- if (opt.all)
- found.push(p + ext)
- else
- return cb(null, p + ext)
- }
- return E(ii + 1, ll)
- })
- })(0, pathExt.length)
- })(0, pathEnv.length)
-}
-
-function whichSync (cmd, opt) {
- opt = opt || {}
-
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
-
- for (var i = 0, l = pathEnv.length; i < l; i ++) {
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
-
- var p = path.join(pathPart, cmd)
- if (!pathPart && /^\.[\\\/]/.test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- for (var j = 0, ll = pathExt.length; j < ll; j ++) {
- var cur = p + pathExt[j]
- var is
- try {
- is = isexe.sync(cur, { pathExt: pathExtExe })
- if (is) {
- if (opt.all)
- found.push(cur)
- else
- return cur
- }
- } catch (ex) {}
- }
- }
-
- if (opt.all && found.length)
- return found
-
- if (opt.nothrow)
- return null
-
- throw getNotFoundError(cmd)
-}
diff --git a/node_modules/@npmcli/run-script/node_modules/yallist/LICENSE b/node_modules/@npmcli/run-script/node_modules/yallist/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/@npmcli/run-script/node_modules/yallist/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@npmcli/run-script/node_modules/yallist/package.json b/node_modules/@npmcli/run-script/node_modules/yallist/package.json
deleted file mode 100644
index 5460abb30..000000000
--- a/node_modules/@npmcli/run-script/node_modules/yallist/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "_from": "yallist@^3.0.3",
- "_id": "yallist@3.1.1",
- "_inBundle": false,
- "_integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "_location": "/@npmcli/run-script/yallist",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "yallist@^3.0.3",
- "name": "yallist",
- "escapedName": "yallist",
- "rawSpec": "^3.0.3",
- "saveSpec": null,
- "fetchSpec": "^3.0.3"
- },
- "_requiredBy": [
- "/@npmcli/run-script/minipass",
- "/@npmcli/run-script/tar"
- ],
- "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "_shasum": "dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd",
- "_spec": "yallist@^3.0.3",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/run-script/node_modules/tar",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/yallist/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Yet Another Linked List",
- "devDependencies": {
- "tap": "^12.1.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "yallist.js",
- "iterator.js"
- ],
- "homepage": "https://github.com/isaacs/yallist#readme",
- "license": "ISC",
- "main": "yallist.js",
- "name": "yallist",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/yallist.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --100"
- },
- "version": "3.1.1"
-}
diff --git a/node_modules/@npmcli/run-script/package.json b/node_modules/@npmcli/run-script/package.json
index 4589eb144..83f039062 100644
--- a/node_modules/@npmcli/run-script/package.json
+++ b/node_modules/@npmcli/run-script/package.json
@@ -4,19 +4,7 @@
"_inBundle": false,
"_integrity": "sha512-9Ea57XJjNLtBFRAaiKqqdoqRrL2QkM0vvCbMjPecljhog5IHupStPtZULbl0CoGN00N3lhLWJ4PaIEC0MGjqJw==",
"_location": "/@npmcli/run-script",
- "_phantomChildren": {
- "chownr": "1.1.3",
- "env-paths": "2.2.0",
- "glob": "7.1.4",
- "graceful-fs": "4.2.3",
- "isexe": "2.0.0",
- "mkdirp": "0.5.1",
- "nopt": "4.0.3",
- "npmlog": "4.1.2",
- "request": "2.88.0",
- "rimraf": "2.6.3",
- "safe-buffer": "5.1.2"
- },
+ "_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
diff --git a/node_modules/agent-base/dist/src/index.d.ts b/node_modules/agent-base/dist/src/index.d.ts
index e44a88ad4..8c8ea4eb2 100644
--- a/node_modules/agent-base/dist/src/index.d.ts
+++ b/node_modules/agent-base/dist/src/index.d.ts
@@ -26,7 +26,7 @@ declare namespace createAgent {
type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
type AgentCallbackReturn = Duplex | AgentLike;
- type AgentCallbackCallback = (err: Error | null | undefined, socket: createAgent.AgentCallbackReturn) => void;
+ type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void;
type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise<createAgent.AgentCallbackReturn>;
type AgentCallback = typeof Agent.prototype.callback;
type AgentOptions = {
@@ -49,6 +49,7 @@ declare namespace createAgent {
requests: {
[key: string]: http.IncomingMessage[];
};
+ options: https.AgentOptions;
private promisifiedCallback?;
private explicitDefaultPort?;
private explicitProtocol?;
diff --git a/node_modules/agent-base/dist/src/index.js b/node_modules/agent-base/dist/src/index.js
index 1e7b8c244..0467bf0b0 100644
--- a/node_modules/agent-base/dist/src/index.js
+++ b/node_modules/agent-base/dist/src/index.js
@@ -47,6 +47,7 @@ function createAgent(callback, opts) {
this.maxSockets = 1;
this.sockets = {};
this.requests = {};
+ this.options = {};
}
get defaultPort() {
if (typeof this.explicitDefaultPort === 'number') {
diff --git a/node_modules/agent-base/dist/src/index.js.map b/node_modules/agent-base/dist/src/index.js.map
index ccfaa7530..dfc8c5cc7 100644
--- a/node_modules/agent-base/dist/src/index.js.map
+++ b/node_modules/agent-base/dist/src/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAOD,SAAS,WAAW,CACnB,QAA+D,EAC/D,IAA+B;IAE/B,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,WAAU,WAAW;IAmDpB;;;;;;OAMG;IACH,MAAa,KAAM,SAAQ,qBAAY;QActC,YACC,QAA+D,EAC/D,KAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;aACzB;iBAAM,IAAI,QAAQ,EAAE;gBACpB,IAAI,GAAG,QAAQ,CAAC;aAChB;YAED,0DAA0D;YAC1D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;aAC5B;YAED,+DAA+D;YAC/D,0DAA0D;YAC1D,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,IAAI,WAAW;YACd,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,QAAQ,EAAE;gBACjD,OAAO,IAAI,CAAC,mBAAmB,CAAC;aAChC;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,CAAC;QAED,IAAI,WAAW,CAAC,CAAS;YACxB,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ;YACX,IAAI,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ,EAAE;gBAC9C,OAAO,IAAI,CAAC,gBAAgB,CAAC;aAC7B;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QAChD,CAAC;QAED,IAAI,QAAQ,CAAC,CAAS;YACrB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC3B,CAAC;QAaD,QAAQ,CACP,GAA8B,EAC9B,IAA8B,EAC9B,EAAsC;YAKtC,MAAM,IAAI,KAAK,CACd,yFAAyF,CACzF,CAAC;QACH,CAAC;QAED;;;;;WAKG;QACH,UAAU,CAAC,GAAkB,EAAE,KAAqB;YACnD,MAAM,IAAI,qBAAwB,KAAK,CAAE,CAAC;YAE1C,IAAI,OAAO,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE;gBAC7C,IAAI,CAAC,cAAc,GAAG,gBAAgB,EAAE,CAAC;aACzC;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;aACxB;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3C;YAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;aACzD;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;gBAC3B,2DAA2D;gBAC3D,0DAA0D;gBAC1D,4DAA4D;gBAC5D,8CAA8C;gBAC9C,OAAO,IAAI,CAAC,IAAI,CAAC;aACjB;YAED,OAAO,IAAI,CAAC,KAAK,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;YACrB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;YACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;YAE7B,kCAAkC;YAClC,2CAA2C;YAC3C,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;YACjB,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC;YAE5B,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,IAAI,SAAS,GAAyC,IAAI,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;YAE/C,MAAM,OAAO,GAAG,CAAC,GAA0B,EAAE,EAAE;gBAC9C,IAAI,GAAG,CAAC,SAAS;oBAAE,OAAO;gBAC1B,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBACvB,yDAAyD;gBACzD,iEAAiE;gBACjE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC;YAEF,MAAM,SAAS,GAAG,GAAG,EAAE;gBACtB,SAAS,GAAG,IAAI,CAAC;gBACjB,QAAQ,GAAG,IAAI,CAAC;gBAChB,MAAM,GAAG,GAA0B,IAAI,KAAK,CAC3C,sDAAsD,SAAS,IAAI,CACnE,CAAC;gBACF,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,aAAa,GAAG,CAAC,GAA0B,EAAE,EAAE;gBACpD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,KAAK,IAAI,EAAE;oBACvB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBACD,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,QAAQ,GAAG,CAAC,MAA2B,EAAE,EAAE;gBAChD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,IAAI,IAAI,EAAE;oBACtB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;oBACpB,oDAAoD;oBACpD,wDAAwD;oBACxD,eAAe;oBACf,KAAK,CACJ,6CAA6C,EAC7C,MAAM,CAAC,WAAW,CAAC,IAAI,CACvB,CAAC;oBACD,MAA4B,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;oBACpD,OAAO;iBACP;gBAED,IAAI,MAAM,EAAE;oBACX,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;wBACxB,IAAI,CAAC,UAAU,CAAC,MAAoB,EAAE,IAAI,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,GAAG,CAAC,QAAQ,CAAC,MAAoB,CAAC,CAAC;oBACnC,OAAO;iBACP;gBAED,MAAM,GAAG,GAAG,IAAI,KAAK,CACpB,qDAAqD,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,CAC/E,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;gBACxC,OAAO,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;gBAChD,OAAO;aACP;YAED,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE;oBAC9B,KAAK,CAAC,gDAAgD,CAAC,CAAC;oBACxD,IAAI,CAAC,mBAAmB,GAAG,mBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBACpD;qBAAM;oBACN,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC;iBACzC;aACD;YAED,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,GAAG,CAAC,EAAE;gBACnD,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;aAC7C;YAED,IAAI,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACpD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAED,IAAI;gBACH,KAAK,CACJ,qCAAqC,EACrC,IAAI,CAAC,QAAQ,EACb,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAC3B,CAAC;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAhPY,iBAAK,QAgPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EA9SS,WAAW,KAAX,WAAW,QA8SpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAIA,mCAAsC;AACtC,kDAAgC;AAChC,4DAAoC;AAEpC,MAAM,KAAK,GAAG,eAAW,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,CAAM;IACtB,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;AACzD,CAAC;AAED,SAAS,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAOD,SAAS,WAAW,CACnB,QAA+D,EAC/D,IAA+B;IAE/B,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,WAAU,WAAW;IAmDpB;;;;;;OAMG;IACH,MAAa,KAAM,SAAQ,qBAAY;QAetC,YACC,QAA+D,EAC/D,KAAgC;YAEhC,KAAK,EAAE,CAAC;YAER,IAAI,IAAI,GAAG,KAAK,CAAC;YACjB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;aACzB;iBAAM,IAAI,QAAQ,EAAE;gBACpB,IAAI,GAAG,QAAQ,CAAC;aAChB;YAED,0DAA0D;YAC1D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;aAC5B;YAED,+DAA+D;YAC/D,0DAA0D;YAC1D,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QACnB,CAAC;QAED,IAAI,WAAW;YACd,IAAI,OAAO,IAAI,CAAC,mBAAmB,KAAK,QAAQ,EAAE;gBACjD,OAAO,IAAI,CAAC,mBAAmB,CAAC;aAChC;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,CAAC;QAED,IAAI,WAAW,CAAC,CAAS;YACxB,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ;YACX,IAAI,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ,EAAE;gBAC9C,OAAO,IAAI,CAAC,gBAAgB,CAAC;aAC7B;YACD,OAAO,gBAAgB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;QAChD,CAAC;QAED,IAAI,QAAQ,CAAC,CAAS;YACrB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC3B,CAAC;QAaD,QAAQ,CACP,GAA8B,EAC9B,IAA8B,EAC9B,EAAsC;YAKtC,MAAM,IAAI,KAAK,CACd,yFAAyF,CACzF,CAAC;QACH,CAAC;QAED;;;;;WAKG;QACH,UAAU,CAAC,GAAkB,EAAE,KAAqB;YACnD,MAAM,IAAI,qBAAwB,KAAK,CAAE,CAAC;YAE1C,IAAI,OAAO,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE;gBAC7C,IAAI,CAAC,cAAc,GAAG,gBAAgB,EAAE,CAAC;aACzC;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;aACxB;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3C;YAED,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE;gBAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;aACzD;YAED,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;gBAC3B,2DAA2D;gBAC3D,0DAA0D;gBAC1D,4DAA4D;gBAC5D,8CAA8C;gBAC9C,OAAO,IAAI,CAAC,IAAI,CAAC;aACjB;YAED,OAAO,IAAI,CAAC,KAAK,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;YACrB,OAAO,IAAI,CAAC,aAAa,CAAC;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;YACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;YAE7B,kCAAkC;YAClC,2CAA2C;YAC3C,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC;YACjB,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC;YAE5B,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,IAAI,SAAS,GAAyC,IAAI,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;YAE/C,MAAM,OAAO,GAAG,CAAC,GAA0B,EAAE,EAAE;gBAC9C,IAAI,GAAG,CAAC,SAAS;oBAAE,OAAO;gBAC1B,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBACvB,yDAAyD;gBACzD,iEAAiE;gBACjE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC;YAEF,MAAM,SAAS,GAAG,GAAG,EAAE;gBACtB,SAAS,GAAG,IAAI,CAAC;gBACjB,QAAQ,GAAG,IAAI,CAAC;gBAChB,MAAM,GAAG,GAA0B,IAAI,KAAK,CAC3C,sDAAsD,SAAS,IAAI,CACnE,CAAC;gBACF,GAAG,CAAC,IAAI,GAAG,UAAU,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,aAAa,GAAG,CAAC,GAA0B,EAAE,EAAE;gBACpD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,KAAK,IAAI,EAAE;oBACvB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBACD,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,MAAM,QAAQ,GAAG,CAAC,MAA2B,EAAE,EAAE;gBAChD,IAAI,QAAQ;oBAAE,OAAO;gBACrB,IAAI,SAAS,IAAI,IAAI,EAAE;oBACtB,YAAY,CAAC,SAAS,CAAC,CAAC;oBACxB,SAAS,GAAG,IAAI,CAAC;iBACjB;gBAED,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;oBACpB,oDAAoD;oBACpD,wDAAwD;oBACxD,eAAe;oBACf,KAAK,CACJ,6CAA6C,EAC7C,MAAM,CAAC,WAAW,CAAC,IAAI,CACvB,CAAC;oBACD,MAA4B,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;oBACpD,OAAO;iBACP;gBAED,IAAI,MAAM,EAAE;oBACX,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;wBACxB,IAAI,CAAC,UAAU,CAAC,MAAoB,EAAE,IAAI,CAAC,CAAC;oBAC7C,CAAC,CAAC,CAAC;oBACH,GAAG,CAAC,QAAQ,CAAC,MAAoB,CAAC,CAAC;oBACnC,OAAO;iBACP;gBAED,MAAM,GAAG,GAAG,IAAI,KAAK,CACpB,qDAAqD,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,IAAI,CAC/E,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC;YAEF,IAAI,OAAO,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;gBACxC,OAAO,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;gBAChD,OAAO;aACP;YAED,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE;oBAC9B,KAAK,CAAC,gDAAgD,CAAC,CAAC;oBACxD,IAAI,CAAC,mBAAmB,GAAG,mBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBACpD;qBAAM;oBACN,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC;iBACzC;aACD;YAED,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,GAAG,CAAC,EAAE;gBACnD,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;aAC7C;YAED,IAAI,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACpD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAED,IAAI;gBACH,KAAK,CACJ,qCAAqC,EACrC,IAAI,CAAC,QAAQ,EACb,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAC3B,CAAC;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAlPY,iBAAK,QAkPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAhTS,WAAW,KAAX,WAAW,QAgTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file
diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json
index 54ee1b941..40dac27ef 100644
--- a/node_modules/agent-base/package.json
+++ b/node_modules/agent-base/package.json
@@ -1,8 +1,8 @@
{
"_from": "agent-base@6",
- "_id": "agent-base@6.0.0",
+ "_id": "agent-base@6.0.1",
"_inBundle": false,
- "_integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
+ "_integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==",
"_location": "/agent-base",
"_phantomChildren": {
"ms": "2.1.2"
@@ -22,8 +22,8 @@
"/https-proxy-agent",
"/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
- "_shasum": "5d0101f19bbfaed39980b22ae866de153b93f09a",
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz",
+ "_shasum": "808007e4e5867decb0ab6ab2f928fbdb5a596db4",
"_spec": "agent-base@6",
"_where": "/Users/isaacs/dev/npm/cli/node_modules/http-proxy-agent",
"author": {
@@ -44,6 +44,7 @@
"@types/debug": "4",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.17",
+ "@types/semver": "^7.1.0",
"@types/ws": "^6.0.3",
"@typescript-eslint/eslint-plugin": "1.6.0",
"@typescript-eslint/parser": "1.1.0",
@@ -58,6 +59,7 @@
"eslint-plugin-react": "7.12.4",
"mocha": "^6.2.0",
"rimraf": "^3.0.0",
+ "semver": "^7.1.2",
"typescript": "^3.5.3",
"ws": "^3.0.0"
},
@@ -65,7 +67,8 @@
"node": ">= 6.0.0"
},
"files": [
- "dist/src"
+ "dist/src",
+ "src"
],
"homepage": "https://github.com/TooTallNate/node-agent-base#readme",
"keywords": [
@@ -91,5 +94,5 @@
"test-lint": "eslint src --ext .js,.ts"
},
"typings": "dist/src/index",
- "version": "6.0.0"
+ "version": "6.0.1"
}
diff --git a/node_modules/agent-base/src/index.ts b/node_modules/agent-base/src/index.ts
new file mode 100644
index 000000000..870e3be2c
--- /dev/null
+++ b/node_modules/agent-base/src/index.ts
@@ -0,0 +1,339 @@
+import net from 'net';
+import http from 'http';
+import https from 'https';
+import { Duplex } from 'stream';
+import { EventEmitter } from 'events';
+import createDebug from 'debug';
+import promisify from './promisify';
+
+const debug = createDebug('agent-base');
+
+function isAgent(v: any): v is createAgent.AgentLike {
+ return Boolean(v) && typeof v.addRequest === 'function';
+}
+
+function isSecureEndpoint(): boolean {
+ const { stack } = new Error();
+ if (typeof stack !== 'string') return false;
+ return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1);
+}
+
+function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
+function createAgent(
+ callback: createAgent.AgentCallback,
+ opts?: createAgent.AgentOptions
+): createAgent.Agent;
+function createAgent(
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
+ opts?: createAgent.AgentOptions
+) {
+ return new createAgent.Agent(callback, opts);
+}
+
+namespace createAgent {
+ export interface ClientRequest extends http.ClientRequest {
+ _last?: boolean;
+ _hadError?: boolean;
+ method: string;
+ }
+
+ export interface AgentRequestOptions {
+ host?: string;
+ path?: string;
+ // `port` on `http.RequestOptions` can be a string or undefined,
+ // but `net.TcpNetConnectOpts` expects only a number
+ port: number;
+ }
+
+ export interface HttpRequestOptions
+ extends AgentRequestOptions,
+ Omit<http.RequestOptions, keyof AgentRequestOptions> {
+ secureEndpoint: false;
+ }
+
+ export interface HttpsRequestOptions
+ extends AgentRequestOptions,
+ Omit<https.RequestOptions, keyof AgentRequestOptions> {
+ secureEndpoint: true;
+ }
+
+ export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
+
+ export type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
+
+ export type AgentCallbackReturn = Duplex | AgentLike;
+
+ export type AgentCallbackCallback = (
+ err?: Error | null,
+ socket?: createAgent.AgentCallbackReturn
+ ) => void;
+
+ export type AgentCallbackPromise = (
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions
+ ) =>
+ | createAgent.AgentCallbackReturn
+ | Promise<createAgent.AgentCallbackReturn>;
+
+ export type AgentCallback = typeof Agent.prototype.callback;
+
+ export type AgentOptions = {
+ timeout?: number;
+ };
+
+ /**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+ export class Agent extends EventEmitter {
+ public timeout: number | null;
+ public maxFreeSockets: number;
+ public maxSockets: number;
+ public sockets: {
+ [key: string]: net.Socket[];
+ };
+ public requests: {
+ [key: string]: http.IncomingMessage[];
+ };
+ public options: https.AgentOptions;
+ private promisifiedCallback?: createAgent.AgentCallbackPromise;
+ private explicitDefaultPort?: number;
+ private explicitProtocol?: string;
+
+ constructor(
+ callback?: createAgent.AgentCallback | createAgent.AgentOptions,
+ _opts?: createAgent.AgentOptions
+ ) {
+ super();
+
+ let opts = _opts;
+ if (typeof callback === 'function') {
+ this.callback = callback;
+ } else if (callback) {
+ opts = callback;
+ }
+
+ // Timeout for the socket to be returned from the callback
+ this.timeout = null;
+ if (opts && typeof opts.timeout === 'number') {
+ this.timeout = opts.timeout;
+ }
+
+ // These aren't actually used by `agent-base`, but are required
+ // for the TypeScript definition files in `@types/node` :/
+ this.maxFreeSockets = 1;
+ this.maxSockets = 1;
+ this.sockets = {};
+ this.requests = {};
+ this.options = {};
+ }
+
+ get defaultPort(): number {
+ if (typeof this.explicitDefaultPort === 'number') {
+ return this.explicitDefaultPort;
+ }
+ return isSecureEndpoint() ? 443 : 80;
+ }
+
+ set defaultPort(v: number) {
+ this.explicitDefaultPort = v;
+ }
+
+ get protocol(): string {
+ if (typeof this.explicitProtocol === 'string') {
+ return this.explicitProtocol;
+ }
+ return isSecureEndpoint() ? 'https:' : 'http:';
+ }
+
+ set protocol(v: string) {
+ this.explicitProtocol = v;
+ }
+
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions,
+ fn: createAgent.AgentCallbackCallback
+ ): void;
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.RequestOptions
+ ):
+ | createAgent.AgentCallbackReturn
+ | Promise<createAgent.AgentCallbackReturn>;
+ callback(
+ req: createAgent.ClientRequest,
+ opts: createAgent.AgentOptions,
+ fn?: createAgent.AgentCallbackCallback
+ ):
+ | createAgent.AgentCallbackReturn
+ | Promise<createAgent.AgentCallbackReturn>
+ | void {
+ throw new Error(
+ '"agent-base" has no default implementation, you must subclass and override `callback()`'
+ );
+ }
+
+ /**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+ addRequest(req: ClientRequest, _opts: RequestOptions): void {
+ const opts: RequestOptions = { ..._opts };
+
+ if (typeof opts.secureEndpoint !== 'boolean') {
+ opts.secureEndpoint = isSecureEndpoint();
+ }
+
+ if (opts.host == null) {
+ opts.host = 'localhost';
+ }
+
+ if (opts.port == null) {
+ opts.port = opts.secureEndpoint ? 443 : 80;
+ }
+
+ if (opts.protocol == null) {
+ opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
+ }
+
+ if (opts.host && opts.path) {
+ // If both a `host` and `path` are specified then it's most
+ // likely the result of a `url.parse()` call... we need to
+ // remove the `path` portion so that `net.connect()` doesn't
+ // attempt to open that as a unix socket file.
+ delete opts.path;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // Hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ let timedOut = false;
+ let timeoutId: ReturnType<typeof setTimeout> | null = null;
+ const timeoutMs = opts.timeout || this.timeout;
+
+ const onerror = (err: NodeJS.ErrnoException) => {
+ if (req._hadError) return;
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ };
+
+ const ontimeout = () => {
+ timeoutId = null;
+ timedOut = true;
+ const err: NodeJS.ErrnoException = new Error(
+ `A "socket" was not created for HTTP request before ${timeoutMs}ms`
+ );
+ err.code = 'ETIMEOUT';
+ onerror(err);
+ };
+
+ const callbackError = (err: NodeJS.ErrnoException) => {
+ if (timedOut) return;
+ if (timeoutId !== null) {
+ clearTimeout(timeoutId);
+ timeoutId = null;
+ }
+ onerror(err);
+ };
+
+ const onsocket = (socket: AgentCallbackReturn) => {
+ if (timedOut) return;
+ if (timeoutId != null) {
+ clearTimeout(timeoutId);
+ timeoutId = null;
+ }
+
+ if (isAgent(socket)) {
+ // `socket` is actually an `http.Agent` instance, so
+ // relinquish responsibility for this `req` to the Agent
+ // from here on
+ debug(
+ 'Callback returned another Agent instance %o',
+ socket.constructor.name
+ );
+ (socket as createAgent.Agent).addRequest(req, opts);
+ return;
+ }
+
+ if (socket) {
+ socket.once('free', () => {
+ this.freeSocket(socket as net.Socket, opts);
+ });
+ req.onSocket(socket as net.Socket);
+ return;
+ }
+
+ const err = new Error(
+ `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
+ );
+ onerror(err);
+ };
+
+ if (typeof this.callback !== 'function') {
+ onerror(new Error('`callback` is not defined'));
+ return;
+ }
+
+ if (!this.promisifiedCallback) {
+ if (this.callback.length >= 3) {
+ debug('Converting legacy callback function to promise');
+ this.promisifiedCallback = promisify(this.callback);
+ } else {
+ this.promisifiedCallback = this.callback;
+ }
+ }
+
+ if (typeof timeoutMs === 'number' && timeoutMs > 0) {
+ timeoutId = setTimeout(ontimeout, timeoutMs);
+ }
+
+ if ('port' in opts && typeof opts.port !== 'number') {
+ opts.port = Number(opts.port);
+ }
+
+ try {
+ debug(
+ 'Resolving socket for %o request: %o',
+ opts.protocol,
+ `${req.method} ${req.path}`
+ );
+ Promise.resolve(this.promisifiedCallback(req, opts)).then(
+ onsocket,
+ callbackError
+ );
+ } catch (err) {
+ Promise.reject(err).catch(callbackError);
+ }
+ }
+
+ freeSocket(socket: net.Socket, opts: AgentOptions) {
+ debug('Freeing socket %o %o', socket.constructor.name, opts);
+ socket.destroy();
+ }
+
+ destroy() {
+ debug('Destroying agent %o', this.constructor.name);
+ }
+ }
+
+ // So that `instanceof` works correctly
+ createAgent.prototype = createAgent.Agent.prototype;
+}
+
+export = createAgent;
diff --git a/node_modules/agent-base/src/promisify.ts b/node_modules/agent-base/src/promisify.ts
new file mode 100644
index 000000000..60cc66271
--- /dev/null
+++ b/node_modules/agent-base/src/promisify.ts
@@ -0,0 +1,33 @@
+import {
+ Agent,
+ ClientRequest,
+ RequestOptions,
+ AgentCallbackCallback,
+ AgentCallbackPromise,
+ AgentCallbackReturn
+} from './index';
+
+type LegacyCallback = (
+ req: ClientRequest,
+ opts: RequestOptions,
+ fn: AgentCallbackCallback
+) => void;
+
+export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
+ return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ req,
+ opts,
+ (err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(rtn);
+ }
+ }
+ );
+ });
+ };
+}
diff --git a/node_modules/agentkeepalive/History.md b/node_modules/agentkeepalive/History.md
index 9ea9986e9..b4e411248 100644
--- a/node_modules/agentkeepalive/History.md
+++ b/node_modules/agentkeepalive/History.md
@@ -1,4 +1,10 @@
+4.1.3 / 2020-06-15
+==================
+
+**fixes**
+ * [[`4ba9f9c`](http://github.com/node-modules/agentkeepalive/commit/4ba9f9c844f2a6b8037ce56599d25c69ef054d91)] - fix: compatible with node v12.16.3 (#91) (killa <<killa123@126.com>>)
+
4.1.2 / 2020-04-25
==================
diff --git a/node_modules/agentkeepalive/lib/agent.js b/node_modules/agentkeepalive/lib/agent.js
index 5767abf22..d0294a69f 100644
--- a/node_modules/agentkeepalive/lib/agent.js
+++ b/node_modules/agentkeepalive/lib/agent.js
@@ -85,6 +85,16 @@ class Agent extends OriginalAgent {
// including free socket timeout counter
this.timeoutSocketCount = 0;
this.timeoutSocketCountLastCheck = 0;
+
+ this.on('free', socket => {
+ // https://github.com/nodejs/node/pull/32000
+ // Node.js native agent will check socket timeout eqs agent.options.timeout.
+ // Use the ttl or freeSocketTimeout to overwrite.
+ const timeout = this.calcSocketTimeout(socket);
+ if (timeout > 0 && socket.timeout !== timeout) {
+ socket.setTimeout(timeout);
+ }
+ });
}
get freeSocketKeepAliveTimeout() {
@@ -102,29 +112,22 @@ class Agent extends OriginalAgent {
return this.options.socketActiveTTL;
}
- keepSocketAlive(socket) {
- const result = super.keepSocketAlive(socket);
- // should not keepAlive, do nothing
- if (!result) return result;
-
+ calcSocketTimeout(socket) {
+ /**
+ * return <= 0: should free socket
+ * return > 0: should update socket timeout
+ * return undefined: not find custom timeout
+ */
let freeSocketTimeout = this.options.freeSocketTimeout;
const socketActiveTTL = this.options.socketActiveTTL;
if (socketActiveTTL) {
// check socketActiveTTL
const aliveTime = Date.now() - socket[SOCKET_CREATED_TIME];
const diff = socketActiveTTL - aliveTime;
- // destroy it
if (diff <= 0) {
- debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, alive %sms(max %sms)',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],
- aliveTime, socketActiveTTL);
- return false;
+ return diff;
}
-
if (freeSocketTimeout && diff < freeSocketTimeout) {
- debug('%s(requests: %s, finished: %s) free and wait for %sms TTL timeout',
- socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT],
- diff);
freeSocketTimeout = diff;
}
}
@@ -134,12 +137,26 @@ class Agent extends OriginalAgent {
// try to use socket custom freeSocketTimeout first, support headers['keep-alive']
// https://github.com/node-modules/urllib/blob/b76053020923f4d99a1c93cf2e16e0c5ba10bacf/lib/urllib.js#L498
const customFreeSocketTimeout = socket.freeSocketTimeout || socket.freeSocketKeepAliveTimeout;
- if (customFreeSocketTimeout && customFreeSocketTimeout < freeSocketTimeout) {
- freeSocketTimeout = customFreeSocketTimeout;
- }
- // FIXME: need to make setRequestSocket as a method on Agent class
- // then we can reset the agent.options.timeout when free socket is reused.
- socket.setTimeout(freeSocketTimeout);
+ return customFreeSocketTimeout || freeSocketTimeout;
+ }
+ }
+
+ keepSocketAlive(socket) {
+ const result = super.keepSocketAlive(socket);
+ // should not keepAlive, do nothing
+ if (!result) return result;
+
+ const customTimeout = this.calcSocketTimeout(socket);
+ if (typeof customTimeout === 'undefined') {
+ return true;
+ }
+ if (customTimeout <= 0) {
+ debug('%s(requests: %s, finished: %s) free but need to destroy by TTL, request count %s, diff is %s',
+ socket[SOCKET_NAME], socket[SOCKET_REQUEST_COUNT], socket[SOCKET_REQUEST_FINISHED_COUNT], customTimeout);
+ return false;
+ }
+ if (socket.timeout !== customTimeout) {
+ socket.setTimeout(customTimeout);
}
return true;
}
diff --git a/node_modules/agentkeepalive/package.json b/node_modules/agentkeepalive/package.json
index 85ba8bb8f..b8f8a4a44 100644
--- a/node_modules/agentkeepalive/package.json
+++ b/node_modules/agentkeepalive/package.json
@@ -1,8 +1,8 @@
{
"_from": "agentkeepalive@^4.1.0",
- "_id": "agentkeepalive@4.1.2",
+ "_id": "agentkeepalive@4.1.3",
"_inBundle": false,
- "_integrity": "sha512-waNHE7tQBBn+2qXucI8HY0o2Y0OBPWldWOWsZwY71JcCm4SvrPnWdceFfB5NIXSqE8Ewq6VR/Qt5b1i69P6KCQ==",
+ "_integrity": "sha512-wn8fw19xKZwdGPO47jivonaHRTd+nGOMP1z11sgGeQzDy2xd5FG0R67dIMcKHDE2cJ5y+YXV30XVGUBPRSY7Hg==",
"_location": "/agentkeepalive",
"_phantomChildren": {
"ms": "2.1.2"
@@ -20,8 +20,8 @@
"_requiredBy": [
"/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.2.tgz",
- "_shasum": "d7bc3bafd7ea88032f6be22b6f1389b3d42c9c91",
+ "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.3.tgz",
+ "_shasum": "360a09d743a1f4fde749f9ba07caa6575d08259a",
"_spec": "agentkeepalive@^4.1.0",
"_where": "/Users/isaacs/dev/npm/cli/node_modules/make-fetch-happen",
"author": {
@@ -39,7 +39,7 @@
"os": {
"github": "linux"
},
- "version": "8, 10, 12"
+ "version": "8, 10, 12, 14"
},
"dependencies": {
"debug": "^4.1.0",
@@ -94,5 +94,5 @@
"test": "npm run lint && egg-bin test --full-trace",
"test-local": "egg-bin test --full-trace"
},
- "version": "4.1.2"
+ "version": "4.1.3"
}
diff --git a/node_modules/bin-links/CHANGELOG.md b/node_modules/bin-links/CHANGELOG.md
index e7b640c08..0531b01ca 100644
--- a/node_modules/bin-links/CHANGELOG.md
+++ b/node_modules/bin-links/CHANGELOG.md
@@ -1,6 +1,8 @@
# Change Log
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## 2.0.0
+
+* Rewrite to promisify and remove dependence on gentle-fs
<a name="1.1.7"></a>
## [1.1.7](https://github.com/npm/bin-links/compare/v1.1.6...v1.1.7) (2019-12-26)
diff --git a/node_modules/bin-links/LICENSE b/node_modules/bin-links/LICENSE
index 0b6c22874..19cec97b1 100644
--- a/node_modules/bin-links/LICENSE
+++ b/node_modules/bin-links/LICENSE
@@ -1,235 +1,15 @@
-The npm application
-Copyright (c) npm, Inc. and Contributors
-Licensed on the terms of The Artistic License 2.0
+The ISC License
-Node package dependencies of the npm application
-Copyright (c) their respective copyright owners
-Licensed on their respective license terms
+Copyright (c) npm, Inc.
-The npm public registry at https://registry.npmjs.org
-and the npm website at https://www.npmjs.com
-Operated by npm, Inc.
-Use governed by terms published on https://www.npmjs.com
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
-"Node.js"
-Trademark Joyent, Inc., https://joyent.com
-Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
-
-The Node.js application
-Project of Node Foundation, https://nodejs.org
-
-The npm Logo
-Copyright (c) Mathias Pettersson and Brian Hammond
-
-"Gubblebum Blocky" typeface
-Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
-Used with permission
-
-
---------
-
-
-The Artistic License 2.0
-
-Copyright (c) 2000-2006, The Perl Foundation.
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-
-This license establishes the terms under which a given free software
-Package may be copied, modified, distributed, and/or redistributed.
-The intent is that the Copyright Holder maintains some artistic
-control over the development of that Package while still keeping the
-Package available as open source and free software.
-
-You are always permitted to make arrangements wholly outside of this
-license directly with the Copyright Holder of a given Package. If the
-terms of this license do not permit the full use that you propose to
-make of the Package, you should contact the Copyright Holder and seek
-a different licensing arrangement.
-
-Definitions
-
- "Copyright Holder" means the individual(s) or organization(s)
- named in the copyright notice for the entire Package.
-
- "Contributor" means any party that has contributed code or other
- material to the Package, in accordance with the Copyright Holder's
- procedures.
-
- "You" and "your" means any person who would like to copy,
- distribute, or modify the Package.
-
- "Package" means the collection of files distributed by the
- Copyright Holder, and derivatives of that collection and/or of
- those files. A given Package may consist of either the Standard
- Version, or a Modified Version.
-
- "Distribute" means providing a copy of the Package or making it
- accessible to anyone else, or in the case of a company or
- organization, to others outside of your company or organization.
-
- "Distributor Fee" means any fee that you charge for Distributing
- this Package or providing support for this Package to another
- party. It does not mean licensing fees.
-
- "Standard Version" refers to the Package if it has not been
- modified, or has been modified only in ways explicitly requested
- by the Copyright Holder.
-
- "Modified Version" means the Package, if it has been changed, and
- such changes were not explicitly requested by the Copyright
- Holder.
-
- "Original License" means this Artistic License as Distributed with
- the Standard Version of the Package, in its current version or as
- it may be modified by The Perl Foundation in the future.
-
- "Source" form means the source code, documentation source, and
- configuration files for the Package.
-
- "Compiled" form means the compiled bytecode, object code, binary,
- or any other form resulting from mechanical transformation or
- translation of the Source form.
-
-
-Permission for Use and Modification Without Distribution
-
-(1) You are permitted to use the Standard Version and create and use
-Modified Versions for any purpose without restriction, provided that
-you do not Distribute the Modified Version.
-
-
-Permissions for Redistribution of the Standard Version
-
-(2) You may Distribute verbatim copies of the Source form of the
-Standard Version of this Package in any medium without restriction,
-either gratis or for a Distributor Fee, provided that you duplicate
-all of the original copyright notices and associated disclaimers. At
-your discretion, such verbatim copies may or may not include a
-Compiled form of the Package.
-
-(3) You may apply any bug fixes, portability changes, and other
-modifications made available from the Copyright Holder. The resulting
-Package will still be considered the Standard Version, and as such
-will be subject to the Original License.
-
-
-Distribution of Modified Versions of the Package as Source
-
-(4) You may Distribute your Modified Version as Source (either gratis
-or for a Distributor Fee, and with or without a Compiled form of the
-Modified Version) provided that you clearly document how it differs
-from the Standard Version, including, but not limited to, documenting
-any non-standard features, executables, or modules, and provided that
-you do at least ONE of the following:
-
- (a) make the Modified Version available to the Copyright Holder
- of the Standard Version, under the Original License, so that the
- Copyright Holder may include your modifications in the Standard
- Version.
-
- (b) ensure that installation of your Modified Version does not
- prevent the user installing or running the Standard Version. In
- addition, the Modified Version must bear a name that is different
- from the name of the Standard Version.
-
- (c) allow anyone who receives a copy of the Modified Version to
- make the Source form of the Modified Version available to others
- under
-
- (i) the Original License or
-
- (ii) a license that permits the licensee to freely copy,
- modify and redistribute the Modified Version using the same
- licensing terms that apply to the copy that the licensee
- received, and requires that the Source form of the Modified
- Version, and of any works derived from it, be made freely
- available in that license fees are prohibited but Distributor
- Fees are allowed.
-
-
-Distribution of Compiled Forms of the Standard Version
-or Modified Versions without the Source
-
-(5) You may Distribute Compiled forms of the Standard Version without
-the Source, provided that you include complete instructions on how to
-get the Source of the Standard Version. Such instructions must be
-valid at the time of your distribution. If these instructions, at any
-time while you are carrying out such distribution, become invalid, you
-must provide new instructions on demand or cease further distribution.
-If you provide valid instructions or cease distribution within thirty
-days after you become aware that the instructions are invalid, then
-you do not forfeit any of your rights under this license.
-
-(6) You may Distribute a Modified Version in Compiled form without
-the Source, provided that you comply with Section 4 with respect to
-the Source of the Modified Version.
-
-
-Aggregating or Linking the Package
-
-(7) You may aggregate the Package (either the Standard Version or
-Modified Version) with other packages and Distribute the resulting
-aggregation provided that you do not charge a licensing fee for the
-Package. Distributor Fees are permitted, and licensing fees for other
-components in the aggregation are permitted. The terms of this license
-apply to the use and Distribution of the Standard or Modified Versions
-as included in the aggregation.
-
-(8) You are permitted to link Modified and Standard Versions with
-other works, to embed the Package in a larger work of your own, or to
-build stand-alone binary or bytecode versions of applications that
-include the Package, and Distribute the result without restriction,
-provided the result does not expose a direct interface to the Package.
-
-
-Items That are Not Considered Part of a Modified Version
-
-(9) Works (including, but not limited to, modules and scripts) that
-merely extend or make use of the Package, do not, by themselves, cause
-the Package to be a Modified Version. In addition, such works are not
-considered parts of the Package itself, and are not subject to the
-terms of this license.
-
-
-General Provisions
-
-(10) Any use, modification, and distribution of the Standard or
-Modified Versions is governed by this Artistic License. By using,
-modifying or distributing the Package, you accept this license. Do not
-use, modify, or distribute the Package, if you do not accept this
-license.
-
-(11) If your Modified Version has been derived from a Modified
-Version made by someone other than you, you are nevertheless required
-to ensure that your Modified Version complies with the requirements of
-this license.
-
-(12) This license does not grant you the right to use any trademark,
-service mark, tradename, or logo of the Copyright Holder.
-
-(13) This license includes the non-exclusive, worldwide,
-free-of-charge patent license to make, have made, use, offer to sell,
-sell, import and otherwise transfer the Package with respect to any
-patent claims licensable by the Copyright Holder that are necessarily
-infringed by the Package. If you institute patent litigation
-(including a cross-claim or counterclaim) against any party alleging
-that the Package constitutes direct or contributory patent
-infringement, then this Artistic License to you shall terminate on the
-date that such litigation is filed.
-
-(14) Disclaimer of Warranty:
-THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
-IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
-NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
-LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
---------
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/bin-links/README.md b/node_modules/bin-links/README.md
index 558d5c74b..4e3a8b407 100644
--- a/node_modules/bin-links/README.md
+++ b/node_modules/bin-links/README.md
@@ -14,19 +14,37 @@ binaries and man pages for Javascript packages
* [Contributing](#contributing)
* [API](#api)
* [`binLinks`](#binLinks)
+ * [`binLinks.getPaths()`](#getPaths)
### Example
```javascript
-// todo
+const binLinks = require('bin-links')
+const readPackageJson = require('read-package-json-fast')
+binLinks({
+ path: '/path/to/node_modules/some-package',
+ pkg: readPackageJson('/path/to/node_modules/some-package/package.json'),
+
+ // true if it's a global install, false for local. default: false
+ global: true,
+
+ // true if it's the top level package being installed, false otherwise
+ top: true,
+
+ // true if you'd like to recklessly overwrite files.
+ force: true,
+})
```
### Features
-* Links bin files listed under the `bin` property of pkg to the node_modules/.bin
-directory of the installing environment.
-* Links man files listed under the `man` property of pkg to the share/man directory
-of the provided optional directory prefix.
+* Links bin files listed under the `bin` property of pkg to the
+ `node_modules/.bin` directory of the installing environment. (Or
+ `${prefix}/bin` for top level global packages on unix, and `${prefix}`
+ for top level global packages on Windows.)
+* Links man files listed under the `man` property of pkg to the share/man
+ directory. (This is only done for top-level global packages on Unix
+ systems.)
### Contributing
@@ -38,10 +56,19 @@ jump in if you'd like to, or even ask us questions if something isn't clear.
### API
-#### <a name="binLinks"></a> `> binLinks(pkg, folder, global, opts, cb)`
+#### <a name="binLinks"></a> `> binLinks({path, pkg, force, global, top})`
+
+Returns a Promise that resolves when the requisite things have been linked.
+
+#### <a name="getPaths"></a> `> binLinks.getPaths({path, pkg, global, top })`
+
+Returns an array of all the paths of links and shims that _might_ be
+created (assuming that they exist!) for the package at the specified path.
+
+Does not touch the filesystem.
##### Example
```javascript
-binLinks(pkg, folder, global, opts, cb)
-``` \ No newline at end of file
+binLinks({path, pkg, force, global, top}).then(() => console.log('bins linked!'))
+```
diff --git a/node_modules/bin-links/index.js b/node_modules/bin-links/index.js
index 79c2cb585..51cc410af 100644
--- a/node_modules/bin-links/index.js
+++ b/node_modules/bin-links/index.js
@@ -1,183 +1,30 @@
-'use strict'
-
-const path = require('path')
-const fs = require('graceful-fs')
-const BB = require('bluebird')
-const gentleFs = require('gentle-fs')
-const linkIfExists = BB.promisify(gentleFs.linkIfExists)
-const gentleFsBinLink = BB.promisify(gentleFs.binLink)
-const open = BB.promisify(fs.open)
-const close = BB.promisify(fs.close)
-const read = BB.promisify(fs.read, {multiArgs: true})
-const chmod = BB.promisify(fs.chmod)
-const readFile = BB.promisify(fs.readFile)
-const writeFileAtomic = BB.promisify(require('write-file-atomic'))
-const normalize = require('npm-normalize-package-bin')
-
-module.exports = BB.promisify(binLinks)
-
-function binLinks (pkg, folder, global, opts, cb) {
- pkg = normalize(pkg)
- folder = path.resolve(folder)
-
- // if it's global, and folder is in {prefix}/node_modules,
- // then bins are in {prefix}/bin
- // otherwise, then bins are in folder/../.bin
- var parent = pkg.name && pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder)
- var gnm = global && opts.globalDir
- var gtop = parent === gnm
-
- opts.log.info('linkStuff', opts.pkgId)
- opts.log.silly('linkStuff', opts.pkgId, 'has', parent, 'as its parent node_modules')
- if (global) opts.log.silly('linkStuff', opts.pkgId, 'is part of a global install')
- if (gnm) opts.log.silly('linkStuff', opts.pkgId, 'is installed into a global node_modules')
- if (gtop) opts.log.silly('linkStuff', opts.pkgId, 'is installed into the top-level global node_modules')
-
- return BB.join(
- linkBins(pkg, folder, parent, gtop, opts),
- linkMans(pkg, folder, parent, gtop, opts)
- ).asCallback(cb)
-}
-
-function isHashbangFile (file) {
- return open(file, 'r').then(fileHandle => {
- return read(fileHandle, Buffer.alloc(2), 0, 2, 0).spread((_, buf) => {
- if (!hasHashbang(buf)) return []
- return read(fileHandle, Buffer.alloc(2048), 0, 2048, 0)
- }).spread((_, buf) => buf && hasCR(buf), /* istanbul ignore next */ () => false)
- .finally(() => close(fileHandle))
- }).catch(/* istanbul ignore next */ () => false)
-}
-
-function hasHashbang (buf) {
- const str = buf.toString()
- return str.slice(0, 2) === '#!'
-}
-
-function hasCR (buf) {
- return /^#![^\n]+\r\n/.test(buf)
-}
-
-function dos2Unix (file) {
- return readFile(file, 'utf8').then(content => {
- return writeFileAtomic(file, content.replace(/^(#![^\n]+)\r\n/, '$1\n'))
- })
-}
-
-function getLinkOpts (opts, gently) {
- return Object.assign({}, opts, { gently: gently })
-}
-
-function linkBins (pkg, folder, parent, gtop, opts) {
- if (!pkg.bin || (!gtop && path.basename(parent) !== 'node_modules')) {
- return
- }
- var linkOpts = getLinkOpts(opts, gtop && folder)
- var execMode = parseInt('0777', 8) & (~opts.umask)
- var binRoot = gtop ? opts.globalBin
- : path.resolve(parent, '.bin')
- opts.log.verbose('linkBins', [pkg.bin, binRoot, gtop])
-
- return BB.map(Object.keys(pkg.bin), bin => {
- var dest = path.resolve(binRoot, bin)
- var src = path.resolve(folder, pkg.bin[bin])
-
- /* istanbul ignore if - that unpossible */
- if (src.indexOf(folder) !== 0) {
- throw new Error('invalid bin entry for package ' +
- pkg._id + '. key=' + bin + ', value=' + pkg.bin[bin])
- }
-
- return linkBin(src, dest, linkOpts).then(() => {
- // bins should always be executable.
- // XXX skip chmod on windows?
- return chmod(src, execMode)
- }).then(() => {
- return isHashbangFile(src)
- }).then(isHashbang => {
- if (!isHashbang) return
- opts.log.silly('linkBins', 'Converting line endings of hashbang file:', src)
- return dos2Unix(src)
- }).then(() => {
- if (!gtop) return
- var dest = path.resolve(binRoot, bin)
- var out = opts.parseable
- ? dest + '::' + src + ':BINFILE'
- : dest + ' -> ' + src
-
- if (!opts.json && !opts.parseable) {
- opts.log.clearProgress()
- console.log(out)
- opts.log.showProgress()
- }
- }).catch(err => {
- /* istanbul ignore next */
- if (err.code === 'ENOENT' && opts.ignoreScripts) return
- throw err
- })
- })
-}
-
-function linkBin (from, to, opts) {
- // do not clobber global bins
- if (opts.globalBin && to.indexOf(opts.globalBin) === 0) {
- opts.clobberLinkGently = true
- }
- return gentleFsBinLink(from, to, opts)
-}
-
-function linkMans (pkg, folder, parent, gtop, opts) {
- if (!pkg.man || !gtop || process.platform === 'win32') return
-
- var manRoot = path.resolve(opts.prefix, 'share', 'man')
- opts.log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot)
-
- // make sure that the mans are unique.
- // otherwise, if there are dupes, it'll fail with EEXIST
- var set = pkg.man.reduce(function (acc, man) {
- if (typeof man !== 'string') {
- return acc
- }
- const cleanMan = path.join('/', man).replace(/\\|:/g, '/').substr(1)
- acc[path.basename(man)] = cleanMan
- return acc
- }, {})
- var manpages = pkg.man.filter(function (man) {
- if (typeof man !== 'string') {
- return false
- }
- const cleanMan = path.join('/', man).replace(/\\|:/g, '/').substr(1)
- return set[path.basename(man)] === cleanMan
- })
-
- return BB.map(manpages, man => {
- opts.log.silly('linkMans', 'preparing to link', man)
- var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
- if (!parseMan) {
- throw new Error(
- man + ' is not a valid name for a man file. ' +
- 'Man files must end with a number, ' +
- 'and optionally a .gz suffix if they are compressed.'
- )
- }
-
- var stem = parseMan[1]
- var sxn = parseMan[2]
- var bn = path.basename(stem)
- var manSrc = path.resolve(folder, man)
- /* istanbul ignore if - that unpossible */
- if (manSrc.indexOf(folder) !== 0) {
- throw new Error('invalid man entry for package ' +
- pkg._id + '. man=' + manSrc)
- }
-
- var manDest = path.join(manRoot, 'man' + sxn, bn)
-
- // man pages should always be clobbering gently, because they are
- // only installed for top-level global packages, so never destroy
- // a link if it doesn't point into the folder we're linking
- opts.clobberLinkGently = true
-
- return linkIfExists(manSrc, manDest, getLinkOpts(opts, gtop && folder))
- })
-}
+const linkBins = require('./lib/link-bins.js')
+const linkMans = require('./lib/link-mans.js')
+
+const binLinks = opts => {
+ const { path, pkg, force, global, top } = opts
+ // global top pkgs on windows get bins installed in {prefix}, and no mans
+ //
+ // unix global top pkgs get their bins installed in {prefix}/bin,
+ // and mans in {prefix}/share/man
+ //
+ // non-top pkgs get their bins installed in {prefix}/node_modules/.bin,
+ // and do not install mans
+ //
+ // non-global top pkgs don't have any bins or mans linked. From here on
+ // out, if it's top, we know that it's global, so no need to pass that
+ // option further down the stack.
+ if (top && !global)
+ return Promise.resolve()
+
+ return Promise.all([
+ // allow clobbering within the local node_modules/.bin folder.
+ // only global bins are protected in this way, or else it is
+ // yet another vector for excessive dependency conflicts.
+ linkBins({path, pkg, top, force: force || !top}),
+ linkMans({path, pkg, top, force}),
+ ])
+}
+
+binLinks.getPaths = require('./lib/get-paths.js')
+module.exports = binLinks
diff --git a/node_modules/bin-links/lib/bin-target.js b/node_modules/bin-links/lib/bin-target.js
new file mode 100644
index 000000000..7ea0c2a96
--- /dev/null
+++ b/node_modules/bin-links/lib/bin-target.js
@@ -0,0 +1,9 @@
+const isWindows = require('./is-windows.js')
+const getPrefix = require('./get-prefix.js')
+const getNodeModules = require('./get-node-modules.js')
+const {dirname} = require('path')
+
+module.exports = ({top, path}) =>
+ !top ? getNodeModules(path) + '/.bin'
+ : isWindows ? getPrefix(path)
+ : dirname(getPrefix(path)) + '/bin'
diff --git a/node_modules/bin-links/lib/fix-bin.js b/node_modules/bin-links/lib/fix-bin.js
new file mode 100644
index 000000000..0f4d5fa02
--- /dev/null
+++ b/node_modules/bin-links/lib/fix-bin.js
@@ -0,0 +1,44 @@
+// make sure that bins are executable, and that they don't have
+// windows line-endings on the hashbang line.
+const fs = require('fs')
+const { promisify } = require('util')
+
+const execMode = 0o777 & (~process.umask())
+
+const writeFileAtomic = promisify(require('write-file-atomic'))
+const open = promisify(fs.open)
+const close = promisify(fs.close)
+const read = promisify(fs.read)
+const chmod = promisify(fs.chmod)
+const readFile = promisify(fs.readFile)
+
+const isWindowsHashBang = buf =>
+ buf[0] === '#'.charCodeAt(0) &&
+ buf[1] === '!'.charCodeAt(0) &&
+ /^#![^\n]+\r\n/.test(buf.toString())
+
+const isWindowsHashbangFile = file => {
+ const FALSE = () => false
+ return open(file, 'r').then(fd => {
+ const buf = Buffer.alloc(2048)
+ return read(fd, buf, 0, 2048, 0)
+ .then(
+ () => {
+ const isWHB = isWindowsHashBang(buf)
+ return close(fd).then(() => isWHB, () => isWHB)
+ },
+ // don't leak FD if read() fails
+ () => close(fd).then(FALSE, FALSE)
+ )
+ }, FALSE)
+}
+
+const dos2Unix = file =>
+ readFile(file, 'utf8').then(content =>
+ writeFileAtomic(file, content.replace(/^(#![^\n]+)\r\n/, '$1\n')))
+
+const fixBin = file => chmod(file, execMode)
+ .then(() => isWindowsHashbangFile(file))
+ .then(isWHB => isWHB ? dos2Unix(file) : null)
+
+module.exports = fixBin
diff --git a/node_modules/bin-links/lib/get-node-modules.js b/node_modules/bin-links/lib/get-node-modules.js
new file mode 100644
index 000000000..b67c198ef
--- /dev/null
+++ b/node_modules/bin-links/lib/get-node-modules.js
@@ -0,0 +1,18 @@
+// we know it's global and/or not top, so the path has to be
+// {prefix}/node_modules/{name}. Can't rely on pkg.name, because
+// it might be installed as an alias.
+
+const {dirname, basename} = require('path')
+// this gets called a lot and can't change, so memoize it
+const memo = new Map()
+module.exports = path => {
+ if (memo.has(path))
+ return memo.get(path)
+
+ const scopeOrNm = dirname(path)
+ const nm = basename(scopeOrNm) === 'node_modules' ? scopeOrNm
+ : dirname(scopeOrNm)
+
+ memo.set(path, nm)
+ return nm
+}
diff --git a/node_modules/bin-links/lib/get-paths.js b/node_modules/bin-links/lib/get-paths.js
new file mode 100644
index 000000000..614c85652
--- /dev/null
+++ b/node_modules/bin-links/lib/get-paths.js
@@ -0,0 +1,48 @@
+// get all the paths that are (or might be) installed for a given pkg
+// There's no guarantee that all of these will be installed, but if they
+// are present, then we can assume that they're associated.
+const binTarget = require('./bin-target.js')
+const manTarget = require('./man-target.js')
+const {resolve, basename} = require('path')
+const isWindows = require('./is-windows.js')
+module.exports = ({path, pkg, global, top}) => {
+ if (top && !global)
+ return []
+
+ const binSet = []
+ const binTarg = binTarget({path, top})
+ if (pkg.bin) {
+ for (const bin of Object.keys(pkg.bin)) {
+ const b = resolve(binTarg, bin)
+ binSet.push(b)
+ if (isWindows) {
+ binSet.push(b + '.cmd')
+ binSet.push(b + '.ps1')
+ }
+ }
+ }
+
+ const manTarg = manTarget({path, top})
+ const manSet = []
+ if (manTarg && pkg.man && Array.isArray(pkg.man) && pkg.man.length) {
+ for (const man of pkg.man) {
+ const parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
+ // invalid entries invalidate the entire man set
+ if (!parseMan)
+ return binSet
+
+ const stem = parseMan[1]
+ const sxn = parseMan[2]
+ const base = basename(stem)
+ const absFrom = resolve(path, man)
+
+ /* istanbul ignore if - should be impossible */
+ if (absFrom.indexOf(path) !== 0)
+ return binSet
+
+ manSet.push(resolve(manTarg, 'man' + sxn, base))
+ }
+ }
+
+ return manSet.length ? [...binSet, ...manSet] : binSet
+}
diff --git a/node_modules/bin-links/lib/get-prefix.js b/node_modules/bin-links/lib/get-prefix.js
new file mode 100644
index 000000000..96112bf0a
--- /dev/null
+++ b/node_modules/bin-links/lib/get-prefix.js
@@ -0,0 +1,3 @@
+const {dirname} = require('path')
+const getNodeModules = require('./get-node-modules.js')
+module.exports = path => dirname(getNodeModules(path))
diff --git a/node_modules/bin-links/lib/is-windows.js b/node_modules/bin-links/lib/is-windows.js
new file mode 100644
index 000000000..da3b2fb22
--- /dev/null
+++ b/node_modules/bin-links/lib/is-windows.js
@@ -0,0 +1,2 @@
+const platform = process.env.__TESTING_BIN_LINKS_PLATFORM__ || process.platform
+module.exports = platform === 'win32'
diff --git a/node_modules/bin-links/lib/link-bin.js b/node_modules/bin-links/lib/link-bin.js
new file mode 100644
index 000000000..4c0bde489
--- /dev/null
+++ b/node_modules/bin-links/lib/link-bin.js
@@ -0,0 +1,9 @@
+const linkGently = require('./link-gently.js')
+const fixBin = require('./fix-bin.js')
+
+// linking bins is simple. just symlink, and if we linked it, fix the bin up
+const linkBin = ({path, to, from, absFrom, force}) =>
+ linkGently({path, to, from, absFrom, force})
+ .then(linked => linked && fixBin(absFrom))
+
+module.exports = linkBin
diff --git a/node_modules/bin-links/lib/link-bins.js b/node_modules/bin-links/lib/link-bins.js
new file mode 100644
index 000000000..6a1086b92
--- /dev/null
+++ b/node_modules/bin-links/lib/link-bins.js
@@ -0,0 +1,22 @@
+const isWindows = require('./is-windows.js')
+const binTarget = require('./bin-target.js')
+const { dirname, resolve, relative } = require('path')
+const linkBin = isWindows ? require('./shim-bin.js') : require('./link-bin.js')
+const normalize = require('npm-normalize-package-bin')
+
+const linkBins = ({path, pkg, top, force}) => {
+ pkg = normalize(pkg)
+ if (!pkg.bin)
+ return Promise.resolve([])
+ const promises = []
+ const target = binTarget({path, top})
+ for (const [key, val] of Object.entries(pkg.bin)) {
+ const to = resolve(target, key)
+ const absFrom = resolve(path, val)
+ const from = relative(dirname(to), absFrom)
+ promises.push(linkBin({path, from, to, absFrom, force}))
+ }
+ return Promise.all(promises)
+}
+
+module.exports = linkBins
diff --git a/node_modules/bin-links/lib/link-gently.js b/node_modules/bin-links/lib/link-gently.js
new file mode 100644
index 000000000..75b157618
--- /dev/null
+++ b/node_modules/bin-links/lib/link-gently.js
@@ -0,0 +1,57 @@
+// if the thing isn't there, skip it
+// if there's a non-symlink there already, eexist
+// if there's a symlink already, pointing somewhere else, eexist
+// if there's a symlink already, pointing into our pkg, remove it first
+// then create the symlink
+
+const { promisify } = require('util')
+const { resolve, dirname } = require('path')
+const mkdirp = require('mkdirp-infer-owner')
+const fs = require('fs')
+const symlink = promisify(fs.symlink)
+const readlink = promisify(fs.readlink)
+const lstat = promisify(fs.lstat)
+const throwNonEnoent = er => { if (er.code !== 'ENOENT') throw er }
+
+// disable glob in our rimraf calls
+const rimraf = promisify(require('rimraf'))
+const rm = path => rimraf(path, { glob: false })
+
+const SKIP = Symbol('skip - missing or already installed')
+
+const linkGently = ({path, to, from, absFrom, force}) => {
+ // if the script or manpage isn't there, just ignore it.
+ // this arguably *should* be an install error of some sort,
+ // or at least a warning, but npm has always behaved this
+ // way in the past, so it'd be a breaking change
+ return Promise.all([
+ lstat(absFrom).catch(throwNonEnoent),
+ lstat(to).catch(throwNonEnoent),
+ ]).then(([stFrom, stTo]) => {
+ // not present in package, skip it
+ if (!stFrom)
+ return SKIP
+
+ // exists! maybe clobber if we can
+ if (stTo) {
+ if (!stTo.isSymbolicLink())
+ return force ? rm(to) : Promise.resolve()
+
+ return readlink(to).then(target => {
+ if (target === from)
+ return SKIP // skip it, already set up like we want it.
+
+ target = resolve(dirname(to), target)
+ if (target.indexOf(path) === 0 || force)
+ return rm(to)
+ })
+ } else {
+ // doesn't exist, dir might not either
+ return mkdirp(dirname(to))
+ }
+ })
+ // this will fail if we didn't remove it
+ .then(skip => skip !== SKIP && symlink(from, to, 'file').then(() => true))
+}
+
+module.exports = linkGently
diff --git a/node_modules/bin-links/lib/link-mans.js b/node_modules/bin-links/lib/link-mans.js
new file mode 100644
index 000000000..6fb167e48
--- /dev/null
+++ b/node_modules/bin-links/lib/link-mans.js
@@ -0,0 +1,51 @@
+const { dirname, relative, join, resolve, basename } = require('path')
+const linkGently = require('./link-gently.js')
+const manTarget = require('./man-target.js')
+
+const linkMans = ({path, pkg, top, force}) => {
+ const target = manTarget({path, top})
+ if (!target || !pkg.man || !Array.isArray(pkg.man) || !pkg.man.length)
+ return Promise.resolve([])
+
+ // break any links to c:\\blah or /foo/blah or ../blah
+ // and filter out duplicates
+ const set = [...new Set(pkg.man.map(man =>
+ man ? join('/', man).replace(/\\|:/g, '/').substr(1) : null)
+ .filter(man => typeof man === 'string'))]
+
+ return Promise.all(set.map(man => {
+ const parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
+ if (!parseMan) {
+ return Promise.reject(Object.assign(new Error('invalid man entry name\n' +
+ 'Man files must end with a number, ' +
+ 'and optionally a .gz suffix if they are compressed.'
+ ), {
+ code: 'EBADMAN',
+ path,
+ pkgid: pkg._id,
+ man,
+ }))
+ }
+
+ const stem = parseMan[1]
+ const sxn = parseMan[2]
+ const base = basename(stem)
+ const absFrom = resolve(path, man)
+ /* istanbul ignore if - that unpossible */
+ if (absFrom.indexOf(path) !== 0) {
+ return Promise.reject(Object.assign(new Error('invalid man entry'), {
+ code: 'EBADMAN',
+ path,
+ pkgid: pkg._id,
+ man,
+ }))
+ }
+
+ const to = resolve(target, 'man' + sxn, base)
+ const from = relative(dirname(to), absFrom)
+
+ return linkGently({from, to, path, absFrom, force})
+ }))
+}
+
+module.exports = linkMans
diff --git a/node_modules/bin-links/lib/man-target.js b/node_modules/bin-links/lib/man-target.js
new file mode 100644
index 000000000..832d2ea35
--- /dev/null
+++ b/node_modules/bin-links/lib/man-target.js
@@ -0,0 +1,6 @@
+const isWindows = require('./is-windows.js')
+const getPrefix = require('./get-prefix.js')
+const {dirname} = require('path')
+
+module.exports = ({top, path}) => !top || isWindows ? null
+ : dirname(getPrefix(path)) + '/share/man'
diff --git a/node_modules/bin-links/lib/shim-bin.js b/node_modules/bin-links/lib/shim-bin.js
new file mode 100644
index 000000000..ff7c99a90
--- /dev/null
+++ b/node_modules/bin-links/lib/shim-bin.js
@@ -0,0 +1,64 @@
+const { promisify } = require('util')
+const { resolve, dirname } = require('path')
+const fs = require('fs')
+const lstat = promisify(fs.lstat)
+const throwNonEnoent = er => { if (er.code !== 'ENOENT') throw er }
+
+const cmdShim = require('cmd-shim')
+const readCmdShim = require('read-cmd-shim')
+
+const fixBin = require('./fix-bin.js')
+
+const failEEXIST = ({path, to, from}) =>
+ Promise.reject(Object.assign(new Error('EEXIST: file already exists'), {
+ path: to,
+ dest: from,
+ code: 'EEXIST',
+ }))
+
+const handleReadCmdShimError = ({er, from, to}) =>
+ er.code === 'ENOENT' ? null
+ : er.code === 'ENOTASHIM' ? failEEXIST({from, to})
+ : Promise.reject(er)
+
+const SKIP = Symbol('skip - missing or already installed')
+const shimBin = ({path, to, from, absFrom, force}) => {
+ const shims = [
+ to,
+ to + '.cmd',
+ to + '.ps1',
+ ]
+ return Promise.all([
+ ...shims,
+ absFrom,
+ ].map(f => lstat(f).catch(throwNonEnoent))).then((stats) => {
+ const [
+ stToBase,
+ stToCmd,
+ stToPs1,
+ stFrom,
+ ] = stats
+ if (!stFrom)
+ return SKIP
+
+ if (force)
+ return
+
+ return Promise.all(shims.map((s, i) => [s, stats[i]]).map(([s, st]) => {
+ if (!st)
+ return
+ return readCmdShim(s)
+ .then(target => {
+ target = resolve(dirname(to), target)
+ if (target.indexOf(resolve(path)) !== 0)
+ return failEEXIST({from, to, path})
+ }, er => handleReadCmdShimError({er, from, to}))
+ }))
+ })
+ .then(skip => skip !== SKIP && doShim(absFrom, to))
+}
+
+const doShim = (absFrom, to) =>
+ cmdShim(absFrom, to).then(() => fixBin(absFrom))
+
+module.exports = shimBin
diff --git a/node_modules/bin-links/node_modules/.bin/rimraf b/node_modules/bin-links/node_modules/.bin/rimraf
new file mode 120000
index 000000000..4cd49a49d
--- /dev/null
+++ b/node_modules/bin-links/node_modules/.bin/rimraf
@@ -0,0 +1 @@
+../rimraf/bin.js \ No newline at end of file
diff --git a/node_modules/bin-links/node_modules/rimraf/CHANGELOG.md b/node_modules/bin-links/node_modules/rimraf/CHANGELOG.md
new file mode 100644
index 000000000..f116f1414
--- /dev/null
+++ b/node_modules/bin-links/node_modules/rimraf/CHANGELOG.md
@@ -0,0 +1,65 @@
+# v3.0
+
+- Add `--preserve-root` option to executable (default true)
+- Drop support for Node.js below version 6
+
+# v2.7
+
+- Make `glob` an optional dependency
+
+# 2.6
+
+- Retry on EBUSY on non-windows platforms as well
+- Make `rimraf.sync` 10000% more reliable on Windows
+
+# 2.5
+
+- Handle Windows EPERM when lstat-ing read-only dirs
+- Add glob option to pass options to glob
+
+# 2.4
+
+- Add EPERM to delay/retry loop
+- Add `disableGlob` option
+
+# 2.3
+
+- Make maxBusyTries and emfileWait configurable
+- Handle weird SunOS unlink-dir issue
+- Glob the CLI arg for better Windows support
+
+# 2.2
+
+- Handle ENOENT properly on Windows
+- Allow overriding fs methods
+- Treat EPERM as indicative of non-empty dir
+- Remove optional graceful-fs dep
+- Consistently return null error instead of undefined on success
+- win32: Treat ENOTEMPTY the same as EBUSY
+- Add `rimraf` binary
+
+# 2.1
+
+- Fix SunOS error code for a non-empty directory
+- Try rmdir before readdir
+- Treat EISDIR like EPERM
+- Remove chmod
+- Remove lstat polyfill, node 0.7 is not supported
+
+# 2.0
+
+- Fix myGid call to check process.getgid
+- Simplify the EBUSY backoff logic.
+- Use fs.lstat in node >= 0.7.9
+- Remove gently option
+- remove fiber implementation
+- Delete files that are marked read-only
+
+# 1.0
+
+- Allow ENOENT in sync method
+- Throw when no callback is provided
+- Make opts.gently an absolute path
+- use 'stat' if 'lstat' is not available
+- Consistent error naming, and rethrow non-ENOENT stat errors
+- add fiber implementation
diff --git a/node_modules/@npmcli/run-script/node_modules/fs-minipass/LICENSE b/node_modules/bin-links/node_modules/rimraf/LICENSE
index 19129e315..19129e315 100644
--- a/node_modules/@npmcli/run-script/node_modules/fs-minipass/LICENSE
+++ b/node_modules/bin-links/node_modules/rimraf/LICENSE
diff --git a/node_modules/bin-links/node_modules/rimraf/README.md b/node_modules/bin-links/node_modules/rimraf/README.md
new file mode 100644
index 000000000..423b8cf85
--- /dev/null
+++ b/node_modules/bin-links/node_modules/rimraf/README.md
@@ -0,0 +1,101 @@
+[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)
+
+The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
+
+Install with `npm install rimraf`, or just drop rimraf.js somewhere.
+
+## API
+
+`rimraf(f, [opts], callback)`
+
+The first parameter will be interpreted as a globbing pattern for files. If you
+want to disable globbing you can do so with `opts.disableGlob` (defaults to
+`false`). This might be handy, for instance, if you have filenames that contain
+globbing wildcard characters.
+
+The callback will be called with an error if there is one. Certain
+errors are handled for you:
+
+* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
+ `opts.maxBusyTries` times before giving up, adding 100ms of wait
+ between each attempt. The default `maxBusyTries` is 3.
+* `ENOENT` - If the file doesn't exist, rimraf will return
+ successfully, since your desired outcome is already the case.
+* `EMFILE` - Since `readdir` requires opening a file descriptor, it's
+ possible to hit `EMFILE` if too many file descriptors are in use.
+ In the sync case, there's nothing to be done for this. But in the
+ async case, rimraf will gradually back off with timeouts up to
+ `opts.emfileWait` ms, which defaults to 1000.
+
+## options
+
+* unlink, chmod, stat, lstat, rmdir, readdir,
+ unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync
+
+ In order to use a custom file system library, you can override
+ specific fs functions on the options object.
+
+ If any of these functions are present on the options object, then
+ the supplied function will be used instead of the default fs
+ method.
+
+ Sync methods are only relevant for `rimraf.sync()`, of course.
+
+ For example:
+
+ ```javascript
+ var myCustomFS = require('some-custom-fs')
+
+ rimraf('some-thing', myCustomFS, callback)
+ ```
+
+* maxBusyTries
+
+ If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered
+ on Windows systems, then rimraf will retry with a linear backoff
+ wait of 100ms longer on each try. The default maxBusyTries is 3.
+
+ Only relevant for async usage.
+
+* emfileWait
+
+ If an `EMFILE` error is encountered, then rimraf will retry
+ repeatedly with a linear backoff of 1ms longer on each try, until
+ the timeout counter hits this max. The default limit is 1000.
+
+ If you repeatedly encounter `EMFILE` errors, then consider using
+ [graceful-fs](http://npm.im/graceful-fs) in your program.
+
+ Only relevant for async usage.
+
+* glob
+
+ Set to `false` to disable [glob](http://npm.im/glob) pattern
+ matching.
+
+ Set to an object to pass options to the glob module. The default
+ glob options are `{ nosort: true, silent: true }`.
+
+ Glob version 6 is used in this module.
+
+ Relevant for both sync and async usage.
+
+* disableGlob
+
+ Set to any non-falsey value to disable globbing entirely.
+ (Equivalent to setting `glob: false`.)
+
+## rimraf.sync
+
+It can remove stuff synchronously, too. But that's not so good. Use
+the async API. It's better.
+
+## CLI
+
+If installed with `npm install rimraf -g` it can be used as a global
+command `rimraf <path> [<path> ...]` which is useful for cross platform support.
+
+## mkdirp
+
+If you need to create a directory recursively, check out
+[mkdirp](https://github.com/substack/node-mkdirp).
diff --git a/node_modules/bin-links/node_modules/rimraf/bin.js b/node_modules/bin-links/node_modules/rimraf/bin.js
new file mode 100755
index 000000000..023814cc9
--- /dev/null
+++ b/node_modules/bin-links/node_modules/rimraf/bin.js
@@ -0,0 +1,68 @@
+#!/usr/bin/env node
+
+const rimraf = require('./')
+
+const path = require('path')
+
+const isRoot = arg => /^(\/|[a-zA-Z]:\\)$/.test(path.resolve(arg))
+const filterOutRoot = arg => {
+ const ok = preserveRoot === false || !isRoot(arg)
+ if (!ok) {
+ console.error(`refusing to remove ${arg}`)
+ console.error('Set --no-preserve-root to allow this')
+ }
+ return ok
+}
+
+let help = false
+let dashdash = false
+let noglob = false
+let preserveRoot = true
+const args = process.argv.slice(2).filter(arg => {
+ if (dashdash)
+ return !!arg
+ else if (arg === '--')
+ dashdash = true
+ else if (arg === '--no-glob' || arg === '-G')
+ noglob = true
+ else if (arg === '--glob' || arg === '-g')
+ noglob = false
+ else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/))
+ help = true
+ else if (arg === '--preserve-root')
+ preserveRoot = true
+ else if (arg === '--no-preserve-root')
+ preserveRoot = false
+ else
+ return !!arg
+}).filter(arg => !preserveRoot || filterOutRoot(arg))
+
+const go = n => {
+ if (n >= args.length)
+ return
+ const options = noglob ? { glob: false } : {}
+ rimraf(args[n], options, er => {
+ if (er)
+ throw er
+ go(n+1)
+ })
+}
+
+if (help || args.length === 0) {
+ // If they didn't ask for help, then this is not a "success"
+ const log = help ? console.log : console.error
+ log('Usage: rimraf <path> [<path> ...]')
+ log('')
+ log(' Deletes all files and folders at "path" recursively.')
+ log('')
+ log('Options:')
+ log('')
+ log(' -h, --help Display this usage info')
+ log(' -G, --no-glob Do not expand glob patterns in arguments')
+ log(' -g, --glob Expand glob patterns in arguments (default)')
+ log(' --preserve-root Do not remove \'/\' (default)')
+ log(' --no-preserve-root Do not treat \'/\' specially')
+ log(' -- Stop parsing flags')
+ process.exit(help ? 0 : 1)
+} else
+ go(0)
diff --git a/node_modules/bin-links/node_modules/rimraf/package.json b/node_modules/bin-links/node_modules/rimraf/package.json
new file mode 100644
index 000000000..e109e110c
--- /dev/null
+++ b/node_modules/bin-links/node_modules/rimraf/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "rimraf@^3.0.0",
+ "_id": "rimraf@3.0.2",
+ "_inBundle": false,
+ "_integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "_location": "/bin-links/rimraf",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "rimraf@^3.0.0",
+ "name": "rimraf",
+ "escapedName": "rimraf",
+ "rawSpec": "^3.0.0",
+ "saveSpec": null,
+ "fetchSpec": "^3.0.0"
+ },
+ "_requiredBy": [
+ "/bin-links"
+ ],
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "_shasum": "f1a5402ba6220ad52cc1282bac1ae3aa49fd061a",
+ "_spec": "rimraf@^3.0.0",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/bin-links",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "bugs": {
+ "url": "https://github.com/isaacs/rimraf/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "deprecated": false,
+ "description": "A deep deletion module for node (like `rm -rf`)",
+ "devDependencies": {
+ "mkdirp": "^0.5.1",
+ "tap": "^12.1.1"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "bin.js",
+ "rimraf.js"
+ ],
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "homepage": "https://github.com/isaacs/rimraf#readme",
+ "license": "ISC",
+ "main": "rimraf.js",
+ "name": "rimraf",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/rimraf.git"
+ },
+ "scripts": {
+ "postpublish": "git push origin --follow-tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "test": "tap test/*.js"
+ },
+ "version": "3.0.2"
+}
diff --git a/node_modules/bin-links/node_modules/rimraf/rimraf.js b/node_modules/bin-links/node_modules/rimraf/rimraf.js
new file mode 100644
index 000000000..34da4171d
--- /dev/null
+++ b/node_modules/bin-links/node_modules/rimraf/rimraf.js
@@ -0,0 +1,360 @@
+const assert = require("assert")
+const path = require("path")
+const fs = require("fs")
+let glob = undefined
+try {
+ glob = require("glob")
+} catch (_err) {
+ // treat glob as optional.
+}
+
+const defaultGlobOpts = {
+ nosort: true,
+ silent: true
+}
+
+// for EMFILE handling
+let timeout = 0
+
+const isWindows = (process.platform === "win32")
+
+const defaults = options => {
+ const methods = [
+ 'unlink',
+ 'chmod',
+ 'stat',
+ 'lstat',
+ 'rmdir',
+ 'readdir'
+ ]
+ methods.forEach(m => {
+ options[m] = options[m] || fs[m]
+ m = m + 'Sync'
+ options[m] = options[m] || fs[m]
+ })
+
+ options.maxBusyTries = options.maxBusyTries || 3
+ options.emfileWait = options.emfileWait || 1000
+ if (options.glob === false) {
+ options.disableGlob = true
+ }
+ if (options.disableGlob !== true && glob === undefined) {
+ throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')
+ }
+ options.disableGlob = options.disableGlob || false
+ options.glob = options.glob || defaultGlobOpts
+}
+
+const rimraf = (p, options, cb) => {
+ if (typeof options === 'function') {
+ cb = options
+ options = {}
+ }
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert.equal(typeof cb, 'function', 'rimraf: callback function required')
+ assert(options, 'rimraf: invalid options argument provided')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ defaults(options)
+
+ let busyTries = 0
+ let errState = null
+ let n = 0
+
+ const next = (er) => {
+ errState = errState || er
+ if (--n === 0)
+ cb(errState)
+ }
+
+ const afterGlob = (er, results) => {
+ if (er)
+ return cb(er)
+
+ n = results.length
+ if (n === 0)
+ return cb()
+
+ results.forEach(p => {
+ const CB = (er) => {
+ if (er) {
+ if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
+ busyTries < options.maxBusyTries) {
+ busyTries ++
+ // try again, with the same exact callback as this one.
+ return setTimeout(() => rimraf_(p, options, CB), busyTries * 100)
+ }
+
+ // this one won't happen if graceful-fs is used.
+ if (er.code === "EMFILE" && timeout < options.emfileWait) {
+ return setTimeout(() => rimraf_(p, options, CB), timeout ++)
+ }
+
+ // already gone
+ if (er.code === "ENOENT") er = null
+ }
+
+ timeout = 0
+ next(er)
+ }
+ rimraf_(p, options, CB)
+ })
+ }
+
+ if (options.disableGlob || !glob.hasMagic(p))
+ return afterGlob(null, [p])
+
+ options.lstat(p, (er, stat) => {
+ if (!er)
+ return afterGlob(null, [p])
+
+ glob(p, options.glob, afterGlob)
+ })
+
+}
+
+// Two possible strategies.
+// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
+// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
+//
+// Both result in an extra syscall when you guess wrong. However, there
+// are likely far more normal files in the world than directories. This
+// is based on the assumption that a the average number of files per
+// directory is >= 1.
+//
+// If anyone ever complains about this, then I guess the strategy could
+// be made configurable somehow. But until then, YAGNI.
+const rimraf_ = (p, options, cb) => {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // sunos lets the root user unlink directories, which is... weird.
+ // so we have to lstat here and make sure it's not a dir.
+ options.lstat(p, (er, st) => {
+ if (er && er.code === "ENOENT")
+ return cb(null)
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === "EPERM" && isWindows)
+ fixWinEPERM(p, options, er, cb)
+
+ if (st && st.isDirectory())
+ return rmdir(p, options, er, cb)
+
+ options.unlink(p, er => {
+ if (er) {
+ if (er.code === "ENOENT")
+ return cb(null)
+ if (er.code === "EPERM")
+ return (isWindows)
+ ? fixWinEPERM(p, options, er, cb)
+ : rmdir(p, options, er, cb)
+ if (er.code === "EISDIR")
+ return rmdir(p, options, er, cb)
+ }
+ return cb(er)
+ })
+ })
+}
+
+const fixWinEPERM = (p, options, er, cb) => {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.chmod(p, 0o666, er2 => {
+ if (er2)
+ cb(er2.code === "ENOENT" ? null : er)
+ else
+ options.stat(p, (er3, stats) => {
+ if (er3)
+ cb(er3.code === "ENOENT" ? null : er)
+ else if (stats.isDirectory())
+ rmdir(p, options, er, cb)
+ else
+ options.unlink(p, cb)
+ })
+ })
+}
+
+const fixWinEPERMSync = (p, options, er) => {
+ assert(p)
+ assert(options)
+
+ try {
+ options.chmodSync(p, 0o666)
+ } catch (er2) {
+ if (er2.code === "ENOENT")
+ return
+ else
+ throw er
+ }
+
+ let stats
+ try {
+ stats = options.statSync(p)
+ } catch (er3) {
+ if (er3.code === "ENOENT")
+ return
+ else
+ throw er
+ }
+
+ if (stats.isDirectory())
+ rmdirSync(p, options, er)
+ else
+ options.unlinkSync(p)
+}
+
+const rmdir = (p, options, originalEr, cb) => {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
+ // if we guessed wrong, and it's not a directory, then
+ // raise the original error.
+ options.rmdir(p, er => {
+ if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
+ rmkids(p, options, cb)
+ else if (er && er.code === "ENOTDIR")
+ cb(originalEr)
+ else
+ cb(er)
+ })
+}
+
+const rmkids = (p, options, cb) => {
+ assert(p)
+ assert(options)
+ assert(typeof cb === 'function')
+
+ options.readdir(p, (er, files) => {
+ if (er)
+ return cb(er)
+ let n = files.length
+ if (n === 0)
+ return options.rmdir(p, cb)
+ let errState
+ files.forEach(f => {
+ rimraf(path.join(p, f), options, er => {
+ if (errState)
+ return
+ if (er)
+ return cb(errState = er)
+ if (--n === 0)
+ options.rmdir(p, cb)
+ })
+ })
+ })
+}
+
+// this looks simpler, and is strictly *faster*, but will
+// tie up the JavaScript thread and fail on excessively
+// deep directory trees.
+const rimrafSync = (p, options) => {
+ options = options || {}
+ defaults(options)
+
+ assert(p, 'rimraf: missing path')
+ assert.equal(typeof p, 'string', 'rimraf: path should be a string')
+ assert(options, 'rimraf: missing options')
+ assert.equal(typeof options, 'object', 'rimraf: options should be object')
+
+ let results
+
+ if (options.disableGlob || !glob.hasMagic(p)) {
+ results = [p]
+ } else {
+ try {
+ options.lstatSync(p)
+ results = [p]
+ } catch (er) {
+ results = glob.sync(p, options.glob)
+ }
+ }
+
+ if (!results.length)
+ return
+
+ for (let i = 0; i < results.length; i++) {
+ const p = results[i]
+
+ let st
+ try {
+ st = options.lstatSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === "EPERM" && isWindows)
+ fixWinEPERMSync(p, options, er)
+ }
+
+ try {
+ // sunos lets the root user unlink directories, which is... weird.
+ if (st && st.isDirectory())
+ rmdirSync(p, options, null)
+ else
+ options.unlinkSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+ if (er.code === "EPERM")
+ return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
+ if (er.code !== "EISDIR")
+ throw er
+
+ rmdirSync(p, options, er)
+ }
+ }
+}
+
+const rmdirSync = (p, options, originalEr) => {
+ assert(p)
+ assert(options)
+
+ try {
+ options.rmdirSync(p)
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return
+ if (er.code === "ENOTDIR")
+ throw originalEr
+ if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
+ rmkidsSync(p, options)
+ }
+}
+
+const rmkidsSync = (p, options) => {
+ assert(p)
+ assert(options)
+ options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+
+ // We only end up here once we got ENOTEMPTY at least once, and
+ // at this point, we are guaranteed to have removed all the kids.
+ // So, we know that it won't be ENOENT or ENOTDIR or anything else.
+ // try really hard to delete stuff on windows, because it has a
+ // PROFOUNDLY annoying habit of not closing handles promptly when
+ // files are deleted, resulting in spurious ENOTEMPTY errors.
+ const retries = isWindows ? 100 : 1
+ let i = 0
+ do {
+ let threw = true
+ try {
+ const ret = options.rmdirSync(p, options)
+ threw = false
+ return ret
+ } finally {
+ if (++i < retries && threw)
+ continue
+ }
+ } while (true)
+}
+
+module.exports = rimraf
+rimraf.sync = rimrafSync
diff --git a/node_modules/bin-links/package.json b/node_modules/bin-links/package.json
index 45393d11c..950031ddb 100644
--- a/node_modules/bin-links/package.json
+++ b/node_modules/bin-links/package.json
@@ -1,67 +1,63 @@
{
- "_from": "bin-links@1.1.7",
- "_id": "bin-links@1.1.7",
+ "_from": "bin-links@latest",
+ "_id": "bin-links@2.1.2",
"_inBundle": false,
- "_integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==",
+ "_integrity": "sha512-mtspzc/umzMiZkIRIVm93WgyT7fFVXX302qswWwlHErBVM8BgAVvB0EVOdzmtrNzs1zIKEE0dE4RR5PwtBfy7g==",
"_location": "/bin-links",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "glob": "7.1.4"
+ },
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "bin-links@1.1.7",
+ "raw": "bin-links@latest",
"name": "bin-links",
"escapedName": "bin-links",
- "rawSpec": "1.1.7",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "1.1.7"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/",
- "/libcipm",
- "/libnpm"
+ "/@npmcli/arborist"
],
- "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz",
- "_shasum": "34b79ea9d0e575d7308afeff0c6b2fc24c793359",
- "_spec": "bin-links@1.1.7",
- "_where": "/Users/mperrotte/npminc/cli",
- "author": {
- "name": "Mike Sherov"
- },
+ "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-2.1.2.tgz",
+ "_shasum": "110f82e5563caf66c4483c1eb5d84043ef571660",
+ "_spec": "bin-links@latest",
+ "_where": "/Users/isaacs/dev/npm/cli",
"bugs": {
"url": "https://github.com/npm/bin-links/issues"
},
"bundleDependencies": false,
"dependencies": {
- "bluebird": "^3.5.3",
- "cmd-shim": "^3.0.0",
- "gentle-fs": "^2.3.0",
- "graceful-fs": "^4.1.15",
+ "cmd-shim": "^4.0.1",
+ "mkdirp": "^1.0.3",
"npm-normalize-package-bin": "^1.0.0",
+ "read-cmd-shim": "^2.0.0",
+ "rimraf": "^3.0.0",
"write-file-atomic": "^2.3.0"
},
"deprecated": false,
"description": "JavaScript package binary linker",
"devDependencies": {
- "mkdirp": "^0.5.1",
- "nyc": "^13.1.0",
- "rimraf": "^2.6.3",
- "standard": "^10.0.3",
- "standard-version": "^4.4.0",
- "tap": "^12.1.3",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
+ "require-inject": "^1.4.4",
+ "tap": "^14.10.6"
+ },
+ "engines": {
+ "node": ">=10"
},
"files": [
- "index.js"
+ "index.js",
+ "lib/*.js"
],
"homepage": "https://github.com/npm/bin-links#readme",
"keywords": [
"npm",
- "gentle",
- "fs"
+ "link",
+ "bins"
],
- "license": "Artistic-2.0",
+ "license": "ISC",
"main": "index.js",
"name": "bin-links",
"repository": {
@@ -69,13 +65,15 @@
"url": "git://github.com/npm/bin-links.git"
},
"scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "posttest": "standard",
- "prerelease": "npm t",
- "release": "standard-version -s",
- "test": "tap -J --nyc-arg=--all --coverage test/*.js --100",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
+ "postversion": "npm publish",
+ "prepublishOnly": "git push --follow-tags",
+ "preversion": "npm t",
+ "snap": "tap",
+ "test": "tap"
+ },
+ "tap": {
+ "check-coverage": true,
+ "coverage-map": "map.js"
},
- "version": "1.1.7"
+ "version": "2.1.2"
}
diff --git a/node_modules/bluebird/LICENSE b/node_modules/bluebird/LICENSE
deleted file mode 100644
index b24e6350c..000000000
--- a/node_modules/bluebird/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013-2018 Petka Antonov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/bluebird/README.md b/node_modules/bluebird/README.md
deleted file mode 100644
index 0eb5b74aa..000000000
--- a/node_modules/bluebird/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-<a href="http://promisesaplus.com/">
- <img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
- title="Promises/A+ 1.1 compliant" align="right" />
-</a>
-
-
-[![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
-[![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
-
-**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises)
-
-# Introduction
-
-Bluebird is a fully featured promise library with focus on innovative features and performance
-
-See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html) for further documentation, references and instructions. See the [**API reference**](http://bluebirdjs.com/docs/api-reference.html) here.
-
-For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
-
-### Note
-
-Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself.
-
-# Questions and issues
-
-The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.
-
-
-
-## Thanks
-
-Thanks to BrowserStack for providing us with a free account which lets us support old browsers like IE8.
-
-# License
-
-The MIT License (MIT)
-
-Copyright (c) 2013-2017 Petka Antonov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
diff --git a/node_modules/bluebird/changelog.md b/node_modules/bluebird/changelog.md
deleted file mode 100644
index 73b2eb6c7..000000000
--- a/node_modules/bluebird/changelog.md
+++ /dev/null
@@ -1 +0,0 @@
-[http://bluebirdjs.com/docs/changelog.html](http://bluebirdjs.com/docs/changelog.html)
diff --git a/node_modules/bluebird/js/browser/bluebird.core.js b/node_modules/bluebird/js/browser/bluebird.core.js
deleted file mode 100644
index bae7583d6..000000000
--- a/node_modules/bluebird/js/browser/bluebird.core.js
+++ /dev/null
@@ -1,3824 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2018 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-/**
- * bluebird build version 3.5.5
- * Features enabled: core
- * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-var firstLineError;
-try {throw new Error(); } catch (e) {firstLineError = e;}
-var schedule = _dereq_("./schedule");
-var Queue = _dereq_("./queue");
-var util = _dereq_("./util");
-
-function Async() {
- this._customScheduler = false;
- this._isTickUsed = false;
- this._lateQueue = new Queue(16);
- this._normalQueue = new Queue(16);
- this._haveDrainedQueues = false;
- this._trampolineEnabled = true;
- var self = this;
- this.drainQueues = function () {
- self._drainQueues();
- };
- this._schedule = schedule;
-}
-
-Async.prototype.setScheduler = function(fn) {
- var prev = this._schedule;
- this._schedule = fn;
- this._customScheduler = true;
- return prev;
-};
-
-Async.prototype.hasCustomScheduler = function() {
- return this._customScheduler;
-};
-
-Async.prototype.enableTrampoline = function() {
- this._trampolineEnabled = true;
-};
-
-Async.prototype.disableTrampolineIfNecessary = function() {
- if (util.hasDevTools) {
- this._trampolineEnabled = false;
- }
-};
-
-Async.prototype.haveItemsQueued = function () {
- return this._isTickUsed || this._haveDrainedQueues;
-};
-
-
-Async.prototype.fatalError = function(e, isNode) {
- if (isNode) {
- process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
- "\n");
- process.exit(2);
- } else {
- this.throwLater(e);
- }
-};
-
-Async.prototype.throwLater = function(fn, arg) {
- if (arguments.length === 1) {
- arg = fn;
- fn = function () { throw arg; };
- }
- if (typeof setTimeout !== "undefined") {
- setTimeout(function() {
- fn(arg);
- }, 0);
- } else try {
- this._schedule(function() {
- fn(arg);
- });
- } catch (e) {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-};
-
-function AsyncInvokeLater(fn, receiver, arg) {
- this._lateQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncInvoke(fn, receiver, arg) {
- this._normalQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncSettlePromises(promise) {
- this._normalQueue._pushOne(promise);
- this._queueTick();
-}
-
-if (!util.hasDevTools) {
- Async.prototype.invokeLater = AsyncInvokeLater;
- Async.prototype.invoke = AsyncInvoke;
- Async.prototype.settlePromises = AsyncSettlePromises;
-} else {
- Async.prototype.invokeLater = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvokeLater.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- setTimeout(function() {
- fn.call(receiver, arg);
- }, 100);
- });
- }
- };
-
- Async.prototype.invoke = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvoke.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- fn.call(receiver, arg);
- });
- }
- };
-
- Async.prototype.settlePromises = function(promise) {
- if (this._trampolineEnabled) {
- AsyncSettlePromises.call(this, promise);
- } else {
- this._schedule(function() {
- promise._settlePromises();
- });
- }
- };
-}
-
-function _drainQueue(queue) {
- while (queue.length() > 0) {
- _drainQueueStep(queue);
- }
-}
-
-function _drainQueueStep(queue) {
- var fn = queue.shift();
- if (typeof fn !== "function") {
- fn._settlePromises();
- } else {
- var receiver = queue.shift();
- var arg = queue.shift();
- fn.call(receiver, arg);
- }
-}
-
-Async.prototype._drainQueues = function () {
- _drainQueue(this._normalQueue);
- this._reset();
- this._haveDrainedQueues = true;
- _drainQueue(this._lateQueue);
-};
-
-Async.prototype._queueTick = function () {
- if (!this._isTickUsed) {
- this._isTickUsed = true;
- this._schedule(this.drainQueues);
- }
-};
-
-Async.prototype._reset = function () {
- this._isTickUsed = false;
-};
-
-module.exports = Async;
-module.exports.firstLineError = firstLineError;
-
-},{"./queue":17,"./schedule":18,"./util":21}],2:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
-var calledBind = false;
-var rejectThis = function(_, e) {
- this._reject(e);
-};
-
-var targetRejected = function(e, context) {
- context.promiseRejectionQueued = true;
- context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
-};
-
-var bindingResolved = function(thisArg, context) {
- if (((this._bitField & 50397184) === 0)) {
- this._resolveCallback(context.target);
- }
-};
-
-var bindingRejected = function(e, context) {
- if (!context.promiseRejectionQueued) this._reject(e);
-};
-
-Promise.prototype.bind = function (thisArg) {
- if (!calledBind) {
- calledBind = true;
- Promise.prototype._propagateFrom = debug.propagateFromFunction();
- Promise.prototype._boundValue = debug.boundValueFunction();
- }
- var maybePromise = tryConvertToPromise(thisArg);
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 1);
- var target = this._target();
- ret._setBoundTo(maybePromise);
- if (maybePromise instanceof Promise) {
- var context = {
- promiseRejectionQueued: false,
- promise: ret,
- target: target,
- bindingPromise: maybePromise
- };
- target._then(INTERNAL, targetRejected, undefined, ret, context);
- maybePromise._then(
- bindingResolved, bindingRejected, undefined, ret, context);
- ret._setOnCancel(maybePromise);
- } else {
- ret._resolveCallback(target);
- }
- return ret;
-};
-
-Promise.prototype._setBoundTo = function (obj) {
- if (obj !== undefined) {
- this._bitField = this._bitField | 2097152;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~2097152);
- }
-};
-
-Promise.prototype._isBound = function () {
- return (this._bitField & 2097152) === 2097152;
-};
-
-Promise.bind = function (thisArg, value) {
- return Promise.resolve(value).bind(thisArg);
-};
-};
-
-},{}],3:[function(_dereq_,module,exports){
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict() {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-var bluebird = _dereq_("./promise")();
-bluebird.noConflict = noConflict;
-module.exports = bluebird;
-
-},{"./promise":15}],4:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-Promise.prototype["break"] = Promise.prototype.cancel = function() {
- if (!debug.cancellation()) return this._warn("cancellation is disabled");
-
- var promise = this;
- var child = promise;
- while (promise._isCancellable()) {
- if (!promise._cancelBy(child)) {
- if (child._isFollowing()) {
- child._followee().cancel();
- } else {
- child._cancelBranched();
- }
- break;
- }
-
- var parent = promise._cancellationParent;
- if (parent == null || !parent._isCancellable()) {
- if (promise._isFollowing()) {
- promise._followee().cancel();
- } else {
- promise._cancelBranched();
- }
- break;
- } else {
- if (promise._isFollowing()) promise._followee().cancel();
- promise._setWillBeCancelled();
- child = promise;
- promise = parent;
- }
- }
-};
-
-Promise.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--;
-};
-
-Promise.prototype._enoughBranchesHaveCancelled = function() {
- return this._branchesRemainingToCancel === undefined ||
- this._branchesRemainingToCancel <= 0;
-};
-
-Promise.prototype._cancelBy = function(canceller) {
- if (canceller === this) {
- this._branchesRemainingToCancel = 0;
- this._invokeOnCancel();
- return true;
- } else {
- this._branchHasCancelled();
- if (this._enoughBranchesHaveCancelled()) {
- this._invokeOnCancel();
- return true;
- }
- }
- return false;
-};
-
-Promise.prototype._cancelBranched = function() {
- if (this._enoughBranchesHaveCancelled()) {
- this._cancel();
- }
-};
-
-Promise.prototype._cancel = function() {
- if (!this._isCancellable()) return;
- this._setCancelled();
- async.invoke(this._cancelPromises, this, undefined);
-};
-
-Promise.prototype._cancelPromises = function() {
- if (this._length() > 0) this._settlePromises();
-};
-
-Promise.prototype._unsetOnCancel = function() {
- this._onCancelField = undefined;
-};
-
-Promise.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled();
-};
-
-Promise.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled();
-};
-
-Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
- if (util.isArray(onCancelCallback)) {
- for (var i = 0; i < onCancelCallback.length; ++i) {
- this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
- }
- } else if (onCancelCallback !== undefined) {
- if (typeof onCancelCallback === "function") {
- if (!internalOnly) {
- var e = tryCatch(onCancelCallback).call(this._boundValue());
- if (e === errorObj) {
- this._attachExtraTrace(e.e);
- async.throwLater(e.e);
- }
- }
- } else {
- onCancelCallback._resultCancelled(this);
- }
- }
-};
-
-Promise.prototype._invokeOnCancel = function() {
- var onCancelCallback = this._onCancel();
- this._unsetOnCancel();
- async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
-};
-
-Promise.prototype._invokeInternalOnCancel = function() {
- if (this._isCancellable()) {
- this._doInvokeOnCancel(this._onCancel(), true);
- this._unsetOnCancel();
- }
-};
-
-Promise.prototype._resultCancelled = function() {
- this.cancel();
-};
-
-};
-
-},{"./util":21}],5:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = _dereq_("./util");
-var getKeys = _dereq_("./es5").keys;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function catchFilter(instances, cb, promise) {
- return function(e) {
- var boundTo = promise._boundValue();
- predicateLoop: for (var i = 0; i < instances.length; ++i) {
- var item = instances[i];
-
- if (item === Error ||
- (item != null && item.prototype instanceof Error)) {
- if (e instanceof item) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (typeof item === "function") {
- var matchesPredicate = tryCatch(item).call(boundTo, e);
- if (matchesPredicate === errorObj) {
- return matchesPredicate;
- } else if (matchesPredicate) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (util.isObject(e)) {
- var keys = getKeys(item);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- if (item[key] != e[key]) {
- continue predicateLoop;
- }
- }
- return tryCatch(cb).call(boundTo, e);
- }
- }
- return NEXT_FILTER;
- };
-}
-
-return catchFilter;
-};
-
-},{"./es5":10,"./util":21}],6:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var longStackTraces = false;
-var contextStack = [];
-
-Promise.prototype._promiseCreated = function() {};
-Promise.prototype._pushContext = function() {};
-Promise.prototype._popContext = function() {return null;};
-Promise._peekContext = Promise.prototype._peekContext = function() {};
-
-function Context() {
- this._trace = new Context.CapturedTrace(peekContext());
-}
-Context.prototype._pushContext = function () {
- if (this._trace !== undefined) {
- this._trace._promiseCreated = null;
- contextStack.push(this._trace);
- }
-};
-
-Context.prototype._popContext = function () {
- if (this._trace !== undefined) {
- var trace = contextStack.pop();
- var ret = trace._promiseCreated;
- trace._promiseCreated = null;
- return ret;
- }
- return null;
-};
-
-function createContext() {
- if (longStackTraces) return new Context();
-}
-
-function peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return undefined;
-}
-Context.CapturedTrace = null;
-Context.create = createContext;
-Context.deactivateLongStackTraces = function() {};
-Context.activateLongStackTraces = function() {
- var Promise_pushContext = Promise.prototype._pushContext;
- var Promise_popContext = Promise.prototype._popContext;
- var Promise_PeekContext = Promise._peekContext;
- var Promise_peekContext = Promise.prototype._peekContext;
- var Promise_promiseCreated = Promise.prototype._promiseCreated;
- Context.deactivateLongStackTraces = function() {
- Promise.prototype._pushContext = Promise_pushContext;
- Promise.prototype._popContext = Promise_popContext;
- Promise._peekContext = Promise_PeekContext;
- Promise.prototype._peekContext = Promise_peekContext;
- Promise.prototype._promiseCreated = Promise_promiseCreated;
- longStackTraces = false;
- };
- longStackTraces = true;
- Promise.prototype._pushContext = Context.prototype._pushContext;
- Promise.prototype._popContext = Context.prototype._popContext;
- Promise._peekContext = Promise.prototype._peekContext = peekContext;
- Promise.prototype._promiseCreated = function() {
- var ctx = this._peekContext();
- if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
- };
-};
-return Context;
-};
-
-},{}],7:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, Context) {
-var getDomain = Promise._getDomain;
-var async = Promise._async;
-var Warning = _dereq_("./errors").Warning;
-var util = _dereq_("./util");
-var es5 = _dereq_("./es5");
-var canAttachTrace = util.canAttachTrace;
-var unhandledRejectionHandled;
-var possiblyUnhandledRejection;
-var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
-var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
-var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
-var stackFramePattern = null;
-var formatStack = null;
-var indentStackFrames = false;
-var printWarning;
-var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
- (true ||
- util.env("BLUEBIRD_DEBUG") ||
- util.env("NODE_ENV") === "development"));
-
-var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
- (debugging || util.env("BLUEBIRD_WARNINGS")));
-
-var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
- (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
-
-var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
- (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
-
-Promise.prototype.suppressUnhandledRejections = function() {
- var target = this._target();
- target._bitField = ((target._bitField & (~1048576)) |
- 524288);
-};
-
-Promise.prototype._ensurePossibleRejectionHandled = function () {
- if ((this._bitField & 524288) !== 0) return;
- this._setRejectionIsUnhandled();
- var self = this;
- setTimeout(function() {
- self._notifyUnhandledRejection();
- }, 1);
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
- fireRejectionEvent("rejectionHandled",
- unhandledRejectionHandled, undefined, this);
-};
-
-Promise.prototype._setReturnedNonUndefined = function() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._returnedNonUndefined = function() {
- return (this._bitField & 268435456) !== 0;
-};
-
-Promise.prototype._notifyUnhandledRejection = function () {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue();
- this._setUnhandledRejectionIsNotified();
- fireRejectionEvent("unhandledRejection",
- possiblyUnhandledRejection, reason, this);
- }
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField | 262144;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField & (~262144);
-};
-
-Promise.prototype._isUnhandledRejectionNotified = function () {
- return (this._bitField & 262144) > 0;
-};
-
-Promise.prototype._setRejectionIsUnhandled = function () {
- this._bitField = this._bitField | 1048576;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled = function () {
- this._bitField = this._bitField & (~1048576);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled = function () {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
- return warn(message, shouldUseOwnTrace, promise || this);
-};
-
-Promise.onPossiblyUnhandledRejection = function (fn) {
- var domain = getDomain();
- possiblyUnhandledRejection =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-Promise.onUnhandledRejectionHandled = function (fn) {
- var domain = getDomain();
- unhandledRejectionHandled =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-var disableLongStackTraces = function() {};
-Promise.longStackTraces = function () {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (!config.longStackTraces && longStackTracesIsSupported()) {
- var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
- var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
- var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
- config.longStackTraces = true;
- disableLongStackTraces = function() {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- Promise.prototype._captureStackTrace = Promise_captureStackTrace;
- Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
- Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
- Context.deactivateLongStackTraces();
- async.enableTrampoline();
- config.longStackTraces = false;
- };
- Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
- Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
- Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
- Context.activateLongStackTraces();
- async.disableTrampolineIfNecessary();
- }
-};
-
-Promise.hasLongStackTraces = function () {
- return config.longStackTraces && longStackTracesIsSupported();
-};
-
-var fireDomEvent = (function() {
- try {
- if (typeof CustomEvent === "function") {
- var event = new CustomEvent("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var eventData = {
- detail: event,
- cancelable: true
- };
- es5.defineProperty(
- eventData, "promise", {value: event.promise});
- es5.defineProperty(eventData, "reason", {value: event.reason});
- var domEvent = new CustomEvent(name.toLowerCase(), eventData);
- return !util.global.dispatchEvent(domEvent);
- };
- } else if (typeof Event === "function") {
- var event = new Event("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new Event(name.toLowerCase(), {
- cancelable: true
- });
- domEvent.detail = event;
- es5.defineProperty(domEvent, "promise", {value: event.promise});
- es5.defineProperty(domEvent, "reason", {value: event.reason});
- return !util.global.dispatchEvent(domEvent);
- };
- } else {
- var event = document.createEvent("CustomEvent");
- event.initCustomEvent("testingtheevent", false, true, {});
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = document.createEvent("CustomEvent");
- domEvent.initCustomEvent(name.toLowerCase(), false, true,
- event);
- return !util.global.dispatchEvent(domEvent);
- };
- }
- } catch (e) {}
- return function() {
- return false;
- };
-})();
-
-var fireGlobalEvent = (function() {
- if (util.isNode) {
- return function() {
- return process.emit.apply(process, arguments);
- };
- } else {
- if (!util.global) {
- return function() {
- return false;
- };
- }
- return function(name) {
- var methodName = "on" + name.toLowerCase();
- var method = util.global[methodName];
- if (!method) return false;
- method.apply(util.global, [].slice.call(arguments, 1));
- return true;
- };
- }
-})();
-
-function generatePromiseLifecycleEventObject(name, promise) {
- return {promise: promise};
-}
-
-var eventToObjectGenerator = {
- promiseCreated: generatePromiseLifecycleEventObject,
- promiseFulfilled: generatePromiseLifecycleEventObject,
- promiseRejected: generatePromiseLifecycleEventObject,
- promiseResolved: generatePromiseLifecycleEventObject,
- promiseCancelled: generatePromiseLifecycleEventObject,
- promiseChained: function(name, promise, child) {
- return {promise: promise, child: child};
- },
- warning: function(name, warning) {
- return {warning: warning};
- },
- unhandledRejection: function (name, reason, promise) {
- return {reason: reason, promise: promise};
- },
- rejectionHandled: generatePromiseLifecycleEventObject
-};
-
-var activeFireEvent = function (name) {
- var globalEventFired = false;
- try {
- globalEventFired = fireGlobalEvent.apply(null, arguments);
- } catch (e) {
- async.throwLater(e);
- globalEventFired = true;
- }
-
- var domEventFired = false;
- try {
- domEventFired = fireDomEvent(name,
- eventToObjectGenerator[name].apply(null, arguments));
- } catch (e) {
- async.throwLater(e);
- domEventFired = true;
- }
-
- return domEventFired || globalEventFired;
-};
-
-Promise.config = function(opts) {
- opts = Object(opts);
- if ("longStackTraces" in opts) {
- if (opts.longStackTraces) {
- Promise.longStackTraces();
- } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
- disableLongStackTraces();
- }
- }
- if ("warnings" in opts) {
- var warningsOption = opts.warnings;
- config.warnings = !!warningsOption;
- wForgottenReturn = config.warnings;
-
- if (util.isObject(warningsOption)) {
- if ("wForgottenReturn" in warningsOption) {
- wForgottenReturn = !!warningsOption.wForgottenReturn;
- }
- }
- }
- if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
- if (async.haveItemsQueued()) {
- throw new Error(
- "cannot enable cancellation after promises are in use");
- }
- Promise.prototype._clearCancellationData =
- cancellationClearCancellationData;
- Promise.prototype._propagateFrom = cancellationPropagateFrom;
- Promise.prototype._onCancel = cancellationOnCancel;
- Promise.prototype._setOnCancel = cancellationSetOnCancel;
- Promise.prototype._attachCancellationCallback =
- cancellationAttachCancellationCallback;
- Promise.prototype._execute = cancellationExecute;
- propagateFromFunction = cancellationPropagateFrom;
- config.cancellation = true;
- }
- if ("monitoring" in opts) {
- if (opts.monitoring && !config.monitoring) {
- config.monitoring = true;
- Promise.prototype._fireEvent = activeFireEvent;
- } else if (!opts.monitoring && config.monitoring) {
- config.monitoring = false;
- Promise.prototype._fireEvent = defaultFireEvent;
- }
- }
- return Promise;
-};
-
-function defaultFireEvent() { return false; }
-
-Promise.prototype._fireEvent = defaultFireEvent;
-Promise.prototype._execute = function(executor, resolve, reject) {
- try {
- executor(resolve, reject);
- } catch (e) {
- return e;
- }
-};
-Promise.prototype._onCancel = function () {};
-Promise.prototype._setOnCancel = function (handler) { ; };
-Promise.prototype._attachCancellationCallback = function(onCancel) {
- ;
-};
-Promise.prototype._captureStackTrace = function () {};
-Promise.prototype._attachExtraTrace = function () {};
-Promise.prototype._dereferenceTrace = function () {};
-Promise.prototype._clearCancellationData = function() {};
-Promise.prototype._propagateFrom = function (parent, flags) {
- ;
- ;
-};
-
-function cancellationExecute(executor, resolve, reject) {
- var promise = this;
- try {
- executor(resolve, reject, function(onCancel) {
- if (typeof onCancel !== "function") {
- throw new TypeError("onCancel must be a function, got: " +
- util.toString(onCancel));
- }
- promise._attachCancellationCallback(onCancel);
- });
- } catch (e) {
- return e;
- }
-}
-
-function cancellationAttachCancellationCallback(onCancel) {
- if (!this._isCancellable()) return this;
-
- var previousOnCancel = this._onCancel();
- if (previousOnCancel !== undefined) {
- if (util.isArray(previousOnCancel)) {
- previousOnCancel.push(onCancel);
- } else {
- this._setOnCancel([previousOnCancel, onCancel]);
- }
- } else {
- this._setOnCancel(onCancel);
- }
-}
-
-function cancellationOnCancel() {
- return this._onCancelField;
-}
-
-function cancellationSetOnCancel(onCancel) {
- this._onCancelField = onCancel;
-}
-
-function cancellationClearCancellationData() {
- this._cancellationParent = undefined;
- this._onCancelField = undefined;
-}
-
-function cancellationPropagateFrom(parent, flags) {
- if ((flags & 1) !== 0) {
- this._cancellationParent = parent;
- var branchesRemainingToCancel = parent._branchesRemainingToCancel;
- if (branchesRemainingToCancel === undefined) {
- branchesRemainingToCancel = 0;
- }
- parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
- }
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-
-function bindingPropagateFrom(parent, flags) {
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-var propagateFromFunction = bindingPropagateFrom;
-
-function boundValueFunction() {
- var ret = this._boundTo;
- if (ret !== undefined) {
- if (ret instanceof Promise) {
- if (ret.isFulfilled()) {
- return ret.value();
- } else {
- return undefined;
- }
- }
- }
- return ret;
-}
-
-function longStackTracesCaptureStackTrace() {
- this._trace = new CapturedTrace(this._peekContext());
-}
-
-function longStackTracesAttachExtraTrace(error, ignoreSelf) {
- if (canAttachTrace(error)) {
- var trace = this._trace;
- if (trace !== undefined) {
- if (ignoreSelf) trace = trace._parent;
- }
- if (trace !== undefined) {
- trace.attachExtraTrace(error);
- } else if (!error.__stackCleaned__) {
- var parsed = parseStackAndMessage(error);
- util.notEnumerableProp(error, "stack",
- parsed.message + "\n" + parsed.stack.join("\n"));
- util.notEnumerableProp(error, "__stackCleaned__", true);
- }
- }
-}
-
-function longStackTracesDereferenceTrace() {
- this._trace = undefined;
-}
-
-function checkForgottenReturns(returnValue, promiseCreated, name, promise,
- parent) {
- if (returnValue === undefined && promiseCreated !== null &&
- wForgottenReturn) {
- if (parent !== undefined && parent._returnedNonUndefined()) return;
- if ((promise._bitField & 65535) === 0) return;
-
- if (name) name = name + " ";
- var handlerLine = "";
- var creatorLine = "";
- if (promiseCreated._trace) {
- var traceLines = promiseCreated._trace.stack.split("\n");
- var stack = cleanStack(traceLines);
- for (var i = stack.length - 1; i >= 0; --i) {
- var line = stack[i];
- if (!nodeFramePattern.test(line)) {
- var lineMatches = line.match(parseLinePattern);
- if (lineMatches) {
- handlerLine = "at " + lineMatches[1] +
- ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
- }
- break;
- }
- }
-
- if (stack.length > 0) {
- var firstUserLine = stack[0];
- for (var i = 0; i < traceLines.length; ++i) {
-
- if (traceLines[i] === firstUserLine) {
- if (i > 0) {
- creatorLine = "\n" + traceLines[i - 1];
- }
- break;
- }
- }
-
- }
- }
- var msg = "a promise was created in a " + name +
- "handler " + handlerLine + "but was not returned from it, " +
- "see http://goo.gl/rRqMUw" +
- creatorLine;
- promise._warn(msg, true, promiseCreated);
- }
-}
-
-function deprecated(name, replacement) {
- var message = name +
- " is deprecated and will be removed in a future version.";
- if (replacement) message += " Use " + replacement + " instead.";
- return warn(message);
-}
-
-function warn(message, shouldUseOwnTrace, promise) {
- if (!config.warnings) return;
- var warning = new Warning(message);
- var ctx;
- if (shouldUseOwnTrace) {
- promise._attachExtraTrace(warning);
- } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
- ctx.attachExtraTrace(warning);
- } else {
- var parsed = parseStackAndMessage(warning);
- warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
- }
-
- if (!activeFireEvent("warning", warning)) {
- formatAndLogError(warning, "", true);
- }
-}
-
-function reconstructStack(message, stacks) {
- for (var i = 0; i < stacks.length - 1; ++i) {
- stacks[i].push("From previous event:");
- stacks[i] = stacks[i].join("\n");
- }
- if (i < stacks.length) {
- stacks[i] = stacks[i].join("\n");
- }
- return message + "\n" + stacks.join("\n");
-}
-
-function removeDuplicateOrEmptyJumps(stacks) {
- for (var i = 0; i < stacks.length; ++i) {
- if (stacks[i].length === 0 ||
- ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
- stacks.splice(i, 1);
- i--;
- }
- }
-}
-
-function removeCommonRoots(stacks) {
- var current = stacks[0];
- for (var i = 1; i < stacks.length; ++i) {
- var prev = stacks[i];
- var currentLastIndex = current.length - 1;
- var currentLastLine = current[currentLastIndex];
- var commonRootMeetPoint = -1;
-
- for (var j = prev.length - 1; j >= 0; --j) {
- if (prev[j] === currentLastLine) {
- commonRootMeetPoint = j;
- break;
- }
- }
-
- for (var j = commonRootMeetPoint; j >= 0; --j) {
- var line = prev[j];
- if (current[currentLastIndex] === line) {
- current.pop();
- currentLastIndex--;
- } else {
- break;
- }
- }
- current = prev;
- }
-}
-
-function cleanStack(stack) {
- var ret = [];
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- var isTraceLine = " (No stack trace)" === line ||
- stackFramePattern.test(line);
- var isInternalFrame = isTraceLine && shouldIgnore(line);
- if (isTraceLine && !isInternalFrame) {
- if (indentStackFrames && line.charAt(0) !== " ") {
- line = " " + line;
- }
- ret.push(line);
- }
- }
- return ret;
-}
-
-function stackFramesAsArray(error) {
- var stack = error.stack.replace(/\s+$/g, "").split("\n");
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- if (" (No stack trace)" === line || stackFramePattern.test(line)) {
- break;
- }
- }
- if (i > 0 && error.name != "SyntaxError") {
- stack = stack.slice(i);
- }
- return stack;
-}
-
-function parseStackAndMessage(error) {
- var stack = error.stack;
- var message = error.toString();
- stack = typeof stack === "string" && stack.length > 0
- ? stackFramesAsArray(error) : [" (No stack trace)"];
- return {
- message: message,
- stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
- };
-}
-
-function formatAndLogError(error, title, isSoft) {
- if (typeof console !== "undefined") {
- var message;
- if (util.isObject(error)) {
- var stack = error.stack;
- message = title + formatStack(stack, error);
- } else {
- message = title + String(error);
- }
- if (typeof printWarning === "function") {
- printWarning(message, isSoft);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-}
-
-function fireRejectionEvent(name, localHandler, reason, promise) {
- var localEventFired = false;
- try {
- if (typeof localHandler === "function") {
- localEventFired = true;
- if (name === "rejectionHandled") {
- localHandler(promise);
- } else {
- localHandler(reason, promise);
- }
- }
- } catch (e) {
- async.throwLater(e);
- }
-
- if (name === "unhandledRejection") {
- if (!activeFireEvent(name, reason, promise) && !localEventFired) {
- formatAndLogError(reason, "Unhandled rejection ");
- }
- } else {
- activeFireEvent(name, promise);
- }
-}
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj && typeof obj.toString === "function"
- ? obj.toString() : util.toString(obj);
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function longStackTracesIsSupported() {
- return typeof captureStackTrace === "function";
-}
-
-var shouldIgnore = function() { return false; };
-var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
-function parseLineInfo(line) {
- var matches = line.match(parseLineInfoRegex);
- if (matches) {
- return {
- fileName: matches[1],
- line: parseInt(matches[2], 10)
- };
- }
-}
-
-function setBounds(firstLineError, lastLineError) {
- if (!longStackTracesIsSupported()) return;
- var firstStackLines = (firstLineError.stack || "").split("\n");
- var lastStackLines = (lastLineError.stack || "").split("\n");
- var firstIndex = -1;
- var lastIndex = -1;
- var firstFileName;
- var lastFileName;
- for (var i = 0; i < firstStackLines.length; ++i) {
- var result = parseLineInfo(firstStackLines[i]);
- if (result) {
- firstFileName = result.fileName;
- firstIndex = result.line;
- break;
- }
- }
- for (var i = 0; i < lastStackLines.length; ++i) {
- var result = parseLineInfo(lastStackLines[i]);
- if (result) {
- lastFileName = result.fileName;
- lastIndex = result.line;
- break;
- }
- }
- if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
- firstFileName !== lastFileName || firstIndex >= lastIndex) {
- return;
- }
-
- shouldIgnore = function(line) {
- if (bluebirdFramePattern.test(line)) return true;
- var info = parseLineInfo(line);
- if (info) {
- if (info.fileName === firstFileName &&
- (firstIndex <= info.line && info.line <= lastIndex)) {
- return true;
- }
- }
- return false;
- };
-}
-
-function CapturedTrace(parent) {
- this._parent = parent;
- this._promisesCreated = 0;
- var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
- captureStackTrace(this, CapturedTrace);
- if (length > 32) this.uncycle();
-}
-util.inherits(CapturedTrace, Error);
-Context.CapturedTrace = CapturedTrace;
-
-CapturedTrace.prototype.uncycle = function() {
- var length = this._length;
- if (length < 2) return;
- var nodes = [];
- var stackToIndex = {};
-
- for (var i = 0, node = this; node !== undefined; ++i) {
- nodes.push(node);
- node = node._parent;
- }
- length = this._length = i;
- for (var i = length - 1; i >= 0; --i) {
- var stack = nodes[i].stack;
- if (stackToIndex[stack] === undefined) {
- stackToIndex[stack] = i;
- }
- }
- for (var i = 0; i < length; ++i) {
- var currentStack = nodes[i].stack;
- var index = stackToIndex[currentStack];
- if (index !== undefined && index !== i) {
- if (index > 0) {
- nodes[index - 1]._parent = undefined;
- nodes[index - 1]._length = 1;
- }
- nodes[i]._parent = undefined;
- nodes[i]._length = 1;
- var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
-
- if (index < length - 1) {
- cycleEdgeNode._parent = nodes[index + 1];
- cycleEdgeNode._parent.uncycle();
- cycleEdgeNode._length =
- cycleEdgeNode._parent._length + 1;
- } else {
- cycleEdgeNode._parent = undefined;
- cycleEdgeNode._length = 1;
- }
- var currentChildLength = cycleEdgeNode._length + 1;
- for (var j = i - 2; j >= 0; --j) {
- nodes[j]._length = currentChildLength;
- currentChildLength++;
- }
- return;
- }
- }
-};
-
-CapturedTrace.prototype.attachExtraTrace = function(error) {
- if (error.__stackCleaned__) return;
- this.uncycle();
- var parsed = parseStackAndMessage(error);
- var message = parsed.message;
- var stacks = [parsed.stack];
-
- var trace = this;
- while (trace !== undefined) {
- stacks.push(cleanStack(trace.stack.split("\n")));
- trace = trace._parent;
- }
- removeCommonRoots(stacks);
- removeDuplicateOrEmptyJumps(stacks);
- util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
- util.notEnumerableProp(error, "__stackCleaned__", true);
-};
-
-var captureStackTrace = (function stackDetection() {
- var v8stackFramePattern = /^\s*at\s*/;
- var v8stackFormatter = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- Error.stackTraceLimit += 6;
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- var captureStackTrace = Error.captureStackTrace;
-
- shouldIgnore = function(line) {
- return bluebirdFramePattern.test(line);
- };
- return function(receiver, ignoreUntil) {
- Error.stackTraceLimit += 6;
- captureStackTrace(receiver, ignoreUntil);
- Error.stackTraceLimit -= 6;
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
- stackFramePattern = /@/;
- formatStack = v8stackFormatter;
- indentStackFrames = true;
- return function captureStackTrace(o) {
- o.stack = new Error().stack;
- };
- }
-
- var hasStackAfterThrow;
- try { throw new Error(); }
- catch(e) {
- hasStackAfterThrow = ("stack" in e);
- }
- if (!("stack" in err) && hasStackAfterThrow &&
- typeof Error.stackTraceLimit === "number") {
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- return function captureStackTrace(o) {
- Error.stackTraceLimit += 6;
- try { throw new Error(); }
- catch(e) { o.stack = e.stack; }
- Error.stackTraceLimit -= 6;
- };
- }
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- return null;
-
-})([]);
-
-if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
- printWarning = function (message) {
- console.warn(message);
- };
- if (util.isNode && process.stderr.isTTY) {
- printWarning = function(message, isSoft) {
- var color = isSoft ? "\u001b[33m" : "\u001b[31m";
- console.warn(color + message + "\u001b[0m\n");
- };
- } else if (!util.isNode && typeof (new Error().stack) === "string") {
- printWarning = function(message, isSoft) {
- console.warn("%c" + message,
- isSoft ? "color: darkorange" : "color: red");
- };
- }
-}
-
-var config = {
- warnings: warnings,
- longStackTraces: false,
- cancellation: false,
- monitoring: false
-};
-
-if (longStackTraces) Promise.longStackTraces();
-
-return {
- longStackTraces: function() {
- return config.longStackTraces;
- },
- warnings: function() {
- return config.warnings;
- },
- cancellation: function() {
- return config.cancellation;
- },
- monitoring: function() {
- return config.monitoring;
- },
- propagateFromFunction: function() {
- return propagateFromFunction;
- },
- boundValueFunction: function() {
- return boundValueFunction;
- },
- checkForgottenReturns: checkForgottenReturns,
- setBounds: setBounds,
- warn: warn,
- deprecated: deprecated,
- CapturedTrace: CapturedTrace,
- fireDomEvent: fireDomEvent,
- fireGlobalEvent: fireGlobalEvent
-};
-};
-
-},{"./errors":9,"./es5":10,"./util":21}],8:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function returner() {
- return this.value;
-}
-function thrower() {
- throw this.reason;
-}
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn = function (value) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- returner, undefined, undefined, {value: value}, undefined);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow = function (reason) {
- return this._then(
- thrower, undefined, undefined, {reason: reason}, undefined);
-};
-
-Promise.prototype.catchThrow = function (reason) {
- if (arguments.length <= 1) {
- return this._then(
- undefined, thrower, undefined, {reason: reason}, undefined);
- } else {
- var _reason = arguments[1];
- var handler = function() {throw _reason;};
- return this.caught(reason, handler);
- }
-};
-
-Promise.prototype.catchReturn = function (value) {
- if (arguments.length <= 1) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- undefined, returner, undefined, {value: value}, undefined);
- } else {
- var _value = arguments[1];
- if (_value instanceof Promise) _value.suppressUnhandledRejections();
- var handler = function() {return _value;};
- return this.caught(value, handler);
- }
-};
-};
-
-},{}],9:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var Objectfreeze = es5.freeze;
-var util = _dereq_("./util");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- notEnumerableProp(this, "message",
- typeof message === "string" ? message : defaultMessage);
- notEnumerableProp(this, "name", nameProperty);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- Error.call(this);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var Warning = subError("Warning", "warning");
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-es5.defineProperty(AggregateError.prototype, "length", {
- value: 0,
- configurable: false,
- writable: true,
- enumerable: true
-});
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- if (!(this instanceof OperationalError))
- return new OperationalError(message);
- notEnumerableProp(this, "name", "OperationalError");
- notEnumerableProp(this, "message", message);
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- notEnumerableProp(this, "message", message.message);
- notEnumerableProp(this, "stack", message.stack);
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var errorTypes = Error["__BluebirdErrorTypes__"];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- es5.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: errorTypes,
- writable: false,
- enumerable: false,
- configurable: false
- });
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- Warning: Warning
-};
-
-},{"./es5":10,"./util":21}],10:[function(_dereq_,module,exports){
-var isES5 = (function(){
- "use strict";
- return this === undefined;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5,
- propertyIsWritable: function(obj, prop) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
- return !!(!descriptor || descriptor.writable || descriptor.set);
- }
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function (o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- };
-
- var ObjectGetDescriptor = function(o, key) {
- return {value: o[key]};
- };
-
- var ObjectDefineProperty = function (o, key, desc) {
- o[key] = desc.value;
- return o;
- };
-
- var ObjectFreeze = function (obj) {
- return obj;
- };
-
- var ObjectGetPrototypeOf = function (obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- };
-
- var ArrayIsArray = function (obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- };
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- names: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- getDescriptor: ObjectGetDescriptor,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5,
- propertyIsWritable: function() {
- return true;
- }
- };
-}
-
-},{}],11:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
-var util = _dereq_("./util");
-var CancellationError = Promise.CancellationError;
-var errorObj = util.errorObj;
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-
-function PassThroughHandlerContext(promise, type, handler) {
- this.promise = promise;
- this.type = type;
- this.handler = handler;
- this.called = false;
- this.cancelPromise = null;
-}
-
-PassThroughHandlerContext.prototype.isFinallyHandler = function() {
- return this.type === 0;
-};
-
-function FinallyHandlerCancelReaction(finallyHandler) {
- this.finallyHandler = finallyHandler;
-}
-
-FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
- checkCancel(this.finallyHandler);
-};
-
-function checkCancel(ctx, reason) {
- if (ctx.cancelPromise != null) {
- if (arguments.length > 1) {
- ctx.cancelPromise._reject(reason);
- } else {
- ctx.cancelPromise._cancel();
- }
- ctx.cancelPromise = null;
- return true;
- }
- return false;
-}
-
-function succeed() {
- return finallyHandler.call(this, this.promise._target()._settledValue());
-}
-function fail(reason) {
- if (checkCancel(this, reason)) return;
- errorObj.e = reason;
- return errorObj;
-}
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- if (!this.called) {
- this.called = true;
- var ret = this.isFinallyHandler()
- ? handler.call(promise._boundValue())
- : handler.call(promise._boundValue(), reasonOrValue);
- if (ret === NEXT_FILTER) {
- return ret;
- } else if (ret !== undefined) {
- promise._setReturnedNonUndefined();
- var maybePromise = tryConvertToPromise(ret, promise);
- if (maybePromise instanceof Promise) {
- if (this.cancelPromise != null) {
- if (maybePromise._isCancelled()) {
- var reason =
- new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- errorObj.e = reason;
- return errorObj;
- } else if (maybePromise.isPending()) {
- maybePromise._attachCancellationCallback(
- new FinallyHandlerCancelReaction(this));
- }
- }
- return maybePromise._then(
- succeed, fail, undefined, this, undefined);
- }
- }
- }
-
- if (promise.isRejected()) {
- checkCancel(this);
- errorObj.e = reasonOrValue;
- return errorObj;
- } else {
- checkCancel(this);
- return reasonOrValue;
- }
-}
-
-Promise.prototype._passThrough = function(handler, type, success, fail) {
- if (typeof handler !== "function") return this.then();
- return this._then(success,
- fail,
- undefined,
- new PassThroughHandlerContext(this, type, handler),
- undefined);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function (handler) {
- return this._passThrough(handler,
- 0,
- finallyHandler,
- finallyHandler);
-};
-
-
-Promise.prototype.tap = function (handler) {
- return this._passThrough(handler, 1, finallyHandler);
-};
-
-Promise.prototype.tapCatch = function (handlerOrPredicate) {
- var len = arguments.length;
- if(len === 1) {
- return this._passThrough(handlerOrPredicate,
- 1,
- undefined,
- finallyHandler);
- } else {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return Promise.reject(new TypeError(
- "tapCatch statement predicate: "
- + "expecting an object but got " + util.classString(item)
- ));
- }
- }
- catchInstances.length = j;
- var handler = arguments[i];
- return this._passThrough(catchFilter(catchInstances, handler, this),
- 1,
- undefined,
- finallyHandler);
- }
-
-};
-
-return PassThroughHandlerContext;
-};
-
-},{"./catch_filter":5,"./util":21}],12:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
- getDomain) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var reject;
-
-if (!true) {
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var promiseSetter = function(i) {
- return new Function("promise", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = promise; \n\
- ".replace(/Index/g, i));
- };
-
- var generateHolderClass = function(total) {
- var props = new Array(total);
- for (var i = 0; i < props.length; ++i) {
- props[i] = "this.p" + (i+1);
- }
- var assignment = props.join(" = ") + " = null;";
- var cancellationCode= "var promise;\n" + props.map(function(prop) {
- return " \n\
- promise = " + prop + "; \n\
- if (promise instanceof Promise) { \n\
- promise.cancel(); \n\
- } \n\
- ";
- }).join("\n");
- var passedArguments = props.join(", ");
- var name = "Holder$" + total;
-
-
- var code = "return function(tryCatch, errorObj, Promise, async) { \n\
- 'use strict'; \n\
- function [TheName](fn) { \n\
- [TheProperties] \n\
- this.fn = fn; \n\
- this.asyncNeeded = true; \n\
- this.now = 0; \n\
- } \n\
- \n\
- [TheName].prototype._callFunction = function(promise) { \n\
- promise._pushContext(); \n\
- var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
- promise._popContext(); \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(ret.e, false); \n\
- } else { \n\
- promise._resolveCallback(ret); \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype.checkFulfillment = function(promise) { \n\
- var now = ++this.now; \n\
- if (now === [TheTotal]) { \n\
- if (this.asyncNeeded) { \n\
- async.invoke(this._callFunction, this, promise); \n\
- } else { \n\
- this._callFunction(promise); \n\
- } \n\
- \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype._resultCancelled = function() { \n\
- [CancellationCode] \n\
- }; \n\
- \n\
- return [TheName]; \n\
- }(tryCatch, errorObj, Promise, async); \n\
- ";
-
- code = code.replace(/\[TheName\]/g, name)
- .replace(/\[TheTotal\]/g, total)
- .replace(/\[ThePassedArguments\]/g, passedArguments)
- .replace(/\[TheProperties\]/g, assignment)
- .replace(/\[CancellationCode\]/g, cancellationCode);
-
- return new Function("tryCatch", "errorObj", "Promise", "async", code)
- (tryCatch, errorObj, Promise, async);
- };
-
- var holderClasses = [];
- var thenCallbacks = [];
- var promiseSetters = [];
-
- for (var i = 0; i < 8; ++i) {
- holderClasses.push(generateHolderClass(i + 1));
- thenCallbacks.push(thenCallback(i + 1));
- promiseSetters.push(promiseSetter(i + 1));
- }
-
- reject = function (reason) {
- this._reject(reason);
- };
-}}
-
-Promise.join = function () {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (!true) {
- if (last <= 8 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var HolderClass = holderClasses[last - 1];
- var holder = new HolderClass(fn);
- var callbacks = thenCallbacks;
-
- for (var i = 0; i < last; ++i) {
- var maybePromise = tryConvertToPromise(arguments[i], ret);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- maybePromise._then(callbacks[i], reject,
- undefined, ret, holder);
- promiseSetters[i](maybePromise, holder);
- holder.asyncNeeded = false;
- } else if (((bitField & 33554432) !== 0)) {
- callbacks[i].call(ret,
- maybePromise._value(), holder);
- } else if (((bitField & 16777216) !== 0)) {
- ret._reject(maybePromise._reason());
- } else {
- ret._cancel();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
-
- if (!ret._isFateSealed()) {
- if (holder.asyncNeeded) {
- var domain = getDomain();
- if (domain !== null) {
- holder.fn = util.domainBind(domain, holder.fn);
- }
- }
- ret._setAsyncGuaranteed();
- ret._setOnCancel(holder);
- }
- return ret;
- }
- }
- }
- var args = [].slice.call(arguments);;
- if (fn) args.pop();
- var ret = new PromiseArray(args).promise();
- return fn !== undefined ? ret.spread(fn) : ret;
-};
-
-};
-
-},{"./util":21}],13:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-Promise.method = function (fn) {
- if (typeof fn !== "function") {
- throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
- }
- return function () {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value = tryCatch(fn).apply(this, arguments);
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.method", ret);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value;
- if (arguments.length > 1) {
- debug.deprecated("calling Promise.try with more than 1 argument");
- var arg = arguments[1];
- var ctx = arguments[2];
- value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
- : tryCatch(fn).call(ctx, arg);
- } else {
- value = tryCatch(fn)();
- }
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.try", ret);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.prototype._resolveFromSyncValue = function (value) {
- if (value === util.errorObj) {
- this._rejectCallback(value.e, false);
- } else {
- this._resolveCallback(value, true);
- }
-};
-};
-
-},{"./util":21}],14:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = _dereq_("./errors");
-var OperationalError = errors.OperationalError;
-var es5 = _dereq_("./es5");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- ret.name = obj.name;
- ret.message = obj.message;
- ret.stack = obj.stack;
- var keys = es5.keys(obj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!rErrorKey.test(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
- }
- util.markAsOriginatingFromRejection(obj);
- return obj;
-}
-
-function nodebackForPromise(promise, multiArgs) {
- return function(err, value) {
- if (promise === null) return;
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (!multiArgs) {
- promise._fulfill(value);
- } else {
- var args = [].slice.call(arguments, 1);;
- promise._fulfill(args);
- }
- promise = null;
- };
-}
-
-module.exports = nodebackForPromise;
-
-},{"./errors":9,"./es5":10,"./util":21}],15:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function() {
-var makeSelfResolutionError = function () {
- return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var reflectHandler = function() {
- return new Promise.PromiseInspection(this._target());
-};
-var apiRejection = function(msg) {
- return Promise.reject(new TypeError(msg));
-};
-function Proxyable() {}
-var UNDEFINED_BINDING = {};
-var util = _dereq_("./util");
-
-var getDomain;
-if (util.isNode) {
- getDomain = function() {
- var ret = process.domain;
- if (ret === undefined) ret = null;
- return ret;
- };
-} else {
- getDomain = function() {
- return null;
- };
-}
-util.notEnumerableProp(Promise, "_getDomain", getDomain);
-
-var es5 = _dereq_("./es5");
-var Async = _dereq_("./async");
-var async = new Async();
-es5.defineProperty(Promise, "_async", {value: async});
-var errors = _dereq_("./errors");
-var TypeError = Promise.TypeError = errors.TypeError;
-Promise.RangeError = errors.RangeError;
-var CancellationError = Promise.CancellationError = errors.CancellationError;
-Promise.TimeoutError = errors.TimeoutError;
-Promise.OperationalError = errors.OperationalError;
-Promise.RejectionError = errors.OperationalError;
-Promise.AggregateError = errors.AggregateError;
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {};
-var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
-var PromiseArray =
- _dereq_("./promise_array")(Promise, INTERNAL,
- tryConvertToPromise, apiRejection, Proxyable);
-var Context = _dereq_("./context")(Promise);
- /*jshint unused:false*/
-var createContext = Context.create;
-var debug = _dereq_("./debuggability")(Promise, Context);
-var CapturedTrace = debug.CapturedTrace;
-var PassThroughHandlerContext =
- _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-var nodebackForPromise = _dereq_("./nodeback");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-function check(self, executor) {
- if (self == null || self.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (typeof executor !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(executor));
- }
-
-}
-
-function Promise(executor) {
- if (executor !== INTERNAL) {
- check(this, executor);
- }
- this._bitField = 0;
- this._fulfillmentHandler0 = undefined;
- this._rejectionHandler0 = undefined;
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._resolveFromExecutor(executor);
- this._promiseCreated();
- this._fireEvent("promiseCreated", this);
-}
-
-Promise.prototype.toString = function () {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return apiRejection("Catch statement predicate: " +
- "expecting an object but got " + util.classString(item));
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
-
- if (typeof fn !== "function") {
- throw new TypeError("The last argument to .catch() " +
- "must be a function, got " + util.toString(fn));
- }
- return this.then(undefined, catchFilter(catchInstances, fn, this));
- }
- return this.then(undefined, fn);
-};
-
-Promise.prototype.reflect = function () {
- return this._then(reflectHandler,
- reflectHandler, undefined, this, undefined);
-};
-
-Promise.prototype.then = function (didFulfill, didReject) {
- if (debug.warnings() && arguments.length > 0 &&
- typeof didFulfill !== "function" &&
- typeof didReject !== "function") {
- var msg = ".then() only accepts functions but was passed: " +
- util.classString(didFulfill);
- if (arguments.length > 1) {
- msg += ", " + util.classString(didReject);
- }
- this._warn(msg);
- }
- return this._then(didFulfill, didReject, undefined, undefined, undefined);
-};
-
-Promise.prototype.done = function (didFulfill, didReject) {
- var promise =
- this._then(didFulfill, didReject, undefined, undefined, undefined);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- return this.all()._then(fn, undefined, undefined, APPLY, undefined);
-};
-
-Promise.prototype.toJSON = function () {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: undefined,
- rejectionReason: undefined
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this.value();
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this.reason();
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function () {
- if (arguments.length > 0) {
- this._warn(".all() was passed arguments but it does not take any");
- }
- return new PromiseArray(this).promise();
-};
-
-Promise.prototype.error = function (fn) {
- return this.caught(util.originatesFromRejection, fn);
-};
-
-Promise.getNewLibraryCopy = module.exports;
-
-Promise.is = function (val) {
- return val instanceof Promise;
-};
-
-Promise.fromNode = Promise.fromCallback = function(fn) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
- : false;
- var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
- if (result === errorObj) {
- ret._rejectCallback(result.e, true);
- }
- if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.all = function (promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.cast = function (obj) {
- var ret = tryConvertToPromise(obj);
- if (!(ret instanceof Promise)) {
- ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._setFulfilled();
- ret._rejectionHandler0 = obj;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function (reason) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._rejectCallback(reason, true);
- return ret;
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- return async.setScheduler(fn);
-};
-
-Promise.prototype._then = function (
- didFulfill,
- didReject,
- _, receiver,
- internalData
-) {
- var haveInternalData = internalData !== undefined;
- var promise = haveInternalData ? internalData : new Promise(INTERNAL);
- var target = this._target();
- var bitField = target._bitField;
-
- if (!haveInternalData) {
- promise._propagateFrom(this, 3);
- promise._captureStackTrace();
- if (receiver === undefined &&
- ((this._bitField & 2097152) !== 0)) {
- if (!((bitField & 50397184) === 0)) {
- receiver = this._boundValue();
- } else {
- receiver = target === this ? undefined : this._boundTo;
- }
- }
- this._fireEvent("promiseChained", this, promise);
- }
-
- var domain = getDomain();
- if (!((bitField & 50397184) === 0)) {
- var handler, value, settler = target._settlePromiseCtx;
- if (((bitField & 33554432) !== 0)) {
- value = target._rejectionHandler0;
- handler = didFulfill;
- } else if (((bitField & 16777216) !== 0)) {
- value = target._fulfillmentHandler0;
- handler = didReject;
- target._unsetRejectionIsUnhandled();
- } else {
- settler = target._settlePromiseLateCancellationObserver;
- value = new CancellationError("late cancellation observer");
- target._attachExtraTrace(value);
- handler = didReject;
- }
-
- async.invoke(settler, target, {
- handler: domain === null ? handler
- : (typeof handler === "function" &&
- util.domainBind(domain, handler)),
- promise: promise,
- receiver: receiver,
- value: value
- });
- } else {
- target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
- }
-
- return promise;
-};
-
-Promise.prototype._length = function () {
- return this._bitField & 65535;
-};
-
-Promise.prototype._isFateSealed = function () {
- return (this._bitField & 117506048) !== 0;
-};
-
-Promise.prototype._isFollowing = function () {
- return (this._bitField & 67108864) === 67108864;
-};
-
-Promise.prototype._setLength = function (len) {
- this._bitField = (this._bitField & -65536) |
- (len & 65535);
-};
-
-Promise.prototype._setFulfilled = function () {
- this._bitField = this._bitField | 33554432;
- this._fireEvent("promiseFulfilled", this);
-};
-
-Promise.prototype._setRejected = function () {
- this._bitField = this._bitField | 16777216;
- this._fireEvent("promiseRejected", this);
-};
-
-Promise.prototype._setFollowing = function () {
- this._bitField = this._bitField | 67108864;
- this._fireEvent("promiseResolved", this);
-};
-
-Promise.prototype._setIsFinal = function () {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._isFinal = function () {
- return (this._bitField & 4194304) > 0;
-};
-
-Promise.prototype._unsetCancelled = function() {
- this._bitField = this._bitField & (~65536);
-};
-
-Promise.prototype._setCancelled = function() {
- this._bitField = this._bitField | 65536;
- this._fireEvent("promiseCancelled", this);
-};
-
-Promise.prototype._setWillBeCancelled = function() {
- this._bitField = this._bitField | 8388608;
-};
-
-Promise.prototype._setAsyncGuaranteed = function() {
- if (async.hasCustomScheduler()) return;
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._receiverAt = function (index) {
- var ret = index === 0 ? this._receiver0 : this[
- index * 4 - 4 + 3];
- if (ret === UNDEFINED_BINDING) {
- return undefined;
- } else if (ret === undefined && this._isBound()) {
- return this._boundValue();
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function (index) {
- return this[
- index * 4 - 4 + 2];
-};
-
-Promise.prototype._fulfillmentHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 1];
-};
-
-Promise.prototype._boundValue = function() {};
-
-Promise.prototype._migrateCallback0 = function (follower) {
- var bitField = follower._bitField;
- var fulfill = follower._fulfillmentHandler0;
- var reject = follower._rejectionHandler0;
- var promise = follower._promise0;
- var receiver = follower._receiverAt(0);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._migrateCallbackAt = function (follower, index) {
- var fulfill = follower._fulfillmentHandlerAt(index);
- var reject = follower._rejectionHandlerAt(index);
- var promise = follower._promiseAt(index);
- var receiver = follower._receiverAt(index);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._addCallbacks = function (
- fulfill,
- reject,
- promise,
- receiver,
- domain
-) {
- var index = this._length();
-
- if (index >= 65535 - 4) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- this._receiver0 = receiver;
- if (typeof fulfill === "function") {
- this._fulfillmentHandler0 =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this._rejectionHandler0 =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- } else {
- var base = index * 4 - 4;
- this[base + 2] = promise;
- this[base + 3] = receiver;
- if (typeof fulfill === "function") {
- this[base + 0] =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this[base + 1] =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._proxy = function (proxyable, arg) {
- this._addCallbacks(undefined, undefined, arg, proxyable, null);
-};
-
-Promise.prototype._resolveCallback = function(value, shouldBind) {
- if (((this._bitField & 117506048) !== 0)) return;
- if (value === this)
- return this._rejectCallback(makeSelfResolutionError(), false);
- var maybePromise = tryConvertToPromise(value, this);
- if (!(maybePromise instanceof Promise)) return this._fulfill(value);
-
- if (shouldBind) this._propagateFrom(maybePromise, 2);
-
- var promise = maybePromise._target();
-
- if (promise === this) {
- this._reject(makeSelfResolutionError());
- return;
- }
-
- var bitField = promise._bitField;
- if (((bitField & 50397184) === 0)) {
- var len = this._length();
- if (len > 0) promise._migrateCallback0(this);
- for (var i = 1; i < len; ++i) {
- promise._migrateCallbackAt(this, i);
- }
- this._setFollowing();
- this._setLength(0);
- this._setFollowee(promise);
- } else if (((bitField & 33554432) !== 0)) {
- this._fulfill(promise._value());
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(promise._reason());
- } else {
- var reason = new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- this._reject(reason);
- }
-};
-
-Promise.prototype._rejectCallback =
-function(reason, synchronous, ignoreNonErrorWarnings) {
- var trace = util.ensureErrorObject(reason);
- var hasStack = trace === reason;
- if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
- var message = "a promise was rejected with a non-error: " +
- util.classString(reason);
- this._warn(message, true);
- }
- this._attachExtraTrace(trace, synchronous ? hasStack : false);
- this._reject(reason);
-};
-
-Promise.prototype._resolveFromExecutor = function (executor) {
- if (executor === INTERNAL) return;
- var promise = this;
- this._captureStackTrace();
- this._pushContext();
- var synchronous = true;
- var r = this._execute(executor, function(value) {
- promise._resolveCallback(value);
- }, function (reason) {
- promise._rejectCallback(reason, synchronous);
- });
- synchronous = false;
- this._popContext();
-
- if (r !== undefined) {
- promise._rejectCallback(r, true);
- }
-};
-
-Promise.prototype._settlePromiseFromHandler = function (
- handler, receiver, value, promise
-) {
- var bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
- promise._pushContext();
- var x;
- if (receiver === APPLY) {
- if (!value || typeof value.length !== "number") {
- x = errorObj;
- x.e = new TypeError("cannot .spread() a non-array: " +
- util.classString(value));
- } else {
- x = tryCatch(handler).apply(this._boundValue(), value);
- }
- } else {
- x = tryCatch(handler).call(receiver, value);
- }
- var promiseCreated = promise._popContext();
- bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
-
- if (x === NEXT_FILTER) {
- promise._reject(value);
- } else if (x === errorObj) {
- promise._rejectCallback(x.e, false);
- } else {
- debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
- promise._resolveCallback(x);
- }
-};
-
-Promise.prototype._target = function() {
- var ret = this;
- while (ret._isFollowing()) ret = ret._followee();
- return ret;
-};
-
-Promise.prototype._followee = function() {
- return this._rejectionHandler0;
-};
-
-Promise.prototype._setFollowee = function(promise) {
- this._rejectionHandler0 = promise;
-};
-
-Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
- var isPromise = promise instanceof Promise;
- var bitField = this._bitField;
- var asyncGuaranteed = ((bitField & 134217728) !== 0);
- if (((bitField & 65536) !== 0)) {
- if (isPromise) promise._invokeInternalOnCancel();
-
- if (receiver instanceof PassThroughHandlerContext &&
- receiver.isFinallyHandler()) {
- receiver.cancelPromise = promise;
- if (tryCatch(handler).call(receiver, value) === errorObj) {
- promise._reject(errorObj.e);
- }
- } else if (handler === reflectHandler) {
- promise._fulfill(reflectHandler.call(receiver));
- } else if (receiver instanceof Proxyable) {
- receiver._promiseCancelled(promise);
- } else if (isPromise || promise instanceof PromiseArray) {
- promise._cancel();
- } else {
- receiver.cancel();
- }
- } else if (typeof handler === "function") {
- if (!isPromise) {
- handler.call(receiver, value, promise);
- } else {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (receiver instanceof Proxyable) {
- if (!receiver._isResolved()) {
- if (((bitField & 33554432) !== 0)) {
- receiver._promiseFulfilled(value, promise);
- } else {
- receiver._promiseRejected(value, promise);
- }
- }
- } else if (isPromise) {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- if (((bitField & 33554432) !== 0)) {
- promise._fulfill(value);
- } else {
- promise._reject(value);
- }
- }
-};
-
-Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
- var handler = ctx.handler;
- var promise = ctx.promise;
- var receiver = ctx.receiver;
- var value = ctx.value;
- if (typeof handler === "function") {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- } else {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (promise instanceof Promise) {
- promise._reject(value);
- }
-};
-
-Promise.prototype._settlePromiseCtx = function(ctx) {
- this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
-};
-
-Promise.prototype._settlePromise0 = function(handler, value, bitField) {
- var promise = this._promise0;
- var receiver = this._receiverAt(0);
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._settlePromise(promise, handler, receiver, value);
-};
-
-Promise.prototype._clearCallbackDataAtIndex = function(index) {
- var base = index * 4 - 4;
- this[base + 2] =
- this[base + 3] =
- this[base + 0] =
- this[base + 1] = undefined;
-};
-
-Promise.prototype._fulfill = function (value) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._reject(err);
- }
- this._setFulfilled();
- this._rejectionHandler0 = value;
-
- if ((bitField & 65535) > 0) {
- if (((bitField & 134217728) !== 0)) {
- this._settlePromises();
- } else {
- async.settlePromises(this);
- }
- this._dereferenceTrace();
- }
-};
-
-Promise.prototype._reject = function (reason) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- this._setRejected();
- this._fulfillmentHandler0 = reason;
-
- if (this._isFinal()) {
- return async.fatalError(reason, util.isNode);
- }
-
- if ((bitField & 65535) > 0) {
- async.settlePromises(this);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._fulfillPromises = function (len, value) {
- for (var i = 1; i < len; i++) {
- var handler = this._fulfillmentHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, value);
- }
-};
-
-Promise.prototype._rejectPromises = function (len, reason) {
- for (var i = 1; i < len; i++) {
- var handler = this._rejectionHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, reason);
- }
-};
-
-Promise.prototype._settlePromises = function () {
- var bitField = this._bitField;
- var len = (bitField & 65535);
-
- if (len > 0) {
- if (((bitField & 16842752) !== 0)) {
- var reason = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, reason, bitField);
- this._rejectPromises(len, reason);
- } else {
- var value = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, value, bitField);
- this._fulfillPromises(len, value);
- }
- this._setLength(0);
- }
- this._clearCancellationData();
-};
-
-Promise.prototype._settledValue = function() {
- var bitField = this._bitField;
- if (((bitField & 33554432) !== 0)) {
- return this._rejectionHandler0;
- } else if (((bitField & 16777216) !== 0)) {
- return this._fulfillmentHandler0;
- }
-};
-
-if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
- es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
- get: function () {
- return "Object";
- }
- });
-}
-
-function deferResolve(v) {this.promise._resolveCallback(v);}
-function deferReject(v) {this.promise._rejectCallback(v, false);}
-
-Promise.defer = Promise.pending = function() {
- debug.deprecated("Promise.defer", "new Promise");
- var promise = new Promise(INTERNAL);
- return {
- promise: promise,
- resolve: deferResolve,
- reject: deferReject
- };
-};
-
-util.notEnumerableProp(Promise,
- "_makeSelfResolutionError",
- makeSelfResolutionError);
-
-_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
- debug);
-_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
-_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
-_dereq_("./direct_resolve")(Promise);
-_dereq_("./synchronous_inspection")(Promise);
-_dereq_("./join")(
- Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
-Promise.Promise = Promise;
-Promise.version = "3.5.5";
-
- util.toFastProperties(Promise);
- util.toFastProperties(Promise.prototype);
- function fillTypes(value) {
- var p = new Promise(INTERNAL);
- p._fulfillmentHandler0 = value;
- p._rejectionHandler0 = value;
- p._promise0 = value;
- p._receiver0 = value;
- }
- // Complete slack tracking, opt out of field-type tracking and
- // stabilize map
- fillTypes({a: 1});
- fillTypes({b: 2});
- fillTypes({c: 3});
- fillTypes(1);
- fillTypes(function(){});
- fillTypes(undefined);
- fillTypes(false);
- fillTypes(new Promise(INTERNAL));
- debug.setBounds(Async.firstLineError, util.lastLineError);
- return Promise;
-
-};
-
-},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
- apiRejection, Proxyable) {
-var util = _dereq_("./util");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -2: return [];
- case -3: return {};
- case -6: return new Map();
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- if (values instanceof Promise) {
- promise._propagateFrom(values, 3);
- }
- promise._setOnCancel(this);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(undefined, -2);
-}
-util.inherits(PromiseArray, Proxyable);
-
-PromiseArray.prototype.length = function () {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
- var values = tryConvertToPromise(this._values, this._promise);
- if (values instanceof Promise) {
- values = values._target();
- var bitField = values._bitField;
- ;
- this._values = values;
-
- if (((bitField & 50397184) === 0)) {
- this._promise._setAsyncGuaranteed();
- return values._then(
- init,
- this._reject,
- undefined,
- this,
- resolveValueIfEmpty
- );
- } else if (((bitField & 33554432) !== 0)) {
- values = values._value();
- } else if (((bitField & 16777216) !== 0)) {
- return this._reject(values._reason());
- } else {
- return this._cancel();
- }
- }
- values = util.asArray(values);
- if (values === null) {
- var err = apiRejection(
- "expecting an array or an iterable object but got " + util.classString(values)).reason();
- this._promise._rejectCallback(err, false);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- this._iterate(values);
-};
-
-PromiseArray.prototype._iterate = function(values) {
- var len = this.getActualLength(values.length);
- this._length = len;
- this._values = this.shouldCopyValues() ? new Array(len) : this._values;
- var result = this._promise;
- var isResolved = false;
- var bitField = null;
- for (var i = 0; i < len; ++i) {
- var maybePromise = tryConvertToPromise(values[i], result);
-
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- bitField = maybePromise._bitField;
- } else {
- bitField = null;
- }
-
- if (isResolved) {
- if (bitField !== null) {
- maybePromise.suppressUnhandledRejections();
- }
- } else if (bitField !== null) {
- if (((bitField & 50397184) === 0)) {
- maybePromise._proxy(this, i);
- this._values[i] = maybePromise;
- } else if (((bitField & 33554432) !== 0)) {
- isResolved = this._promiseFulfilled(maybePromise._value(), i);
- } else if (((bitField & 16777216) !== 0)) {
- isResolved = this._promiseRejected(maybePromise._reason(), i);
- } else {
- isResolved = this._promiseCancelled(i);
- }
- } else {
- isResolved = this._promiseFulfilled(maybePromise, i);
- }
- }
- if (!isResolved) result._setAsyncGuaranteed();
-};
-
-PromiseArray.prototype._isResolved = function () {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype._cancel = function() {
- if (this._isResolved() || !this._promise._isCancellable()) return;
- this._values = null;
- this._promise._cancel();
-};
-
-PromiseArray.prototype._reject = function (reason) {
- this._values = null;
- this._promise._rejectCallback(reason, false);
-};
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-PromiseArray.prototype._promiseCancelled = function() {
- this._cancel();
- return true;
-};
-
-PromiseArray.prototype._promiseRejected = function (reason) {
- this._totalResolved++;
- this._reject(reason);
- return true;
-};
-
-PromiseArray.prototype._resultCancelled = function() {
- if (this._isResolved()) return;
- var values = this._values;
- this._cancel();
- if (values instanceof Promise) {
- values.cancel();
- } else {
- for (var i = 0; i < values.length; ++i) {
- if (values[i] instanceof Promise) {
- values[i].cancel();
- }
- }
- }
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
- return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
- return len;
-};
-
-return PromiseArray;
-};
-
-},{"./util":21}],17:[function(_dereq_,module,exports){
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- src[j + srcIndex] = void 0;
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype.push = function (fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function () {
- var front = this._front,
- ret = this[front];
-
- this[front] = undefined;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function () {
- return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 1);
- }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
- var oldCapacity = this._capacity;
- this._capacity = capacity;
- var front = this._front;
- var length = this._length;
- var moveItemsCount = (front + length) & (oldCapacity - 1);
- arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;
-
-},{}],18:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var schedule;
-var noAsyncScheduler = function() {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var NativePromise = util.getNativePromise();
-if (util.isNode && typeof MutationObserver === "undefined") {
- var GlobalSetImmediate = global.setImmediate;
- var ProcessNextTick = process.nextTick;
- schedule = util.isRecentNode
- ? function(fn) { GlobalSetImmediate.call(global, fn); }
- : function(fn) { ProcessNextTick.call(process, fn); };
-} else if (typeof NativePromise === "function" &&
- typeof NativePromise.resolve === "function") {
- var nativePromise = NativePromise.resolve();
- schedule = function(fn) {
- nativePromise.then(fn);
- };
-} else if ((typeof MutationObserver !== "undefined") &&
- !(typeof window !== "undefined" &&
- window.navigator &&
- (window.navigator.standalone || window.cordova)) &&
- ("classList" in document.documentElement)) {
- schedule = (function() {
- var div = document.createElement("div");
- var opts = {attributes: true};
- var toggleScheduled = false;
- var div2 = document.createElement("div");
- var o2 = new MutationObserver(function() {
- div.classList.toggle("foo");
- toggleScheduled = false;
- });
- o2.observe(div2, opts);
-
- var scheduleToggle = function() {
- if (toggleScheduled) return;
- toggleScheduled = true;
- div2.classList.toggle("foo");
- };
-
- return function schedule(fn) {
- var o = new MutationObserver(function() {
- o.disconnect();
- fn();
- });
- o.observe(div, opts);
- scheduleToggle();
- };
- })();
-} else if (typeof setImmediate !== "undefined") {
- schedule = function (fn) {
- setImmediate(fn);
- };
-} else if (typeof setTimeout !== "undefined") {
- schedule = function (fn) {
- setTimeout(fn, 0);
- };
-} else {
- schedule = noAsyncScheduler;
-}
-module.exports = schedule;
-
-},{"./util":21}],19:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== undefined) {
- promise = promise._target();
- this._bitField = promise._bitField;
- this._settledValueField = promise._isFateSealed()
- ? promise._settledValue() : undefined;
- }
- else {
- this._bitField = 0;
- this._settledValueField = undefined;
- }
-}
-
-PromiseInspection.prototype._settledValue = function() {
- return this._settledValueField;
-};
-
-var value = PromiseInspection.prototype.value = function () {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var reason = PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
- return (this._bitField & 33554432) !== 0;
-};
-
-var isRejected = PromiseInspection.prototype.isRejected = function () {
- return (this._bitField & 16777216) !== 0;
-};
-
-var isPending = PromiseInspection.prototype.isPending = function () {
- return (this._bitField & 50397184) === 0;
-};
-
-var isResolved = PromiseInspection.prototype.isResolved = function () {
- return (this._bitField & 50331648) !== 0;
-};
-
-PromiseInspection.prototype.isCancelled = function() {
- return (this._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.__isCancelled = function() {
- return (this._bitField & 65536) === 65536;
-};
-
-Promise.prototype._isCancelled = function() {
- return this._target().__isCancelled();
-};
-
-Promise.prototype.isCancelled = function() {
- return (this._target()._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.isPending = function() {
- return isPending.call(this._target());
-};
-
-Promise.prototype.isRejected = function() {
- return isRejected.call(this._target());
-};
-
-Promise.prototype.isFulfilled = function() {
- return isFulfilled.call(this._target());
-};
-
-Promise.prototype.isResolved = function() {
- return isResolved.call(this._target());
-};
-
-Promise.prototype.value = function() {
- return value.call(this._target());
-};
-
-Promise.prototype.reason = function() {
- var target = this._target();
- target._unsetRejectionIsUnhandled();
- return reason.call(target);
-};
-
-Promise.prototype._value = function() {
- return this._settledValue();
-};
-
-Promise.prototype._reason = function() {
- this._unsetRejectionIsUnhandled();
- return this._settledValue();
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
-
-},{}],20:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
- if (isObject(obj)) {
- if (obj instanceof Promise) return obj;
- var then = getThen(obj);
- if (then === errorObj) {
- if (context) context._pushContext();
- var ret = Promise.reject(then.e);
- if (context) context._popContext();
- return ret;
- } else if (typeof then === "function") {
- if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- obj._then(
- ret._fulfill,
- ret._reject,
- undefined,
- ret,
- null
- );
- return ret;
- }
- return doThenable(obj, then, context);
- }
- }
- return obj;
-}
-
-function doGetThen(obj) {
- return obj.then;
-}
-
-function getThen(obj) {
- try {
- return doGetThen(obj);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- try {
- return hasProp.call(obj, "_promise0");
- } catch (e) {
- return false;
- }
-}
-
-function doThenable(x, then, context) {
- var promise = new Promise(INTERNAL);
- var ret = promise;
- if (context) context._pushContext();
- promise._captureStackTrace();
- if (context) context._popContext();
- var synchronous = true;
- var result = util.tryCatch(then).call(x, resolve, reject);
- synchronous = false;
-
- if (promise && result === errorObj) {
- promise._rejectCallback(result.e, true, true);
- promise = null;
- }
-
- function resolve(value) {
- if (!promise) return;
- promise._resolveCallback(value);
- promise = null;
- }
-
- function reject(reason) {
- if (!promise) return;
- promise._rejectCallback(reason, synchronous, true);
- promise = null;
- }
- return ret;
-}
-
-return tryConvertToPromise;
-};
-
-},{"./util":21}],21:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var canEvaluate = typeof navigator == "undefined";
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-var globalObject = typeof self !== "undefined" ? self :
- typeof window !== "undefined" ? window :
- typeof global !== "undefined" ? global :
- this !== undefined ? this : null;
-
-function tryCatcher() {
- try {
- var target = tryCatchTarget;
- tryCatchTarget = null;
- return target.apply(this, arguments);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return typeof value === "function" ||
- typeof value === "object" && value !== null;
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(safeToString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
-
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- var excludedPrototypes = [
- Array.prototype,
- Object.prototype,
- Function.prototype
- ];
-
- var isExcludedProto = function(val) {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (excludedPrototypes[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- if (es5.isES5) {
- var getKeys = Object.getOwnPropertyNames;
- return function(obj) {
- var ret = [];
- var visitedKeys = Object.create(null);
- while (obj != null && !isExcludedProto(obj)) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- var hasProp = {}.hasOwnProperty;
- return function(obj) {
- if (isExcludedProto(obj)) return [];
- var ret = [];
-
- /*jshint forin:false */
- enumeration: for (var key in obj) {
- if (hasProp.call(obj, key)) {
- ret.push(key);
- } else {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (hasProp.call(excludedPrototypes[i], key)) {
- continue enumeration;
- }
- }
- ret.push(key);
- }
- }
- return ret;
- };
- }
-
-})();
-
-var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.names(fn.prototype);
-
- var hasMethods = es5.isES5 && keys.length > 1;
- var hasMethodsOtherThanConstructor = keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- var hasThisAssignmentAndStaticMethods =
- thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
-
- if (hasMethods || hasMethodsOtherThanConstructor ||
- hasThisAssignmentAndStaticMethods) {
- return true;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027,-W055,-W031*/
- function FakeConstructor() {}
- FakeConstructor.prototype = obj;
- var receiver = new FakeConstructor();
- function ic() {
- return typeof receiver.foo;
- }
- ic();
- ic();
- return obj;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-function safeToString(obj) {
- try {
- return obj + "";
- } catch (e) {
- return "[no string representation]";
- }
-}
-
-function isError(obj) {
- return obj instanceof Error ||
- (obj !== null &&
- typeof obj === "object" &&
- typeof obj.message === "string" &&
- typeof obj.name === "string");
-}
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
- e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
- return isError(obj) && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
- if (!("stack" in new Error())) {
- return function(value) {
- if (canAttachTrace(value)) return value;
- try {throw new Error(safeToString(value));}
- catch(err) {return err;}
- };
- } else {
- return function(value) {
- if (canAttachTrace(value)) return value;
- return new Error(safeToString(value));
- };
- }
-})();
-
-function classString(obj) {
- return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
- var keys = es5.names(from);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (filter(key)) {
- try {
- es5.defineProperty(to, key, es5.getDescriptor(from, key));
- } catch (ignore) {}
- }
- }
-}
-
-var asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- }
- return null;
-};
-
-if (typeof Symbol !== "undefined" && Symbol.iterator) {
- var ArrayFrom = typeof Array.from === "function" ? function(v) {
- return Array.from(v);
- } : function(v) {
- var ret = [];
- var it = v[Symbol.iterator]();
- var itResult;
- while (!((itResult = it.next()).done)) {
- ret.push(itResult.value);
- }
- return ret;
- };
-
- asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- } else if (v != null && typeof v[Symbol.iterator] === "function") {
- return ArrayFrom(v);
- }
- return null;
- };
-}
-
-var isNode = typeof process !== "undefined" &&
- classString(process).toLowerCase() === "[object process]";
-
-var hasEnvVariables = typeof process !== "undefined" &&
- typeof process.env !== "undefined";
-
-function env(key) {
- return hasEnvVariables ? process.env[key] : undefined;
-}
-
-function getNativePromise() {
- if (typeof Promise === "function") {
- try {
- var promise = new Promise(function(){});
- if ({}.toString.call(promise) === "[object Promise]") {
- return Promise;
- }
- } catch (e) {}
- }
-}
-
-function domainBind(self, cb) {
- return self.bind(cb);
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- asArray: asArray,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- isError: isError,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch: tryCatch,
- inherits: inherits,
- withAppended: withAppended,
- maybeWrapAsError: maybeWrapAsError,
- toFastProperties: toFastProperties,
- filledRange: filledRange,
- toString: safeToString,
- canAttachTrace: canAttachTrace,
- ensureErrorObject: ensureErrorObject,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- classString: classString,
- copyDescriptors: copyDescriptors,
- hasDevTools: typeof chrome !== "undefined" && chrome &&
- typeof chrome.loadTimes === "function",
- isNode: isNode,
- hasEnvVariables: hasEnvVariables,
- env: env,
- global: globalObject,
- getNativePromise: getNativePromise,
- domainBind: domainBind
-};
-ret.isRecentNode = ret.isNode && (function() {
- var version;
- if (process.versions && process.versions.node) {
- version = process.versions.node.split(".").map(Number);
- } else if (process.version) {
- version = process.version.split(".").map(Number);
- }
- return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
-})();
-
-if (ret.isNode) ret.toFastProperties(process);
-
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;
-
-},{"./es5":10}]},{},[3])(3)
-}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.core.min.js b/node_modules/bluebird/js/browser/bluebird.core.min.js
deleted file mode 100644
index 7091d9fac..000000000
--- a/node_modules/bluebird/js/browser/bluebird.core.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2018 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-/**
- * bluebird build version 3.5.5
- * Features enabled: core
- * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=p}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}function s(t){for(;t.length()>0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),f=t("./queue"),h=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){h.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},h.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=a(t).call(this._boundValue());r===s&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":21}],5:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,s){return function(c){var l=s._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var f=o(p).call(l,c);if(f===a)return f;if(f)return o(n).call(l,c)}else if(r.isObject(c)){for(var h=i(p),d=0;d<h.length;++d){var _=h[d];if(p[_]!=c[_])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,a=r.errorObj;return n}},{"./es5":10,"./util":21}],6:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new x(this._peekContext())}function d(t,e){if(V(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function _(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=w(s),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match(G);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l<s.length;++l)if(s[l]===f){l>0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),g(n)}function g(t,n,r){if(st.warnings){var i,o=new I(t);if(n)r._attachExtraTrace(o);else if(st.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}nt("warning",o)||j(o,"",!0)}}function m(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function C(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],a=-1,s=r.length-1;s>=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||M.test(r),o=i&&it(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function E(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||M.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?E(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function j(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+W(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){U.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||j(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+P(e)+">, no stack trace)"}function P(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function S(){return"function"==typeof at}function O(t){var e=t.match(ot);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(S()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),a=-1,s=-1,c=0;c<i.length;++c){var l=O(i[c]);if(l){n=l.fileName,a=l.line;break}}for(var c=0;c<o.length;++c){var l=O(o[c]);if(l){r=l.fileName,s=l.line;break}}0>a||0>s||!n||!r||n!==r||a>=s||(it=function(t){if(Q.test(t))return!0;var e=O(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function x(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);at(this,x),e>32&&this.uncycle()}var A,N,L,B=e._getDomain,U=e._async,I=t("./errors").Warning,H=t("./util"),D=t("./es5"),V=H.canAttachTrace,Q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,G=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,M=null,W=null,$=!1,z=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),X=!(0==H.env("BLUEBIRD_WARNINGS")||!z&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(X||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",N,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return g(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=B();N="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=B();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!st.longStackTraces&&S()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;st.longStackTraces=!0,Y=function(){if(U.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),U.enableTrampoline(),st.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=d,e.prototype._dereferenceTrace=_,n.activateLongStackTraces(),U.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return st.longStackTraces&&S()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,D.defineProperty(n,"promise",{value:e.promise}),D.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){U.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){U.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;st.warnings=!!n,J=st.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!st.cancellation){if(U.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,rt=u,st.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!st.monitoring?(st.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&st.monitoring&&(st.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(x,Error),n.CapturedTrace=x,x.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;C(r),b(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var at=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,M=t,W=e;var n=Error.captureStackTrace;return it=function(t){return Q.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return M=/@/,W=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(M=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var st={warnings:X,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return st.longStackTraces},warnings:function(){return st.warnings},cancellation:function(){return st.cancellation},monitoring:function(){return st.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return f},checkForgottenReturns:v,setBounds:R,warn:g,deprecated:y,CapturedTrace:x,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":9,"./es5":10,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),d=r("TimeoutError","timeout error"),_=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<y.length;++g)"function"==typeof Array.prototype[y[g]]&&(_.prototype[y[g]]=Array.prototype[y[g]]);s.defineProperty(_.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),_.prototype.isOperational=!0;var m=0;_.prototype.toString=function(){var t=Array(4*m+1).join(" "),e="\n"+t+"AggregateError of:\n";m++,t=Array(4*m+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return m--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:h,TimeoutError:d,OperationalError:i,RejectionError:i,AggregateError:_}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:f}},{"./es5":10,"./util":21}],10:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return a}},f=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:f,keys:s,names:s,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],11:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function a(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return l.call(this,this.promise._target()._settledValue())}function c(t){return a(this,t)?void 0:(f.e=t,f)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var h=n(u,i);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var d=new p("late cancellation observer");return i._attachExtraTrace(d),f.e=d,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(a(this),f.e=t,f):(a(this),t)}var u=t("./util"),p=e.CancellationError,f=u.errorObj,h=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var a=arguments[r];if(!u.isObject(a))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(a)));i[o++]=a}i.length=o;var s=arguments[r];return this._passThrough(h(i,s,this),1,void 0,l)},i}},{"./catch_filter":5,"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(s(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(r);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":9,"./es5":10,"./util":21}],15:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if(null==t||t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new g("expecting a function but got "+h.classString(e))}function i(t){t!==b&&r(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function s(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new g(t))},f={},h=t("./util");c=h.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},h.notEnumerableProp(i,"_getDomain",c);var d=t("./es5"),_=t("./async"),v=new _;d.defineProperty(i,"_async",{value:v});var y=t("./errors"),g=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var m=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},C={},w={},E=t("./thenables")(i,b),k=t("./promise_array")(i,b,E,p,n),j=t("./context")(i),F=(j.create,t("./debuggability")(i,j)),T=(F.CapturedTrace,t("./finally")(i,E,w)),P=t("./catch_filter")(w),S=t("./nodeback"),O=h.errorObj,R=h.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("Catch statement predicate: expecting an object but got "+h.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new g("The last argument to .catch() must be a function, got "+h.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0);
-},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=R(t)(S(e,n));return r===O&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=E(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,d,_=l._settlePromiseCtx;0!==(33554432&u)?(d=l._rejectionHandler0,f=t):0!==(16777216&u)?(d=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(_=l._settlePromiseLateCancellationObserver,d=new m("late cancellation observer"),l._attachExtraTrace(d),f=e),v.invoke(_,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:d})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=R(t).apply(this._boundValue(),n):(o=O,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=R(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===O?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,R(e).call(r,o)===O&&t._reject(O.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,E,p,F),t("./bind")(i,b,E,F),t("./cancel")(i,k,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,E,b,v,c),i.Promise=i,i.version="3.5.5",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(_.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":21}],17:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],18:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},a=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var s=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){s.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var l=a.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":21}],19:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],20:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(a(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return s(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function a(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function s(t,r,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,p,!0),s=null)}var s=new e(n),u=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var p=!0,f=c.tryCatch(r).call(t,o,a);return p=!1,s&&f===l&&(s._rejectCallback(f.e,!0,!0),s=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":21}],21:[function(t,e,n){"use strict";function r(){try{var t=S;return S=null,t.apply(this,arguments)}catch(e){return P.e=e,P}}function i(t){return S=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function d(t){return N.test(t)}function _(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(a){}}}function E(t){return H?process.env[t]:void 0}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function j(t,e){return t.bind(e)}var F=t("./es5"),T="undefined"==typeof navigator,P={e:{}},S,O="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,R=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},x=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(a){return r}for(var s=0;s<o.length;++s){var c=o[s];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var a=0;a<t.length;++a)if(r.call(t[a],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,N=/^[a-z$_][a-z$_0-9]*$/i,L=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),B=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};B=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var I="undefined"!=typeof process&&"[object process]"===C(process).toLowerCase(),H="undefined"!=typeof process&&"undefined"!=typeof process.env,D={isClass:f,isIdentifier:d,inheritedDataKeys:x,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:B,notEnumerableProp:u,isPrimitive:o,isObject:a,isError:y,canEvaluate:T,errorObj:P,tryCatch:i,inherits:R,withAppended:c,maybeWrapAsError:s,toFastProperties:h,filledRange:_,toString:v,canAttachTrace:b,ensureErrorObject:L,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:C,copyDescriptors:w,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:I,hasEnvVariables:H,env:E,global:O,getNativePromise:k,domainBind:j};D.isRecentNode=D.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),D.isNode&&D.toFastProperties(process);try{throw new Error}catch(V){D.lastLineError=V}e.exports=D},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.js b/node_modules/bluebird/js/browser/bluebird.js
deleted file mode 100644
index 35d0912b0..000000000
--- a/node_modules/bluebird/js/browser/bluebird.js
+++ /dev/null
@@ -1,5666 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2018 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-/**
- * bluebird build version 3.5.5
- * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var SomePromiseArray = Promise._SomePromiseArray;
-function any(promises) {
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(1);
- ret.setUnwrap();
- ret.init();
- return promise;
-}
-
-Promise.any = function (promises) {
- return any(promises);
-};
-
-Promise.prototype.any = function () {
- return any(this);
-};
-
-};
-
-},{}],2:[function(_dereq_,module,exports){
-"use strict";
-var firstLineError;
-try {throw new Error(); } catch (e) {firstLineError = e;}
-var schedule = _dereq_("./schedule");
-var Queue = _dereq_("./queue");
-var util = _dereq_("./util");
-
-function Async() {
- this._customScheduler = false;
- this._isTickUsed = false;
- this._lateQueue = new Queue(16);
- this._normalQueue = new Queue(16);
- this._haveDrainedQueues = false;
- this._trampolineEnabled = true;
- var self = this;
- this.drainQueues = function () {
- self._drainQueues();
- };
- this._schedule = schedule;
-}
-
-Async.prototype.setScheduler = function(fn) {
- var prev = this._schedule;
- this._schedule = fn;
- this._customScheduler = true;
- return prev;
-};
-
-Async.prototype.hasCustomScheduler = function() {
- return this._customScheduler;
-};
-
-Async.prototype.enableTrampoline = function() {
- this._trampolineEnabled = true;
-};
-
-Async.prototype.disableTrampolineIfNecessary = function() {
- if (util.hasDevTools) {
- this._trampolineEnabled = false;
- }
-};
-
-Async.prototype.haveItemsQueued = function () {
- return this._isTickUsed || this._haveDrainedQueues;
-};
-
-
-Async.prototype.fatalError = function(e, isNode) {
- if (isNode) {
- process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
- "\n");
- process.exit(2);
- } else {
- this.throwLater(e);
- }
-};
-
-Async.prototype.throwLater = function(fn, arg) {
- if (arguments.length === 1) {
- arg = fn;
- fn = function () { throw arg; };
- }
- if (typeof setTimeout !== "undefined") {
- setTimeout(function() {
- fn(arg);
- }, 0);
- } else try {
- this._schedule(function() {
- fn(arg);
- });
- } catch (e) {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-};
-
-function AsyncInvokeLater(fn, receiver, arg) {
- this._lateQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncInvoke(fn, receiver, arg) {
- this._normalQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncSettlePromises(promise) {
- this._normalQueue._pushOne(promise);
- this._queueTick();
-}
-
-if (!util.hasDevTools) {
- Async.prototype.invokeLater = AsyncInvokeLater;
- Async.prototype.invoke = AsyncInvoke;
- Async.prototype.settlePromises = AsyncSettlePromises;
-} else {
- Async.prototype.invokeLater = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvokeLater.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- setTimeout(function() {
- fn.call(receiver, arg);
- }, 100);
- });
- }
- };
-
- Async.prototype.invoke = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvoke.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- fn.call(receiver, arg);
- });
- }
- };
-
- Async.prototype.settlePromises = function(promise) {
- if (this._trampolineEnabled) {
- AsyncSettlePromises.call(this, promise);
- } else {
- this._schedule(function() {
- promise._settlePromises();
- });
- }
- };
-}
-
-function _drainQueue(queue) {
- while (queue.length() > 0) {
- _drainQueueStep(queue);
- }
-}
-
-function _drainQueueStep(queue) {
- var fn = queue.shift();
- if (typeof fn !== "function") {
- fn._settlePromises();
- } else {
- var receiver = queue.shift();
- var arg = queue.shift();
- fn.call(receiver, arg);
- }
-}
-
-Async.prototype._drainQueues = function () {
- _drainQueue(this._normalQueue);
- this._reset();
- this._haveDrainedQueues = true;
- _drainQueue(this._lateQueue);
-};
-
-Async.prototype._queueTick = function () {
- if (!this._isTickUsed) {
- this._isTickUsed = true;
- this._schedule(this.drainQueues);
- }
-};
-
-Async.prototype._reset = function () {
- this._isTickUsed = false;
-};
-
-module.exports = Async;
-module.exports.firstLineError = firstLineError;
-
-},{"./queue":26,"./schedule":29,"./util":36}],3:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
-var calledBind = false;
-var rejectThis = function(_, e) {
- this._reject(e);
-};
-
-var targetRejected = function(e, context) {
- context.promiseRejectionQueued = true;
- context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
-};
-
-var bindingResolved = function(thisArg, context) {
- if (((this._bitField & 50397184) === 0)) {
- this._resolveCallback(context.target);
- }
-};
-
-var bindingRejected = function(e, context) {
- if (!context.promiseRejectionQueued) this._reject(e);
-};
-
-Promise.prototype.bind = function (thisArg) {
- if (!calledBind) {
- calledBind = true;
- Promise.prototype._propagateFrom = debug.propagateFromFunction();
- Promise.prototype._boundValue = debug.boundValueFunction();
- }
- var maybePromise = tryConvertToPromise(thisArg);
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 1);
- var target = this._target();
- ret._setBoundTo(maybePromise);
- if (maybePromise instanceof Promise) {
- var context = {
- promiseRejectionQueued: false,
- promise: ret,
- target: target,
- bindingPromise: maybePromise
- };
- target._then(INTERNAL, targetRejected, undefined, ret, context);
- maybePromise._then(
- bindingResolved, bindingRejected, undefined, ret, context);
- ret._setOnCancel(maybePromise);
- } else {
- ret._resolveCallback(target);
- }
- return ret;
-};
-
-Promise.prototype._setBoundTo = function (obj) {
- if (obj !== undefined) {
- this._bitField = this._bitField | 2097152;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~2097152);
- }
-};
-
-Promise.prototype._isBound = function () {
- return (this._bitField & 2097152) === 2097152;
-};
-
-Promise.bind = function (thisArg, value) {
- return Promise.resolve(value).bind(thisArg);
-};
-};
-
-},{}],4:[function(_dereq_,module,exports){
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict() {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-var bluebird = _dereq_("./promise")();
-bluebird.noConflict = noConflict;
-module.exports = bluebird;
-
-},{"./promise":22}],5:[function(_dereq_,module,exports){
-"use strict";
-var cr = Object.create;
-if (cr) {
- var callerCache = cr(null);
- var getterCache = cr(null);
- callerCache[" size"] = getterCache[" size"] = 0;
-}
-
-module.exports = function(Promise) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var isIdentifier = util.isIdentifier;
-
-var getMethodCaller;
-var getGetter;
-if (!true) {
-var makeMethodCaller = function (methodName) {
- return new Function("ensureMethod", " \n\
- return function(obj) { \n\
- 'use strict' \n\
- var len = this.length; \n\
- ensureMethod(obj, 'methodName'); \n\
- switch(len) { \n\
- case 1: return obj.methodName(this[0]); \n\
- case 2: return obj.methodName(this[0], this[1]); \n\
- case 3: return obj.methodName(this[0], this[1], this[2]); \n\
- case 0: return obj.methodName(); \n\
- default: \n\
- return obj.methodName.apply(obj, this); \n\
- } \n\
- }; \n\
- ".replace(/methodName/g, methodName))(ensureMethod);
-};
-
-var makeGetter = function (propertyName) {
- return new Function("obj", " \n\
- 'use strict'; \n\
- return obj.propertyName; \n\
- ".replace("propertyName", propertyName));
-};
-
-var getCompiled = function(name, compiler, cache) {
- var ret = cache[name];
- if (typeof ret !== "function") {
- if (!isIdentifier(name)) {
- return null;
- }
- ret = compiler(name);
- cache[name] = ret;
- cache[" size"]++;
- if (cache[" size"] > 512) {
- var keys = Object.keys(cache);
- for (var i = 0; i < 256; ++i) delete cache[keys[i]];
- cache[" size"] = keys.length - 256;
- }
- }
- return ret;
-};
-
-getMethodCaller = function(name) {
- return getCompiled(name, makeMethodCaller, callerCache);
-};
-
-getGetter = function(name) {
- return getCompiled(name, makeGetter, getterCache);
-};
-}
-
-function ensureMethod(obj, methodName) {
- var fn;
- if (obj != null) fn = obj[methodName];
- if (typeof fn !== "function") {
- var message = "Object " + util.classString(obj) + " has no method '" +
- util.toString(methodName) + "'";
- throw new Promise.TypeError(message);
- }
- return fn;
-}
-
-function caller(obj) {
- var methodName = this.pop();
- var fn = ensureMethod(obj, methodName);
- return fn.apply(obj, this);
-}
-Promise.prototype.call = function (methodName) {
- var args = [].slice.call(arguments, 1);;
- if (!true) {
- if (canEvaluate) {
- var maybeCaller = getMethodCaller(methodName);
- if (maybeCaller !== null) {
- return this._then(
- maybeCaller, undefined, undefined, args, undefined);
- }
- }
- }
- args.push(methodName);
- return this._then(caller, undefined, undefined, args, undefined);
-};
-
-function namedGetter(obj) {
- return obj[this];
-}
-function indexedGetter(obj) {
- var index = +this;
- if (index < 0) index = Math.max(0, index + obj.length);
- return obj[index];
-}
-Promise.prototype.get = function (propertyName) {
- var isIndex = (typeof propertyName === "number");
- var getter;
- if (!isIndex) {
- if (canEvaluate) {
- var maybeGetter = getGetter(propertyName);
- getter = maybeGetter !== null ? maybeGetter : namedGetter;
- } else {
- getter = namedGetter;
- }
- } else {
- getter = indexedGetter;
- }
- return this._then(getter, undefined, undefined, propertyName, undefined);
-};
-};
-
-},{"./util":36}],6:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-Promise.prototype["break"] = Promise.prototype.cancel = function() {
- if (!debug.cancellation()) return this._warn("cancellation is disabled");
-
- var promise = this;
- var child = promise;
- while (promise._isCancellable()) {
- if (!promise._cancelBy(child)) {
- if (child._isFollowing()) {
- child._followee().cancel();
- } else {
- child._cancelBranched();
- }
- break;
- }
-
- var parent = promise._cancellationParent;
- if (parent == null || !parent._isCancellable()) {
- if (promise._isFollowing()) {
- promise._followee().cancel();
- } else {
- promise._cancelBranched();
- }
- break;
- } else {
- if (promise._isFollowing()) promise._followee().cancel();
- promise._setWillBeCancelled();
- child = promise;
- promise = parent;
- }
- }
-};
-
-Promise.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--;
-};
-
-Promise.prototype._enoughBranchesHaveCancelled = function() {
- return this._branchesRemainingToCancel === undefined ||
- this._branchesRemainingToCancel <= 0;
-};
-
-Promise.prototype._cancelBy = function(canceller) {
- if (canceller === this) {
- this._branchesRemainingToCancel = 0;
- this._invokeOnCancel();
- return true;
- } else {
- this._branchHasCancelled();
- if (this._enoughBranchesHaveCancelled()) {
- this._invokeOnCancel();
- return true;
- }
- }
- return false;
-};
-
-Promise.prototype._cancelBranched = function() {
- if (this._enoughBranchesHaveCancelled()) {
- this._cancel();
- }
-};
-
-Promise.prototype._cancel = function() {
- if (!this._isCancellable()) return;
- this._setCancelled();
- async.invoke(this._cancelPromises, this, undefined);
-};
-
-Promise.prototype._cancelPromises = function() {
- if (this._length() > 0) this._settlePromises();
-};
-
-Promise.prototype._unsetOnCancel = function() {
- this._onCancelField = undefined;
-};
-
-Promise.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled();
-};
-
-Promise.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled();
-};
-
-Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
- if (util.isArray(onCancelCallback)) {
- for (var i = 0; i < onCancelCallback.length; ++i) {
- this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
- }
- } else if (onCancelCallback !== undefined) {
- if (typeof onCancelCallback === "function") {
- if (!internalOnly) {
- var e = tryCatch(onCancelCallback).call(this._boundValue());
- if (e === errorObj) {
- this._attachExtraTrace(e.e);
- async.throwLater(e.e);
- }
- }
- } else {
- onCancelCallback._resultCancelled(this);
- }
- }
-};
-
-Promise.prototype._invokeOnCancel = function() {
- var onCancelCallback = this._onCancel();
- this._unsetOnCancel();
- async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
-};
-
-Promise.prototype._invokeInternalOnCancel = function() {
- if (this._isCancellable()) {
- this._doInvokeOnCancel(this._onCancel(), true);
- this._unsetOnCancel();
- }
-};
-
-Promise.prototype._resultCancelled = function() {
- this.cancel();
-};
-
-};
-
-},{"./util":36}],7:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = _dereq_("./util");
-var getKeys = _dereq_("./es5").keys;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function catchFilter(instances, cb, promise) {
- return function(e) {
- var boundTo = promise._boundValue();
- predicateLoop: for (var i = 0; i < instances.length; ++i) {
- var item = instances[i];
-
- if (item === Error ||
- (item != null && item.prototype instanceof Error)) {
- if (e instanceof item) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (typeof item === "function") {
- var matchesPredicate = tryCatch(item).call(boundTo, e);
- if (matchesPredicate === errorObj) {
- return matchesPredicate;
- } else if (matchesPredicate) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (util.isObject(e)) {
- var keys = getKeys(item);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- if (item[key] != e[key]) {
- continue predicateLoop;
- }
- }
- return tryCatch(cb).call(boundTo, e);
- }
- }
- return NEXT_FILTER;
- };
-}
-
-return catchFilter;
-};
-
-},{"./es5":13,"./util":36}],8:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var longStackTraces = false;
-var contextStack = [];
-
-Promise.prototype._promiseCreated = function() {};
-Promise.prototype._pushContext = function() {};
-Promise.prototype._popContext = function() {return null;};
-Promise._peekContext = Promise.prototype._peekContext = function() {};
-
-function Context() {
- this._trace = new Context.CapturedTrace(peekContext());
-}
-Context.prototype._pushContext = function () {
- if (this._trace !== undefined) {
- this._trace._promiseCreated = null;
- contextStack.push(this._trace);
- }
-};
-
-Context.prototype._popContext = function () {
- if (this._trace !== undefined) {
- var trace = contextStack.pop();
- var ret = trace._promiseCreated;
- trace._promiseCreated = null;
- return ret;
- }
- return null;
-};
-
-function createContext() {
- if (longStackTraces) return new Context();
-}
-
-function peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return undefined;
-}
-Context.CapturedTrace = null;
-Context.create = createContext;
-Context.deactivateLongStackTraces = function() {};
-Context.activateLongStackTraces = function() {
- var Promise_pushContext = Promise.prototype._pushContext;
- var Promise_popContext = Promise.prototype._popContext;
- var Promise_PeekContext = Promise._peekContext;
- var Promise_peekContext = Promise.prototype._peekContext;
- var Promise_promiseCreated = Promise.prototype._promiseCreated;
- Context.deactivateLongStackTraces = function() {
- Promise.prototype._pushContext = Promise_pushContext;
- Promise.prototype._popContext = Promise_popContext;
- Promise._peekContext = Promise_PeekContext;
- Promise.prototype._peekContext = Promise_peekContext;
- Promise.prototype._promiseCreated = Promise_promiseCreated;
- longStackTraces = false;
- };
- longStackTraces = true;
- Promise.prototype._pushContext = Context.prototype._pushContext;
- Promise.prototype._popContext = Context.prototype._popContext;
- Promise._peekContext = Promise.prototype._peekContext = peekContext;
- Promise.prototype._promiseCreated = function() {
- var ctx = this._peekContext();
- if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
- };
-};
-return Context;
-};
-
-},{}],9:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, Context) {
-var getDomain = Promise._getDomain;
-var async = Promise._async;
-var Warning = _dereq_("./errors").Warning;
-var util = _dereq_("./util");
-var es5 = _dereq_("./es5");
-var canAttachTrace = util.canAttachTrace;
-var unhandledRejectionHandled;
-var possiblyUnhandledRejection;
-var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
-var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
-var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
-var stackFramePattern = null;
-var formatStack = null;
-var indentStackFrames = false;
-var printWarning;
-var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
- (true ||
- util.env("BLUEBIRD_DEBUG") ||
- util.env("NODE_ENV") === "development"));
-
-var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
- (debugging || util.env("BLUEBIRD_WARNINGS")));
-
-var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
- (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
-
-var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
- (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
-
-Promise.prototype.suppressUnhandledRejections = function() {
- var target = this._target();
- target._bitField = ((target._bitField & (~1048576)) |
- 524288);
-};
-
-Promise.prototype._ensurePossibleRejectionHandled = function () {
- if ((this._bitField & 524288) !== 0) return;
- this._setRejectionIsUnhandled();
- var self = this;
- setTimeout(function() {
- self._notifyUnhandledRejection();
- }, 1);
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
- fireRejectionEvent("rejectionHandled",
- unhandledRejectionHandled, undefined, this);
-};
-
-Promise.prototype._setReturnedNonUndefined = function() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._returnedNonUndefined = function() {
- return (this._bitField & 268435456) !== 0;
-};
-
-Promise.prototype._notifyUnhandledRejection = function () {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue();
- this._setUnhandledRejectionIsNotified();
- fireRejectionEvent("unhandledRejection",
- possiblyUnhandledRejection, reason, this);
- }
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField | 262144;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField & (~262144);
-};
-
-Promise.prototype._isUnhandledRejectionNotified = function () {
- return (this._bitField & 262144) > 0;
-};
-
-Promise.prototype._setRejectionIsUnhandled = function () {
- this._bitField = this._bitField | 1048576;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled = function () {
- this._bitField = this._bitField & (~1048576);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled = function () {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
- return warn(message, shouldUseOwnTrace, promise || this);
-};
-
-Promise.onPossiblyUnhandledRejection = function (fn) {
- var domain = getDomain();
- possiblyUnhandledRejection =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-Promise.onUnhandledRejectionHandled = function (fn) {
- var domain = getDomain();
- unhandledRejectionHandled =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-var disableLongStackTraces = function() {};
-Promise.longStackTraces = function () {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (!config.longStackTraces && longStackTracesIsSupported()) {
- var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
- var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
- var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
- config.longStackTraces = true;
- disableLongStackTraces = function() {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- Promise.prototype._captureStackTrace = Promise_captureStackTrace;
- Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
- Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
- Context.deactivateLongStackTraces();
- async.enableTrampoline();
- config.longStackTraces = false;
- };
- Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
- Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
- Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
- Context.activateLongStackTraces();
- async.disableTrampolineIfNecessary();
- }
-};
-
-Promise.hasLongStackTraces = function () {
- return config.longStackTraces && longStackTracesIsSupported();
-};
-
-var fireDomEvent = (function() {
- try {
- if (typeof CustomEvent === "function") {
- var event = new CustomEvent("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var eventData = {
- detail: event,
- cancelable: true
- };
- es5.defineProperty(
- eventData, "promise", {value: event.promise});
- es5.defineProperty(eventData, "reason", {value: event.reason});
- var domEvent = new CustomEvent(name.toLowerCase(), eventData);
- return !util.global.dispatchEvent(domEvent);
- };
- } else if (typeof Event === "function") {
- var event = new Event("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new Event(name.toLowerCase(), {
- cancelable: true
- });
- domEvent.detail = event;
- es5.defineProperty(domEvent, "promise", {value: event.promise});
- es5.defineProperty(domEvent, "reason", {value: event.reason});
- return !util.global.dispatchEvent(domEvent);
- };
- } else {
- var event = document.createEvent("CustomEvent");
- event.initCustomEvent("testingtheevent", false, true, {});
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = document.createEvent("CustomEvent");
- domEvent.initCustomEvent(name.toLowerCase(), false, true,
- event);
- return !util.global.dispatchEvent(domEvent);
- };
- }
- } catch (e) {}
- return function() {
- return false;
- };
-})();
-
-var fireGlobalEvent = (function() {
- if (util.isNode) {
- return function() {
- return process.emit.apply(process, arguments);
- };
- } else {
- if (!util.global) {
- return function() {
- return false;
- };
- }
- return function(name) {
- var methodName = "on" + name.toLowerCase();
- var method = util.global[methodName];
- if (!method) return false;
- method.apply(util.global, [].slice.call(arguments, 1));
- return true;
- };
- }
-})();
-
-function generatePromiseLifecycleEventObject(name, promise) {
- return {promise: promise};
-}
-
-var eventToObjectGenerator = {
- promiseCreated: generatePromiseLifecycleEventObject,
- promiseFulfilled: generatePromiseLifecycleEventObject,
- promiseRejected: generatePromiseLifecycleEventObject,
- promiseResolved: generatePromiseLifecycleEventObject,
- promiseCancelled: generatePromiseLifecycleEventObject,
- promiseChained: function(name, promise, child) {
- return {promise: promise, child: child};
- },
- warning: function(name, warning) {
- return {warning: warning};
- },
- unhandledRejection: function (name, reason, promise) {
- return {reason: reason, promise: promise};
- },
- rejectionHandled: generatePromiseLifecycleEventObject
-};
-
-var activeFireEvent = function (name) {
- var globalEventFired = false;
- try {
- globalEventFired = fireGlobalEvent.apply(null, arguments);
- } catch (e) {
- async.throwLater(e);
- globalEventFired = true;
- }
-
- var domEventFired = false;
- try {
- domEventFired = fireDomEvent(name,
- eventToObjectGenerator[name].apply(null, arguments));
- } catch (e) {
- async.throwLater(e);
- domEventFired = true;
- }
-
- return domEventFired || globalEventFired;
-};
-
-Promise.config = function(opts) {
- opts = Object(opts);
- if ("longStackTraces" in opts) {
- if (opts.longStackTraces) {
- Promise.longStackTraces();
- } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
- disableLongStackTraces();
- }
- }
- if ("warnings" in opts) {
- var warningsOption = opts.warnings;
- config.warnings = !!warningsOption;
- wForgottenReturn = config.warnings;
-
- if (util.isObject(warningsOption)) {
- if ("wForgottenReturn" in warningsOption) {
- wForgottenReturn = !!warningsOption.wForgottenReturn;
- }
- }
- }
- if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
- if (async.haveItemsQueued()) {
- throw new Error(
- "cannot enable cancellation after promises are in use");
- }
- Promise.prototype._clearCancellationData =
- cancellationClearCancellationData;
- Promise.prototype._propagateFrom = cancellationPropagateFrom;
- Promise.prototype._onCancel = cancellationOnCancel;
- Promise.prototype._setOnCancel = cancellationSetOnCancel;
- Promise.prototype._attachCancellationCallback =
- cancellationAttachCancellationCallback;
- Promise.prototype._execute = cancellationExecute;
- propagateFromFunction = cancellationPropagateFrom;
- config.cancellation = true;
- }
- if ("monitoring" in opts) {
- if (opts.monitoring && !config.monitoring) {
- config.monitoring = true;
- Promise.prototype._fireEvent = activeFireEvent;
- } else if (!opts.monitoring && config.monitoring) {
- config.monitoring = false;
- Promise.prototype._fireEvent = defaultFireEvent;
- }
- }
- return Promise;
-};
-
-function defaultFireEvent() { return false; }
-
-Promise.prototype._fireEvent = defaultFireEvent;
-Promise.prototype._execute = function(executor, resolve, reject) {
- try {
- executor(resolve, reject);
- } catch (e) {
- return e;
- }
-};
-Promise.prototype._onCancel = function () {};
-Promise.prototype._setOnCancel = function (handler) { ; };
-Promise.prototype._attachCancellationCallback = function(onCancel) {
- ;
-};
-Promise.prototype._captureStackTrace = function () {};
-Promise.prototype._attachExtraTrace = function () {};
-Promise.prototype._dereferenceTrace = function () {};
-Promise.prototype._clearCancellationData = function() {};
-Promise.prototype._propagateFrom = function (parent, flags) {
- ;
- ;
-};
-
-function cancellationExecute(executor, resolve, reject) {
- var promise = this;
- try {
- executor(resolve, reject, function(onCancel) {
- if (typeof onCancel !== "function") {
- throw new TypeError("onCancel must be a function, got: " +
- util.toString(onCancel));
- }
- promise._attachCancellationCallback(onCancel);
- });
- } catch (e) {
- return e;
- }
-}
-
-function cancellationAttachCancellationCallback(onCancel) {
- if (!this._isCancellable()) return this;
-
- var previousOnCancel = this._onCancel();
- if (previousOnCancel !== undefined) {
- if (util.isArray(previousOnCancel)) {
- previousOnCancel.push(onCancel);
- } else {
- this._setOnCancel([previousOnCancel, onCancel]);
- }
- } else {
- this._setOnCancel(onCancel);
- }
-}
-
-function cancellationOnCancel() {
- return this._onCancelField;
-}
-
-function cancellationSetOnCancel(onCancel) {
- this._onCancelField = onCancel;
-}
-
-function cancellationClearCancellationData() {
- this._cancellationParent = undefined;
- this._onCancelField = undefined;
-}
-
-function cancellationPropagateFrom(parent, flags) {
- if ((flags & 1) !== 0) {
- this._cancellationParent = parent;
- var branchesRemainingToCancel = parent._branchesRemainingToCancel;
- if (branchesRemainingToCancel === undefined) {
- branchesRemainingToCancel = 0;
- }
- parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
- }
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-
-function bindingPropagateFrom(parent, flags) {
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-var propagateFromFunction = bindingPropagateFrom;
-
-function boundValueFunction() {
- var ret = this._boundTo;
- if (ret !== undefined) {
- if (ret instanceof Promise) {
- if (ret.isFulfilled()) {
- return ret.value();
- } else {
- return undefined;
- }
- }
- }
- return ret;
-}
-
-function longStackTracesCaptureStackTrace() {
- this._trace = new CapturedTrace(this._peekContext());
-}
-
-function longStackTracesAttachExtraTrace(error, ignoreSelf) {
- if (canAttachTrace(error)) {
- var trace = this._trace;
- if (trace !== undefined) {
- if (ignoreSelf) trace = trace._parent;
- }
- if (trace !== undefined) {
- trace.attachExtraTrace(error);
- } else if (!error.__stackCleaned__) {
- var parsed = parseStackAndMessage(error);
- util.notEnumerableProp(error, "stack",
- parsed.message + "\n" + parsed.stack.join("\n"));
- util.notEnumerableProp(error, "__stackCleaned__", true);
- }
- }
-}
-
-function longStackTracesDereferenceTrace() {
- this._trace = undefined;
-}
-
-function checkForgottenReturns(returnValue, promiseCreated, name, promise,
- parent) {
- if (returnValue === undefined && promiseCreated !== null &&
- wForgottenReturn) {
- if (parent !== undefined && parent._returnedNonUndefined()) return;
- if ((promise._bitField & 65535) === 0) return;
-
- if (name) name = name + " ";
- var handlerLine = "";
- var creatorLine = "";
- if (promiseCreated._trace) {
- var traceLines = promiseCreated._trace.stack.split("\n");
- var stack = cleanStack(traceLines);
- for (var i = stack.length - 1; i >= 0; --i) {
- var line = stack[i];
- if (!nodeFramePattern.test(line)) {
- var lineMatches = line.match(parseLinePattern);
- if (lineMatches) {
- handlerLine = "at " + lineMatches[1] +
- ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
- }
- break;
- }
- }
-
- if (stack.length > 0) {
- var firstUserLine = stack[0];
- for (var i = 0; i < traceLines.length; ++i) {
-
- if (traceLines[i] === firstUserLine) {
- if (i > 0) {
- creatorLine = "\n" + traceLines[i - 1];
- }
- break;
- }
- }
-
- }
- }
- var msg = "a promise was created in a " + name +
- "handler " + handlerLine + "but was not returned from it, " +
- "see http://goo.gl/rRqMUw" +
- creatorLine;
- promise._warn(msg, true, promiseCreated);
- }
-}
-
-function deprecated(name, replacement) {
- var message = name +
- " is deprecated and will be removed in a future version.";
- if (replacement) message += " Use " + replacement + " instead.";
- return warn(message);
-}
-
-function warn(message, shouldUseOwnTrace, promise) {
- if (!config.warnings) return;
- var warning = new Warning(message);
- var ctx;
- if (shouldUseOwnTrace) {
- promise._attachExtraTrace(warning);
- } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
- ctx.attachExtraTrace(warning);
- } else {
- var parsed = parseStackAndMessage(warning);
- warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
- }
-
- if (!activeFireEvent("warning", warning)) {
- formatAndLogError(warning, "", true);
- }
-}
-
-function reconstructStack(message, stacks) {
- for (var i = 0; i < stacks.length - 1; ++i) {
- stacks[i].push("From previous event:");
- stacks[i] = stacks[i].join("\n");
- }
- if (i < stacks.length) {
- stacks[i] = stacks[i].join("\n");
- }
- return message + "\n" + stacks.join("\n");
-}
-
-function removeDuplicateOrEmptyJumps(stacks) {
- for (var i = 0; i < stacks.length; ++i) {
- if (stacks[i].length === 0 ||
- ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
- stacks.splice(i, 1);
- i--;
- }
- }
-}
-
-function removeCommonRoots(stacks) {
- var current = stacks[0];
- for (var i = 1; i < stacks.length; ++i) {
- var prev = stacks[i];
- var currentLastIndex = current.length - 1;
- var currentLastLine = current[currentLastIndex];
- var commonRootMeetPoint = -1;
-
- for (var j = prev.length - 1; j >= 0; --j) {
- if (prev[j] === currentLastLine) {
- commonRootMeetPoint = j;
- break;
- }
- }
-
- for (var j = commonRootMeetPoint; j >= 0; --j) {
- var line = prev[j];
- if (current[currentLastIndex] === line) {
- current.pop();
- currentLastIndex--;
- } else {
- break;
- }
- }
- current = prev;
- }
-}
-
-function cleanStack(stack) {
- var ret = [];
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- var isTraceLine = " (No stack trace)" === line ||
- stackFramePattern.test(line);
- var isInternalFrame = isTraceLine && shouldIgnore(line);
- if (isTraceLine && !isInternalFrame) {
- if (indentStackFrames && line.charAt(0) !== " ") {
- line = " " + line;
- }
- ret.push(line);
- }
- }
- return ret;
-}
-
-function stackFramesAsArray(error) {
- var stack = error.stack.replace(/\s+$/g, "").split("\n");
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- if (" (No stack trace)" === line || stackFramePattern.test(line)) {
- break;
- }
- }
- if (i > 0 && error.name != "SyntaxError") {
- stack = stack.slice(i);
- }
- return stack;
-}
-
-function parseStackAndMessage(error) {
- var stack = error.stack;
- var message = error.toString();
- stack = typeof stack === "string" && stack.length > 0
- ? stackFramesAsArray(error) : [" (No stack trace)"];
- return {
- message: message,
- stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
- };
-}
-
-function formatAndLogError(error, title, isSoft) {
- if (typeof console !== "undefined") {
- var message;
- if (util.isObject(error)) {
- var stack = error.stack;
- message = title + formatStack(stack, error);
- } else {
- message = title + String(error);
- }
- if (typeof printWarning === "function") {
- printWarning(message, isSoft);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-}
-
-function fireRejectionEvent(name, localHandler, reason, promise) {
- var localEventFired = false;
- try {
- if (typeof localHandler === "function") {
- localEventFired = true;
- if (name === "rejectionHandled") {
- localHandler(promise);
- } else {
- localHandler(reason, promise);
- }
- }
- } catch (e) {
- async.throwLater(e);
- }
-
- if (name === "unhandledRejection") {
- if (!activeFireEvent(name, reason, promise) && !localEventFired) {
- formatAndLogError(reason, "Unhandled rejection ");
- }
- } else {
- activeFireEvent(name, promise);
- }
-}
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj && typeof obj.toString === "function"
- ? obj.toString() : util.toString(obj);
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function longStackTracesIsSupported() {
- return typeof captureStackTrace === "function";
-}
-
-var shouldIgnore = function() { return false; };
-var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
-function parseLineInfo(line) {
- var matches = line.match(parseLineInfoRegex);
- if (matches) {
- return {
- fileName: matches[1],
- line: parseInt(matches[2], 10)
- };
- }
-}
-
-function setBounds(firstLineError, lastLineError) {
- if (!longStackTracesIsSupported()) return;
- var firstStackLines = (firstLineError.stack || "").split("\n");
- var lastStackLines = (lastLineError.stack || "").split("\n");
- var firstIndex = -1;
- var lastIndex = -1;
- var firstFileName;
- var lastFileName;
- for (var i = 0; i < firstStackLines.length; ++i) {
- var result = parseLineInfo(firstStackLines[i]);
- if (result) {
- firstFileName = result.fileName;
- firstIndex = result.line;
- break;
- }
- }
- for (var i = 0; i < lastStackLines.length; ++i) {
- var result = parseLineInfo(lastStackLines[i]);
- if (result) {
- lastFileName = result.fileName;
- lastIndex = result.line;
- break;
- }
- }
- if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
- firstFileName !== lastFileName || firstIndex >= lastIndex) {
- return;
- }
-
- shouldIgnore = function(line) {
- if (bluebirdFramePattern.test(line)) return true;
- var info = parseLineInfo(line);
- if (info) {
- if (info.fileName === firstFileName &&
- (firstIndex <= info.line && info.line <= lastIndex)) {
- return true;
- }
- }
- return false;
- };
-}
-
-function CapturedTrace(parent) {
- this._parent = parent;
- this._promisesCreated = 0;
- var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
- captureStackTrace(this, CapturedTrace);
- if (length > 32) this.uncycle();
-}
-util.inherits(CapturedTrace, Error);
-Context.CapturedTrace = CapturedTrace;
-
-CapturedTrace.prototype.uncycle = function() {
- var length = this._length;
- if (length < 2) return;
- var nodes = [];
- var stackToIndex = {};
-
- for (var i = 0, node = this; node !== undefined; ++i) {
- nodes.push(node);
- node = node._parent;
- }
- length = this._length = i;
- for (var i = length - 1; i >= 0; --i) {
- var stack = nodes[i].stack;
- if (stackToIndex[stack] === undefined) {
- stackToIndex[stack] = i;
- }
- }
- for (var i = 0; i < length; ++i) {
- var currentStack = nodes[i].stack;
- var index = stackToIndex[currentStack];
- if (index !== undefined && index !== i) {
- if (index > 0) {
- nodes[index - 1]._parent = undefined;
- nodes[index - 1]._length = 1;
- }
- nodes[i]._parent = undefined;
- nodes[i]._length = 1;
- var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
-
- if (index < length - 1) {
- cycleEdgeNode._parent = nodes[index + 1];
- cycleEdgeNode._parent.uncycle();
- cycleEdgeNode._length =
- cycleEdgeNode._parent._length + 1;
- } else {
- cycleEdgeNode._parent = undefined;
- cycleEdgeNode._length = 1;
- }
- var currentChildLength = cycleEdgeNode._length + 1;
- for (var j = i - 2; j >= 0; --j) {
- nodes[j]._length = currentChildLength;
- currentChildLength++;
- }
- return;
- }
- }
-};
-
-CapturedTrace.prototype.attachExtraTrace = function(error) {
- if (error.__stackCleaned__) return;
- this.uncycle();
- var parsed = parseStackAndMessage(error);
- var message = parsed.message;
- var stacks = [parsed.stack];
-
- var trace = this;
- while (trace !== undefined) {
- stacks.push(cleanStack(trace.stack.split("\n")));
- trace = trace._parent;
- }
- removeCommonRoots(stacks);
- removeDuplicateOrEmptyJumps(stacks);
- util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
- util.notEnumerableProp(error, "__stackCleaned__", true);
-};
-
-var captureStackTrace = (function stackDetection() {
- var v8stackFramePattern = /^\s*at\s*/;
- var v8stackFormatter = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- Error.stackTraceLimit += 6;
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- var captureStackTrace = Error.captureStackTrace;
-
- shouldIgnore = function(line) {
- return bluebirdFramePattern.test(line);
- };
- return function(receiver, ignoreUntil) {
- Error.stackTraceLimit += 6;
- captureStackTrace(receiver, ignoreUntil);
- Error.stackTraceLimit -= 6;
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
- stackFramePattern = /@/;
- formatStack = v8stackFormatter;
- indentStackFrames = true;
- return function captureStackTrace(o) {
- o.stack = new Error().stack;
- };
- }
-
- var hasStackAfterThrow;
- try { throw new Error(); }
- catch(e) {
- hasStackAfterThrow = ("stack" in e);
- }
- if (!("stack" in err) && hasStackAfterThrow &&
- typeof Error.stackTraceLimit === "number") {
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- return function captureStackTrace(o) {
- Error.stackTraceLimit += 6;
- try { throw new Error(); }
- catch(e) { o.stack = e.stack; }
- Error.stackTraceLimit -= 6;
- };
- }
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- return null;
-
-})([]);
-
-if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
- printWarning = function (message) {
- console.warn(message);
- };
- if (util.isNode && process.stderr.isTTY) {
- printWarning = function(message, isSoft) {
- var color = isSoft ? "\u001b[33m" : "\u001b[31m";
- console.warn(color + message + "\u001b[0m\n");
- };
- } else if (!util.isNode && typeof (new Error().stack) === "string") {
- printWarning = function(message, isSoft) {
- console.warn("%c" + message,
- isSoft ? "color: darkorange" : "color: red");
- };
- }
-}
-
-var config = {
- warnings: warnings,
- longStackTraces: false,
- cancellation: false,
- monitoring: false
-};
-
-if (longStackTraces) Promise.longStackTraces();
-
-return {
- longStackTraces: function() {
- return config.longStackTraces;
- },
- warnings: function() {
- return config.warnings;
- },
- cancellation: function() {
- return config.cancellation;
- },
- monitoring: function() {
- return config.monitoring;
- },
- propagateFromFunction: function() {
- return propagateFromFunction;
- },
- boundValueFunction: function() {
- return boundValueFunction;
- },
- checkForgottenReturns: checkForgottenReturns,
- setBounds: setBounds,
- warn: warn,
- deprecated: deprecated,
- CapturedTrace: CapturedTrace,
- fireDomEvent: fireDomEvent,
- fireGlobalEvent: fireGlobalEvent
-};
-};
-
-},{"./errors":12,"./es5":13,"./util":36}],10:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function returner() {
- return this.value;
-}
-function thrower() {
- throw this.reason;
-}
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn = function (value) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- returner, undefined, undefined, {value: value}, undefined);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow = function (reason) {
- return this._then(
- thrower, undefined, undefined, {reason: reason}, undefined);
-};
-
-Promise.prototype.catchThrow = function (reason) {
- if (arguments.length <= 1) {
- return this._then(
- undefined, thrower, undefined, {reason: reason}, undefined);
- } else {
- var _reason = arguments[1];
- var handler = function() {throw _reason;};
- return this.caught(reason, handler);
- }
-};
-
-Promise.prototype.catchReturn = function (value) {
- if (arguments.length <= 1) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- undefined, returner, undefined, {value: value}, undefined);
- } else {
- var _value = arguments[1];
- if (_value instanceof Promise) _value.suppressUnhandledRejections();
- var handler = function() {return _value;};
- return this.caught(value, handler);
- }
-};
-};
-
-},{}],11:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseReduce = Promise.reduce;
-var PromiseAll = Promise.all;
-
-function promiseAllThis() {
- return PromiseAll(this);
-}
-
-function PromiseMapSeries(promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
-}
-
-Promise.prototype.each = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, this, undefined);
-};
-
-Promise.prototype.mapSeries = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, INTERNAL);
-};
-
-Promise.each = function (promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, promises, undefined);
-};
-
-Promise.mapSeries = PromiseMapSeries;
-};
-
-
-},{}],12:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var Objectfreeze = es5.freeze;
-var util = _dereq_("./util");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- notEnumerableProp(this, "message",
- typeof message === "string" ? message : defaultMessage);
- notEnumerableProp(this, "name", nameProperty);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- Error.call(this);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var Warning = subError("Warning", "warning");
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-es5.defineProperty(AggregateError.prototype, "length", {
- value: 0,
- configurable: false,
- writable: true,
- enumerable: true
-});
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- if (!(this instanceof OperationalError))
- return new OperationalError(message);
- notEnumerableProp(this, "name", "OperationalError");
- notEnumerableProp(this, "message", message);
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- notEnumerableProp(this, "message", message.message);
- notEnumerableProp(this, "stack", message.stack);
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var errorTypes = Error["__BluebirdErrorTypes__"];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- es5.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: errorTypes,
- writable: false,
- enumerable: false,
- configurable: false
- });
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- Warning: Warning
-};
-
-},{"./es5":13,"./util":36}],13:[function(_dereq_,module,exports){
-var isES5 = (function(){
- "use strict";
- return this === undefined;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5,
- propertyIsWritable: function(obj, prop) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
- return !!(!descriptor || descriptor.writable || descriptor.set);
- }
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function (o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- };
-
- var ObjectGetDescriptor = function(o, key) {
- return {value: o[key]};
- };
-
- var ObjectDefineProperty = function (o, key, desc) {
- o[key] = desc.value;
- return o;
- };
-
- var ObjectFreeze = function (obj) {
- return obj;
- };
-
- var ObjectGetPrototypeOf = function (obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- };
-
- var ArrayIsArray = function (obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- };
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- names: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- getDescriptor: ObjectGetDescriptor,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5,
- propertyIsWritable: function() {
- return true;
- }
- };
-}
-
-},{}],14:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseMap = Promise.map;
-
-Promise.prototype.filter = function (fn, options) {
- return PromiseMap(this, fn, options, INTERNAL);
-};
-
-Promise.filter = function (promises, fn, options) {
- return PromiseMap(promises, fn, options, INTERNAL);
-};
-};
-
-},{}],15:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
-var util = _dereq_("./util");
-var CancellationError = Promise.CancellationError;
-var errorObj = util.errorObj;
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-
-function PassThroughHandlerContext(promise, type, handler) {
- this.promise = promise;
- this.type = type;
- this.handler = handler;
- this.called = false;
- this.cancelPromise = null;
-}
-
-PassThroughHandlerContext.prototype.isFinallyHandler = function() {
- return this.type === 0;
-};
-
-function FinallyHandlerCancelReaction(finallyHandler) {
- this.finallyHandler = finallyHandler;
-}
-
-FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
- checkCancel(this.finallyHandler);
-};
-
-function checkCancel(ctx, reason) {
- if (ctx.cancelPromise != null) {
- if (arguments.length > 1) {
- ctx.cancelPromise._reject(reason);
- } else {
- ctx.cancelPromise._cancel();
- }
- ctx.cancelPromise = null;
- return true;
- }
- return false;
-}
-
-function succeed() {
- return finallyHandler.call(this, this.promise._target()._settledValue());
-}
-function fail(reason) {
- if (checkCancel(this, reason)) return;
- errorObj.e = reason;
- return errorObj;
-}
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- if (!this.called) {
- this.called = true;
- var ret = this.isFinallyHandler()
- ? handler.call(promise._boundValue())
- : handler.call(promise._boundValue(), reasonOrValue);
- if (ret === NEXT_FILTER) {
- return ret;
- } else if (ret !== undefined) {
- promise._setReturnedNonUndefined();
- var maybePromise = tryConvertToPromise(ret, promise);
- if (maybePromise instanceof Promise) {
- if (this.cancelPromise != null) {
- if (maybePromise._isCancelled()) {
- var reason =
- new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- errorObj.e = reason;
- return errorObj;
- } else if (maybePromise.isPending()) {
- maybePromise._attachCancellationCallback(
- new FinallyHandlerCancelReaction(this));
- }
- }
- return maybePromise._then(
- succeed, fail, undefined, this, undefined);
- }
- }
- }
-
- if (promise.isRejected()) {
- checkCancel(this);
- errorObj.e = reasonOrValue;
- return errorObj;
- } else {
- checkCancel(this);
- return reasonOrValue;
- }
-}
-
-Promise.prototype._passThrough = function(handler, type, success, fail) {
- if (typeof handler !== "function") return this.then();
- return this._then(success,
- fail,
- undefined,
- new PassThroughHandlerContext(this, type, handler),
- undefined);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function (handler) {
- return this._passThrough(handler,
- 0,
- finallyHandler,
- finallyHandler);
-};
-
-
-Promise.prototype.tap = function (handler) {
- return this._passThrough(handler, 1, finallyHandler);
-};
-
-Promise.prototype.tapCatch = function (handlerOrPredicate) {
- var len = arguments.length;
- if(len === 1) {
- return this._passThrough(handlerOrPredicate,
- 1,
- undefined,
- finallyHandler);
- } else {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return Promise.reject(new TypeError(
- "tapCatch statement predicate: "
- + "expecting an object but got " + util.classString(item)
- ));
- }
- }
- catchInstances.length = j;
- var handler = arguments[i];
- return this._passThrough(catchFilter(catchInstances, handler, this),
- 1,
- undefined,
- finallyHandler);
- }
-
-};
-
-return PassThroughHandlerContext;
-};
-
-},{"./catch_filter":7,"./util":36}],16:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- apiRejection,
- INTERNAL,
- tryConvertToPromise,
- Proxyable,
- debug) {
-var errors = _dereq_("./errors");
-var TypeError = errors.TypeError;
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-var yieldHandlers = [];
-
-function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
- for (var i = 0; i < yieldHandlers.length; ++i) {
- traceParent._pushContext();
- var result = tryCatch(yieldHandlers[i])(value);
- traceParent._popContext();
- if (result === errorObj) {
- traceParent._pushContext();
- var ret = Promise.reject(errorObj.e);
- traceParent._popContext();
- return ret;
- }
- var maybePromise = tryConvertToPromise(result, traceParent);
- if (maybePromise instanceof Promise) return maybePromise;
- }
- return null;
-}
-
-function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
- if (debug.cancellation()) {
- var internal = new Promise(INTERNAL);
- var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
- this._promise = internal.lastly(function() {
- return _finallyPromise;
- });
- internal._captureStackTrace();
- internal._setOnCancel(this);
- } else {
- var promise = this._promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- }
- this._stack = stack;
- this._generatorFunction = generatorFunction;
- this._receiver = receiver;
- this._generator = undefined;
- this._yieldHandlers = typeof yieldHandler === "function"
- ? [yieldHandler].concat(yieldHandlers)
- : yieldHandlers;
- this._yieldedPromise = null;
- this._cancellationPhase = false;
-}
-util.inherits(PromiseSpawn, Proxyable);
-
-PromiseSpawn.prototype._isResolved = function() {
- return this._promise === null;
-};
-
-PromiseSpawn.prototype._cleanup = function() {
- this._promise = this._generator = null;
- if (debug.cancellation() && this._finallyPromise !== null) {
- this._finallyPromise._fulfill();
- this._finallyPromise = null;
- }
-};
-
-PromiseSpawn.prototype._promiseCancelled = function() {
- if (this._isResolved()) return;
- var implementsReturn = typeof this._generator["return"] !== "undefined";
-
- var result;
- if (!implementsReturn) {
- var reason = new Promise.CancellationError(
- "generator .return() sentinel");
- Promise.coroutine.returnSentinel = reason;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- result = tryCatch(this._generator["throw"]).call(this._generator,
- reason);
- this._promise._popContext();
- } else {
- this._promise._pushContext();
- result = tryCatch(this._generator["return"]).call(this._generator,
- undefined);
- this._promise._popContext();
- }
- this._cancellationPhase = true;
- this._yieldedPromise = null;
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseFulfilled = function(value) {
- this._yieldedPromise = null;
- this._promise._pushContext();
- var result = tryCatch(this._generator.next).call(this._generator, value);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseRejected = function(reason) {
- this._yieldedPromise = null;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- var result = tryCatch(this._generator["throw"])
- .call(this._generator, reason);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._resultCancelled = function() {
- if (this._yieldedPromise instanceof Promise) {
- var promise = this._yieldedPromise;
- this._yieldedPromise = null;
- promise.cancel();
- }
-};
-
-PromiseSpawn.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseSpawn.prototype._run = function () {
- this._generator = this._generatorFunction.call(this._receiver);
- this._receiver =
- this._generatorFunction = undefined;
- this._promiseFulfilled(undefined);
-};
-
-PromiseSpawn.prototype._continue = function (result) {
- var promise = this._promise;
- if (result === errorObj) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._rejectCallback(result.e, false);
- }
- }
-
- var value = result.value;
- if (result.done === true) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._resolveCallback(value);
- }
- } else {
- var maybePromise = tryConvertToPromise(value, this._promise);
- if (!(maybePromise instanceof Promise)) {
- maybePromise =
- promiseFromYieldHandler(maybePromise,
- this._yieldHandlers,
- this._promise);
- if (maybePromise === null) {
- this._promiseRejected(
- new TypeError(
- "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
- "From coroutine:\u000a" +
- this._stack.split("\n").slice(1, -7).join("\n")
- )
- );
- return;
- }
- }
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- this._yieldedPromise = maybePromise;
- maybePromise._proxy(this, null);
- } else if (((bitField & 33554432) !== 0)) {
- Promise._async.invoke(
- this._promiseFulfilled, this, maybePromise._value()
- );
- } else if (((bitField & 16777216) !== 0)) {
- Promise._async.invoke(
- this._promiseRejected, this, maybePromise._reason()
- );
- } else {
- this._promiseCancelled();
- }
- }
-};
-
-Promise.coroutine = function (generatorFunction, options) {
- if (typeof generatorFunction !== "function") {
- throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var yieldHandler = Object(options).yieldHandler;
- var PromiseSpawn$ = PromiseSpawn;
- var stack = new Error().stack;
- return function () {
- var generator = generatorFunction.apply(this, arguments);
- var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
- stack);
- var ret = spawn.promise();
- spawn._generator = generator;
- spawn._promiseFulfilled(undefined);
- return ret;
- };
-};
-
-Promise.coroutine.addYieldHandler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- yieldHandlers.push(fn);
-};
-
-Promise.spawn = function (generatorFunction) {
- debug.deprecated("Promise.spawn()", "Promise.coroutine()");
- if (typeof generatorFunction !== "function") {
- return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var spawn = new PromiseSpawn(generatorFunction, this);
- var ret = spawn.promise();
- spawn._run(Promise.spawn);
- return ret;
-};
-};
-
-},{"./errors":12,"./util":36}],17:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
- getDomain) {
-var util = _dereq_("./util");
-var canEvaluate = util.canEvaluate;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var reject;
-
-if (!true) {
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var promiseSetter = function(i) {
- return new Function("promise", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = promise; \n\
- ".replace(/Index/g, i));
- };
-
- var generateHolderClass = function(total) {
- var props = new Array(total);
- for (var i = 0; i < props.length; ++i) {
- props[i] = "this.p" + (i+1);
- }
- var assignment = props.join(" = ") + " = null;";
- var cancellationCode= "var promise;\n" + props.map(function(prop) {
- return " \n\
- promise = " + prop + "; \n\
- if (promise instanceof Promise) { \n\
- promise.cancel(); \n\
- } \n\
- ";
- }).join("\n");
- var passedArguments = props.join(", ");
- var name = "Holder$" + total;
-
-
- var code = "return function(tryCatch, errorObj, Promise, async) { \n\
- 'use strict'; \n\
- function [TheName](fn) { \n\
- [TheProperties] \n\
- this.fn = fn; \n\
- this.asyncNeeded = true; \n\
- this.now = 0; \n\
- } \n\
- \n\
- [TheName].prototype._callFunction = function(promise) { \n\
- promise._pushContext(); \n\
- var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
- promise._popContext(); \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(ret.e, false); \n\
- } else { \n\
- promise._resolveCallback(ret); \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype.checkFulfillment = function(promise) { \n\
- var now = ++this.now; \n\
- if (now === [TheTotal]) { \n\
- if (this.asyncNeeded) { \n\
- async.invoke(this._callFunction, this, promise); \n\
- } else { \n\
- this._callFunction(promise); \n\
- } \n\
- \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype._resultCancelled = function() { \n\
- [CancellationCode] \n\
- }; \n\
- \n\
- return [TheName]; \n\
- }(tryCatch, errorObj, Promise, async); \n\
- ";
-
- code = code.replace(/\[TheName\]/g, name)
- .replace(/\[TheTotal\]/g, total)
- .replace(/\[ThePassedArguments\]/g, passedArguments)
- .replace(/\[TheProperties\]/g, assignment)
- .replace(/\[CancellationCode\]/g, cancellationCode);
-
- return new Function("tryCatch", "errorObj", "Promise", "async", code)
- (tryCatch, errorObj, Promise, async);
- };
-
- var holderClasses = [];
- var thenCallbacks = [];
- var promiseSetters = [];
-
- for (var i = 0; i < 8; ++i) {
- holderClasses.push(generateHolderClass(i + 1));
- thenCallbacks.push(thenCallback(i + 1));
- promiseSetters.push(promiseSetter(i + 1));
- }
-
- reject = function (reason) {
- this._reject(reason);
- };
-}}
-
-Promise.join = function () {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (!true) {
- if (last <= 8 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var HolderClass = holderClasses[last - 1];
- var holder = new HolderClass(fn);
- var callbacks = thenCallbacks;
-
- for (var i = 0; i < last; ++i) {
- var maybePromise = tryConvertToPromise(arguments[i], ret);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- maybePromise._then(callbacks[i], reject,
- undefined, ret, holder);
- promiseSetters[i](maybePromise, holder);
- holder.asyncNeeded = false;
- } else if (((bitField & 33554432) !== 0)) {
- callbacks[i].call(ret,
- maybePromise._value(), holder);
- } else if (((bitField & 16777216) !== 0)) {
- ret._reject(maybePromise._reason());
- } else {
- ret._cancel();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
-
- if (!ret._isFateSealed()) {
- if (holder.asyncNeeded) {
- var domain = getDomain();
- if (domain !== null) {
- holder.fn = util.domainBind(domain, holder.fn);
- }
- }
- ret._setAsyncGuaranteed();
- ret._setOnCancel(holder);
- }
- return ret;
- }
- }
- }
- var args = [].slice.call(arguments);;
- if (fn) args.pop();
- var ret = new PromiseArray(args).promise();
- return fn !== undefined ? ret.spread(fn) : ret;
-};
-
-};
-
-},{"./util":36}],18:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-function MappingPromiseArray(promises, fn, limit, _filter) {
- this.constructor$(promises);
- this._promise._captureStackTrace();
- var domain = getDomain();
- this._callback = domain === null ? fn : util.domainBind(domain, fn);
- this._preservedValues = _filter === INTERNAL
- ? new Array(this.length())
- : null;
- this._limit = limit;
- this._inFlight = 0;
- this._queue = [];
- async.invoke(this._asyncInit, this, undefined);
-}
-util.inherits(MappingPromiseArray, PromiseArray);
-
-MappingPromiseArray.prototype._asyncInit = function() {
- this._init$(undefined, -2);
-};
-
-MappingPromiseArray.prototype._init = function () {};
-
-MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var values = this._values;
- var length = this.length();
- var preservedValues = this._preservedValues;
- var limit = this._limit;
-
- if (index < 0) {
- index = (index * -1) - 1;
- values[index] = value;
- if (limit >= 1) {
- this._inFlight--;
- this._drainQueue();
- if (this._isResolved()) return true;
- }
- } else {
- if (limit >= 1 && this._inFlight >= limit) {
- values[index] = value;
- this._queue.push(index);
- return false;
- }
- if (preservedValues !== null) preservedValues[index] = value;
-
- var promise = this._promise;
- var callback = this._callback;
- var receiver = promise._boundValue();
- promise._pushContext();
- var ret = tryCatch(callback).call(receiver, value, index, length);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- preservedValues !== null ? "Promise.filter" : "Promise.map",
- promise
- );
- if (ret === errorObj) {
- this._reject(ret.e);
- return true;
- }
-
- var maybePromise = tryConvertToPromise(ret, this._promise);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- if (limit >= 1) this._inFlight++;
- values[index] = maybePromise;
- maybePromise._proxy(this, (index + 1) * -1);
- return false;
- } else if (((bitField & 33554432) !== 0)) {
- ret = maybePromise._value();
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(maybePromise._reason());
- return true;
- } else {
- this._cancel();
- return true;
- }
- }
- values[index] = ret;
- }
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= length) {
- if (preservedValues !== null) {
- this._filter(values, preservedValues);
- } else {
- this._resolve(values);
- }
- return true;
- }
- return false;
-};
-
-MappingPromiseArray.prototype._drainQueue = function () {
- var queue = this._queue;
- var limit = this._limit;
- var values = this._values;
- while (queue.length > 0 && this._inFlight < limit) {
- if (this._isResolved()) return;
- var index = queue.pop();
- this._promiseFulfilled(values[index], index);
- }
-};
-
-MappingPromiseArray.prototype._filter = function (booleans, values) {
- var len = values.length;
- var ret = new Array(len);
- var j = 0;
- for (var i = 0; i < len; ++i) {
- if (booleans[i]) ret[j++] = values[i];
- }
- ret.length = j;
- this._resolve(ret);
-};
-
-MappingPromiseArray.prototype.preservedValues = function () {
- return this._preservedValues;
-};
-
-function map(promises, fn, options, _filter) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
-
- var limit = 0;
- if (options !== undefined) {
- if (typeof options === "object" && options !== null) {
- if (typeof options.concurrency !== "number") {
- return Promise.reject(
- new TypeError("'concurrency' must be a number but it is " +
- util.classString(options.concurrency)));
- }
- limit = options.concurrency;
- } else {
- return Promise.reject(new TypeError(
- "options argument must be an object but it is " +
- util.classString(options)));
- }
- }
- limit = typeof limit === "number" &&
- isFinite(limit) && limit >= 1 ? limit : 0;
- return new MappingPromiseArray(promises, fn, limit, _filter).promise();
-}
-
-Promise.prototype.map = function (fn, options) {
- return map(this, fn, options, null);
-};
-
-Promise.map = function (promises, fn, options, _filter) {
- return map(promises, fn, options, _filter);
-};
-
-
-};
-
-},{"./util":36}],19:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-Promise.method = function (fn) {
- if (typeof fn !== "function") {
- throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
- }
- return function () {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value = tryCatch(fn).apply(this, arguments);
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.method", ret);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value;
- if (arguments.length > 1) {
- debug.deprecated("calling Promise.try with more than 1 argument");
- var arg = arguments[1];
- var ctx = arguments[2];
- value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
- : tryCatch(fn).call(ctx, arg);
- } else {
- value = tryCatch(fn)();
- }
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.try", ret);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.prototype._resolveFromSyncValue = function (value) {
- if (value === util.errorObj) {
- this._rejectCallback(value.e, false);
- } else {
- this._resolveCallback(value, true);
- }
-};
-};
-
-},{"./util":36}],20:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = _dereq_("./errors");
-var OperationalError = errors.OperationalError;
-var es5 = _dereq_("./es5");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- ret.name = obj.name;
- ret.message = obj.message;
- ret.stack = obj.stack;
- var keys = es5.keys(obj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!rErrorKey.test(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
- }
- util.markAsOriginatingFromRejection(obj);
- return obj;
-}
-
-function nodebackForPromise(promise, multiArgs) {
- return function(err, value) {
- if (promise === null) return;
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (!multiArgs) {
- promise._fulfill(value);
- } else {
- var args = [].slice.call(arguments, 1);;
- promise._fulfill(args);
- }
- promise = null;
- };
-}
-
-module.exports = nodebackForPromise;
-
-},{"./errors":12,"./es5":13,"./util":36}],21:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-var util = _dereq_("./util");
-var async = Promise._async;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function spreadAdapter(val, nodeback) {
- var promise = this;
- if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
- var ret =
- tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-function successAdapter(val, nodeback) {
- var promise = this;
- var receiver = promise._boundValue();
- var ret = val === undefined
- ? tryCatch(nodeback).call(receiver, null)
- : tryCatch(nodeback).call(receiver, null, val);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-function errorAdapter(reason, nodeback) {
- var promise = this;
- if (!reason) {
- var newReason = new Error(reason + "");
- newReason.cause = reason;
- reason = newReason;
- }
- var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
- options) {
- if (typeof nodeback == "function") {
- var adapter = successAdapter;
- if (options !== undefined && Object(options).spread) {
- adapter = spreadAdapter;
- }
- this._then(
- adapter,
- errorAdapter,
- undefined,
- this,
- nodeback
- );
- }
- return this;
-};
-};
-
-},{"./util":36}],22:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function() {
-var makeSelfResolutionError = function () {
- return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var reflectHandler = function() {
- return new Promise.PromiseInspection(this._target());
-};
-var apiRejection = function(msg) {
- return Promise.reject(new TypeError(msg));
-};
-function Proxyable() {}
-var UNDEFINED_BINDING = {};
-var util = _dereq_("./util");
-
-var getDomain;
-if (util.isNode) {
- getDomain = function() {
- var ret = process.domain;
- if (ret === undefined) ret = null;
- return ret;
- };
-} else {
- getDomain = function() {
- return null;
- };
-}
-util.notEnumerableProp(Promise, "_getDomain", getDomain);
-
-var es5 = _dereq_("./es5");
-var Async = _dereq_("./async");
-var async = new Async();
-es5.defineProperty(Promise, "_async", {value: async});
-var errors = _dereq_("./errors");
-var TypeError = Promise.TypeError = errors.TypeError;
-Promise.RangeError = errors.RangeError;
-var CancellationError = Promise.CancellationError = errors.CancellationError;
-Promise.TimeoutError = errors.TimeoutError;
-Promise.OperationalError = errors.OperationalError;
-Promise.RejectionError = errors.OperationalError;
-Promise.AggregateError = errors.AggregateError;
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {};
-var tryConvertToPromise = _dereq_("./thenables")(Promise, INTERNAL);
-var PromiseArray =
- _dereq_("./promise_array")(Promise, INTERNAL,
- tryConvertToPromise, apiRejection, Proxyable);
-var Context = _dereq_("./context")(Promise);
- /*jshint unused:false*/
-var createContext = Context.create;
-var debug = _dereq_("./debuggability")(Promise, Context);
-var CapturedTrace = debug.CapturedTrace;
-var PassThroughHandlerContext =
- _dereq_("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
-var catchFilter = _dereq_("./catch_filter")(NEXT_FILTER);
-var nodebackForPromise = _dereq_("./nodeback");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-function check(self, executor) {
- if (self == null || self.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (typeof executor !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(executor));
- }
-
-}
-
-function Promise(executor) {
- if (executor !== INTERNAL) {
- check(this, executor);
- }
- this._bitField = 0;
- this._fulfillmentHandler0 = undefined;
- this._rejectionHandler0 = undefined;
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._resolveFromExecutor(executor);
- this._promiseCreated();
- this._fireEvent("promiseCreated", this);
-}
-
-Promise.prototype.toString = function () {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return apiRejection("Catch statement predicate: " +
- "expecting an object but got " + util.classString(item));
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
-
- if (typeof fn !== "function") {
- throw new TypeError("The last argument to .catch() " +
- "must be a function, got " + util.toString(fn));
- }
- return this.then(undefined, catchFilter(catchInstances, fn, this));
- }
- return this.then(undefined, fn);
-};
-
-Promise.prototype.reflect = function () {
- return this._then(reflectHandler,
- reflectHandler, undefined, this, undefined);
-};
-
-Promise.prototype.then = function (didFulfill, didReject) {
- if (debug.warnings() && arguments.length > 0 &&
- typeof didFulfill !== "function" &&
- typeof didReject !== "function") {
- var msg = ".then() only accepts functions but was passed: " +
- util.classString(didFulfill);
- if (arguments.length > 1) {
- msg += ", " + util.classString(didReject);
- }
- this._warn(msg);
- }
- return this._then(didFulfill, didReject, undefined, undefined, undefined);
-};
-
-Promise.prototype.done = function (didFulfill, didReject) {
- var promise =
- this._then(didFulfill, didReject, undefined, undefined, undefined);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- return this.all()._then(fn, undefined, undefined, APPLY, undefined);
-};
-
-Promise.prototype.toJSON = function () {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: undefined,
- rejectionReason: undefined
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this.value();
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this.reason();
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function () {
- if (arguments.length > 0) {
- this._warn(".all() was passed arguments but it does not take any");
- }
- return new PromiseArray(this).promise();
-};
-
-Promise.prototype.error = function (fn) {
- return this.caught(util.originatesFromRejection, fn);
-};
-
-Promise.getNewLibraryCopy = module.exports;
-
-Promise.is = function (val) {
- return val instanceof Promise;
-};
-
-Promise.fromNode = Promise.fromCallback = function(fn) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
- : false;
- var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
- if (result === errorObj) {
- ret._rejectCallback(result.e, true);
- }
- if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.all = function (promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.cast = function (obj) {
- var ret = tryConvertToPromise(obj);
- if (!(ret instanceof Promise)) {
- ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._setFulfilled();
- ret._rejectionHandler0 = obj;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function (reason) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._rejectCallback(reason, true);
- return ret;
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- return async.setScheduler(fn);
-};
-
-Promise.prototype._then = function (
- didFulfill,
- didReject,
- _, receiver,
- internalData
-) {
- var haveInternalData = internalData !== undefined;
- var promise = haveInternalData ? internalData : new Promise(INTERNAL);
- var target = this._target();
- var bitField = target._bitField;
-
- if (!haveInternalData) {
- promise._propagateFrom(this, 3);
- promise._captureStackTrace();
- if (receiver === undefined &&
- ((this._bitField & 2097152) !== 0)) {
- if (!((bitField & 50397184) === 0)) {
- receiver = this._boundValue();
- } else {
- receiver = target === this ? undefined : this._boundTo;
- }
- }
- this._fireEvent("promiseChained", this, promise);
- }
-
- var domain = getDomain();
- if (!((bitField & 50397184) === 0)) {
- var handler, value, settler = target._settlePromiseCtx;
- if (((bitField & 33554432) !== 0)) {
- value = target._rejectionHandler0;
- handler = didFulfill;
- } else if (((bitField & 16777216) !== 0)) {
- value = target._fulfillmentHandler0;
- handler = didReject;
- target._unsetRejectionIsUnhandled();
- } else {
- settler = target._settlePromiseLateCancellationObserver;
- value = new CancellationError("late cancellation observer");
- target._attachExtraTrace(value);
- handler = didReject;
- }
-
- async.invoke(settler, target, {
- handler: domain === null ? handler
- : (typeof handler === "function" &&
- util.domainBind(domain, handler)),
- promise: promise,
- receiver: receiver,
- value: value
- });
- } else {
- target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
- }
-
- return promise;
-};
-
-Promise.prototype._length = function () {
- return this._bitField & 65535;
-};
-
-Promise.prototype._isFateSealed = function () {
- return (this._bitField & 117506048) !== 0;
-};
-
-Promise.prototype._isFollowing = function () {
- return (this._bitField & 67108864) === 67108864;
-};
-
-Promise.prototype._setLength = function (len) {
- this._bitField = (this._bitField & -65536) |
- (len & 65535);
-};
-
-Promise.prototype._setFulfilled = function () {
- this._bitField = this._bitField | 33554432;
- this._fireEvent("promiseFulfilled", this);
-};
-
-Promise.prototype._setRejected = function () {
- this._bitField = this._bitField | 16777216;
- this._fireEvent("promiseRejected", this);
-};
-
-Promise.prototype._setFollowing = function () {
- this._bitField = this._bitField | 67108864;
- this._fireEvent("promiseResolved", this);
-};
-
-Promise.prototype._setIsFinal = function () {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._isFinal = function () {
- return (this._bitField & 4194304) > 0;
-};
-
-Promise.prototype._unsetCancelled = function() {
- this._bitField = this._bitField & (~65536);
-};
-
-Promise.prototype._setCancelled = function() {
- this._bitField = this._bitField | 65536;
- this._fireEvent("promiseCancelled", this);
-};
-
-Promise.prototype._setWillBeCancelled = function() {
- this._bitField = this._bitField | 8388608;
-};
-
-Promise.prototype._setAsyncGuaranteed = function() {
- if (async.hasCustomScheduler()) return;
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._receiverAt = function (index) {
- var ret = index === 0 ? this._receiver0 : this[
- index * 4 - 4 + 3];
- if (ret === UNDEFINED_BINDING) {
- return undefined;
- } else if (ret === undefined && this._isBound()) {
- return this._boundValue();
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function (index) {
- return this[
- index * 4 - 4 + 2];
-};
-
-Promise.prototype._fulfillmentHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 1];
-};
-
-Promise.prototype._boundValue = function() {};
-
-Promise.prototype._migrateCallback0 = function (follower) {
- var bitField = follower._bitField;
- var fulfill = follower._fulfillmentHandler0;
- var reject = follower._rejectionHandler0;
- var promise = follower._promise0;
- var receiver = follower._receiverAt(0);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._migrateCallbackAt = function (follower, index) {
- var fulfill = follower._fulfillmentHandlerAt(index);
- var reject = follower._rejectionHandlerAt(index);
- var promise = follower._promiseAt(index);
- var receiver = follower._receiverAt(index);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._addCallbacks = function (
- fulfill,
- reject,
- promise,
- receiver,
- domain
-) {
- var index = this._length();
-
- if (index >= 65535 - 4) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- this._receiver0 = receiver;
- if (typeof fulfill === "function") {
- this._fulfillmentHandler0 =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this._rejectionHandler0 =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- } else {
- var base = index * 4 - 4;
- this[base + 2] = promise;
- this[base + 3] = receiver;
- if (typeof fulfill === "function") {
- this[base + 0] =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this[base + 1] =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._proxy = function (proxyable, arg) {
- this._addCallbacks(undefined, undefined, arg, proxyable, null);
-};
-
-Promise.prototype._resolveCallback = function(value, shouldBind) {
- if (((this._bitField & 117506048) !== 0)) return;
- if (value === this)
- return this._rejectCallback(makeSelfResolutionError(), false);
- var maybePromise = tryConvertToPromise(value, this);
- if (!(maybePromise instanceof Promise)) return this._fulfill(value);
-
- if (shouldBind) this._propagateFrom(maybePromise, 2);
-
- var promise = maybePromise._target();
-
- if (promise === this) {
- this._reject(makeSelfResolutionError());
- return;
- }
-
- var bitField = promise._bitField;
- if (((bitField & 50397184) === 0)) {
- var len = this._length();
- if (len > 0) promise._migrateCallback0(this);
- for (var i = 1; i < len; ++i) {
- promise._migrateCallbackAt(this, i);
- }
- this._setFollowing();
- this._setLength(0);
- this._setFollowee(promise);
- } else if (((bitField & 33554432) !== 0)) {
- this._fulfill(promise._value());
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(promise._reason());
- } else {
- var reason = new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- this._reject(reason);
- }
-};
-
-Promise.prototype._rejectCallback =
-function(reason, synchronous, ignoreNonErrorWarnings) {
- var trace = util.ensureErrorObject(reason);
- var hasStack = trace === reason;
- if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
- var message = "a promise was rejected with a non-error: " +
- util.classString(reason);
- this._warn(message, true);
- }
- this._attachExtraTrace(trace, synchronous ? hasStack : false);
- this._reject(reason);
-};
-
-Promise.prototype._resolveFromExecutor = function (executor) {
- if (executor === INTERNAL) return;
- var promise = this;
- this._captureStackTrace();
- this._pushContext();
- var synchronous = true;
- var r = this._execute(executor, function(value) {
- promise._resolveCallback(value);
- }, function (reason) {
- promise._rejectCallback(reason, synchronous);
- });
- synchronous = false;
- this._popContext();
-
- if (r !== undefined) {
- promise._rejectCallback(r, true);
- }
-};
-
-Promise.prototype._settlePromiseFromHandler = function (
- handler, receiver, value, promise
-) {
- var bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
- promise._pushContext();
- var x;
- if (receiver === APPLY) {
- if (!value || typeof value.length !== "number") {
- x = errorObj;
- x.e = new TypeError("cannot .spread() a non-array: " +
- util.classString(value));
- } else {
- x = tryCatch(handler).apply(this._boundValue(), value);
- }
- } else {
- x = tryCatch(handler).call(receiver, value);
- }
- var promiseCreated = promise._popContext();
- bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
-
- if (x === NEXT_FILTER) {
- promise._reject(value);
- } else if (x === errorObj) {
- promise._rejectCallback(x.e, false);
- } else {
- debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
- promise._resolveCallback(x);
- }
-};
-
-Promise.prototype._target = function() {
- var ret = this;
- while (ret._isFollowing()) ret = ret._followee();
- return ret;
-};
-
-Promise.prototype._followee = function() {
- return this._rejectionHandler0;
-};
-
-Promise.prototype._setFollowee = function(promise) {
- this._rejectionHandler0 = promise;
-};
-
-Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
- var isPromise = promise instanceof Promise;
- var bitField = this._bitField;
- var asyncGuaranteed = ((bitField & 134217728) !== 0);
- if (((bitField & 65536) !== 0)) {
- if (isPromise) promise._invokeInternalOnCancel();
-
- if (receiver instanceof PassThroughHandlerContext &&
- receiver.isFinallyHandler()) {
- receiver.cancelPromise = promise;
- if (tryCatch(handler).call(receiver, value) === errorObj) {
- promise._reject(errorObj.e);
- }
- } else if (handler === reflectHandler) {
- promise._fulfill(reflectHandler.call(receiver));
- } else if (receiver instanceof Proxyable) {
- receiver._promiseCancelled(promise);
- } else if (isPromise || promise instanceof PromiseArray) {
- promise._cancel();
- } else {
- receiver.cancel();
- }
- } else if (typeof handler === "function") {
- if (!isPromise) {
- handler.call(receiver, value, promise);
- } else {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (receiver instanceof Proxyable) {
- if (!receiver._isResolved()) {
- if (((bitField & 33554432) !== 0)) {
- receiver._promiseFulfilled(value, promise);
- } else {
- receiver._promiseRejected(value, promise);
- }
- }
- } else if (isPromise) {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- if (((bitField & 33554432) !== 0)) {
- promise._fulfill(value);
- } else {
- promise._reject(value);
- }
- }
-};
-
-Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
- var handler = ctx.handler;
- var promise = ctx.promise;
- var receiver = ctx.receiver;
- var value = ctx.value;
- if (typeof handler === "function") {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- } else {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (promise instanceof Promise) {
- promise._reject(value);
- }
-};
-
-Promise.prototype._settlePromiseCtx = function(ctx) {
- this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
-};
-
-Promise.prototype._settlePromise0 = function(handler, value, bitField) {
- var promise = this._promise0;
- var receiver = this._receiverAt(0);
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._settlePromise(promise, handler, receiver, value);
-};
-
-Promise.prototype._clearCallbackDataAtIndex = function(index) {
- var base = index * 4 - 4;
- this[base + 2] =
- this[base + 3] =
- this[base + 0] =
- this[base + 1] = undefined;
-};
-
-Promise.prototype._fulfill = function (value) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._reject(err);
- }
- this._setFulfilled();
- this._rejectionHandler0 = value;
-
- if ((bitField & 65535) > 0) {
- if (((bitField & 134217728) !== 0)) {
- this._settlePromises();
- } else {
- async.settlePromises(this);
- }
- this._dereferenceTrace();
- }
-};
-
-Promise.prototype._reject = function (reason) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- this._setRejected();
- this._fulfillmentHandler0 = reason;
-
- if (this._isFinal()) {
- return async.fatalError(reason, util.isNode);
- }
-
- if ((bitField & 65535) > 0) {
- async.settlePromises(this);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._fulfillPromises = function (len, value) {
- for (var i = 1; i < len; i++) {
- var handler = this._fulfillmentHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, value);
- }
-};
-
-Promise.prototype._rejectPromises = function (len, reason) {
- for (var i = 1; i < len; i++) {
- var handler = this._rejectionHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, reason);
- }
-};
-
-Promise.prototype._settlePromises = function () {
- var bitField = this._bitField;
- var len = (bitField & 65535);
-
- if (len > 0) {
- if (((bitField & 16842752) !== 0)) {
- var reason = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, reason, bitField);
- this._rejectPromises(len, reason);
- } else {
- var value = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, value, bitField);
- this._fulfillPromises(len, value);
- }
- this._setLength(0);
- }
- this._clearCancellationData();
-};
-
-Promise.prototype._settledValue = function() {
- var bitField = this._bitField;
- if (((bitField & 33554432) !== 0)) {
- return this._rejectionHandler0;
- } else if (((bitField & 16777216) !== 0)) {
- return this._fulfillmentHandler0;
- }
-};
-
-if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
- es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
- get: function () {
- return "Object";
- }
- });
-}
-
-function deferResolve(v) {this.promise._resolveCallback(v);}
-function deferReject(v) {this.promise._rejectCallback(v, false);}
-
-Promise.defer = Promise.pending = function() {
- debug.deprecated("Promise.defer", "new Promise");
- var promise = new Promise(INTERNAL);
- return {
- promise: promise,
- resolve: deferResolve,
- reject: deferReject
- };
-};
-
-util.notEnumerableProp(Promise,
- "_makeSelfResolutionError",
- makeSelfResolutionError);
-
-_dereq_("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
- debug);
-_dereq_("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
-_dereq_("./cancel")(Promise, PromiseArray, apiRejection, debug);
-_dereq_("./direct_resolve")(Promise);
-_dereq_("./synchronous_inspection")(Promise);
-_dereq_("./join")(
- Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
-Promise.Promise = Promise;
-Promise.version = "3.5.5";
-_dereq_('./call_get.js')(Promise);
-_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
-_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-_dereq_('./nodeify.js')(Promise);
-_dereq_('./promisify.js')(Promise, INTERNAL);
-_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
-_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
-_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-_dereq_('./settle.js')(Promise, PromiseArray, debug);
-_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
-_dereq_('./timers.js')(Promise, INTERNAL, debug);
-_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
-_dereq_('./any.js')(Promise);
-_dereq_('./each.js')(Promise, INTERNAL);
-_dereq_('./filter.js')(Promise, INTERNAL);
-
- util.toFastProperties(Promise);
- util.toFastProperties(Promise.prototype);
- function fillTypes(value) {
- var p = new Promise(INTERNAL);
- p._fulfillmentHandler0 = value;
- p._rejectionHandler0 = value;
- p._promise0 = value;
- p._receiver0 = value;
- }
- // Complete slack tracking, opt out of field-type tracking and
- // stabilize map
- fillTypes({a: 1});
- fillTypes({b: 2});
- fillTypes({c: 3});
- fillTypes(1);
- fillTypes(function(){});
- fillTypes(undefined);
- fillTypes(false);
- fillTypes(new Promise(INTERNAL));
- debug.setBounds(Async.firstLineError, util.lastLineError);
- return Promise;
-
-};
-
-},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
- apiRejection, Proxyable) {
-var util = _dereq_("./util");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -2: return [];
- case -3: return {};
- case -6: return new Map();
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- if (values instanceof Promise) {
- promise._propagateFrom(values, 3);
- }
- promise._setOnCancel(this);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(undefined, -2);
-}
-util.inherits(PromiseArray, Proxyable);
-
-PromiseArray.prototype.length = function () {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
- var values = tryConvertToPromise(this._values, this._promise);
- if (values instanceof Promise) {
- values = values._target();
- var bitField = values._bitField;
- ;
- this._values = values;
-
- if (((bitField & 50397184) === 0)) {
- this._promise._setAsyncGuaranteed();
- return values._then(
- init,
- this._reject,
- undefined,
- this,
- resolveValueIfEmpty
- );
- } else if (((bitField & 33554432) !== 0)) {
- values = values._value();
- } else if (((bitField & 16777216) !== 0)) {
- return this._reject(values._reason());
- } else {
- return this._cancel();
- }
- }
- values = util.asArray(values);
- if (values === null) {
- var err = apiRejection(
- "expecting an array or an iterable object but got " + util.classString(values)).reason();
- this._promise._rejectCallback(err, false);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- this._iterate(values);
-};
-
-PromiseArray.prototype._iterate = function(values) {
- var len = this.getActualLength(values.length);
- this._length = len;
- this._values = this.shouldCopyValues() ? new Array(len) : this._values;
- var result = this._promise;
- var isResolved = false;
- var bitField = null;
- for (var i = 0; i < len; ++i) {
- var maybePromise = tryConvertToPromise(values[i], result);
-
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- bitField = maybePromise._bitField;
- } else {
- bitField = null;
- }
-
- if (isResolved) {
- if (bitField !== null) {
- maybePromise.suppressUnhandledRejections();
- }
- } else if (bitField !== null) {
- if (((bitField & 50397184) === 0)) {
- maybePromise._proxy(this, i);
- this._values[i] = maybePromise;
- } else if (((bitField & 33554432) !== 0)) {
- isResolved = this._promiseFulfilled(maybePromise._value(), i);
- } else if (((bitField & 16777216) !== 0)) {
- isResolved = this._promiseRejected(maybePromise._reason(), i);
- } else {
- isResolved = this._promiseCancelled(i);
- }
- } else {
- isResolved = this._promiseFulfilled(maybePromise, i);
- }
- }
- if (!isResolved) result._setAsyncGuaranteed();
-};
-
-PromiseArray.prototype._isResolved = function () {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype._cancel = function() {
- if (this._isResolved() || !this._promise._isCancellable()) return;
- this._values = null;
- this._promise._cancel();
-};
-
-PromiseArray.prototype._reject = function (reason) {
- this._values = null;
- this._promise._rejectCallback(reason, false);
-};
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-PromiseArray.prototype._promiseCancelled = function() {
- this._cancel();
- return true;
-};
-
-PromiseArray.prototype._promiseRejected = function (reason) {
- this._totalResolved++;
- this._reject(reason);
- return true;
-};
-
-PromiseArray.prototype._resultCancelled = function() {
- if (this._isResolved()) return;
- var values = this._values;
- this._cancel();
- if (values instanceof Promise) {
- values.cancel();
- } else {
- for (var i = 0; i < values.length; ++i) {
- if (values[i] instanceof Promise) {
- values[i].cancel();
- }
- }
- }
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
- return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
- return len;
-};
-
-return PromiseArray;
-};
-
-},{"./util":36}],24:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var THIS = {};
-var util = _dereq_("./util");
-var nodebackForPromise = _dereq_("./nodeback");
-var withAppended = util.withAppended;
-var maybeWrapAsError = util.maybeWrapAsError;
-var canEvaluate = util.canEvaluate;
-var TypeError = _dereq_("./errors").TypeError;
-var defaultSuffix = "Async";
-var defaultPromisified = {__isPromisified__: true};
-var noCopyProps = [
- "arity", "length",
- "name",
- "arguments",
- "caller",
- "callee",
- "prototype",
- "__isPromisified__"
-];
-var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
-
-var defaultFilter = function(name) {
- return util.isIdentifier(name) &&
- name.charAt(0) !== "_" &&
- name !== "constructor";
-};
-
-function propsFilter(key) {
- return !noCopyPropsPattern.test(key);
-}
-
-function isPromisified(fn) {
- try {
- return fn.__isPromisified__ === true;
- }
- catch (e) {
- return false;
- }
-}
-
-function hasPromisified(obj, key, suffix) {
- var val = util.getDataPropertyOrDefault(obj, key + suffix,
- defaultPromisified);
- return val ? isPromisified(val) : false;
-}
-function checkValid(ret, suffix, suffixRegexp) {
- for (var i = 0; i < ret.length; i += 2) {
- var key = ret[i];
- if (suffixRegexp.test(key)) {
- var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
- for (var j = 0; j < ret.length; j += 2) {
- if (ret[j] === keyWithoutAsyncSuffix) {
- throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
- .replace("%s", suffix));
- }
- }
- }
- }
-}
-
-function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
- var keys = util.inheritedDataKeys(obj);
- var ret = [];
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var value = obj[key];
- var passesDefaultFilter = filter === defaultFilter
- ? true : defaultFilter(key, value, obj);
- if (typeof value === "function" &&
- !isPromisified(value) &&
- !hasPromisified(obj, key, suffix) &&
- filter(key, value, obj, passesDefaultFilter)) {
- ret.push(key, value);
- }
- }
- checkValid(ret, suffix, suffixRegexp);
- return ret;
-}
-
-var escapeIdentRegex = function(str) {
- return str.replace(/([$])/, "\\$");
-};
-
-var makeNodePromisifiedEval;
-if (!true) {
-var switchCaseArgumentOrder = function(likelyArgumentCount) {
- var ret = [likelyArgumentCount];
- var min = Math.max(0, likelyArgumentCount - 1 - 3);
- for(var i = likelyArgumentCount - 1; i >= min; --i) {
- ret.push(i);
- }
- for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
- ret.push(i);
- }
- return ret;
-};
-
-var argumentSequence = function(argumentCount) {
- return util.filledRange(argumentCount, "_arg", "");
-};
-
-var parameterDeclaration = function(parameterCount) {
- return util.filledRange(
- Math.max(parameterCount, 3), "_arg", "");
-};
-
-var parameterCount = function(fn) {
- if (typeof fn.length === "number") {
- return Math.max(Math.min(fn.length, 1023 + 1), 0);
- }
- return 0;
-};
-
-makeNodePromisifiedEval =
-function(callback, receiver, originalName, fn, _, multiArgs) {
- var newParameterCount = Math.max(0, parameterCount(fn) - 1);
- var argumentOrder = switchCaseArgumentOrder(newParameterCount);
- var shouldProxyThis = typeof callback === "string" || receiver === THIS;
-
- function generateCallForArgumentCount(count) {
- var args = argumentSequence(count).join(", ");
- var comma = count > 0 ? ", " : "";
- var ret;
- if (shouldProxyThis) {
- ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
- } else {
- ret = receiver === undefined
- ? "ret = callback({{args}}, nodeback); break;\n"
- : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
- }
- return ret.replace("{{args}}", args).replace(", ", comma);
- }
-
- function generateArgumentSwitchCase() {
- var ret = "";
- for (var i = 0; i < argumentOrder.length; ++i) {
- ret += "case " + argumentOrder[i] +":" +
- generateCallForArgumentCount(argumentOrder[i]);
- }
-
- ret += " \n\
- default: \n\
- var args = new Array(len + 1); \n\
- var i = 0; \n\
- for (var i = 0; i < len; ++i) { \n\
- args[i] = arguments[i]; \n\
- } \n\
- args[i] = nodeback; \n\
- [CodeForCall] \n\
- break; \n\
- ".replace("[CodeForCall]", (shouldProxyThis
- ? "ret = callback.apply(this, args);\n"
- : "ret = callback.apply(receiver, args);\n"));
- return ret;
- }
-
- var getFunctionCode = typeof callback === "string"
- ? ("this != null ? this['"+callback+"'] : fn")
- : "fn";
- var body = "'use strict'; \n\
- var ret = function (Parameters) { \n\
- 'use strict'; \n\
- var len = arguments.length; \n\
- var promise = new Promise(INTERNAL); \n\
- promise._captureStackTrace(); \n\
- var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
- var ret; \n\
- var callback = tryCatch([GetFunctionCode]); \n\
- switch(len) { \n\
- [CodeForSwitchCase] \n\
- } \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
- } \n\
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
- return promise; \n\
- }; \n\
- notEnumerableProp(ret, '__isPromisified__', true); \n\
- return ret; \n\
- ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
- .replace("[GetFunctionCode]", getFunctionCode);
- body = body.replace("Parameters", parameterDeclaration(newParameterCount));
- return new Function("Promise",
- "fn",
- "receiver",
- "withAppended",
- "maybeWrapAsError",
- "nodebackForPromise",
- "tryCatch",
- "errorObj",
- "notEnumerableProp",
- "INTERNAL",
- body)(
- Promise,
- fn,
- receiver,
- withAppended,
- maybeWrapAsError,
- nodebackForPromise,
- util.tryCatch,
- util.errorObj,
- util.notEnumerableProp,
- INTERNAL);
-};
-}
-
-function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
- var defaultThis = (function() {return this;})();
- var method = callback;
- if (typeof method === "string") {
- callback = fn;
- }
- function promisified() {
- var _receiver = receiver;
- if (receiver === THIS) _receiver = this;
- var promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- var cb = typeof method === "string" && this !== defaultThis
- ? this[method] : callback;
- var fn = nodebackForPromise(promise, multiArgs);
- try {
- cb.apply(_receiver, withAppended(arguments, fn));
- } catch(e) {
- promise._rejectCallback(maybeWrapAsError(e), true, true);
- }
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
- return promise;
- }
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- return promisified;
-}
-
-var makeNodePromisified = canEvaluate
- ? makeNodePromisifiedEval
- : makeNodePromisifiedClosure;
-
-function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
- var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
- var methods =
- promisifiableMethods(obj, suffix, suffixRegexp, filter);
-
- for (var i = 0, len = methods.length; i < len; i+= 2) {
- var key = methods[i];
- var fn = methods[i+1];
- var promisifiedKey = key + suffix;
- if (promisifier === makeNodePromisified) {
- obj[promisifiedKey] =
- makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
- } else {
- var promisified = promisifier(fn, function() {
- return makeNodePromisified(key, THIS, key,
- fn, suffix, multiArgs);
- });
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- obj[promisifiedKey] = promisified;
- }
- }
- util.toFastProperties(obj);
- return obj;
-}
-
-function promisify(callback, receiver, multiArgs) {
- return makeNodePromisified(callback, receiver, undefined,
- callback, null, multiArgs);
-}
-
-Promise.promisify = function (fn, options) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- if (isPromisified(fn)) {
- return fn;
- }
- options = Object(options);
- var receiver = options.context === undefined ? THIS : options.context;
- var multiArgs = !!options.multiArgs;
- var ret = promisify(fn, receiver, multiArgs);
- util.copyDescriptors(fn, ret, propsFilter);
- return ret;
-};
-
-Promise.promisifyAll = function (target, options) {
- if (typeof target !== "function" && typeof target !== "object") {
- throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- options = Object(options);
- var multiArgs = !!options.multiArgs;
- var suffix = options.suffix;
- if (typeof suffix !== "string") suffix = defaultSuffix;
- var filter = options.filter;
- if (typeof filter !== "function") filter = defaultFilter;
- var promisifier = options.promisifier;
- if (typeof promisifier !== "function") promisifier = makeNodePromisified;
-
- if (!util.isIdentifier(suffix)) {
- throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-
- var keys = util.inheritedDataKeys(target);
- for (var i = 0; i < keys.length; ++i) {
- var value = target[keys[i]];
- if (keys[i] !== "constructor" &&
- util.isClass(value)) {
- promisifyAll(value.prototype, suffix, filter, promisifier,
- multiArgs);
- promisifyAll(value, suffix, filter, promisifier, multiArgs);
- }
- }
-
- return promisifyAll(target, suffix, filter, promisifier, multiArgs);
-};
-};
-
-
-},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(
- Promise, PromiseArray, tryConvertToPromise, apiRejection) {
-var util = _dereq_("./util");
-var isObject = util.isObject;
-var es5 = _dereq_("./es5");
-var Es6Map;
-if (typeof Map === "function") Es6Map = Map;
-
-var mapToEntries = (function() {
- var index = 0;
- var size = 0;
-
- function extractEntry(value, key) {
- this[index] = value;
- this[index + size] = key;
- index++;
- }
-
- return function mapToEntries(map) {
- size = map.size;
- index = 0;
- var ret = new Array(map.size * 2);
- map.forEach(extractEntry, ret);
- return ret;
- };
-})();
-
-var entriesToMap = function(entries) {
- var ret = new Es6Map();
- var length = entries.length / 2 | 0;
- for (var i = 0; i < length; ++i) {
- var key = entries[length + i];
- var value = entries[i];
- ret.set(key, value);
- }
- return ret;
-};
-
-function PropertiesPromiseArray(obj) {
- var isMap = false;
- var entries;
- if (Es6Map !== undefined && obj instanceof Es6Map) {
- entries = mapToEntries(obj);
- isMap = true;
- } else {
- var keys = es5.keys(obj);
- var len = keys.length;
- entries = new Array(len * 2);
- for (var i = 0; i < len; ++i) {
- var key = keys[i];
- entries[i] = obj[key];
- entries[i + len] = key;
- }
- }
- this.constructor$(entries);
- this._isMap = isMap;
- this._init$(undefined, isMap ? -6 : -3);
-}
-util.inherits(PropertiesPromiseArray, PromiseArray);
-
-PropertiesPromiseArray.prototype._init = function () {};
-
-PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- var val;
- if (this._isMap) {
- val = entriesToMap(this._values);
- } else {
- val = {};
- var keyOffset = this.length();
- for (var i = 0, len = this.length(); i < len; ++i) {
- val[this._values[i + keyOffset]] = this._values[i];
- }
- }
- this._resolve(val);
- return true;
- }
- return false;
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength = function (len) {
- return len >> 1;
-};
-
-function props(promises) {
- var ret;
- var castValue = tryConvertToPromise(promises);
-
- if (!isObject(castValue)) {
- return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- } else if (castValue instanceof Promise) {
- ret = castValue._then(
- Promise.props, undefined, undefined, undefined, undefined);
- } else {
- ret = new PropertiesPromiseArray(castValue).promise();
- }
-
- if (castValue instanceof Promise) {
- ret._propagateFrom(castValue, 2);
- }
- return ret;
-}
-
-Promise.prototype.props = function () {
- return props(this);
-};
-
-Promise.props = function (promises) {
- return props(promises);
-};
-};
-
-},{"./es5":13,"./util":36}],26:[function(_dereq_,module,exports){
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- src[j + srcIndex] = void 0;
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype.push = function (fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function () {
- var front = this._front,
- ret = this[front];
-
- this[front] = undefined;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function () {
- return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 1);
- }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
- var oldCapacity = this._capacity;
- this._capacity = capacity;
- var front = this._front;
- var length = this._length;
- var moveItemsCount = (front + length) & (oldCapacity - 1);
- arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;
-
-},{}],27:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(
- Promise, INTERNAL, tryConvertToPromise, apiRejection) {
-var util = _dereq_("./util");
-
-var raceLater = function (promise) {
- return promise.then(function(array) {
- return race(array, promise);
- });
-};
-
-function race(promises, parent) {
- var maybePromise = tryConvertToPromise(promises);
-
- if (maybePromise instanceof Promise) {
- return raceLater(maybePromise);
- } else {
- promises = util.asArray(promises);
- if (promises === null)
- return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
- }
-
- var ret = new Promise(INTERNAL);
- if (parent !== undefined) {
- ret._propagateFrom(parent, 3);
- }
- var fulfill = ret._fulfill;
- var reject = ret._reject;
- for (var i = 0, len = promises.length; i < len; ++i) {
- var val = promises[i];
-
- if (val === undefined && !(i in promises)) {
- continue;
- }
-
- Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
- }
- return ret;
-}
-
-Promise.race = function (promises) {
- return race(promises, undefined);
-};
-
-Promise.prototype.race = function () {
- return race(this, undefined);
-};
-
-};
-
-},{"./util":36}],28:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = _dereq_("./util");
-var tryCatch = util.tryCatch;
-
-function ReductionPromiseArray(promises, fn, initialValue, _each) {
- this.constructor$(promises);
- var domain = getDomain();
- this._fn = domain === null ? fn : util.domainBind(domain, fn);
- if (initialValue !== undefined) {
- initialValue = Promise.resolve(initialValue);
- initialValue._attachCancellationCallback(this);
- }
- this._initialValue = initialValue;
- this._currentCancellable = null;
- if(_each === INTERNAL) {
- this._eachValues = Array(this._length);
- } else if (_each === 0) {
- this._eachValues = null;
- } else {
- this._eachValues = undefined;
- }
- this._promise._captureStackTrace();
- this._init$(undefined, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._gotAccum = function(accum) {
- if (this._eachValues !== undefined &&
- this._eachValues !== null &&
- accum !== INTERNAL) {
- this._eachValues.push(accum);
- }
-};
-
-ReductionPromiseArray.prototype._eachComplete = function(value) {
- if (this._eachValues !== null) {
- this._eachValues.push(value);
- }
- return this._eachValues;
-};
-
-ReductionPromiseArray.prototype._init = function() {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray = function() {
- this._resolve(this._eachValues !== undefined ? this._eachValues
- : this._initialValue);
-};
-
-ReductionPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-ReductionPromiseArray.prototype._resolve = function(value) {
- this._promise._resolveCallback(value);
- this._values = null;
-};
-
-ReductionPromiseArray.prototype._resultCancelled = function(sender) {
- if (sender === this._initialValue) return this._cancel();
- if (this._isResolved()) return;
- this._resultCancelled$();
- if (this._currentCancellable instanceof Promise) {
- this._currentCancellable.cancel();
- }
- if (this._initialValue instanceof Promise) {
- this._initialValue.cancel();
- }
-};
-
-ReductionPromiseArray.prototype._iterate = function (values) {
- this._values = values;
- var value;
- var i;
- var length = values.length;
- if (this._initialValue !== undefined) {
- value = this._initialValue;
- i = 0;
- } else {
- value = Promise.resolve(values[0]);
- i = 1;
- }
-
- this._currentCancellable = value;
-
- if (!value.isRejected()) {
- for (; i < length; ++i) {
- var ctx = {
- accum: null,
- value: values[i],
- index: i,
- length: length,
- array: this
- };
- value = value._then(gotAccum, undefined, undefined, ctx, undefined);
- }
- }
-
- if (this._eachValues !== undefined) {
- value = value
- ._then(this._eachComplete, undefined, undefined, this, undefined);
- }
- value._then(completed, completed, undefined, value, this);
-};
-
-Promise.prototype.reduce = function (fn, initialValue) {
- return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function (promises, fn, initialValue, _each) {
- return reduce(promises, fn, initialValue, _each);
-};
-
-function completed(valueOrReason, array) {
- if (this.isFulfilled()) {
- array._resolve(valueOrReason);
- } else {
- array._reject(valueOrReason);
- }
-}
-
-function reduce(promises, fn, initialValue, _each) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
- return array.promise();
-}
-
-function gotAccum(accum) {
- this.accum = accum;
- this.array._gotAccum(accum);
- var value = tryConvertToPromise(this.value, this.array._promise);
- if (value instanceof Promise) {
- this.array._currentCancellable = value;
- return value._then(gotValue, undefined, undefined, this, undefined);
- } else {
- return gotValue.call(this, value);
- }
-}
-
-function gotValue(value) {
- var array = this.array;
- var promise = array._promise;
- var fn = tryCatch(array._fn);
- promise._pushContext();
- var ret;
- if (array._eachValues !== undefined) {
- ret = fn.call(promise._boundValue(), value, this.index, this.length);
- } else {
- ret = fn.call(promise._boundValue(),
- this.accum, value, this.index, this.length);
- }
- if (ret instanceof Promise) {
- array._currentCancellable = ret;
- }
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
- promise
- );
- return ret;
-}
-};
-
-},{"./util":36}],29:[function(_dereq_,module,exports){
-"use strict";
-var util = _dereq_("./util");
-var schedule;
-var noAsyncScheduler = function() {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var NativePromise = util.getNativePromise();
-if (util.isNode && typeof MutationObserver === "undefined") {
- var GlobalSetImmediate = global.setImmediate;
- var ProcessNextTick = process.nextTick;
- schedule = util.isRecentNode
- ? function(fn) { GlobalSetImmediate.call(global, fn); }
- : function(fn) { ProcessNextTick.call(process, fn); };
-} else if (typeof NativePromise === "function" &&
- typeof NativePromise.resolve === "function") {
- var nativePromise = NativePromise.resolve();
- schedule = function(fn) {
- nativePromise.then(fn);
- };
-} else if ((typeof MutationObserver !== "undefined") &&
- !(typeof window !== "undefined" &&
- window.navigator &&
- (window.navigator.standalone || window.cordova)) &&
- ("classList" in document.documentElement)) {
- schedule = (function() {
- var div = document.createElement("div");
- var opts = {attributes: true};
- var toggleScheduled = false;
- var div2 = document.createElement("div");
- var o2 = new MutationObserver(function() {
- div.classList.toggle("foo");
- toggleScheduled = false;
- });
- o2.observe(div2, opts);
-
- var scheduleToggle = function() {
- if (toggleScheduled) return;
- toggleScheduled = true;
- div2.classList.toggle("foo");
- };
-
- return function schedule(fn) {
- var o = new MutationObserver(function() {
- o.disconnect();
- fn();
- });
- o.observe(div, opts);
- scheduleToggle();
- };
- })();
-} else if (typeof setImmediate !== "undefined") {
- schedule = function (fn) {
- setImmediate(fn);
- };
-} else if (typeof setTimeout !== "undefined") {
- schedule = function (fn) {
- setTimeout(fn, 0);
- };
-} else {
- schedule = noAsyncScheduler;
-}
-module.exports = schedule;
-
-},{"./util":36}],30:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
- function(Promise, PromiseArray, debug) {
-var PromiseInspection = Promise.PromiseInspection;
-var util = _dereq_("./util");
-
-function SettledPromiseArray(values) {
- this.constructor$(values);
-}
-util.inherits(SettledPromiseArray, PromiseArray);
-
-SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
- this._values[index] = inspection;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var ret = new PromiseInspection();
- ret._bitField = 33554432;
- ret._settledValueField = value;
- return this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
- var ret = new PromiseInspection();
- ret._bitField = 16777216;
- ret._settledValueField = reason;
- return this._promiseResolved(index, ret);
-};
-
-Promise.settle = function (promises) {
- debug.deprecated(".settle()", ".reflect()");
- return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function () {
- return Promise.settle(this);
-};
-};
-
-},{"./util":36}],31:[function(_dereq_,module,exports){
-"use strict";
-module.exports =
-function(Promise, PromiseArray, apiRejection) {
-var util = _dereq_("./util");
-var RangeError = _dereq_("./errors").RangeError;
-var AggregateError = _dereq_("./errors").AggregateError;
-var isArray = util.isArray;
-var CANCELLATION = {};
-
-
-function SomePromiseArray(values) {
- this.constructor$(values);
- this._howMany = 0;
- this._unwrap = false;
- this._initialized = false;
-}
-util.inherits(SomePromiseArray, PromiseArray);
-
-SomePromiseArray.prototype._init = function () {
- if (!this._initialized) {
- return;
- }
- if (this._howMany === 0) {
- this._resolve([]);
- return;
- }
- this._init$(undefined, -5);
- var isArrayResolved = isArray(this._values);
- if (!this._isResolved() &&
- isArrayResolved &&
- this._howMany > this._canPossiblyFulfill()) {
- this._reject(this._getRangeError(this.length()));
- }
-};
-
-SomePromiseArray.prototype.init = function () {
- this._initialized = true;
- this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function () {
- this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function () {
- return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany = function (count) {
- this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled = function (value) {
- this._addFulfilled(value);
- if (this._fulfilled() === this.howMany()) {
- this._values.length = this.howMany();
- if (this.howMany() === 1 && this._unwrap) {
- this._resolve(this._values[0]);
- } else {
- this._resolve(this._values);
- }
- return true;
- }
- return false;
-
-};
-SomePromiseArray.prototype._promiseRejected = function (reason) {
- this._addRejected(reason);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._promiseCancelled = function () {
- if (this._values instanceof Promise || this._values == null) {
- return this._cancel();
- }
- this._addRejected(CANCELLATION);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._checkOutcome = function() {
- if (this.howMany() > this._canPossiblyFulfill()) {
- var e = new AggregateError();
- for (var i = this.length(); i < this._values.length; ++i) {
- if (this._values[i] !== CANCELLATION) {
- e.push(this._values[i]);
- }
- }
- if (e.length > 0) {
- this._reject(e);
- } else {
- this._cancel();
- }
- return true;
- }
- return false;
-};
-
-SomePromiseArray.prototype._fulfilled = function () {
- return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function () {
- return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected = function (reason) {
- this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled = function (value) {
- this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill = function () {
- return this.length() - this._rejected();
-};
-
-SomePromiseArray.prototype._getRangeError = function (count) {
- var message = "Input array must contain at least " +
- this._howMany + " items but contains only " + count + " items";
- return new RangeError(message);
-};
-
-SomePromiseArray.prototype._resolveEmptyArray = function () {
- this._reject(this._getRangeError(0));
-};
-
-function some(promises, howMany) {
- if ((howMany | 0) !== howMany || howMany < 0) {
- return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(howMany);
- ret.init();
- return promise;
-}
-
-Promise.some = function (promises, howMany) {
- return some(promises, howMany);
-};
-
-Promise.prototype.some = function (howMany) {
- return some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};
-
-},{"./errors":12,"./util":36}],32:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== undefined) {
- promise = promise._target();
- this._bitField = promise._bitField;
- this._settledValueField = promise._isFateSealed()
- ? promise._settledValue() : undefined;
- }
- else {
- this._bitField = 0;
- this._settledValueField = undefined;
- }
-}
-
-PromiseInspection.prototype._settledValue = function() {
- return this._settledValueField;
-};
-
-var value = PromiseInspection.prototype.value = function () {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var reason = PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
- return (this._bitField & 33554432) !== 0;
-};
-
-var isRejected = PromiseInspection.prototype.isRejected = function () {
- return (this._bitField & 16777216) !== 0;
-};
-
-var isPending = PromiseInspection.prototype.isPending = function () {
- return (this._bitField & 50397184) === 0;
-};
-
-var isResolved = PromiseInspection.prototype.isResolved = function () {
- return (this._bitField & 50331648) !== 0;
-};
-
-PromiseInspection.prototype.isCancelled = function() {
- return (this._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.__isCancelled = function() {
- return (this._bitField & 65536) === 65536;
-};
-
-Promise.prototype._isCancelled = function() {
- return this._target().__isCancelled();
-};
-
-Promise.prototype.isCancelled = function() {
- return (this._target()._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.isPending = function() {
- return isPending.call(this._target());
-};
-
-Promise.prototype.isRejected = function() {
- return isRejected.call(this._target());
-};
-
-Promise.prototype.isFulfilled = function() {
- return isFulfilled.call(this._target());
-};
-
-Promise.prototype.isResolved = function() {
- return isResolved.call(this._target());
-};
-
-Promise.prototype.value = function() {
- return value.call(this._target());
-};
-
-Promise.prototype.reason = function() {
- var target = this._target();
- target._unsetRejectionIsUnhandled();
- return reason.call(target);
-};
-
-Promise.prototype._value = function() {
- return this._settledValue();
-};
-
-Promise.prototype._reason = function() {
- this._unsetRejectionIsUnhandled();
- return this._settledValue();
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
-
-},{}],33:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = _dereq_("./util");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
- if (isObject(obj)) {
- if (obj instanceof Promise) return obj;
- var then = getThen(obj);
- if (then === errorObj) {
- if (context) context._pushContext();
- var ret = Promise.reject(then.e);
- if (context) context._popContext();
- return ret;
- } else if (typeof then === "function") {
- if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- obj._then(
- ret._fulfill,
- ret._reject,
- undefined,
- ret,
- null
- );
- return ret;
- }
- return doThenable(obj, then, context);
- }
- }
- return obj;
-}
-
-function doGetThen(obj) {
- return obj.then;
-}
-
-function getThen(obj) {
- try {
- return doGetThen(obj);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- try {
- return hasProp.call(obj, "_promise0");
- } catch (e) {
- return false;
- }
-}
-
-function doThenable(x, then, context) {
- var promise = new Promise(INTERNAL);
- var ret = promise;
- if (context) context._pushContext();
- promise._captureStackTrace();
- if (context) context._popContext();
- var synchronous = true;
- var result = util.tryCatch(then).call(x, resolve, reject);
- synchronous = false;
-
- if (promise && result === errorObj) {
- promise._rejectCallback(result.e, true, true);
- promise = null;
- }
-
- function resolve(value) {
- if (!promise) return;
- promise._resolveCallback(value);
- promise = null;
- }
-
- function reject(reason) {
- if (!promise) return;
- promise._rejectCallback(reason, synchronous, true);
- promise = null;
- }
- return ret;
-}
-
-return tryConvertToPromise;
-};
-
-},{"./util":36}],34:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function(Promise, INTERNAL, debug) {
-var util = _dereq_("./util");
-var TimeoutError = Promise.TimeoutError;
-
-function HandleWrapper(handle) {
- this.handle = handle;
-}
-
-HandleWrapper.prototype._resultCancelled = function() {
- clearTimeout(this.handle);
-};
-
-var afterValue = function(value) { return delay(+this).thenReturn(value); };
-var delay = Promise.delay = function (ms, value) {
- var ret;
- var handle;
- if (value !== undefined) {
- ret = Promise.resolve(value)
- ._then(afterValue, null, null, ms, undefined);
- if (debug.cancellation() && value instanceof Promise) {
- ret._setOnCancel(value);
- }
- } else {
- ret = new Promise(INTERNAL);
- handle = setTimeout(function() { ret._fulfill(); }, +ms);
- if (debug.cancellation()) {
- ret._setOnCancel(new HandleWrapper(handle));
- }
- ret._captureStackTrace();
- }
- ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.prototype.delay = function (ms) {
- return delay(ms, this);
-};
-
-var afterTimeout = function (promise, message, parent) {
- var err;
- if (typeof message !== "string") {
- if (message instanceof Error) {
- err = message;
- } else {
- err = new TimeoutError("operation timed out");
- }
- } else {
- err = new TimeoutError(message);
- }
- util.markAsOriginatingFromRejection(err);
- promise._attachExtraTrace(err);
- promise._reject(err);
-
- if (parent != null) {
- parent.cancel();
- }
-};
-
-function successClear(value) {
- clearTimeout(this.handle);
- return value;
-}
-
-function failureClear(reason) {
- clearTimeout(this.handle);
- throw reason;
-}
-
-Promise.prototype.timeout = function (ms, message) {
- ms = +ms;
- var ret, parent;
-
- var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
- if (ret.isPending()) {
- afterTimeout(ret, message, parent);
- }
- }, ms));
-
- if (debug.cancellation()) {
- parent = this.then();
- ret = parent._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- ret._setOnCancel(handleWrapper);
- } else {
- ret = this._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- }
-
- return ret;
-};
-
-};
-
-},{"./util":36}],35:[function(_dereq_,module,exports){
-"use strict";
-module.exports = function (Promise, apiRejection, tryConvertToPromise,
- createContext, INTERNAL, debug) {
- var util = _dereq_("./util");
- var TypeError = _dereq_("./errors").TypeError;
- var inherits = _dereq_("./util").inherits;
- var errorObj = util.errorObj;
- var tryCatch = util.tryCatch;
- var NULL = {};
-
- function thrower(e) {
- setTimeout(function(){throw e;}, 0);
- }
-
- function castPreservingDisposable(thenable) {
- var maybePromise = tryConvertToPromise(thenable);
- if (maybePromise !== thenable &&
- typeof thenable._isDisposable === "function" &&
- typeof thenable._getDisposer === "function" &&
- thenable._isDisposable()) {
- maybePromise._setDisposable(thenable._getDisposer());
- }
- return maybePromise;
- }
- function dispose(resources, inspection) {
- var i = 0;
- var len = resources.length;
- var ret = new Promise(INTERNAL);
- function iterator() {
- if (i >= len) return ret._fulfill();
- var maybePromise = castPreservingDisposable(resources[i++]);
- if (maybePromise instanceof Promise &&
- maybePromise._isDisposable()) {
- try {
- maybePromise = tryConvertToPromise(
- maybePromise._getDisposer().tryDispose(inspection),
- resources.promise);
- } catch (e) {
- return thrower(e);
- }
- if (maybePromise instanceof Promise) {
- return maybePromise._then(iterator, thrower,
- null, null, null);
- }
- }
- iterator();
- }
- iterator();
- return ret;
- }
-
- function Disposer(data, promise, context) {
- this._data = data;
- this._promise = promise;
- this._context = context;
- }
-
- Disposer.prototype.data = function () {
- return this._data;
- };
-
- Disposer.prototype.promise = function () {
- return this._promise;
- };
-
- Disposer.prototype.resource = function () {
- if (this.promise().isFulfilled()) {
- return this.promise().value();
- }
- return NULL;
- };
-
- Disposer.prototype.tryDispose = function(inspection) {
- var resource = this.resource();
- var context = this._context;
- if (context !== undefined) context._pushContext();
- var ret = resource !== NULL
- ? this.doDispose(resource, inspection) : null;
- if (context !== undefined) context._popContext();
- this._promise._unsetDisposable();
- this._data = null;
- return ret;
- };
-
- Disposer.isDisposer = function (d) {
- return (d != null &&
- typeof d.resource === "function" &&
- typeof d.tryDispose === "function");
- };
-
- function FunctionDisposer(fn, promise, context) {
- this.constructor$(fn, promise, context);
- }
- inherits(FunctionDisposer, Disposer);
-
- FunctionDisposer.prototype.doDispose = function (resource, inspection) {
- var fn = this.data();
- return fn.call(resource, resource, inspection);
- };
-
- function maybeUnwrapDisposer(value) {
- if (Disposer.isDisposer(value)) {
- this.resources[this.index]._setDisposable(value);
- return value.promise();
- }
- return value;
- }
-
- function ResourceList(length) {
- this.length = length;
- this.promise = null;
- this[length-1] = null;
- }
-
- ResourceList.prototype._resultCancelled = function() {
- var len = this.length;
- for (var i = 0; i < len; ++i) {
- var item = this[i];
- if (item instanceof Promise) {
- item.cancel();
- }
- }
- };
-
- Promise.using = function () {
- var len = arguments.length;
- if (len < 2) return apiRejection(
- "you must pass at least 2 arguments to Promise.using");
- var fn = arguments[len - 1];
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var input;
- var spreadArgs = true;
- if (len === 2 && Array.isArray(arguments[0])) {
- input = arguments[0];
- len = input.length;
- spreadArgs = false;
- } else {
- input = arguments;
- len--;
- }
- var resources = new ResourceList(len);
- for (var i = 0; i < len; ++i) {
- var resource = input[i];
- if (Disposer.isDisposer(resource)) {
- var disposer = resource;
- resource = resource.promise();
- resource._setDisposable(disposer);
- } else {
- var maybePromise = tryConvertToPromise(resource);
- if (maybePromise instanceof Promise) {
- resource =
- maybePromise._then(maybeUnwrapDisposer, null, null, {
- resources: resources,
- index: i
- }, undefined);
- }
- }
- resources[i] = resource;
- }
-
- var reflectedResources = new Array(resources.length);
- for (var i = 0; i < reflectedResources.length; ++i) {
- reflectedResources[i] = Promise.resolve(resources[i]).reflect();
- }
-
- var resultPromise = Promise.all(reflectedResources)
- .then(function(inspections) {
- for (var i = 0; i < inspections.length; ++i) {
- var inspection = inspections[i];
- if (inspection.isRejected()) {
- errorObj.e = inspection.error();
- return errorObj;
- } else if (!inspection.isFulfilled()) {
- resultPromise.cancel();
- return;
- }
- inspections[i] = inspection.value();
- }
- promise._pushContext();
-
- fn = tryCatch(fn);
- var ret = spreadArgs
- ? fn.apply(undefined, inspections) : fn(inspections);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret, promiseCreated, "Promise.using", promise);
- return ret;
- });
-
- var promise = resultPromise.lastly(function() {
- var inspection = new Promise.PromiseInspection(resultPromise);
- return dispose(resources, inspection);
- });
- resources.promise = promise;
- promise._setOnCancel(resources);
- return promise;
- };
-
- Promise.prototype._setDisposable = function (disposer) {
- this._bitField = this._bitField | 131072;
- this._disposer = disposer;
- };
-
- Promise.prototype._isDisposable = function () {
- return (this._bitField & 131072) > 0;
- };
-
- Promise.prototype._getDisposer = function () {
- return this._disposer;
- };
-
- Promise.prototype._unsetDisposable = function () {
- this._bitField = this._bitField & (~131072);
- this._disposer = undefined;
- };
-
- Promise.prototype.disposer = function (fn) {
- if (typeof fn === "function") {
- return new FunctionDisposer(fn, this, createContext());
- }
- throw new TypeError();
- };
-
-};
-
-},{"./errors":12,"./util":36}],36:[function(_dereq_,module,exports){
-"use strict";
-var es5 = _dereq_("./es5");
-var canEvaluate = typeof navigator == "undefined";
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-var globalObject = typeof self !== "undefined" ? self :
- typeof window !== "undefined" ? window :
- typeof global !== "undefined" ? global :
- this !== undefined ? this : null;
-
-function tryCatcher() {
- try {
- var target = tryCatchTarget;
- tryCatchTarget = null;
- return target.apply(this, arguments);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return typeof value === "function" ||
- typeof value === "object" && value !== null;
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(safeToString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
-
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- var excludedPrototypes = [
- Array.prototype,
- Object.prototype,
- Function.prototype
- ];
-
- var isExcludedProto = function(val) {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (excludedPrototypes[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- if (es5.isES5) {
- var getKeys = Object.getOwnPropertyNames;
- return function(obj) {
- var ret = [];
- var visitedKeys = Object.create(null);
- while (obj != null && !isExcludedProto(obj)) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- var hasProp = {}.hasOwnProperty;
- return function(obj) {
- if (isExcludedProto(obj)) return [];
- var ret = [];
-
- /*jshint forin:false */
- enumeration: for (var key in obj) {
- if (hasProp.call(obj, key)) {
- ret.push(key);
- } else {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (hasProp.call(excludedPrototypes[i], key)) {
- continue enumeration;
- }
- }
- ret.push(key);
- }
- }
- return ret;
- };
- }
-
-})();
-
-var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.names(fn.prototype);
-
- var hasMethods = es5.isES5 && keys.length > 1;
- var hasMethodsOtherThanConstructor = keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- var hasThisAssignmentAndStaticMethods =
- thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
-
- if (hasMethods || hasMethodsOtherThanConstructor ||
- hasThisAssignmentAndStaticMethods) {
- return true;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027,-W055,-W031*/
- function FakeConstructor() {}
- FakeConstructor.prototype = obj;
- var receiver = new FakeConstructor();
- function ic() {
- return typeof receiver.foo;
- }
- ic();
- ic();
- return obj;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-function safeToString(obj) {
- try {
- return obj + "";
- } catch (e) {
- return "[no string representation]";
- }
-}
-
-function isError(obj) {
- return obj instanceof Error ||
- (obj !== null &&
- typeof obj === "object" &&
- typeof obj.message === "string" &&
- typeof obj.name === "string");
-}
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
- e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
- return isError(obj) && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
- if (!("stack" in new Error())) {
- return function(value) {
- if (canAttachTrace(value)) return value;
- try {throw new Error(safeToString(value));}
- catch(err) {return err;}
- };
- } else {
- return function(value) {
- if (canAttachTrace(value)) return value;
- return new Error(safeToString(value));
- };
- }
-})();
-
-function classString(obj) {
- return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
- var keys = es5.names(from);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (filter(key)) {
- try {
- es5.defineProperty(to, key, es5.getDescriptor(from, key));
- } catch (ignore) {}
- }
- }
-}
-
-var asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- }
- return null;
-};
-
-if (typeof Symbol !== "undefined" && Symbol.iterator) {
- var ArrayFrom = typeof Array.from === "function" ? function(v) {
- return Array.from(v);
- } : function(v) {
- var ret = [];
- var it = v[Symbol.iterator]();
- var itResult;
- while (!((itResult = it.next()).done)) {
- ret.push(itResult.value);
- }
- return ret;
- };
-
- asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- } else if (v != null && typeof v[Symbol.iterator] === "function") {
- return ArrayFrom(v);
- }
- return null;
- };
-}
-
-var isNode = typeof process !== "undefined" &&
- classString(process).toLowerCase() === "[object process]";
-
-var hasEnvVariables = typeof process !== "undefined" &&
- typeof process.env !== "undefined";
-
-function env(key) {
- return hasEnvVariables ? process.env[key] : undefined;
-}
-
-function getNativePromise() {
- if (typeof Promise === "function") {
- try {
- var promise = new Promise(function(){});
- if ({}.toString.call(promise) === "[object Promise]") {
- return Promise;
- }
- } catch (e) {}
- }
-}
-
-function domainBind(self, cb) {
- return self.bind(cb);
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- asArray: asArray,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- isError: isError,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch: tryCatch,
- inherits: inherits,
- withAppended: withAppended,
- maybeWrapAsError: maybeWrapAsError,
- toFastProperties: toFastProperties,
- filledRange: filledRange,
- toString: safeToString,
- canAttachTrace: canAttachTrace,
- ensureErrorObject: ensureErrorObject,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- classString: classString,
- copyDescriptors: copyDescriptors,
- hasDevTools: typeof chrome !== "undefined" && chrome &&
- typeof chrome.loadTimes === "function",
- isNode: isNode,
- hasEnvVariables: hasEnvVariables,
- env: env,
- global: globalObject,
- getNativePromise: getNativePromise,
- domainBind: domainBind
-};
-ret.isRecentNode = ret.isNode && (function() {
- var version;
- if (process.versions && process.versions.node) {
- version = process.versions.node.split(".").map(Number);
- } else if (process.version) {
- version = process.version.split(".").map(Number);
- }
- return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
-})();
-
-if (ret.isNode) ret.toFastProperties(process);
-
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;
-
-},{"./es5":13}]},{},[4])(4)
-}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; } \ No newline at end of file
diff --git a/node_modules/bluebird/js/browser/bluebird.min.js b/node_modules/bluebird/js/browser/bluebird.min.js
deleted file mode 100644
index ef4fb4ae8..000000000
--- a/node_modules/bluebird/js/browser/bluebird.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* @preserve
- * The MIT License (MIT)
- *
- * Copyright (c) 2013-2018 Petka Antonov
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-/**
- * bluebird build version 3.5.5
- * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
-*/
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new h(16),this._normalQueue=new h(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=p}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}function a(t){for(;t.length()>0;)c(t)}function c(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),r=t.shift();e.call(n,r)}}var l;try{throw new Error}catch(u){l=u}var p=t("./schedule"),h=t("./queue"),f=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=l},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new O(this._peekContext())}function _(t,e){if(U(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(){this._trace=void 0}function v(t,e,n,r,i){if(void 0===t&&null!==e&&J){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=C(a),l=c.length-1;l>=0;--l){var u=c[l];if(!q.test(u)){var p=u.match($);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,n,r){if(at.warnings){var i,o=new N(t);if(n)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=E(o);o.stack=s.message+"\n"+s.stack.join("\n")}nt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||Q.test(r),o=i&&it(r);i&&!o&&(z&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function j(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||Q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof V?V(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function F(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){L.throwLater(o)}"unhandledRejection"===t?nt(t,n,r)||i||k(n,"Unhandled rejection "):nt(t,r)}function T(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function P(){return"function"==typeof st}function S(t){var e=t.match(ot);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(P()){for(var n,r,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=S(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=S(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(it=function(t){if(M.test(t))return!0;var e=S(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function O(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);st(this,O),e>32&&this.uncycle()}var A,D,V,I=e._getDomain,L=e._async,N=t("./errors").Warning,H=t("./util"),B=t("./es5"),U=H.canAttachTrace,M=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,$=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,Q=null,G=null,z=!1,X=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),W=!(0==H.env("BLUEBIRD_WARNINGS")||!X&&!H.env("BLUEBIRD_WARNINGS")),K=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(W||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0===(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",A,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",D,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return m(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();D="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var Y=function(){};e.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,e.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,e.prototype._dereferenceTrace=d,n.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason});var r=new CustomEvent(t.toLowerCase(),n);return!H.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,B.defineProperty(n,"promise",{value:e.promise}),B.defineProperty(n,"reason",{value:e.reason}),!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),tt=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),et={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},nt=function(t){var e=!1;try{e=tt.apply(null,arguments)}catch(n){L.throwLater(n),e=!0}var r=!1;try{r=Z(t,et[t].apply(null,arguments))}catch(n){L.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&Y()),"warnings"in t){var n=t.warnings;at.warnings=!!n,J=at.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(J=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,rt=u,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,e.prototype._fireEvent=nt):!t.monitoring&&at.monitoring&&(at.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var rt=p,it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(O,Error),n.CapturedTrace=O,O.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},O.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),b(r),H.notEnumerableProp(t,"stack",g(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var st=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():T(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,Q=t,G=e;var n=Error.captureStackTrace;return it=function(t){return M.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return Q=/@/,G=e,z=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?T(e):e.toString()},null):(Q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(V=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?V=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:H.isNode||"string"!=typeof(new Error).stack||(V=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:W,longStackTraces:!1,cancellation:!1,monitoring:!1};return K&&e.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:R,warn:m,deprecated:y,CapturedTrace:O,fireDomEvent:Z,fireGlobalEvent:tt}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<y.length;++m)"function"==typeof Array.prototype[y[m]]&&(d.prototype[y[m]]=Array.prototype[y[m]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return l.call(this,this.promise._target()._settledValue())}function c(t){return s(this,t)?void 0:(h.e=t,h)}function l(t){var i=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(i._boundValue()):l.call(i._boundValue(),t);if(u===r)return u;if(void 0!==u){i._setReturnedNonUndefined();var f=n(u,i);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new p("late cancellation observer");return i._attachExtraTrace(_),h.e=_,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,c,void 0,this,void 0)}}}return i.isRejected()?(s(this),h.e=t,h):(s(this),t)}var u=t("./util"),p=e.CancellationError,h=u.errorObj,f=t("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,r){return"function"!=typeof t?this.then():this._then(n,r,void 0,new i(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,l,l)},e.prototype.tap=function(t){return this._passThrough(t,1,l)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,l);var r,i=new Array(n-1),o=0;for(r=0;n-1>r;++r){var s=arguments[r];if(!u.isObject(s))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+u.classString(s)));i[o++]=s}i.length=o;var a=arguments[r];return this._passThrough(f(i,a,this),1,void 0,l)},i}},{"./catch_filter":7,"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new e(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator["return"];if(n)this._promise._pushContext(),t=f(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator["throw"]).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),
-null===o))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(r))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if(null==t||t.constructor!==i)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new m("expecting a function but got "+f.classString(e))}function i(t){t!==b&&r(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new m(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),m=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var g=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),E=t("./promise_array")(i,b,j,p,n),k=t("./context")(i),F=k.create,T=t("./debuggability")(i,k),x=(T.CapturedTrace,t("./finally")(i,j,C)),P=t("./catch_filter")(C),S=t("./nodeback"),R=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("Catch statement predicate: expecting an object but got "+f.classString(o));r[i++]=o}if(r.length=i,t=arguments[n],"function"!=typeof t)throw new m("The last argument to .catch() must be a function, got "+f.toString(t));return this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(S(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&T.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)}},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=R,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===R?r._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof x&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){T.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,T),t("./bind")(i,b,j,T),t("./cancel")(i,E,p,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.5.5",t("./call_get.js")(i),t("./generators.js")(i,p,b,j,n,T),t("./map.js")(i,E,p,j,b,T),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,p),t("./timers.js")(i,b,T),t("./using.js")(i,p,j,F,b,T),t("./any.js")(i),t("./each.js")(i,b),t("./filter.js")(i,b),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),T.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=f.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=f.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],h=r===j?!0:j(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,h)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===h&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(p){o._rejectCallback(v(p),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(E(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&f.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,n?-6:-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}():"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o;e.exports=r},{"./util":36
-}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=m(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return x.e=e,x}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}function n(){return typeof r.foo}e.prototype=t;var r=new e;return n(),n(),t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(s){}}}function j(t){return H?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function k(t,e){return t.bind(e)}var F=t("./es5"),T="undefined"==typeof navigator,x={e:{}},P,S="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,R=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(s){return r}for(var a=0;a<o.length;++a){var c=o[a];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),I=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var N="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),H="undefined"!=typeof process&&"undefined"!=typeof process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:T,errorObj:x,tryCatch:i,inherits:R,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:g,markAsOriginatingFromRejection:m,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:j,global:S,getNativePromise:E,domainBind:k};B.isRecentNode=B.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); \ No newline at end of file
diff --git a/node_modules/bluebird/js/release/any.js b/node_modules/bluebird/js/release/any.js
deleted file mode 100644
index 05a6228ef..000000000
--- a/node_modules/bluebird/js/release/any.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-var SomePromiseArray = Promise._SomePromiseArray;
-function any(promises) {
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(1);
- ret.setUnwrap();
- ret.init();
- return promise;
-}
-
-Promise.any = function (promises) {
- return any(promises);
-};
-
-Promise.prototype.any = function () {
- return any(this);
-};
-
-};
diff --git a/node_modules/bluebird/js/release/assert.js b/node_modules/bluebird/js/release/assert.js
deleted file mode 100644
index 4518231a1..000000000
--- a/node_modules/bluebird/js/release/assert.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-module.exports = (function(){
-var AssertionError = (function() {
- function AssertionError(a) {
- this.constructor$(a);
- this.message = a;
- this.name = "AssertionError";
- }
- AssertionError.prototype = new Error();
- AssertionError.prototype.constructor = AssertionError;
- AssertionError.prototype.constructor$ = Error;
- return AssertionError;
-})();
-
-function getParams(args) {
- var params = [];
- for (var i = 0; i < args.length; ++i) params.push("arg" + i);
- return params;
-}
-
-function nativeAssert(callName, args, expect) {
- try {
- var params = getParams(args);
- var constructorArgs = params;
- constructorArgs.push("return " +
- callName + "("+ params.join(",") + ");");
- var fn = Function.apply(null, constructorArgs);
- return fn.apply(null, args);
- } catch (e) {
- if (!(e instanceof SyntaxError)) {
- throw e;
- } else {
- return expect;
- }
- }
-}
-
-return function assert(boolExpr, message) {
- if (boolExpr === true) return;
-
- if (typeof boolExpr === "string" &&
- boolExpr.charAt(0) === "%") {
- var nativeCallName = boolExpr;
- var $_len = arguments.length;var args = new Array(Math.max($_len - 2, 0)); for(var $_i = 2; $_i < $_len; ++$_i) {args[$_i - 2] = arguments[$_i];};
- if (nativeAssert(nativeCallName, args, message) === message) return;
- message = (nativeCallName + " !== " + message);
- }
-
- var ret = new AssertionError(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(ret, assert);
- }
- throw ret;
-};
-})();
diff --git a/node_modules/bluebird/js/release/async.js b/node_modules/bluebird/js/release/async.js
deleted file mode 100644
index 73cdc6110..000000000
--- a/node_modules/bluebird/js/release/async.js
+++ /dev/null
@@ -1,165 +0,0 @@
-"use strict";
-var firstLineError;
-try {throw new Error(); } catch (e) {firstLineError = e;}
-var schedule = require("./schedule");
-var Queue = require("./queue");
-var util = require("./util");
-
-function Async() {
- this._customScheduler = false;
- this._isTickUsed = false;
- this._lateQueue = new Queue(16);
- this._normalQueue = new Queue(16);
- this._haveDrainedQueues = false;
- this._trampolineEnabled = true;
- var self = this;
- this.drainQueues = function () {
- self._drainQueues();
- };
- this._schedule = schedule;
-}
-
-Async.prototype.setScheduler = function(fn) {
- var prev = this._schedule;
- this._schedule = fn;
- this._customScheduler = true;
- return prev;
-};
-
-Async.prototype.hasCustomScheduler = function() {
- return this._customScheduler;
-};
-
-Async.prototype.enableTrampoline = function() {
- this._trampolineEnabled = true;
-};
-
-Async.prototype.disableTrampolineIfNecessary = function() {
- if (util.hasDevTools) {
- this._trampolineEnabled = false;
- }
-};
-
-Async.prototype.haveItemsQueued = function () {
- return this._isTickUsed || this._haveDrainedQueues;
-};
-
-
-Async.prototype.fatalError = function(e, isNode) {
- if (isNode) {
- process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) +
- "\n");
- process.exit(2);
- } else {
- this.throwLater(e);
- }
-};
-
-Async.prototype.throwLater = function(fn, arg) {
- if (arguments.length === 1) {
- arg = fn;
- fn = function () { throw arg; };
- }
- if (typeof setTimeout !== "undefined") {
- setTimeout(function() {
- fn(arg);
- }, 0);
- } else try {
- this._schedule(function() {
- fn(arg);
- });
- } catch (e) {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-};
-
-function AsyncInvokeLater(fn, receiver, arg) {
- this._lateQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncInvoke(fn, receiver, arg) {
- this._normalQueue.push(fn, receiver, arg);
- this._queueTick();
-}
-
-function AsyncSettlePromises(promise) {
- this._normalQueue._pushOne(promise);
- this._queueTick();
-}
-
-if (!util.hasDevTools) {
- Async.prototype.invokeLater = AsyncInvokeLater;
- Async.prototype.invoke = AsyncInvoke;
- Async.prototype.settlePromises = AsyncSettlePromises;
-} else {
- Async.prototype.invokeLater = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvokeLater.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- setTimeout(function() {
- fn.call(receiver, arg);
- }, 100);
- });
- }
- };
-
- Async.prototype.invoke = function (fn, receiver, arg) {
- if (this._trampolineEnabled) {
- AsyncInvoke.call(this, fn, receiver, arg);
- } else {
- this._schedule(function() {
- fn.call(receiver, arg);
- });
- }
- };
-
- Async.prototype.settlePromises = function(promise) {
- if (this._trampolineEnabled) {
- AsyncSettlePromises.call(this, promise);
- } else {
- this._schedule(function() {
- promise._settlePromises();
- });
- }
- };
-}
-
-function _drainQueue(queue) {
- while (queue.length() > 0) {
- _drainQueueStep(queue);
- }
-}
-
-function _drainQueueStep(queue) {
- var fn = queue.shift();
- if (typeof fn !== "function") {
- fn._settlePromises();
- } else {
- var receiver = queue.shift();
- var arg = queue.shift();
- fn.call(receiver, arg);
- }
-}
-
-Async.prototype._drainQueues = function () {
- _drainQueue(this._normalQueue);
- this._reset();
- this._haveDrainedQueues = true;
- _drainQueue(this._lateQueue);
-};
-
-Async.prototype._queueTick = function () {
- if (!this._isTickUsed) {
- this._isTickUsed = true;
- this._schedule(this.drainQueues);
- }
-};
-
-Async.prototype._reset = function () {
- this._isTickUsed = false;
-};
-
-module.exports = Async;
-module.exports.firstLineError = firstLineError;
diff --git a/node_modules/bluebird/js/release/bind.js b/node_modules/bluebird/js/release/bind.js
deleted file mode 100644
index fc3379db2..000000000
--- a/node_modules/bluebird/js/release/bind.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise, debug) {
-var calledBind = false;
-var rejectThis = function(_, e) {
- this._reject(e);
-};
-
-var targetRejected = function(e, context) {
- context.promiseRejectionQueued = true;
- context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
-};
-
-var bindingResolved = function(thisArg, context) {
- if (((this._bitField & 50397184) === 0)) {
- this._resolveCallback(context.target);
- }
-};
-
-var bindingRejected = function(e, context) {
- if (!context.promiseRejectionQueued) this._reject(e);
-};
-
-Promise.prototype.bind = function (thisArg) {
- if (!calledBind) {
- calledBind = true;
- Promise.prototype._propagateFrom = debug.propagateFromFunction();
- Promise.prototype._boundValue = debug.boundValueFunction();
- }
- var maybePromise = tryConvertToPromise(thisArg);
- var ret = new Promise(INTERNAL);
- ret._propagateFrom(this, 1);
- var target = this._target();
- ret._setBoundTo(maybePromise);
- if (maybePromise instanceof Promise) {
- var context = {
- promiseRejectionQueued: false,
- promise: ret,
- target: target,
- bindingPromise: maybePromise
- };
- target._then(INTERNAL, targetRejected, undefined, ret, context);
- maybePromise._then(
- bindingResolved, bindingRejected, undefined, ret, context);
- ret._setOnCancel(maybePromise);
- } else {
- ret._resolveCallback(target);
- }
- return ret;
-};
-
-Promise.prototype._setBoundTo = function (obj) {
- if (obj !== undefined) {
- this._bitField = this._bitField | 2097152;
- this._boundTo = obj;
- } else {
- this._bitField = this._bitField & (~2097152);
- }
-};
-
-Promise.prototype._isBound = function () {
- return (this._bitField & 2097152) === 2097152;
-};
-
-Promise.bind = function (thisArg, value) {
- return Promise.resolve(value).bind(thisArg);
-};
-};
diff --git a/node_modules/bluebird/js/release/bluebird.js b/node_modules/bluebird/js/release/bluebird.js
deleted file mode 100644
index 1c36cf364..000000000
--- a/node_modules/bluebird/js/release/bluebird.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-var old;
-if (typeof Promise !== "undefined") old = Promise;
-function noConflict() {
- try { if (Promise === bluebird) Promise = old; }
- catch (e) {}
- return bluebird;
-}
-var bluebird = require("./promise")();
-bluebird.noConflict = noConflict;
-module.exports = bluebird;
diff --git a/node_modules/bluebird/js/release/call_get.js b/node_modules/bluebird/js/release/call_get.js
deleted file mode 100644
index 0ed7714ac..000000000
--- a/node_modules/bluebird/js/release/call_get.js
+++ /dev/null
@@ -1,123 +0,0 @@
-"use strict";
-var cr = Object.create;
-if (cr) {
- var callerCache = cr(null);
- var getterCache = cr(null);
- callerCache[" size"] = getterCache[" size"] = 0;
-}
-
-module.exports = function(Promise) {
-var util = require("./util");
-var canEvaluate = util.canEvaluate;
-var isIdentifier = util.isIdentifier;
-
-var getMethodCaller;
-var getGetter;
-if (!false) {
-var makeMethodCaller = function (methodName) {
- return new Function("ensureMethod", " \n\
- return function(obj) { \n\
- 'use strict' \n\
- var len = this.length; \n\
- ensureMethod(obj, 'methodName'); \n\
- switch(len) { \n\
- case 1: return obj.methodName(this[0]); \n\
- case 2: return obj.methodName(this[0], this[1]); \n\
- case 3: return obj.methodName(this[0], this[1], this[2]); \n\
- case 0: return obj.methodName(); \n\
- default: \n\
- return obj.methodName.apply(obj, this); \n\
- } \n\
- }; \n\
- ".replace(/methodName/g, methodName))(ensureMethod);
-};
-
-var makeGetter = function (propertyName) {
- return new Function("obj", " \n\
- 'use strict'; \n\
- return obj.propertyName; \n\
- ".replace("propertyName", propertyName));
-};
-
-var getCompiled = function(name, compiler, cache) {
- var ret = cache[name];
- if (typeof ret !== "function") {
- if (!isIdentifier(name)) {
- return null;
- }
- ret = compiler(name);
- cache[name] = ret;
- cache[" size"]++;
- if (cache[" size"] > 512) {
- var keys = Object.keys(cache);
- for (var i = 0; i < 256; ++i) delete cache[keys[i]];
- cache[" size"] = keys.length - 256;
- }
- }
- return ret;
-};
-
-getMethodCaller = function(name) {
- return getCompiled(name, makeMethodCaller, callerCache);
-};
-
-getGetter = function(name) {
- return getCompiled(name, makeGetter, getterCache);
-};
-}
-
-function ensureMethod(obj, methodName) {
- var fn;
- if (obj != null) fn = obj[methodName];
- if (typeof fn !== "function") {
- var message = "Object " + util.classString(obj) + " has no method '" +
- util.toString(methodName) + "'";
- throw new Promise.TypeError(message);
- }
- return fn;
-}
-
-function caller(obj) {
- var methodName = this.pop();
- var fn = ensureMethod(obj, methodName);
- return fn.apply(obj, this);
-}
-Promise.prototype.call = function (methodName) {
- var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
- if (!false) {
- if (canEvaluate) {
- var maybeCaller = getMethodCaller(methodName);
- if (maybeCaller !== null) {
- return this._then(
- maybeCaller, undefined, undefined, args, undefined);
- }
- }
- }
- args.push(methodName);
- return this._then(caller, undefined, undefined, args, undefined);
-};
-
-function namedGetter(obj) {
- return obj[this];
-}
-function indexedGetter(obj) {
- var index = +this;
- if (index < 0) index = Math.max(0, index + obj.length);
- return obj[index];
-}
-Promise.prototype.get = function (propertyName) {
- var isIndex = (typeof propertyName === "number");
- var getter;
- if (!isIndex) {
- if (canEvaluate) {
- var maybeGetter = getGetter(propertyName);
- getter = maybeGetter !== null ? maybeGetter : namedGetter;
- } else {
- getter = namedGetter;
- }
- } else {
- getter = indexedGetter;
- }
- return this._then(getter, undefined, undefined, propertyName, undefined);
-};
-};
diff --git a/node_modules/bluebird/js/release/cancel.js b/node_modules/bluebird/js/release/cancel.js
deleted file mode 100644
index 7a12415ee..000000000
--- a/node_modules/bluebird/js/release/cancel.js
+++ /dev/null
@@ -1,129 +0,0 @@
-"use strict";
-module.exports = function(Promise, PromiseArray, apiRejection, debug) {
-var util = require("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-Promise.prototype["break"] = Promise.prototype.cancel = function() {
- if (!debug.cancellation()) return this._warn("cancellation is disabled");
-
- var promise = this;
- var child = promise;
- while (promise._isCancellable()) {
- if (!promise._cancelBy(child)) {
- if (child._isFollowing()) {
- child._followee().cancel();
- } else {
- child._cancelBranched();
- }
- break;
- }
-
- var parent = promise._cancellationParent;
- if (parent == null || !parent._isCancellable()) {
- if (promise._isFollowing()) {
- promise._followee().cancel();
- } else {
- promise._cancelBranched();
- }
- break;
- } else {
- if (promise._isFollowing()) promise._followee().cancel();
- promise._setWillBeCancelled();
- child = promise;
- promise = parent;
- }
- }
-};
-
-Promise.prototype._branchHasCancelled = function() {
- this._branchesRemainingToCancel--;
-};
-
-Promise.prototype._enoughBranchesHaveCancelled = function() {
- return this._branchesRemainingToCancel === undefined ||
- this._branchesRemainingToCancel <= 0;
-};
-
-Promise.prototype._cancelBy = function(canceller) {
- if (canceller === this) {
- this._branchesRemainingToCancel = 0;
- this._invokeOnCancel();
- return true;
- } else {
- this._branchHasCancelled();
- if (this._enoughBranchesHaveCancelled()) {
- this._invokeOnCancel();
- return true;
- }
- }
- return false;
-};
-
-Promise.prototype._cancelBranched = function() {
- if (this._enoughBranchesHaveCancelled()) {
- this._cancel();
- }
-};
-
-Promise.prototype._cancel = function() {
- if (!this._isCancellable()) return;
- this._setCancelled();
- async.invoke(this._cancelPromises, this, undefined);
-};
-
-Promise.prototype._cancelPromises = function() {
- if (this._length() > 0) this._settlePromises();
-};
-
-Promise.prototype._unsetOnCancel = function() {
- this._onCancelField = undefined;
-};
-
-Promise.prototype._isCancellable = function() {
- return this.isPending() && !this._isCancelled();
-};
-
-Promise.prototype.isCancellable = function() {
- return this.isPending() && !this.isCancelled();
-};
-
-Promise.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) {
- if (util.isArray(onCancelCallback)) {
- for (var i = 0; i < onCancelCallback.length; ++i) {
- this._doInvokeOnCancel(onCancelCallback[i], internalOnly);
- }
- } else if (onCancelCallback !== undefined) {
- if (typeof onCancelCallback === "function") {
- if (!internalOnly) {
- var e = tryCatch(onCancelCallback).call(this._boundValue());
- if (e === errorObj) {
- this._attachExtraTrace(e.e);
- async.throwLater(e.e);
- }
- }
- } else {
- onCancelCallback._resultCancelled(this);
- }
- }
-};
-
-Promise.prototype._invokeOnCancel = function() {
- var onCancelCallback = this._onCancel();
- this._unsetOnCancel();
- async.invoke(this._doInvokeOnCancel, this, onCancelCallback);
-};
-
-Promise.prototype._invokeInternalOnCancel = function() {
- if (this._isCancellable()) {
- this._doInvokeOnCancel(this._onCancel(), true);
- this._unsetOnCancel();
- }
-};
-
-Promise.prototype._resultCancelled = function() {
- this.cancel();
-};
-
-};
diff --git a/node_modules/bluebird/js/release/catch_filter.js b/node_modules/bluebird/js/release/catch_filter.js
deleted file mode 100644
index 0f24ce23e..000000000
--- a/node_modules/bluebird/js/release/catch_filter.js
+++ /dev/null
@@ -1,42 +0,0 @@
-"use strict";
-module.exports = function(NEXT_FILTER) {
-var util = require("./util");
-var getKeys = require("./es5").keys;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function catchFilter(instances, cb, promise) {
- return function(e) {
- var boundTo = promise._boundValue();
- predicateLoop: for (var i = 0; i < instances.length; ++i) {
- var item = instances[i];
-
- if (item === Error ||
- (item != null && item.prototype instanceof Error)) {
- if (e instanceof item) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (typeof item === "function") {
- var matchesPredicate = tryCatch(item).call(boundTo, e);
- if (matchesPredicate === errorObj) {
- return matchesPredicate;
- } else if (matchesPredicate) {
- return tryCatch(cb).call(boundTo, e);
- }
- } else if (util.isObject(e)) {
- var keys = getKeys(item);
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- if (item[key] != e[key]) {
- continue predicateLoop;
- }
- }
- return tryCatch(cb).call(boundTo, e);
- }
- }
- return NEXT_FILTER;
- };
-}
-
-return catchFilter;
-};
diff --git a/node_modules/bluebird/js/release/context.js b/node_modules/bluebird/js/release/context.js
deleted file mode 100644
index c307414fc..000000000
--- a/node_modules/bluebird/js/release/context.js
+++ /dev/null
@@ -1,69 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-var longStackTraces = false;
-var contextStack = [];
-
-Promise.prototype._promiseCreated = function() {};
-Promise.prototype._pushContext = function() {};
-Promise.prototype._popContext = function() {return null;};
-Promise._peekContext = Promise.prototype._peekContext = function() {};
-
-function Context() {
- this._trace = new Context.CapturedTrace(peekContext());
-}
-Context.prototype._pushContext = function () {
- if (this._trace !== undefined) {
- this._trace._promiseCreated = null;
- contextStack.push(this._trace);
- }
-};
-
-Context.prototype._popContext = function () {
- if (this._trace !== undefined) {
- var trace = contextStack.pop();
- var ret = trace._promiseCreated;
- trace._promiseCreated = null;
- return ret;
- }
- return null;
-};
-
-function createContext() {
- if (longStackTraces) return new Context();
-}
-
-function peekContext() {
- var lastIndex = contextStack.length - 1;
- if (lastIndex >= 0) {
- return contextStack[lastIndex];
- }
- return undefined;
-}
-Context.CapturedTrace = null;
-Context.create = createContext;
-Context.deactivateLongStackTraces = function() {};
-Context.activateLongStackTraces = function() {
- var Promise_pushContext = Promise.prototype._pushContext;
- var Promise_popContext = Promise.prototype._popContext;
- var Promise_PeekContext = Promise._peekContext;
- var Promise_peekContext = Promise.prototype._peekContext;
- var Promise_promiseCreated = Promise.prototype._promiseCreated;
- Context.deactivateLongStackTraces = function() {
- Promise.prototype._pushContext = Promise_pushContext;
- Promise.prototype._popContext = Promise_popContext;
- Promise._peekContext = Promise_PeekContext;
- Promise.prototype._peekContext = Promise_peekContext;
- Promise.prototype._promiseCreated = Promise_promiseCreated;
- longStackTraces = false;
- };
- longStackTraces = true;
- Promise.prototype._pushContext = Context.prototype._pushContext;
- Promise.prototype._popContext = Context.prototype._popContext;
- Promise._peekContext = Promise.prototype._peekContext = peekContext;
- Promise.prototype._promiseCreated = function() {
- var ctx = this._peekContext();
- if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;
- };
-};
-return Context;
-};
diff --git a/node_modules/bluebird/js/release/debuggability.js b/node_modules/bluebird/js/release/debuggability.js
deleted file mode 100644
index 9a64c99c9..000000000
--- a/node_modules/bluebird/js/release/debuggability.js
+++ /dev/null
@@ -1,934 +0,0 @@
-"use strict";
-module.exports = function(Promise, Context) {
-var getDomain = Promise._getDomain;
-var async = Promise._async;
-var Warning = require("./errors").Warning;
-var util = require("./util");
-var es5 = require("./es5");
-var canAttachTrace = util.canAttachTrace;
-var unhandledRejectionHandled;
-var possiblyUnhandledRejection;
-var bluebirdFramePattern =
- /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;
-var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/;
-var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;
-var stackFramePattern = null;
-var formatStack = null;
-var indentStackFrames = false;
-var printWarning;
-var debugging = !!(util.env("BLUEBIRD_DEBUG") != 0 &&
- (false ||
- util.env("BLUEBIRD_DEBUG") ||
- util.env("NODE_ENV") === "development"));
-
-var warnings = !!(util.env("BLUEBIRD_WARNINGS") != 0 &&
- (debugging || util.env("BLUEBIRD_WARNINGS")));
-
-var longStackTraces = !!(util.env("BLUEBIRD_LONG_STACK_TRACES") != 0 &&
- (debugging || util.env("BLUEBIRD_LONG_STACK_TRACES")));
-
-var wForgottenReturn = util.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 &&
- (warnings || !!util.env("BLUEBIRD_W_FORGOTTEN_RETURN"));
-
-Promise.prototype.suppressUnhandledRejections = function() {
- var target = this._target();
- target._bitField = ((target._bitField & (~1048576)) |
- 524288);
-};
-
-Promise.prototype._ensurePossibleRejectionHandled = function () {
- if ((this._bitField & 524288) !== 0) return;
- this._setRejectionIsUnhandled();
- var self = this;
- setTimeout(function() {
- self._notifyUnhandledRejection();
- }, 1);
-};
-
-Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
- fireRejectionEvent("rejectionHandled",
- unhandledRejectionHandled, undefined, this);
-};
-
-Promise.prototype._setReturnedNonUndefined = function() {
- this._bitField = this._bitField | 268435456;
-};
-
-Promise.prototype._returnedNonUndefined = function() {
- return (this._bitField & 268435456) !== 0;
-};
-
-Promise.prototype._notifyUnhandledRejection = function () {
- if (this._isRejectionUnhandled()) {
- var reason = this._settledValue();
- this._setUnhandledRejectionIsNotified();
- fireRejectionEvent("unhandledRejection",
- possiblyUnhandledRejection, reason, this);
- }
-};
-
-Promise.prototype._setUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField | 262144;
-};
-
-Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
- this._bitField = this._bitField & (~262144);
-};
-
-Promise.prototype._isUnhandledRejectionNotified = function () {
- return (this._bitField & 262144) > 0;
-};
-
-Promise.prototype._setRejectionIsUnhandled = function () {
- this._bitField = this._bitField | 1048576;
-};
-
-Promise.prototype._unsetRejectionIsUnhandled = function () {
- this._bitField = this._bitField & (~1048576);
- if (this._isUnhandledRejectionNotified()) {
- this._unsetUnhandledRejectionIsNotified();
- this._notifyUnhandledRejectionIsHandled();
- }
-};
-
-Promise.prototype._isRejectionUnhandled = function () {
- return (this._bitField & 1048576) > 0;
-};
-
-Promise.prototype._warn = function(message, shouldUseOwnTrace, promise) {
- return warn(message, shouldUseOwnTrace, promise || this);
-};
-
-Promise.onPossiblyUnhandledRejection = function (fn) {
- var domain = getDomain();
- possiblyUnhandledRejection =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-Promise.onUnhandledRejectionHandled = function (fn) {
- var domain = getDomain();
- unhandledRejectionHandled =
- typeof fn === "function" ? (domain === null ?
- fn : util.domainBind(domain, fn))
- : undefined;
-};
-
-var disableLongStackTraces = function() {};
-Promise.longStackTraces = function () {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (!config.longStackTraces && longStackTracesIsSupported()) {
- var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
- var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
- var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
- config.longStackTraces = true;
- disableLongStackTraces = function() {
- if (async.haveItemsQueued() && !config.longStackTraces) {
- throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- Promise.prototype._captureStackTrace = Promise_captureStackTrace;
- Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
- Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
- Context.deactivateLongStackTraces();
- async.enableTrampoline();
- config.longStackTraces = false;
- };
- Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
- Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
- Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
- Context.activateLongStackTraces();
- async.disableTrampolineIfNecessary();
- }
-};
-
-Promise.hasLongStackTraces = function () {
- return config.longStackTraces && longStackTracesIsSupported();
-};
-
-var fireDomEvent = (function() {
- try {
- if (typeof CustomEvent === "function") {
- var event = new CustomEvent("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var eventData = {
- detail: event,
- cancelable: true
- };
- es5.defineProperty(
- eventData, "promise", {value: event.promise});
- es5.defineProperty(eventData, "reason", {value: event.reason});
- var domEvent = new CustomEvent(name.toLowerCase(), eventData);
- return !util.global.dispatchEvent(domEvent);
- };
- } else if (typeof Event === "function") {
- var event = new Event("CustomEvent");
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = new Event(name.toLowerCase(), {
- cancelable: true
- });
- domEvent.detail = event;
- es5.defineProperty(domEvent, "promise", {value: event.promise});
- es5.defineProperty(domEvent, "reason", {value: event.reason});
- return !util.global.dispatchEvent(domEvent);
- };
- } else {
- var event = document.createEvent("CustomEvent");
- event.initCustomEvent("testingtheevent", false, true, {});
- util.global.dispatchEvent(event);
- return function(name, event) {
- var domEvent = document.createEvent("CustomEvent");
- domEvent.initCustomEvent(name.toLowerCase(), false, true,
- event);
- return !util.global.dispatchEvent(domEvent);
- };
- }
- } catch (e) {}
- return function() {
- return false;
- };
-})();
-
-var fireGlobalEvent = (function() {
- if (util.isNode) {
- return function() {
- return process.emit.apply(process, arguments);
- };
- } else {
- if (!util.global) {
- return function() {
- return false;
- };
- }
- return function(name) {
- var methodName = "on" + name.toLowerCase();
- var method = util.global[methodName];
- if (!method) return false;
- method.apply(util.global, [].slice.call(arguments, 1));
- return true;
- };
- }
-})();
-
-function generatePromiseLifecycleEventObject(name, promise) {
- return {promise: promise};
-}
-
-var eventToObjectGenerator = {
- promiseCreated: generatePromiseLifecycleEventObject,
- promiseFulfilled: generatePromiseLifecycleEventObject,
- promiseRejected: generatePromiseLifecycleEventObject,
- promiseResolved: generatePromiseLifecycleEventObject,
- promiseCancelled: generatePromiseLifecycleEventObject,
- promiseChained: function(name, promise, child) {
- return {promise: promise, child: child};
- },
- warning: function(name, warning) {
- return {warning: warning};
- },
- unhandledRejection: function (name, reason, promise) {
- return {reason: reason, promise: promise};
- },
- rejectionHandled: generatePromiseLifecycleEventObject
-};
-
-var activeFireEvent = function (name) {
- var globalEventFired = false;
- try {
- globalEventFired = fireGlobalEvent.apply(null, arguments);
- } catch (e) {
- async.throwLater(e);
- globalEventFired = true;
- }
-
- var domEventFired = false;
- try {
- domEventFired = fireDomEvent(name,
- eventToObjectGenerator[name].apply(null, arguments));
- } catch (e) {
- async.throwLater(e);
- domEventFired = true;
- }
-
- return domEventFired || globalEventFired;
-};
-
-Promise.config = function(opts) {
- opts = Object(opts);
- if ("longStackTraces" in opts) {
- if (opts.longStackTraces) {
- Promise.longStackTraces();
- } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {
- disableLongStackTraces();
- }
- }
- if ("warnings" in opts) {
- var warningsOption = opts.warnings;
- config.warnings = !!warningsOption;
- wForgottenReturn = config.warnings;
-
- if (util.isObject(warningsOption)) {
- if ("wForgottenReturn" in warningsOption) {
- wForgottenReturn = !!warningsOption.wForgottenReturn;
- }
- }
- }
- if ("cancellation" in opts && opts.cancellation && !config.cancellation) {
- if (async.haveItemsQueued()) {
- throw new Error(
- "cannot enable cancellation after promises are in use");
- }
- Promise.prototype._clearCancellationData =
- cancellationClearCancellationData;
- Promise.prototype._propagateFrom = cancellationPropagateFrom;
- Promise.prototype._onCancel = cancellationOnCancel;
- Promise.prototype._setOnCancel = cancellationSetOnCancel;
- Promise.prototype._attachCancellationCallback =
- cancellationAttachCancellationCallback;
- Promise.prototype._execute = cancellationExecute;
- propagateFromFunction = cancellationPropagateFrom;
- config.cancellation = true;
- }
- if ("monitoring" in opts) {
- if (opts.monitoring && !config.monitoring) {
- config.monitoring = true;
- Promise.prototype._fireEvent = activeFireEvent;
- } else if (!opts.monitoring && config.monitoring) {
- config.monitoring = false;
- Promise.prototype._fireEvent = defaultFireEvent;
- }
- }
- return Promise;
-};
-
-function defaultFireEvent() { return false; }
-
-Promise.prototype._fireEvent = defaultFireEvent;
-Promise.prototype._execute = function(executor, resolve, reject) {
- try {
- executor(resolve, reject);
- } catch (e) {
- return e;
- }
-};
-Promise.prototype._onCancel = function () {};
-Promise.prototype._setOnCancel = function (handler) { ; };
-Promise.prototype._attachCancellationCallback = function(onCancel) {
- ;
-};
-Promise.prototype._captureStackTrace = function () {};
-Promise.prototype._attachExtraTrace = function () {};
-Promise.prototype._dereferenceTrace = function () {};
-Promise.prototype._clearCancellationData = function() {};
-Promise.prototype._propagateFrom = function (parent, flags) {
- ;
- ;
-};
-
-function cancellationExecute(executor, resolve, reject) {
- var promise = this;
- try {
- executor(resolve, reject, function(onCancel) {
- if (typeof onCancel !== "function") {
- throw new TypeError("onCancel must be a function, got: " +
- util.toString(onCancel));
- }
- promise._attachCancellationCallback(onCancel);
- });
- } catch (e) {
- return e;
- }
-}
-
-function cancellationAttachCancellationCallback(onCancel) {
- if (!this._isCancellable()) return this;
-
- var previousOnCancel = this._onCancel();
- if (previousOnCancel !== undefined) {
- if (util.isArray(previousOnCancel)) {
- previousOnCancel.push(onCancel);
- } else {
- this._setOnCancel([previousOnCancel, onCancel]);
- }
- } else {
- this._setOnCancel(onCancel);
- }
-}
-
-function cancellationOnCancel() {
- return this._onCancelField;
-}
-
-function cancellationSetOnCancel(onCancel) {
- this._onCancelField = onCancel;
-}
-
-function cancellationClearCancellationData() {
- this._cancellationParent = undefined;
- this._onCancelField = undefined;
-}
-
-function cancellationPropagateFrom(parent, flags) {
- if ((flags & 1) !== 0) {
- this._cancellationParent = parent;
- var branchesRemainingToCancel = parent._branchesRemainingToCancel;
- if (branchesRemainingToCancel === undefined) {
- branchesRemainingToCancel = 0;
- }
- parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;
- }
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-
-function bindingPropagateFrom(parent, flags) {
- if ((flags & 2) !== 0 && parent._isBound()) {
- this._setBoundTo(parent._boundTo);
- }
-}
-var propagateFromFunction = bindingPropagateFrom;
-
-function boundValueFunction() {
- var ret = this._boundTo;
- if (ret !== undefined) {
- if (ret instanceof Promise) {
- if (ret.isFulfilled()) {
- return ret.value();
- } else {
- return undefined;
- }
- }
- }
- return ret;
-}
-
-function longStackTracesCaptureStackTrace() {
- this._trace = new CapturedTrace(this._peekContext());
-}
-
-function longStackTracesAttachExtraTrace(error, ignoreSelf) {
- if (canAttachTrace(error)) {
- var trace = this._trace;
- if (trace !== undefined) {
- if (ignoreSelf) trace = trace._parent;
- }
- if (trace !== undefined) {
- trace.attachExtraTrace(error);
- } else if (!error.__stackCleaned__) {
- var parsed = parseStackAndMessage(error);
- util.notEnumerableProp(error, "stack",
- parsed.message + "\n" + parsed.stack.join("\n"));
- util.notEnumerableProp(error, "__stackCleaned__", true);
- }
- }
-}
-
-function longStackTracesDereferenceTrace() {
- this._trace = undefined;
-}
-
-function checkForgottenReturns(returnValue, promiseCreated, name, promise,
- parent) {
- if (returnValue === undefined && promiseCreated !== null &&
- wForgottenReturn) {
- if (parent !== undefined && parent._returnedNonUndefined()) return;
- if ((promise._bitField & 65535) === 0) return;
-
- if (name) name = name + " ";
- var handlerLine = "";
- var creatorLine = "";
- if (promiseCreated._trace) {
- var traceLines = promiseCreated._trace.stack.split("\n");
- var stack = cleanStack(traceLines);
- for (var i = stack.length - 1; i >= 0; --i) {
- var line = stack[i];
- if (!nodeFramePattern.test(line)) {
- var lineMatches = line.match(parseLinePattern);
- if (lineMatches) {
- handlerLine = "at " + lineMatches[1] +
- ":" + lineMatches[2] + ":" + lineMatches[3] + " ";
- }
- break;
- }
- }
-
- if (stack.length > 0) {
- var firstUserLine = stack[0];
- for (var i = 0; i < traceLines.length; ++i) {
-
- if (traceLines[i] === firstUserLine) {
- if (i > 0) {
- creatorLine = "\n" + traceLines[i - 1];
- }
- break;
- }
- }
-
- }
- }
- var msg = "a promise was created in a " + name +
- "handler " + handlerLine + "but was not returned from it, " +
- "see http://goo.gl/rRqMUw" +
- creatorLine;
- promise._warn(msg, true, promiseCreated);
- }
-}
-
-function deprecated(name, replacement) {
- var message = name +
- " is deprecated and will be removed in a future version.";
- if (replacement) message += " Use " + replacement + " instead.";
- return warn(message);
-}
-
-function warn(message, shouldUseOwnTrace, promise) {
- if (!config.warnings) return;
- var warning = new Warning(message);
- var ctx;
- if (shouldUseOwnTrace) {
- promise._attachExtraTrace(warning);
- } else if (config.longStackTraces && (ctx = Promise._peekContext())) {
- ctx.attachExtraTrace(warning);
- } else {
- var parsed = parseStackAndMessage(warning);
- warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
- }
-
- if (!activeFireEvent("warning", warning)) {
- formatAndLogError(warning, "", true);
- }
-}
-
-function reconstructStack(message, stacks) {
- for (var i = 0; i < stacks.length - 1; ++i) {
- stacks[i].push("From previous event:");
- stacks[i] = stacks[i].join("\n");
- }
- if (i < stacks.length) {
- stacks[i] = stacks[i].join("\n");
- }
- return message + "\n" + stacks.join("\n");
-}
-
-function removeDuplicateOrEmptyJumps(stacks) {
- for (var i = 0; i < stacks.length; ++i) {
- if (stacks[i].length === 0 ||
- ((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
- stacks.splice(i, 1);
- i--;
- }
- }
-}
-
-function removeCommonRoots(stacks) {
- var current = stacks[0];
- for (var i = 1; i < stacks.length; ++i) {
- var prev = stacks[i];
- var currentLastIndex = current.length - 1;
- var currentLastLine = current[currentLastIndex];
- var commonRootMeetPoint = -1;
-
- for (var j = prev.length - 1; j >= 0; --j) {
- if (prev[j] === currentLastLine) {
- commonRootMeetPoint = j;
- break;
- }
- }
-
- for (var j = commonRootMeetPoint; j >= 0; --j) {
- var line = prev[j];
- if (current[currentLastIndex] === line) {
- current.pop();
- currentLastIndex--;
- } else {
- break;
- }
- }
- current = prev;
- }
-}
-
-function cleanStack(stack) {
- var ret = [];
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- var isTraceLine = " (No stack trace)" === line ||
- stackFramePattern.test(line);
- var isInternalFrame = isTraceLine && shouldIgnore(line);
- if (isTraceLine && !isInternalFrame) {
- if (indentStackFrames && line.charAt(0) !== " ") {
- line = " " + line;
- }
- ret.push(line);
- }
- }
- return ret;
-}
-
-function stackFramesAsArray(error) {
- var stack = error.stack.replace(/\s+$/g, "").split("\n");
- for (var i = 0; i < stack.length; ++i) {
- var line = stack[i];
- if (" (No stack trace)" === line || stackFramePattern.test(line)) {
- break;
- }
- }
- if (i > 0 && error.name != "SyntaxError") {
- stack = stack.slice(i);
- }
- return stack;
-}
-
-function parseStackAndMessage(error) {
- var stack = error.stack;
- var message = error.toString();
- stack = typeof stack === "string" && stack.length > 0
- ? stackFramesAsArray(error) : [" (No stack trace)"];
- return {
- message: message,
- stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
- };
-}
-
-function formatAndLogError(error, title, isSoft) {
- if (typeof console !== "undefined") {
- var message;
- if (util.isObject(error)) {
- var stack = error.stack;
- message = title + formatStack(stack, error);
- } else {
- message = title + String(error);
- }
- if (typeof printWarning === "function") {
- printWarning(message, isSoft);
- } else if (typeof console.log === "function" ||
- typeof console.log === "object") {
- console.log(message);
- }
- }
-}
-
-function fireRejectionEvent(name, localHandler, reason, promise) {
- var localEventFired = false;
- try {
- if (typeof localHandler === "function") {
- localEventFired = true;
- if (name === "rejectionHandled") {
- localHandler(promise);
- } else {
- localHandler(reason, promise);
- }
- }
- } catch (e) {
- async.throwLater(e);
- }
-
- if (name === "unhandledRejection") {
- if (!activeFireEvent(name, reason, promise) && !localEventFired) {
- formatAndLogError(reason, "Unhandled rejection ");
- }
- } else {
- activeFireEvent(name, promise);
- }
-}
-
-function formatNonError(obj) {
- var str;
- if (typeof obj === "function") {
- str = "[function " +
- (obj.name || "anonymous") +
- "]";
- } else {
- str = obj && typeof obj.toString === "function"
- ? obj.toString() : util.toString(obj);
- var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
- if (ruselessToString.test(str)) {
- try {
- var newStr = JSON.stringify(obj);
- str = newStr;
- }
- catch(e) {
-
- }
- }
- if (str.length === 0) {
- str = "(empty array)";
- }
- }
- return ("(<" + snip(str) + ">, no stack trace)");
-}
-
-function snip(str) {
- var maxChars = 41;
- if (str.length < maxChars) {
- return str;
- }
- return str.substr(0, maxChars - 3) + "...";
-}
-
-function longStackTracesIsSupported() {
- return typeof captureStackTrace === "function";
-}
-
-var shouldIgnore = function() { return false; };
-var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
-function parseLineInfo(line) {
- var matches = line.match(parseLineInfoRegex);
- if (matches) {
- return {
- fileName: matches[1],
- line: parseInt(matches[2], 10)
- };
- }
-}
-
-function setBounds(firstLineError, lastLineError) {
- if (!longStackTracesIsSupported()) return;
- var firstStackLines = (firstLineError.stack || "").split("\n");
- var lastStackLines = (lastLineError.stack || "").split("\n");
- var firstIndex = -1;
- var lastIndex = -1;
- var firstFileName;
- var lastFileName;
- for (var i = 0; i < firstStackLines.length; ++i) {
- var result = parseLineInfo(firstStackLines[i]);
- if (result) {
- firstFileName = result.fileName;
- firstIndex = result.line;
- break;
- }
- }
- for (var i = 0; i < lastStackLines.length; ++i) {
- var result = parseLineInfo(lastStackLines[i]);
- if (result) {
- lastFileName = result.fileName;
- lastIndex = result.line;
- break;
- }
- }
- if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
- firstFileName !== lastFileName || firstIndex >= lastIndex) {
- return;
- }
-
- shouldIgnore = function(line) {
- if (bluebirdFramePattern.test(line)) return true;
- var info = parseLineInfo(line);
- if (info) {
- if (info.fileName === firstFileName &&
- (firstIndex <= info.line && info.line <= lastIndex)) {
- return true;
- }
- }
- return false;
- };
-}
-
-function CapturedTrace(parent) {
- this._parent = parent;
- this._promisesCreated = 0;
- var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
- captureStackTrace(this, CapturedTrace);
- if (length > 32) this.uncycle();
-}
-util.inherits(CapturedTrace, Error);
-Context.CapturedTrace = CapturedTrace;
-
-CapturedTrace.prototype.uncycle = function() {
- var length = this._length;
- if (length < 2) return;
- var nodes = [];
- var stackToIndex = {};
-
- for (var i = 0, node = this; node !== undefined; ++i) {
- nodes.push(node);
- node = node._parent;
- }
- length = this._length = i;
- for (var i = length - 1; i >= 0; --i) {
- var stack = nodes[i].stack;
- if (stackToIndex[stack] === undefined) {
- stackToIndex[stack] = i;
- }
- }
- for (var i = 0; i < length; ++i) {
- var currentStack = nodes[i].stack;
- var index = stackToIndex[currentStack];
- if (index !== undefined && index !== i) {
- if (index > 0) {
- nodes[index - 1]._parent = undefined;
- nodes[index - 1]._length = 1;
- }
- nodes[i]._parent = undefined;
- nodes[i]._length = 1;
- var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
-
- if (index < length - 1) {
- cycleEdgeNode._parent = nodes[index + 1];
- cycleEdgeNode._parent.uncycle();
- cycleEdgeNode._length =
- cycleEdgeNode._parent._length + 1;
- } else {
- cycleEdgeNode._parent = undefined;
- cycleEdgeNode._length = 1;
- }
- var currentChildLength = cycleEdgeNode._length + 1;
- for (var j = i - 2; j >= 0; --j) {
- nodes[j]._length = currentChildLength;
- currentChildLength++;
- }
- return;
- }
- }
-};
-
-CapturedTrace.prototype.attachExtraTrace = function(error) {
- if (error.__stackCleaned__) return;
- this.uncycle();
- var parsed = parseStackAndMessage(error);
- var message = parsed.message;
- var stacks = [parsed.stack];
-
- var trace = this;
- while (trace !== undefined) {
- stacks.push(cleanStack(trace.stack.split("\n")));
- trace = trace._parent;
- }
- removeCommonRoots(stacks);
- removeDuplicateOrEmptyJumps(stacks);
- util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
- util.notEnumerableProp(error, "__stackCleaned__", true);
-};
-
-var captureStackTrace = (function stackDetection() {
- var v8stackFramePattern = /^\s*at\s*/;
- var v8stackFormatter = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if (error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- if (typeof Error.stackTraceLimit === "number" &&
- typeof Error.captureStackTrace === "function") {
- Error.stackTraceLimit += 6;
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- var captureStackTrace = Error.captureStackTrace;
-
- shouldIgnore = function(line) {
- return bluebirdFramePattern.test(line);
- };
- return function(receiver, ignoreUntil) {
- Error.stackTraceLimit += 6;
- captureStackTrace(receiver, ignoreUntil);
- Error.stackTraceLimit -= 6;
- };
- }
- var err = new Error();
-
- if (typeof err.stack === "string" &&
- err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
- stackFramePattern = /@/;
- formatStack = v8stackFormatter;
- indentStackFrames = true;
- return function captureStackTrace(o) {
- o.stack = new Error().stack;
- };
- }
-
- var hasStackAfterThrow;
- try { throw new Error(); }
- catch(e) {
- hasStackAfterThrow = ("stack" in e);
- }
- if (!("stack" in err) && hasStackAfterThrow &&
- typeof Error.stackTraceLimit === "number") {
- stackFramePattern = v8stackFramePattern;
- formatStack = v8stackFormatter;
- return function captureStackTrace(o) {
- Error.stackTraceLimit += 6;
- try { throw new Error(); }
- catch(e) { o.stack = e.stack; }
- Error.stackTraceLimit -= 6;
- };
- }
-
- formatStack = function(stack, error) {
- if (typeof stack === "string") return stack;
-
- if ((typeof error === "object" ||
- typeof error === "function") &&
- error.name !== undefined &&
- error.message !== undefined) {
- return error.toString();
- }
- return formatNonError(error);
- };
-
- return null;
-
-})([]);
-
-if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
- printWarning = function (message) {
- console.warn(message);
- };
- if (util.isNode && process.stderr.isTTY) {
- printWarning = function(message, isSoft) {
- var color = isSoft ? "\u001b[33m" : "\u001b[31m";
- console.warn(color + message + "\u001b[0m\n");
- };
- } else if (!util.isNode && typeof (new Error().stack) === "string") {
- printWarning = function(message, isSoft) {
- console.warn("%c" + message,
- isSoft ? "color: darkorange" : "color: red");
- };
- }
-}
-
-var config = {
- warnings: warnings,
- longStackTraces: false,
- cancellation: false,
- monitoring: false
-};
-
-if (longStackTraces) Promise.longStackTraces();
-
-return {
- longStackTraces: function() {
- return config.longStackTraces;
- },
- warnings: function() {
- return config.warnings;
- },
- cancellation: function() {
- return config.cancellation;
- },
- monitoring: function() {
- return config.monitoring;
- },
- propagateFromFunction: function() {
- return propagateFromFunction;
- },
- boundValueFunction: function() {
- return boundValueFunction;
- },
- checkForgottenReturns: checkForgottenReturns,
- setBounds: setBounds,
- warn: warn,
- deprecated: deprecated,
- CapturedTrace: CapturedTrace,
- fireDomEvent: fireDomEvent,
- fireGlobalEvent: fireGlobalEvent
-};
-};
diff --git a/node_modules/bluebird/js/release/direct_resolve.js b/node_modules/bluebird/js/release/direct_resolve.js
deleted file mode 100644
index a89029826..000000000
--- a/node_modules/bluebird/js/release/direct_resolve.js
+++ /dev/null
@@ -1,46 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-function returner() {
- return this.value;
-}
-function thrower() {
- throw this.reason;
-}
-
-Promise.prototype["return"] =
-Promise.prototype.thenReturn = function (value) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- returner, undefined, undefined, {value: value}, undefined);
-};
-
-Promise.prototype["throw"] =
-Promise.prototype.thenThrow = function (reason) {
- return this._then(
- thrower, undefined, undefined, {reason: reason}, undefined);
-};
-
-Promise.prototype.catchThrow = function (reason) {
- if (arguments.length <= 1) {
- return this._then(
- undefined, thrower, undefined, {reason: reason}, undefined);
- } else {
- var _reason = arguments[1];
- var handler = function() {throw _reason;};
- return this.caught(reason, handler);
- }
-};
-
-Promise.prototype.catchReturn = function (value) {
- if (arguments.length <= 1) {
- if (value instanceof Promise) value.suppressUnhandledRejections();
- return this._then(
- undefined, returner, undefined, {value: value}, undefined);
- } else {
- var _value = arguments[1];
- if (_value instanceof Promise) _value.suppressUnhandledRejections();
- var handler = function() {return _value;};
- return this.caught(value, handler);
- }
-};
-};
diff --git a/node_modules/bluebird/js/release/each.js b/node_modules/bluebird/js/release/each.js
deleted file mode 100644
index e4f3d05ba..000000000
--- a/node_modules/bluebird/js/release/each.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseReduce = Promise.reduce;
-var PromiseAll = Promise.all;
-
-function promiseAllThis() {
- return PromiseAll(this);
-}
-
-function PromiseMapSeries(promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
-}
-
-Promise.prototype.each = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, this, undefined);
-};
-
-Promise.prototype.mapSeries = function (fn) {
- return PromiseReduce(this, fn, INTERNAL, INTERNAL);
-};
-
-Promise.each = function (promises, fn) {
- return PromiseReduce(promises, fn, INTERNAL, 0)
- ._then(promiseAllThis, undefined, undefined, promises, undefined);
-};
-
-Promise.mapSeries = PromiseMapSeries;
-};
-
diff --git a/node_modules/bluebird/js/release/errors.js b/node_modules/bluebird/js/release/errors.js
deleted file mode 100644
index f62f323eb..000000000
--- a/node_modules/bluebird/js/release/errors.js
+++ /dev/null
@@ -1,116 +0,0 @@
-"use strict";
-var es5 = require("./es5");
-var Objectfreeze = es5.freeze;
-var util = require("./util");
-var inherits = util.inherits;
-var notEnumerableProp = util.notEnumerableProp;
-
-function subError(nameProperty, defaultMessage) {
- function SubError(message) {
- if (!(this instanceof SubError)) return new SubError(message);
- notEnumerableProp(this, "message",
- typeof message === "string" ? message : defaultMessage);
- notEnumerableProp(this, "name", nameProperty);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- } else {
- Error.call(this);
- }
- }
- inherits(SubError, Error);
- return SubError;
-}
-
-var _TypeError, _RangeError;
-var Warning = subError("Warning", "warning");
-var CancellationError = subError("CancellationError", "cancellation error");
-var TimeoutError = subError("TimeoutError", "timeout error");
-var AggregateError = subError("AggregateError", "aggregate error");
-try {
- _TypeError = TypeError;
- _RangeError = RangeError;
-} catch(e) {
- _TypeError = subError("TypeError", "type error");
- _RangeError = subError("RangeError", "range error");
-}
-
-var methods = ("join pop push shift unshift slice filter forEach some " +
- "every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
-
-for (var i = 0; i < methods.length; ++i) {
- if (typeof Array.prototype[methods[i]] === "function") {
- AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
- }
-}
-
-es5.defineProperty(AggregateError.prototype, "length", {
- value: 0,
- configurable: false,
- writable: true,
- enumerable: true
-});
-AggregateError.prototype["isOperational"] = true;
-var level = 0;
-AggregateError.prototype.toString = function() {
- var indent = Array(level * 4 + 1).join(" ");
- var ret = "\n" + indent + "AggregateError of:" + "\n";
- level++;
- indent = Array(level * 4 + 1).join(" ");
- for (var i = 0; i < this.length; ++i) {
- var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
- var lines = str.split("\n");
- for (var j = 0; j < lines.length; ++j) {
- lines[j] = indent + lines[j];
- }
- str = lines.join("\n");
- ret += str + "\n";
- }
- level--;
- return ret;
-};
-
-function OperationalError(message) {
- if (!(this instanceof OperationalError))
- return new OperationalError(message);
- notEnumerableProp(this, "name", "OperationalError");
- notEnumerableProp(this, "message", message);
- this.cause = message;
- this["isOperational"] = true;
-
- if (message instanceof Error) {
- notEnumerableProp(this, "message", message.message);
- notEnumerableProp(this, "stack", message.stack);
- } else if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
-}
-inherits(OperationalError, Error);
-
-var errorTypes = Error["__BluebirdErrorTypes__"];
-if (!errorTypes) {
- errorTypes = Objectfreeze({
- CancellationError: CancellationError,
- TimeoutError: TimeoutError,
- OperationalError: OperationalError,
- RejectionError: OperationalError,
- AggregateError: AggregateError
- });
- es5.defineProperty(Error, "__BluebirdErrorTypes__", {
- value: errorTypes,
- writable: false,
- enumerable: false,
- configurable: false
- });
-}
-
-module.exports = {
- Error: Error,
- TypeError: _TypeError,
- RangeError: _RangeError,
- CancellationError: errorTypes.CancellationError,
- OperationalError: errorTypes.OperationalError,
- TimeoutError: errorTypes.TimeoutError,
- AggregateError: errorTypes.AggregateError,
- Warning: Warning
-};
diff --git a/node_modules/bluebird/js/release/es5.js b/node_modules/bluebird/js/release/es5.js
deleted file mode 100644
index ea41d5a56..000000000
--- a/node_modules/bluebird/js/release/es5.js
+++ /dev/null
@@ -1,80 +0,0 @@
-var isES5 = (function(){
- "use strict";
- return this === undefined;
-})();
-
-if (isES5) {
- module.exports = {
- freeze: Object.freeze,
- defineProperty: Object.defineProperty,
- getDescriptor: Object.getOwnPropertyDescriptor,
- keys: Object.keys,
- names: Object.getOwnPropertyNames,
- getPrototypeOf: Object.getPrototypeOf,
- isArray: Array.isArray,
- isES5: isES5,
- propertyIsWritable: function(obj, prop) {
- var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
- return !!(!descriptor || descriptor.writable || descriptor.set);
- }
- };
-} else {
- var has = {}.hasOwnProperty;
- var str = {}.toString;
- var proto = {}.constructor.prototype;
-
- var ObjectKeys = function (o) {
- var ret = [];
- for (var key in o) {
- if (has.call(o, key)) {
- ret.push(key);
- }
- }
- return ret;
- };
-
- var ObjectGetDescriptor = function(o, key) {
- return {value: o[key]};
- };
-
- var ObjectDefineProperty = function (o, key, desc) {
- o[key] = desc.value;
- return o;
- };
-
- var ObjectFreeze = function (obj) {
- return obj;
- };
-
- var ObjectGetPrototypeOf = function (obj) {
- try {
- return Object(obj).constructor.prototype;
- }
- catch (e) {
- return proto;
- }
- };
-
- var ArrayIsArray = function (obj) {
- try {
- return str.call(obj) === "[object Array]";
- }
- catch(e) {
- return false;
- }
- };
-
- module.exports = {
- isArray: ArrayIsArray,
- keys: ObjectKeys,
- names: ObjectKeys,
- defineProperty: ObjectDefineProperty,
- getDescriptor: ObjectGetDescriptor,
- freeze: ObjectFreeze,
- getPrototypeOf: ObjectGetPrototypeOf,
- isES5: isES5,
- propertyIsWritable: function() {
- return true;
- }
- };
-}
diff --git a/node_modules/bluebird/js/release/filter.js b/node_modules/bluebird/js/release/filter.js
deleted file mode 100644
index ed57bf015..000000000
--- a/node_modules/bluebird/js/release/filter.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var PromiseMap = Promise.map;
-
-Promise.prototype.filter = function (fn, options) {
- return PromiseMap(this, fn, options, INTERNAL);
-};
-
-Promise.filter = function (promises, fn, options) {
- return PromiseMap(promises, fn, options, INTERNAL);
-};
-};
diff --git a/node_modules/bluebird/js/release/finally.js b/node_modules/bluebird/js/release/finally.js
deleted file mode 100644
index d57444bed..000000000
--- a/node_modules/bluebird/js/release/finally.js
+++ /dev/null
@@ -1,146 +0,0 @@
-"use strict";
-module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
-var util = require("./util");
-var CancellationError = Promise.CancellationError;
-var errorObj = util.errorObj;
-var catchFilter = require("./catch_filter")(NEXT_FILTER);
-
-function PassThroughHandlerContext(promise, type, handler) {
- this.promise = promise;
- this.type = type;
- this.handler = handler;
- this.called = false;
- this.cancelPromise = null;
-}
-
-PassThroughHandlerContext.prototype.isFinallyHandler = function() {
- return this.type === 0;
-};
-
-function FinallyHandlerCancelReaction(finallyHandler) {
- this.finallyHandler = finallyHandler;
-}
-
-FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
- checkCancel(this.finallyHandler);
-};
-
-function checkCancel(ctx, reason) {
- if (ctx.cancelPromise != null) {
- if (arguments.length > 1) {
- ctx.cancelPromise._reject(reason);
- } else {
- ctx.cancelPromise._cancel();
- }
- ctx.cancelPromise = null;
- return true;
- }
- return false;
-}
-
-function succeed() {
- return finallyHandler.call(this, this.promise._target()._settledValue());
-}
-function fail(reason) {
- if (checkCancel(this, reason)) return;
- errorObj.e = reason;
- return errorObj;
-}
-function finallyHandler(reasonOrValue) {
- var promise = this.promise;
- var handler = this.handler;
-
- if (!this.called) {
- this.called = true;
- var ret = this.isFinallyHandler()
- ? handler.call(promise._boundValue())
- : handler.call(promise._boundValue(), reasonOrValue);
- if (ret === NEXT_FILTER) {
- return ret;
- } else if (ret !== undefined) {
- promise._setReturnedNonUndefined();
- var maybePromise = tryConvertToPromise(ret, promise);
- if (maybePromise instanceof Promise) {
- if (this.cancelPromise != null) {
- if (maybePromise._isCancelled()) {
- var reason =
- new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- errorObj.e = reason;
- return errorObj;
- } else if (maybePromise.isPending()) {
- maybePromise._attachCancellationCallback(
- new FinallyHandlerCancelReaction(this));
- }
- }
- return maybePromise._then(
- succeed, fail, undefined, this, undefined);
- }
- }
- }
-
- if (promise.isRejected()) {
- checkCancel(this);
- errorObj.e = reasonOrValue;
- return errorObj;
- } else {
- checkCancel(this);
- return reasonOrValue;
- }
-}
-
-Promise.prototype._passThrough = function(handler, type, success, fail) {
- if (typeof handler !== "function") return this.then();
- return this._then(success,
- fail,
- undefined,
- new PassThroughHandlerContext(this, type, handler),
- undefined);
-};
-
-Promise.prototype.lastly =
-Promise.prototype["finally"] = function (handler) {
- return this._passThrough(handler,
- 0,
- finallyHandler,
- finallyHandler);
-};
-
-
-Promise.prototype.tap = function (handler) {
- return this._passThrough(handler, 1, finallyHandler);
-};
-
-Promise.prototype.tapCatch = function (handlerOrPredicate) {
- var len = arguments.length;
- if(len === 1) {
- return this._passThrough(handlerOrPredicate,
- 1,
- undefined,
- finallyHandler);
- } else {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return Promise.reject(new TypeError(
- "tapCatch statement predicate: "
- + "expecting an object but got " + util.classString(item)
- ));
- }
- }
- catchInstances.length = j;
- var handler = arguments[i];
- return this._passThrough(catchFilter(catchInstances, handler, this),
- 1,
- undefined,
- finallyHandler);
- }
-
-};
-
-return PassThroughHandlerContext;
-};
diff --git a/node_modules/bluebird/js/release/generators.js b/node_modules/bluebird/js/release/generators.js
deleted file mode 100644
index 500c280c0..000000000
--- a/node_modules/bluebird/js/release/generators.js
+++ /dev/null
@@ -1,223 +0,0 @@
-"use strict";
-module.exports = function(Promise,
- apiRejection,
- INTERNAL,
- tryConvertToPromise,
- Proxyable,
- debug) {
-var errors = require("./errors");
-var TypeError = errors.TypeError;
-var util = require("./util");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-var yieldHandlers = [];
-
-function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
- for (var i = 0; i < yieldHandlers.length; ++i) {
- traceParent._pushContext();
- var result = tryCatch(yieldHandlers[i])(value);
- traceParent._popContext();
- if (result === errorObj) {
- traceParent._pushContext();
- var ret = Promise.reject(errorObj.e);
- traceParent._popContext();
- return ret;
- }
- var maybePromise = tryConvertToPromise(result, traceParent);
- if (maybePromise instanceof Promise) return maybePromise;
- }
- return null;
-}
-
-function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
- if (debug.cancellation()) {
- var internal = new Promise(INTERNAL);
- var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
- this._promise = internal.lastly(function() {
- return _finallyPromise;
- });
- internal._captureStackTrace();
- internal._setOnCancel(this);
- } else {
- var promise = this._promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- }
- this._stack = stack;
- this._generatorFunction = generatorFunction;
- this._receiver = receiver;
- this._generator = undefined;
- this._yieldHandlers = typeof yieldHandler === "function"
- ? [yieldHandler].concat(yieldHandlers)
- : yieldHandlers;
- this._yieldedPromise = null;
- this._cancellationPhase = false;
-}
-util.inherits(PromiseSpawn, Proxyable);
-
-PromiseSpawn.prototype._isResolved = function() {
- return this._promise === null;
-};
-
-PromiseSpawn.prototype._cleanup = function() {
- this._promise = this._generator = null;
- if (debug.cancellation() && this._finallyPromise !== null) {
- this._finallyPromise._fulfill();
- this._finallyPromise = null;
- }
-};
-
-PromiseSpawn.prototype._promiseCancelled = function() {
- if (this._isResolved()) return;
- var implementsReturn = typeof this._generator["return"] !== "undefined";
-
- var result;
- if (!implementsReturn) {
- var reason = new Promise.CancellationError(
- "generator .return() sentinel");
- Promise.coroutine.returnSentinel = reason;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- result = tryCatch(this._generator["throw"]).call(this._generator,
- reason);
- this._promise._popContext();
- } else {
- this._promise._pushContext();
- result = tryCatch(this._generator["return"]).call(this._generator,
- undefined);
- this._promise._popContext();
- }
- this._cancellationPhase = true;
- this._yieldedPromise = null;
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseFulfilled = function(value) {
- this._yieldedPromise = null;
- this._promise._pushContext();
- var result = tryCatch(this._generator.next).call(this._generator, value);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._promiseRejected = function(reason) {
- this._yieldedPromise = null;
- this._promise._attachExtraTrace(reason);
- this._promise._pushContext();
- var result = tryCatch(this._generator["throw"])
- .call(this._generator, reason);
- this._promise._popContext();
- this._continue(result);
-};
-
-PromiseSpawn.prototype._resultCancelled = function() {
- if (this._yieldedPromise instanceof Promise) {
- var promise = this._yieldedPromise;
- this._yieldedPromise = null;
- promise.cancel();
- }
-};
-
-PromiseSpawn.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseSpawn.prototype._run = function () {
- this._generator = this._generatorFunction.call(this._receiver);
- this._receiver =
- this._generatorFunction = undefined;
- this._promiseFulfilled(undefined);
-};
-
-PromiseSpawn.prototype._continue = function (result) {
- var promise = this._promise;
- if (result === errorObj) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._rejectCallback(result.e, false);
- }
- }
-
- var value = result.value;
- if (result.done === true) {
- this._cleanup();
- if (this._cancellationPhase) {
- return promise.cancel();
- } else {
- return promise._resolveCallback(value);
- }
- } else {
- var maybePromise = tryConvertToPromise(value, this._promise);
- if (!(maybePromise instanceof Promise)) {
- maybePromise =
- promiseFromYieldHandler(maybePromise,
- this._yieldHandlers,
- this._promise);
- if (maybePromise === null) {
- this._promiseRejected(
- new TypeError(
- "A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
- "From coroutine:\u000a" +
- this._stack.split("\n").slice(1, -7).join("\n")
- )
- );
- return;
- }
- }
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- this._yieldedPromise = maybePromise;
- maybePromise._proxy(this, null);
- } else if (((bitField & 33554432) !== 0)) {
- Promise._async.invoke(
- this._promiseFulfilled, this, maybePromise._value()
- );
- } else if (((bitField & 16777216) !== 0)) {
- Promise._async.invoke(
- this._promiseRejected, this, maybePromise._reason()
- );
- } else {
- this._promiseCancelled();
- }
- }
-};
-
-Promise.coroutine = function (generatorFunction, options) {
- if (typeof generatorFunction !== "function") {
- throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var yieldHandler = Object(options).yieldHandler;
- var PromiseSpawn$ = PromiseSpawn;
- var stack = new Error().stack;
- return function () {
- var generator = generatorFunction.apply(this, arguments);
- var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
- stack);
- var ret = spawn.promise();
- spawn._generator = generator;
- spawn._promiseFulfilled(undefined);
- return ret;
- };
-};
-
-Promise.coroutine.addYieldHandler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- yieldHandlers.push(fn);
-};
-
-Promise.spawn = function (generatorFunction) {
- debug.deprecated("Promise.spawn()", "Promise.coroutine()");
- if (typeof generatorFunction !== "function") {
- return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var spawn = new PromiseSpawn(generatorFunction, this);
- var ret = spawn.promise();
- spawn._run(Promise.spawn);
- return ret;
-};
-};
diff --git a/node_modules/bluebird/js/release/join.js b/node_modules/bluebird/js/release/join.js
deleted file mode 100644
index 4945e3f78..000000000
--- a/node_modules/bluebird/js/release/join.js
+++ /dev/null
@@ -1,168 +0,0 @@
-"use strict";
-module.exports =
-function(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async,
- getDomain) {
-var util = require("./util");
-var canEvaluate = util.canEvaluate;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var reject;
-
-if (!false) {
-if (canEvaluate) {
- var thenCallback = function(i) {
- return new Function("value", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = value; \n\
- holder.checkFulfillment(this); \n\
- ".replace(/Index/g, i));
- };
-
- var promiseSetter = function(i) {
- return new Function("promise", "holder", " \n\
- 'use strict'; \n\
- holder.pIndex = promise; \n\
- ".replace(/Index/g, i));
- };
-
- var generateHolderClass = function(total) {
- var props = new Array(total);
- for (var i = 0; i < props.length; ++i) {
- props[i] = "this.p" + (i+1);
- }
- var assignment = props.join(" = ") + " = null;";
- var cancellationCode= "var promise;\n" + props.map(function(prop) {
- return " \n\
- promise = " + prop + "; \n\
- if (promise instanceof Promise) { \n\
- promise.cancel(); \n\
- } \n\
- ";
- }).join("\n");
- var passedArguments = props.join(", ");
- var name = "Holder$" + total;
-
-
- var code = "return function(tryCatch, errorObj, Promise, async) { \n\
- 'use strict'; \n\
- function [TheName](fn) { \n\
- [TheProperties] \n\
- this.fn = fn; \n\
- this.asyncNeeded = true; \n\
- this.now = 0; \n\
- } \n\
- \n\
- [TheName].prototype._callFunction = function(promise) { \n\
- promise._pushContext(); \n\
- var ret = tryCatch(this.fn)([ThePassedArguments]); \n\
- promise._popContext(); \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(ret.e, false); \n\
- } else { \n\
- promise._resolveCallback(ret); \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype.checkFulfillment = function(promise) { \n\
- var now = ++this.now; \n\
- if (now === [TheTotal]) { \n\
- if (this.asyncNeeded) { \n\
- async.invoke(this._callFunction, this, promise); \n\
- } else { \n\
- this._callFunction(promise); \n\
- } \n\
- \n\
- } \n\
- }; \n\
- \n\
- [TheName].prototype._resultCancelled = function() { \n\
- [CancellationCode] \n\
- }; \n\
- \n\
- return [TheName]; \n\
- }(tryCatch, errorObj, Promise, async); \n\
- ";
-
- code = code.replace(/\[TheName\]/g, name)
- .replace(/\[TheTotal\]/g, total)
- .replace(/\[ThePassedArguments\]/g, passedArguments)
- .replace(/\[TheProperties\]/g, assignment)
- .replace(/\[CancellationCode\]/g, cancellationCode);
-
- return new Function("tryCatch", "errorObj", "Promise", "async", code)
- (tryCatch, errorObj, Promise, async);
- };
-
- var holderClasses = [];
- var thenCallbacks = [];
- var promiseSetters = [];
-
- for (var i = 0; i < 8; ++i) {
- holderClasses.push(generateHolderClass(i + 1));
- thenCallbacks.push(thenCallback(i + 1));
- promiseSetters.push(promiseSetter(i + 1));
- }
-
- reject = function (reason) {
- this._reject(reason);
- };
-}}
-
-Promise.join = function () {
- var last = arguments.length - 1;
- var fn;
- if (last > 0 && typeof arguments[last] === "function") {
- fn = arguments[last];
- if (!false) {
- if (last <= 8 && canEvaluate) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var HolderClass = holderClasses[last - 1];
- var holder = new HolderClass(fn);
- var callbacks = thenCallbacks;
-
- for (var i = 0; i < last; ++i) {
- var maybePromise = tryConvertToPromise(arguments[i], ret);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- maybePromise._then(callbacks[i], reject,
- undefined, ret, holder);
- promiseSetters[i](maybePromise, holder);
- holder.asyncNeeded = false;
- } else if (((bitField & 33554432) !== 0)) {
- callbacks[i].call(ret,
- maybePromise._value(), holder);
- } else if (((bitField & 16777216) !== 0)) {
- ret._reject(maybePromise._reason());
- } else {
- ret._cancel();
- }
- } else {
- callbacks[i].call(ret, maybePromise, holder);
- }
- }
-
- if (!ret._isFateSealed()) {
- if (holder.asyncNeeded) {
- var domain = getDomain();
- if (domain !== null) {
- holder.fn = util.domainBind(domain, holder.fn);
- }
- }
- ret._setAsyncGuaranteed();
- ret._setOnCancel(holder);
- }
- return ret;
- }
- }
- }
- var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];};
- if (fn) args.pop();
- var ret = new PromiseArray(args).promise();
- return fn !== undefined ? ret.spread(fn) : ret;
-};
-
-};
diff --git a/node_modules/bluebird/js/release/map.js b/node_modules/bluebird/js/release/map.js
deleted file mode 100644
index 976f15ef2..000000000
--- a/node_modules/bluebird/js/release/map.js
+++ /dev/null
@@ -1,168 +0,0 @@
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = require("./util");
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-var async = Promise._async;
-
-function MappingPromiseArray(promises, fn, limit, _filter) {
- this.constructor$(promises);
- this._promise._captureStackTrace();
- var domain = getDomain();
- this._callback = domain === null ? fn : util.domainBind(domain, fn);
- this._preservedValues = _filter === INTERNAL
- ? new Array(this.length())
- : null;
- this._limit = limit;
- this._inFlight = 0;
- this._queue = [];
- async.invoke(this._asyncInit, this, undefined);
-}
-util.inherits(MappingPromiseArray, PromiseArray);
-
-MappingPromiseArray.prototype._asyncInit = function() {
- this._init$(undefined, -2);
-};
-
-MappingPromiseArray.prototype._init = function () {};
-
-MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var values = this._values;
- var length = this.length();
- var preservedValues = this._preservedValues;
- var limit = this._limit;
-
- if (index < 0) {
- index = (index * -1) - 1;
- values[index] = value;
- if (limit >= 1) {
- this._inFlight--;
- this._drainQueue();
- if (this._isResolved()) return true;
- }
- } else {
- if (limit >= 1 && this._inFlight >= limit) {
- values[index] = value;
- this._queue.push(index);
- return false;
- }
- if (preservedValues !== null) preservedValues[index] = value;
-
- var promise = this._promise;
- var callback = this._callback;
- var receiver = promise._boundValue();
- promise._pushContext();
- var ret = tryCatch(callback).call(receiver, value, index, length);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- preservedValues !== null ? "Promise.filter" : "Promise.map",
- promise
- );
- if (ret === errorObj) {
- this._reject(ret.e);
- return true;
- }
-
- var maybePromise = tryConvertToPromise(ret, this._promise);
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- var bitField = maybePromise._bitField;
- ;
- if (((bitField & 50397184) === 0)) {
- if (limit >= 1) this._inFlight++;
- values[index] = maybePromise;
- maybePromise._proxy(this, (index + 1) * -1);
- return false;
- } else if (((bitField & 33554432) !== 0)) {
- ret = maybePromise._value();
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(maybePromise._reason());
- return true;
- } else {
- this._cancel();
- return true;
- }
- }
- values[index] = ret;
- }
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= length) {
- if (preservedValues !== null) {
- this._filter(values, preservedValues);
- } else {
- this._resolve(values);
- }
- return true;
- }
- return false;
-};
-
-MappingPromiseArray.prototype._drainQueue = function () {
- var queue = this._queue;
- var limit = this._limit;
- var values = this._values;
- while (queue.length > 0 && this._inFlight < limit) {
- if (this._isResolved()) return;
- var index = queue.pop();
- this._promiseFulfilled(values[index], index);
- }
-};
-
-MappingPromiseArray.prototype._filter = function (booleans, values) {
- var len = values.length;
- var ret = new Array(len);
- var j = 0;
- for (var i = 0; i < len; ++i) {
- if (booleans[i]) ret[j++] = values[i];
- }
- ret.length = j;
- this._resolve(ret);
-};
-
-MappingPromiseArray.prototype.preservedValues = function () {
- return this._preservedValues;
-};
-
-function map(promises, fn, options, _filter) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
-
- var limit = 0;
- if (options !== undefined) {
- if (typeof options === "object" && options !== null) {
- if (typeof options.concurrency !== "number") {
- return Promise.reject(
- new TypeError("'concurrency' must be a number but it is " +
- util.classString(options.concurrency)));
- }
- limit = options.concurrency;
- } else {
- return Promise.reject(new TypeError(
- "options argument must be an object but it is " +
- util.classString(options)));
- }
- }
- limit = typeof limit === "number" &&
- isFinite(limit) && limit >= 1 ? limit : 0;
- return new MappingPromiseArray(promises, fn, limit, _filter).promise();
-}
-
-Promise.prototype.map = function (fn, options) {
- return map(this, fn, options, null);
-};
-
-Promise.map = function (promises, fn, options, _filter) {
- return map(promises, fn, options, _filter);
-};
-
-
-};
diff --git a/node_modules/bluebird/js/release/method.js b/node_modules/bluebird/js/release/method.js
deleted file mode 100644
index ce9e4db7e..000000000
--- a/node_modules/bluebird/js/release/method.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-module.exports =
-function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
-var util = require("./util");
-var tryCatch = util.tryCatch;
-
-Promise.method = function (fn) {
- if (typeof fn !== "function") {
- throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
- }
- return function () {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value = tryCatch(fn).apply(this, arguments);
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.method", ret);
- ret._resolveFromSyncValue(value);
- return ret;
- };
-};
-
-Promise.attempt = Promise["try"] = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._pushContext();
- var value;
- if (arguments.length > 1) {
- debug.deprecated("calling Promise.try with more than 1 argument");
- var arg = arguments[1];
- var ctx = arguments[2];
- value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
- : tryCatch(fn).call(ctx, arg);
- } else {
- value = tryCatch(fn)();
- }
- var promiseCreated = ret._popContext();
- debug.checkForgottenReturns(
- value, promiseCreated, "Promise.try", ret);
- ret._resolveFromSyncValue(value);
- return ret;
-};
-
-Promise.prototype._resolveFromSyncValue = function (value) {
- if (value === util.errorObj) {
- this._rejectCallback(value.e, false);
- } else {
- this._resolveCallback(value, true);
- }
-};
-};
diff --git a/node_modules/bluebird/js/release/nodeback.js b/node_modules/bluebird/js/release/nodeback.js
deleted file mode 100644
index 71e69ebdb..000000000
--- a/node_modules/bluebird/js/release/nodeback.js
+++ /dev/null
@@ -1,51 +0,0 @@
-"use strict";
-var util = require("./util");
-var maybeWrapAsError = util.maybeWrapAsError;
-var errors = require("./errors");
-var OperationalError = errors.OperationalError;
-var es5 = require("./es5");
-
-function isUntypedError(obj) {
- return obj instanceof Error &&
- es5.getPrototypeOf(obj) === Error.prototype;
-}
-
-var rErrorKey = /^(?:name|message|stack|cause)$/;
-function wrapAsOperationalError(obj) {
- var ret;
- if (isUntypedError(obj)) {
- ret = new OperationalError(obj);
- ret.name = obj.name;
- ret.message = obj.message;
- ret.stack = obj.stack;
- var keys = es5.keys(obj);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!rErrorKey.test(key)) {
- ret[key] = obj[key];
- }
- }
- return ret;
- }
- util.markAsOriginatingFromRejection(obj);
- return obj;
-}
-
-function nodebackForPromise(promise, multiArgs) {
- return function(err, value) {
- if (promise === null) return;
- if (err) {
- var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
- promise._attachExtraTrace(wrapped);
- promise._reject(wrapped);
- } else if (!multiArgs) {
- promise._fulfill(value);
- } else {
- var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};
- promise._fulfill(args);
- }
- promise = null;
- };
-}
-
-module.exports = nodebackForPromise;
diff --git a/node_modules/bluebird/js/release/nodeify.js b/node_modules/bluebird/js/release/nodeify.js
deleted file mode 100644
index ce2b19004..000000000
--- a/node_modules/bluebird/js/release/nodeify.js
+++ /dev/null
@@ -1,58 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-var util = require("./util");
-var async = Promise._async;
-var tryCatch = util.tryCatch;
-var errorObj = util.errorObj;
-
-function spreadAdapter(val, nodeback) {
- var promise = this;
- if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
- var ret =
- tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-function successAdapter(val, nodeback) {
- var promise = this;
- var receiver = promise._boundValue();
- var ret = val === undefined
- ? tryCatch(nodeback).call(receiver, null)
- : tryCatch(nodeback).call(receiver, null, val);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-function errorAdapter(reason, nodeback) {
- var promise = this;
- if (!reason) {
- var newReason = new Error(reason + "");
- newReason.cause = reason;
- reason = newReason;
- }
- var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
- if (ret === errorObj) {
- async.throwLater(ret.e);
- }
-}
-
-Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback,
- options) {
- if (typeof nodeback == "function") {
- var adapter = successAdapter;
- if (options !== undefined && Object(options).spread) {
- adapter = spreadAdapter;
- }
- this._then(
- adapter,
- errorAdapter,
- undefined,
- this,
- nodeback
- );
- }
- return this;
-};
-};
diff --git a/node_modules/bluebird/js/release/promise.js b/node_modules/bluebird/js/release/promise.js
deleted file mode 100644
index d80b44da4..000000000
--- a/node_modules/bluebird/js/release/promise.js
+++ /dev/null
@@ -1,789 +0,0 @@
-"use strict";
-module.exports = function() {
-var makeSelfResolutionError = function () {
- return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var reflectHandler = function() {
- return new Promise.PromiseInspection(this._target());
-};
-var apiRejection = function(msg) {
- return Promise.reject(new TypeError(msg));
-};
-function Proxyable() {}
-var UNDEFINED_BINDING = {};
-var util = require("./util");
-
-var getDomain;
-if (util.isNode) {
- getDomain = function() {
- var ret = process.domain;
- if (ret === undefined) ret = null;
- return ret;
- };
-} else {
- getDomain = function() {
- return null;
- };
-}
-util.notEnumerableProp(Promise, "_getDomain", getDomain);
-
-var es5 = require("./es5");
-var Async = require("./async");
-var async = new Async();
-es5.defineProperty(Promise, "_async", {value: async});
-var errors = require("./errors");
-var TypeError = Promise.TypeError = errors.TypeError;
-Promise.RangeError = errors.RangeError;
-var CancellationError = Promise.CancellationError = errors.CancellationError;
-Promise.TimeoutError = errors.TimeoutError;
-Promise.OperationalError = errors.OperationalError;
-Promise.RejectionError = errors.OperationalError;
-Promise.AggregateError = errors.AggregateError;
-var INTERNAL = function(){};
-var APPLY = {};
-var NEXT_FILTER = {};
-var tryConvertToPromise = require("./thenables")(Promise, INTERNAL);
-var PromiseArray =
- require("./promise_array")(Promise, INTERNAL,
- tryConvertToPromise, apiRejection, Proxyable);
-var Context = require("./context")(Promise);
- /*jshint unused:false*/
-var createContext = Context.create;
-var debug = require("./debuggability")(Promise, Context);
-var CapturedTrace = debug.CapturedTrace;
-var PassThroughHandlerContext =
- require("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
-var catchFilter = require("./catch_filter")(NEXT_FILTER);
-var nodebackForPromise = require("./nodeback");
-var errorObj = util.errorObj;
-var tryCatch = util.tryCatch;
-function check(self, executor) {
- if (self == null || self.constructor !== Promise) {
- throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- if (typeof executor !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(executor));
- }
-
-}
-
-function Promise(executor) {
- if (executor !== INTERNAL) {
- check(this, executor);
- }
- this._bitField = 0;
- this._fulfillmentHandler0 = undefined;
- this._rejectionHandler0 = undefined;
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._resolveFromExecutor(executor);
- this._promiseCreated();
- this._fireEvent("promiseCreated", this);
-}
-
-Promise.prototype.toString = function () {
- return "[object Promise]";
-};
-
-Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
- var len = arguments.length;
- if (len > 1) {
- var catchInstances = new Array(len - 1),
- j = 0, i;
- for (i = 0; i < len - 1; ++i) {
- var item = arguments[i];
- if (util.isObject(item)) {
- catchInstances[j++] = item;
- } else {
- return apiRejection("Catch statement predicate: " +
- "expecting an object but got " + util.classString(item));
- }
- }
- catchInstances.length = j;
- fn = arguments[i];
-
- if (typeof fn !== "function") {
- throw new TypeError("The last argument to .catch() " +
- "must be a function, got " + util.toString(fn));
- }
- return this.then(undefined, catchFilter(catchInstances, fn, this));
- }
- return this.then(undefined, fn);
-};
-
-Promise.prototype.reflect = function () {
- return this._then(reflectHandler,
- reflectHandler, undefined, this, undefined);
-};
-
-Promise.prototype.then = function (didFulfill, didReject) {
- if (debug.warnings() && arguments.length > 0 &&
- typeof didFulfill !== "function" &&
- typeof didReject !== "function") {
- var msg = ".then() only accepts functions but was passed: " +
- util.classString(didFulfill);
- if (arguments.length > 1) {
- msg += ", " + util.classString(didReject);
- }
- this._warn(msg);
- }
- return this._then(didFulfill, didReject, undefined, undefined, undefined);
-};
-
-Promise.prototype.done = function (didFulfill, didReject) {
- var promise =
- this._then(didFulfill, didReject, undefined, undefined, undefined);
- promise._setIsFinal();
-};
-
-Promise.prototype.spread = function (fn) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- return this.all()._then(fn, undefined, undefined, APPLY, undefined);
-};
-
-Promise.prototype.toJSON = function () {
- var ret = {
- isFulfilled: false,
- isRejected: false,
- fulfillmentValue: undefined,
- rejectionReason: undefined
- };
- if (this.isFulfilled()) {
- ret.fulfillmentValue = this.value();
- ret.isFulfilled = true;
- } else if (this.isRejected()) {
- ret.rejectionReason = this.reason();
- ret.isRejected = true;
- }
- return ret;
-};
-
-Promise.prototype.all = function () {
- if (arguments.length > 0) {
- this._warn(".all() was passed arguments but it does not take any");
- }
- return new PromiseArray(this).promise();
-};
-
-Promise.prototype.error = function (fn) {
- return this.caught(util.originatesFromRejection, fn);
-};
-
-Promise.getNewLibraryCopy = module.exports;
-
-Promise.is = function (val) {
- return val instanceof Promise;
-};
-
-Promise.fromNode = Promise.fromCallback = function(fn) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs
- : false;
- var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));
- if (result === errorObj) {
- ret._rejectCallback(result.e, true);
- }
- if (!ret._isFateSealed()) ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.all = function (promises) {
- return new PromiseArray(promises).promise();
-};
-
-Promise.cast = function (obj) {
- var ret = tryConvertToPromise(obj);
- if (!(ret instanceof Promise)) {
- ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._setFulfilled();
- ret._rejectionHandler0 = obj;
- }
- return ret;
-};
-
-Promise.resolve = Promise.fulfilled = Promise.cast;
-
-Promise.reject = Promise.rejected = function (reason) {
- var ret = new Promise(INTERNAL);
- ret._captureStackTrace();
- ret._rejectCallback(reason, true);
- return ret;
-};
-
-Promise.setScheduler = function(fn) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- return async.setScheduler(fn);
-};
-
-Promise.prototype._then = function (
- didFulfill,
- didReject,
- _, receiver,
- internalData
-) {
- var haveInternalData = internalData !== undefined;
- var promise = haveInternalData ? internalData : new Promise(INTERNAL);
- var target = this._target();
- var bitField = target._bitField;
-
- if (!haveInternalData) {
- promise._propagateFrom(this, 3);
- promise._captureStackTrace();
- if (receiver === undefined &&
- ((this._bitField & 2097152) !== 0)) {
- if (!((bitField & 50397184) === 0)) {
- receiver = this._boundValue();
- } else {
- receiver = target === this ? undefined : this._boundTo;
- }
- }
- this._fireEvent("promiseChained", this, promise);
- }
-
- var domain = getDomain();
- if (!((bitField & 50397184) === 0)) {
- var handler, value, settler = target._settlePromiseCtx;
- if (((bitField & 33554432) !== 0)) {
- value = target._rejectionHandler0;
- handler = didFulfill;
- } else if (((bitField & 16777216) !== 0)) {
- value = target._fulfillmentHandler0;
- handler = didReject;
- target._unsetRejectionIsUnhandled();
- } else {
- settler = target._settlePromiseLateCancellationObserver;
- value = new CancellationError("late cancellation observer");
- target._attachExtraTrace(value);
- handler = didReject;
- }
-
- async.invoke(settler, target, {
- handler: domain === null ? handler
- : (typeof handler === "function" &&
- util.domainBind(domain, handler)),
- promise: promise,
- receiver: receiver,
- value: value
- });
- } else {
- target._addCallbacks(didFulfill, didReject, promise, receiver, domain);
- }
-
- return promise;
-};
-
-Promise.prototype._length = function () {
- return this._bitField & 65535;
-};
-
-Promise.prototype._isFateSealed = function () {
- return (this._bitField & 117506048) !== 0;
-};
-
-Promise.prototype._isFollowing = function () {
- return (this._bitField & 67108864) === 67108864;
-};
-
-Promise.prototype._setLength = function (len) {
- this._bitField = (this._bitField & -65536) |
- (len & 65535);
-};
-
-Promise.prototype._setFulfilled = function () {
- this._bitField = this._bitField | 33554432;
- this._fireEvent("promiseFulfilled", this);
-};
-
-Promise.prototype._setRejected = function () {
- this._bitField = this._bitField | 16777216;
- this._fireEvent("promiseRejected", this);
-};
-
-Promise.prototype._setFollowing = function () {
- this._bitField = this._bitField | 67108864;
- this._fireEvent("promiseResolved", this);
-};
-
-Promise.prototype._setIsFinal = function () {
- this._bitField = this._bitField | 4194304;
-};
-
-Promise.prototype._isFinal = function () {
- return (this._bitField & 4194304) > 0;
-};
-
-Promise.prototype._unsetCancelled = function() {
- this._bitField = this._bitField & (~65536);
-};
-
-Promise.prototype._setCancelled = function() {
- this._bitField = this._bitField | 65536;
- this._fireEvent("promiseCancelled", this);
-};
-
-Promise.prototype._setWillBeCancelled = function() {
- this._bitField = this._bitField | 8388608;
-};
-
-Promise.prototype._setAsyncGuaranteed = function() {
- if (async.hasCustomScheduler()) return;
- this._bitField = this._bitField | 134217728;
-};
-
-Promise.prototype._receiverAt = function (index) {
- var ret = index === 0 ? this._receiver0 : this[
- index * 4 - 4 + 3];
- if (ret === UNDEFINED_BINDING) {
- return undefined;
- } else if (ret === undefined && this._isBound()) {
- return this._boundValue();
- }
- return ret;
-};
-
-Promise.prototype._promiseAt = function (index) {
- return this[
- index * 4 - 4 + 2];
-};
-
-Promise.prototype._fulfillmentHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 0];
-};
-
-Promise.prototype._rejectionHandlerAt = function (index) {
- return this[
- index * 4 - 4 + 1];
-};
-
-Promise.prototype._boundValue = function() {};
-
-Promise.prototype._migrateCallback0 = function (follower) {
- var bitField = follower._bitField;
- var fulfill = follower._fulfillmentHandler0;
- var reject = follower._rejectionHandler0;
- var promise = follower._promise0;
- var receiver = follower._receiverAt(0);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._migrateCallbackAt = function (follower, index) {
- var fulfill = follower._fulfillmentHandlerAt(index);
- var reject = follower._rejectionHandlerAt(index);
- var promise = follower._promiseAt(index);
- var receiver = follower._receiverAt(index);
- if (receiver === undefined) receiver = UNDEFINED_BINDING;
- this._addCallbacks(fulfill, reject, promise, receiver, null);
-};
-
-Promise.prototype._addCallbacks = function (
- fulfill,
- reject,
- promise,
- receiver,
- domain
-) {
- var index = this._length();
-
- if (index >= 65535 - 4) {
- index = 0;
- this._setLength(0);
- }
-
- if (index === 0) {
- this._promise0 = promise;
- this._receiver0 = receiver;
- if (typeof fulfill === "function") {
- this._fulfillmentHandler0 =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this._rejectionHandler0 =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- } else {
- var base = index * 4 - 4;
- this[base + 2] = promise;
- this[base + 3] = receiver;
- if (typeof fulfill === "function") {
- this[base + 0] =
- domain === null ? fulfill : util.domainBind(domain, fulfill);
- }
- if (typeof reject === "function") {
- this[base + 1] =
- domain === null ? reject : util.domainBind(domain, reject);
- }
- }
- this._setLength(index + 1);
- return index;
-};
-
-Promise.prototype._proxy = function (proxyable, arg) {
- this._addCallbacks(undefined, undefined, arg, proxyable, null);
-};
-
-Promise.prototype._resolveCallback = function(value, shouldBind) {
- if (((this._bitField & 117506048) !== 0)) return;
- if (value === this)
- return this._rejectCallback(makeSelfResolutionError(), false);
- var maybePromise = tryConvertToPromise(value, this);
- if (!(maybePromise instanceof Promise)) return this._fulfill(value);
-
- if (shouldBind) this._propagateFrom(maybePromise, 2);
-
- var promise = maybePromise._target();
-
- if (promise === this) {
- this._reject(makeSelfResolutionError());
- return;
- }
-
- var bitField = promise._bitField;
- if (((bitField & 50397184) === 0)) {
- var len = this._length();
- if (len > 0) promise._migrateCallback0(this);
- for (var i = 1; i < len; ++i) {
- promise._migrateCallbackAt(this, i);
- }
- this._setFollowing();
- this._setLength(0);
- this._setFollowee(promise);
- } else if (((bitField & 33554432) !== 0)) {
- this._fulfill(promise._value());
- } else if (((bitField & 16777216) !== 0)) {
- this._reject(promise._reason());
- } else {
- var reason = new CancellationError("late cancellation observer");
- promise._attachExtraTrace(reason);
- this._reject(reason);
- }
-};
-
-Promise.prototype._rejectCallback =
-function(reason, synchronous, ignoreNonErrorWarnings) {
- var trace = util.ensureErrorObject(reason);
- var hasStack = trace === reason;
- if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
- var message = "a promise was rejected with a non-error: " +
- util.classString(reason);
- this._warn(message, true);
- }
- this._attachExtraTrace(trace, synchronous ? hasStack : false);
- this._reject(reason);
-};
-
-Promise.prototype._resolveFromExecutor = function (executor) {
- if (executor === INTERNAL) return;
- var promise = this;
- this._captureStackTrace();
- this._pushContext();
- var synchronous = true;
- var r = this._execute(executor, function(value) {
- promise._resolveCallback(value);
- }, function (reason) {
- promise._rejectCallback(reason, synchronous);
- });
- synchronous = false;
- this._popContext();
-
- if (r !== undefined) {
- promise._rejectCallback(r, true);
- }
-};
-
-Promise.prototype._settlePromiseFromHandler = function (
- handler, receiver, value, promise
-) {
- var bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
- promise._pushContext();
- var x;
- if (receiver === APPLY) {
- if (!value || typeof value.length !== "number") {
- x = errorObj;
- x.e = new TypeError("cannot .spread() a non-array: " +
- util.classString(value));
- } else {
- x = tryCatch(handler).apply(this._boundValue(), value);
- }
- } else {
- x = tryCatch(handler).call(receiver, value);
- }
- var promiseCreated = promise._popContext();
- bitField = promise._bitField;
- if (((bitField & 65536) !== 0)) return;
-
- if (x === NEXT_FILTER) {
- promise._reject(value);
- } else if (x === errorObj) {
- promise._rejectCallback(x.e, false);
- } else {
- debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
- promise._resolveCallback(x);
- }
-};
-
-Promise.prototype._target = function() {
- var ret = this;
- while (ret._isFollowing()) ret = ret._followee();
- return ret;
-};
-
-Promise.prototype._followee = function() {
- return this._rejectionHandler0;
-};
-
-Promise.prototype._setFollowee = function(promise) {
- this._rejectionHandler0 = promise;
-};
-
-Promise.prototype._settlePromise = function(promise, handler, receiver, value) {
- var isPromise = promise instanceof Promise;
- var bitField = this._bitField;
- var asyncGuaranteed = ((bitField & 134217728) !== 0);
- if (((bitField & 65536) !== 0)) {
- if (isPromise) promise._invokeInternalOnCancel();
-
- if (receiver instanceof PassThroughHandlerContext &&
- receiver.isFinallyHandler()) {
- receiver.cancelPromise = promise;
- if (tryCatch(handler).call(receiver, value) === errorObj) {
- promise._reject(errorObj.e);
- }
- } else if (handler === reflectHandler) {
- promise._fulfill(reflectHandler.call(receiver));
- } else if (receiver instanceof Proxyable) {
- receiver._promiseCancelled(promise);
- } else if (isPromise || promise instanceof PromiseArray) {
- promise._cancel();
- } else {
- receiver.cancel();
- }
- } else if (typeof handler === "function") {
- if (!isPromise) {
- handler.call(receiver, value, promise);
- } else {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (receiver instanceof Proxyable) {
- if (!receiver._isResolved()) {
- if (((bitField & 33554432) !== 0)) {
- receiver._promiseFulfilled(value, promise);
- } else {
- receiver._promiseRejected(value, promise);
- }
- }
- } else if (isPromise) {
- if (asyncGuaranteed) promise._setAsyncGuaranteed();
- if (((bitField & 33554432) !== 0)) {
- promise._fulfill(value);
- } else {
- promise._reject(value);
- }
- }
-};
-
-Promise.prototype._settlePromiseLateCancellationObserver = function(ctx) {
- var handler = ctx.handler;
- var promise = ctx.promise;
- var receiver = ctx.receiver;
- var value = ctx.value;
- if (typeof handler === "function") {
- if (!(promise instanceof Promise)) {
- handler.call(receiver, value, promise);
- } else {
- this._settlePromiseFromHandler(handler, receiver, value, promise);
- }
- } else if (promise instanceof Promise) {
- promise._reject(value);
- }
-};
-
-Promise.prototype._settlePromiseCtx = function(ctx) {
- this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);
-};
-
-Promise.prototype._settlePromise0 = function(handler, value, bitField) {
- var promise = this._promise0;
- var receiver = this._receiverAt(0);
- this._promise0 = undefined;
- this._receiver0 = undefined;
- this._settlePromise(promise, handler, receiver, value);
-};
-
-Promise.prototype._clearCallbackDataAtIndex = function(index) {
- var base = index * 4 - 4;
- this[base + 2] =
- this[base + 3] =
- this[base + 0] =
- this[base + 1] = undefined;
-};
-
-Promise.prototype._fulfill = function (value) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- if (value === this) {
- var err = makeSelfResolutionError();
- this._attachExtraTrace(err);
- return this._reject(err);
- }
- this._setFulfilled();
- this._rejectionHandler0 = value;
-
- if ((bitField & 65535) > 0) {
- if (((bitField & 134217728) !== 0)) {
- this._settlePromises();
- } else {
- async.settlePromises(this);
- }
- this._dereferenceTrace();
- }
-};
-
-Promise.prototype._reject = function (reason) {
- var bitField = this._bitField;
- if (((bitField & 117506048) >>> 16)) return;
- this._setRejected();
- this._fulfillmentHandler0 = reason;
-
- if (this._isFinal()) {
- return async.fatalError(reason, util.isNode);
- }
-
- if ((bitField & 65535) > 0) {
- async.settlePromises(this);
- } else {
- this._ensurePossibleRejectionHandled();
- }
-};
-
-Promise.prototype._fulfillPromises = function (len, value) {
- for (var i = 1; i < len; i++) {
- var handler = this._fulfillmentHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, value);
- }
-};
-
-Promise.prototype._rejectPromises = function (len, reason) {
- for (var i = 1; i < len; i++) {
- var handler = this._rejectionHandlerAt(i);
- var promise = this._promiseAt(i);
- var receiver = this._receiverAt(i);
- this._clearCallbackDataAtIndex(i);
- this._settlePromise(promise, handler, receiver, reason);
- }
-};
-
-Promise.prototype._settlePromises = function () {
- var bitField = this._bitField;
- var len = (bitField & 65535);
-
- if (len > 0) {
- if (((bitField & 16842752) !== 0)) {
- var reason = this._fulfillmentHandler0;
- this._settlePromise0(this._rejectionHandler0, reason, bitField);
- this._rejectPromises(len, reason);
- } else {
- var value = this._rejectionHandler0;
- this._settlePromise0(this._fulfillmentHandler0, value, bitField);
- this._fulfillPromises(len, value);
- }
- this._setLength(0);
- }
- this._clearCancellationData();
-};
-
-Promise.prototype._settledValue = function() {
- var bitField = this._bitField;
- if (((bitField & 33554432) !== 0)) {
- return this._rejectionHandler0;
- } else if (((bitField & 16777216) !== 0)) {
- return this._fulfillmentHandler0;
- }
-};
-
-if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
- es5.defineProperty(Promise.prototype, Symbol.toStringTag, {
- get: function () {
- return "Object";
- }
- });
-}
-
-function deferResolve(v) {this.promise._resolveCallback(v);}
-function deferReject(v) {this.promise._rejectCallback(v, false);}
-
-Promise.defer = Promise.pending = function() {
- debug.deprecated("Promise.defer", "new Promise");
- var promise = new Promise(INTERNAL);
- return {
- promise: promise,
- resolve: deferResolve,
- reject: deferReject
- };
-};
-
-util.notEnumerableProp(Promise,
- "_makeSelfResolutionError",
- makeSelfResolutionError);
-
-require("./method")(Promise, INTERNAL, tryConvertToPromise, apiRejection,
- debug);
-require("./bind")(Promise, INTERNAL, tryConvertToPromise, debug);
-require("./cancel")(Promise, PromiseArray, apiRejection, debug);
-require("./direct_resolve")(Promise);
-require("./synchronous_inspection")(Promise);
-require("./join")(
- Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
-Promise.Promise = Promise;
-Promise.version = "3.5.5";
-require('./call_get.js')(Promise);
-require('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
-require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-require('./nodeify.js')(Promise);
-require('./promisify.js')(Promise, INTERNAL);
-require('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
-require('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
-require('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
-require('./settle.js')(Promise, PromiseArray, debug);
-require('./some.js')(Promise, PromiseArray, apiRejection);
-require('./timers.js')(Promise, INTERNAL, debug);
-require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
-require('./any.js')(Promise);
-require('./each.js')(Promise, INTERNAL);
-require('./filter.js')(Promise, INTERNAL);
-
- util.toFastProperties(Promise);
- util.toFastProperties(Promise.prototype);
- function fillTypes(value) {
- var p = new Promise(INTERNAL);
- p._fulfillmentHandler0 = value;
- p._rejectionHandler0 = value;
- p._promise0 = value;
- p._receiver0 = value;
- }
- // Complete slack tracking, opt out of field-type tracking and
- // stabilize map
- fillTypes({a: 1});
- fillTypes({b: 2});
- fillTypes({c: 3});
- fillTypes(1);
- fillTypes(function(){});
- fillTypes(undefined);
- fillTypes(false);
- fillTypes(new Promise(INTERNAL));
- debug.setBounds(Async.firstLineError, util.lastLineError);
- return Promise;
-
-};
diff --git a/node_modules/bluebird/js/release/promise_array.js b/node_modules/bluebird/js/release/promise_array.js
deleted file mode 100644
index 0fb303eb0..000000000
--- a/node_modules/bluebird/js/release/promise_array.js
+++ /dev/null
@@ -1,185 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL, tryConvertToPromise,
- apiRejection, Proxyable) {
-var util = require("./util");
-var isArray = util.isArray;
-
-function toResolutionValue(val) {
- switch(val) {
- case -2: return [];
- case -3: return {};
- case -6: return new Map();
- }
-}
-
-function PromiseArray(values) {
- var promise = this._promise = new Promise(INTERNAL);
- if (values instanceof Promise) {
- promise._propagateFrom(values, 3);
- }
- promise._setOnCancel(this);
- this._values = values;
- this._length = 0;
- this._totalResolved = 0;
- this._init(undefined, -2);
-}
-util.inherits(PromiseArray, Proxyable);
-
-PromiseArray.prototype.length = function () {
- return this._length;
-};
-
-PromiseArray.prototype.promise = function () {
- return this._promise;
-};
-
-PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
- var values = tryConvertToPromise(this._values, this._promise);
- if (values instanceof Promise) {
- values = values._target();
- var bitField = values._bitField;
- ;
- this._values = values;
-
- if (((bitField & 50397184) === 0)) {
- this._promise._setAsyncGuaranteed();
- return values._then(
- init,
- this._reject,
- undefined,
- this,
- resolveValueIfEmpty
- );
- } else if (((bitField & 33554432) !== 0)) {
- values = values._value();
- } else if (((bitField & 16777216) !== 0)) {
- return this._reject(values._reason());
- } else {
- return this._cancel();
- }
- }
- values = util.asArray(values);
- if (values === null) {
- var err = apiRejection(
- "expecting an array or an iterable object but got " + util.classString(values)).reason();
- this._promise._rejectCallback(err, false);
- return;
- }
-
- if (values.length === 0) {
- if (resolveValueIfEmpty === -5) {
- this._resolveEmptyArray();
- }
- else {
- this._resolve(toResolutionValue(resolveValueIfEmpty));
- }
- return;
- }
- this._iterate(values);
-};
-
-PromiseArray.prototype._iterate = function(values) {
- var len = this.getActualLength(values.length);
- this._length = len;
- this._values = this.shouldCopyValues() ? new Array(len) : this._values;
- var result = this._promise;
- var isResolved = false;
- var bitField = null;
- for (var i = 0; i < len; ++i) {
- var maybePromise = tryConvertToPromise(values[i], result);
-
- if (maybePromise instanceof Promise) {
- maybePromise = maybePromise._target();
- bitField = maybePromise._bitField;
- } else {
- bitField = null;
- }
-
- if (isResolved) {
- if (bitField !== null) {
- maybePromise.suppressUnhandledRejections();
- }
- } else if (bitField !== null) {
- if (((bitField & 50397184) === 0)) {
- maybePromise._proxy(this, i);
- this._values[i] = maybePromise;
- } else if (((bitField & 33554432) !== 0)) {
- isResolved = this._promiseFulfilled(maybePromise._value(), i);
- } else if (((bitField & 16777216) !== 0)) {
- isResolved = this._promiseRejected(maybePromise._reason(), i);
- } else {
- isResolved = this._promiseCancelled(i);
- }
- } else {
- isResolved = this._promiseFulfilled(maybePromise, i);
- }
- }
- if (!isResolved) result._setAsyncGuaranteed();
-};
-
-PromiseArray.prototype._isResolved = function () {
- return this._values === null;
-};
-
-PromiseArray.prototype._resolve = function (value) {
- this._values = null;
- this._promise._fulfill(value);
-};
-
-PromiseArray.prototype._cancel = function() {
- if (this._isResolved() || !this._promise._isCancellable()) return;
- this._values = null;
- this._promise._cancel();
-};
-
-PromiseArray.prototype._reject = function (reason) {
- this._values = null;
- this._promise._rejectCallback(reason, false);
-};
-
-PromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-PromiseArray.prototype._promiseCancelled = function() {
- this._cancel();
- return true;
-};
-
-PromiseArray.prototype._promiseRejected = function (reason) {
- this._totalResolved++;
- this._reject(reason);
- return true;
-};
-
-PromiseArray.prototype._resultCancelled = function() {
- if (this._isResolved()) return;
- var values = this._values;
- this._cancel();
- if (values instanceof Promise) {
- values.cancel();
- } else {
- for (var i = 0; i < values.length; ++i) {
- if (values[i] instanceof Promise) {
- values[i].cancel();
- }
- }
- }
-};
-
-PromiseArray.prototype.shouldCopyValues = function () {
- return true;
-};
-
-PromiseArray.prototype.getActualLength = function (len) {
- return len;
-};
-
-return PromiseArray;
-};
diff --git a/node_modules/bluebird/js/release/promisify.js b/node_modules/bluebird/js/release/promisify.js
deleted file mode 100644
index aa98e5bde..000000000
--- a/node_modules/bluebird/js/release/promisify.js
+++ /dev/null
@@ -1,314 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var THIS = {};
-var util = require("./util");
-var nodebackForPromise = require("./nodeback");
-var withAppended = util.withAppended;
-var maybeWrapAsError = util.maybeWrapAsError;
-var canEvaluate = util.canEvaluate;
-var TypeError = require("./errors").TypeError;
-var defaultSuffix = "Async";
-var defaultPromisified = {__isPromisified__: true};
-var noCopyProps = [
- "arity", "length",
- "name",
- "arguments",
- "caller",
- "callee",
- "prototype",
- "__isPromisified__"
-];
-var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
-
-var defaultFilter = function(name) {
- return util.isIdentifier(name) &&
- name.charAt(0) !== "_" &&
- name !== "constructor";
-};
-
-function propsFilter(key) {
- return !noCopyPropsPattern.test(key);
-}
-
-function isPromisified(fn) {
- try {
- return fn.__isPromisified__ === true;
- }
- catch (e) {
- return false;
- }
-}
-
-function hasPromisified(obj, key, suffix) {
- var val = util.getDataPropertyOrDefault(obj, key + suffix,
- defaultPromisified);
- return val ? isPromisified(val) : false;
-}
-function checkValid(ret, suffix, suffixRegexp) {
- for (var i = 0; i < ret.length; i += 2) {
- var key = ret[i];
- if (suffixRegexp.test(key)) {
- var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
- for (var j = 0; j < ret.length; j += 2) {
- if (ret[j] === keyWithoutAsyncSuffix) {
- throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/MqrFmX\u000a"
- .replace("%s", suffix));
- }
- }
- }
- }
-}
-
-function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
- var keys = util.inheritedDataKeys(obj);
- var ret = [];
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var value = obj[key];
- var passesDefaultFilter = filter === defaultFilter
- ? true : defaultFilter(key, value, obj);
- if (typeof value === "function" &&
- !isPromisified(value) &&
- !hasPromisified(obj, key, suffix) &&
- filter(key, value, obj, passesDefaultFilter)) {
- ret.push(key, value);
- }
- }
- checkValid(ret, suffix, suffixRegexp);
- return ret;
-}
-
-var escapeIdentRegex = function(str) {
- return str.replace(/([$])/, "\\$");
-};
-
-var makeNodePromisifiedEval;
-if (!false) {
-var switchCaseArgumentOrder = function(likelyArgumentCount) {
- var ret = [likelyArgumentCount];
- var min = Math.max(0, likelyArgumentCount - 1 - 3);
- for(var i = likelyArgumentCount - 1; i >= min; --i) {
- ret.push(i);
- }
- for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
- ret.push(i);
- }
- return ret;
-};
-
-var argumentSequence = function(argumentCount) {
- return util.filledRange(argumentCount, "_arg", "");
-};
-
-var parameterDeclaration = function(parameterCount) {
- return util.filledRange(
- Math.max(parameterCount, 3), "_arg", "");
-};
-
-var parameterCount = function(fn) {
- if (typeof fn.length === "number") {
- return Math.max(Math.min(fn.length, 1023 + 1), 0);
- }
- return 0;
-};
-
-makeNodePromisifiedEval =
-function(callback, receiver, originalName, fn, _, multiArgs) {
- var newParameterCount = Math.max(0, parameterCount(fn) - 1);
- var argumentOrder = switchCaseArgumentOrder(newParameterCount);
- var shouldProxyThis = typeof callback === "string" || receiver === THIS;
-
- function generateCallForArgumentCount(count) {
- var args = argumentSequence(count).join(", ");
- var comma = count > 0 ? ", " : "";
- var ret;
- if (shouldProxyThis) {
- ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
- } else {
- ret = receiver === undefined
- ? "ret = callback({{args}}, nodeback); break;\n"
- : "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
- }
- return ret.replace("{{args}}", args).replace(", ", comma);
- }
-
- function generateArgumentSwitchCase() {
- var ret = "";
- for (var i = 0; i < argumentOrder.length; ++i) {
- ret += "case " + argumentOrder[i] +":" +
- generateCallForArgumentCount(argumentOrder[i]);
- }
-
- ret += " \n\
- default: \n\
- var args = new Array(len + 1); \n\
- var i = 0; \n\
- for (var i = 0; i < len; ++i) { \n\
- args[i] = arguments[i]; \n\
- } \n\
- args[i] = nodeback; \n\
- [CodeForCall] \n\
- break; \n\
- ".replace("[CodeForCall]", (shouldProxyThis
- ? "ret = callback.apply(this, args);\n"
- : "ret = callback.apply(receiver, args);\n"));
- return ret;
- }
-
- var getFunctionCode = typeof callback === "string"
- ? ("this != null ? this['"+callback+"'] : fn")
- : "fn";
- var body = "'use strict'; \n\
- var ret = function (Parameters) { \n\
- 'use strict'; \n\
- var len = arguments.length; \n\
- var promise = new Promise(INTERNAL); \n\
- promise._captureStackTrace(); \n\
- var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n\
- var ret; \n\
- var callback = tryCatch([GetFunctionCode]); \n\
- switch(len) { \n\
- [CodeForSwitchCase] \n\
- } \n\
- if (ret === errorObj) { \n\
- promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
- } \n\
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\
- return promise; \n\
- }; \n\
- notEnumerableProp(ret, '__isPromisified__', true); \n\
- return ret; \n\
- ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
- .replace("[GetFunctionCode]", getFunctionCode);
- body = body.replace("Parameters", parameterDeclaration(newParameterCount));
- return new Function("Promise",
- "fn",
- "receiver",
- "withAppended",
- "maybeWrapAsError",
- "nodebackForPromise",
- "tryCatch",
- "errorObj",
- "notEnumerableProp",
- "INTERNAL",
- body)(
- Promise,
- fn,
- receiver,
- withAppended,
- maybeWrapAsError,
- nodebackForPromise,
- util.tryCatch,
- util.errorObj,
- util.notEnumerableProp,
- INTERNAL);
-};
-}
-
-function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {
- var defaultThis = (function() {return this;})();
- var method = callback;
- if (typeof method === "string") {
- callback = fn;
- }
- function promisified() {
- var _receiver = receiver;
- if (receiver === THIS) _receiver = this;
- var promise = new Promise(INTERNAL);
- promise._captureStackTrace();
- var cb = typeof method === "string" && this !== defaultThis
- ? this[method] : callback;
- var fn = nodebackForPromise(promise, multiArgs);
- try {
- cb.apply(_receiver, withAppended(arguments, fn));
- } catch(e) {
- promise._rejectCallback(maybeWrapAsError(e), true, true);
- }
- if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
- return promise;
- }
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- return promisified;
-}
-
-var makeNodePromisified = canEvaluate
- ? makeNodePromisifiedEval
- : makeNodePromisifiedClosure;
-
-function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {
- var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
- var methods =
- promisifiableMethods(obj, suffix, suffixRegexp, filter);
-
- for (var i = 0, len = methods.length; i < len; i+= 2) {
- var key = methods[i];
- var fn = methods[i+1];
- var promisifiedKey = key + suffix;
- if (promisifier === makeNodePromisified) {
- obj[promisifiedKey] =
- makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);
- } else {
- var promisified = promisifier(fn, function() {
- return makeNodePromisified(key, THIS, key,
- fn, suffix, multiArgs);
- });
- util.notEnumerableProp(promisified, "__isPromisified__", true);
- obj[promisifiedKey] = promisified;
- }
- }
- util.toFastProperties(obj);
- return obj;
-}
-
-function promisify(callback, receiver, multiArgs) {
- return makeNodePromisified(callback, receiver, undefined,
- callback, null, multiArgs);
-}
-
-Promise.promisify = function (fn, options) {
- if (typeof fn !== "function") {
- throw new TypeError("expecting a function but got " + util.classString(fn));
- }
- if (isPromisified(fn)) {
- return fn;
- }
- options = Object(options);
- var receiver = options.context === undefined ? THIS : options.context;
- var multiArgs = !!options.multiArgs;
- var ret = promisify(fn, receiver, multiArgs);
- util.copyDescriptors(fn, ret, propsFilter);
- return ret;
-};
-
-Promise.promisifyAll = function (target, options) {
- if (typeof target !== "function" && typeof target !== "object") {
- throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- options = Object(options);
- var multiArgs = !!options.multiArgs;
- var suffix = options.suffix;
- if (typeof suffix !== "string") suffix = defaultSuffix;
- var filter = options.filter;
- if (typeof filter !== "function") filter = defaultFilter;
- var promisifier = options.promisifier;
- if (typeof promisifier !== "function") promisifier = makeNodePromisified;
-
- if (!util.isIdentifier(suffix)) {
- throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
-
- var keys = util.inheritedDataKeys(target);
- for (var i = 0; i < keys.length; ++i) {
- var value = target[keys[i]];
- if (keys[i] !== "constructor" &&
- util.isClass(value)) {
- promisifyAll(value.prototype, suffix, filter, promisifier,
- multiArgs);
- promisifyAll(value, suffix, filter, promisifier, multiArgs);
- }
- }
-
- return promisifyAll(target, suffix, filter, promisifier, multiArgs);
-};
-};
-
diff --git a/node_modules/bluebird/js/release/props.js b/node_modules/bluebird/js/release/props.js
deleted file mode 100644
index 6a34aaf55..000000000
--- a/node_modules/bluebird/js/release/props.js
+++ /dev/null
@@ -1,118 +0,0 @@
-"use strict";
-module.exports = function(
- Promise, PromiseArray, tryConvertToPromise, apiRejection) {
-var util = require("./util");
-var isObject = util.isObject;
-var es5 = require("./es5");
-var Es6Map;
-if (typeof Map === "function") Es6Map = Map;
-
-var mapToEntries = (function() {
- var index = 0;
- var size = 0;
-
- function extractEntry(value, key) {
- this[index] = value;
- this[index + size] = key;
- index++;
- }
-
- return function mapToEntries(map) {
- size = map.size;
- index = 0;
- var ret = new Array(map.size * 2);
- map.forEach(extractEntry, ret);
- return ret;
- };
-})();
-
-var entriesToMap = function(entries) {
- var ret = new Es6Map();
- var length = entries.length / 2 | 0;
- for (var i = 0; i < length; ++i) {
- var key = entries[length + i];
- var value = entries[i];
- ret.set(key, value);
- }
- return ret;
-};
-
-function PropertiesPromiseArray(obj) {
- var isMap = false;
- var entries;
- if (Es6Map !== undefined && obj instanceof Es6Map) {
- entries = mapToEntries(obj);
- isMap = true;
- } else {
- var keys = es5.keys(obj);
- var len = keys.length;
- entries = new Array(len * 2);
- for (var i = 0; i < len; ++i) {
- var key = keys[i];
- entries[i] = obj[key];
- entries[i + len] = key;
- }
- }
- this.constructor$(entries);
- this._isMap = isMap;
- this._init$(undefined, isMap ? -6 : -3);
-}
-util.inherits(PropertiesPromiseArray, PromiseArray);
-
-PropertiesPromiseArray.prototype._init = function () {};
-
-PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
- this._values[index] = value;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- var val;
- if (this._isMap) {
- val = entriesToMap(this._values);
- } else {
- val = {};
- var keyOffset = this.length();
- for (var i = 0, len = this.length(); i < len; ++i) {
- val[this._values[i + keyOffset]] = this._values[i];
- }
- }
- this._resolve(val);
- return true;
- }
- return false;
-};
-
-PropertiesPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-PropertiesPromiseArray.prototype.getActualLength = function (len) {
- return len >> 1;
-};
-
-function props(promises) {
- var ret;
- var castValue = tryConvertToPromise(promises);
-
- if (!isObject(castValue)) {
- return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- } else if (castValue instanceof Promise) {
- ret = castValue._then(
- Promise.props, undefined, undefined, undefined, undefined);
- } else {
- ret = new PropertiesPromiseArray(castValue).promise();
- }
-
- if (castValue instanceof Promise) {
- ret._propagateFrom(castValue, 2);
- }
- return ret;
-}
-
-Promise.prototype.props = function () {
- return props(this);
-};
-
-Promise.props = function (promises) {
- return props(promises);
-};
-};
diff --git a/node_modules/bluebird/js/release/queue.js b/node_modules/bluebird/js/release/queue.js
deleted file mode 100644
index ffd36fda1..000000000
--- a/node_modules/bluebird/js/release/queue.js
+++ /dev/null
@@ -1,73 +0,0 @@
-"use strict";
-function arrayMove(src, srcIndex, dst, dstIndex, len) {
- for (var j = 0; j < len; ++j) {
- dst[j + dstIndex] = src[j + srcIndex];
- src[j + srcIndex] = void 0;
- }
-}
-
-function Queue(capacity) {
- this._capacity = capacity;
- this._length = 0;
- this._front = 0;
-}
-
-Queue.prototype._willBeOverCapacity = function (size) {
- return this._capacity < size;
-};
-
-Queue.prototype._pushOne = function (arg) {
- var length = this.length();
- this._checkCapacity(length + 1);
- var i = (this._front + length) & (this._capacity - 1);
- this[i] = arg;
- this._length = length + 1;
-};
-
-Queue.prototype.push = function (fn, receiver, arg) {
- var length = this.length() + 3;
- if (this._willBeOverCapacity(length)) {
- this._pushOne(fn);
- this._pushOne(receiver);
- this._pushOne(arg);
- return;
- }
- var j = this._front + length - 3;
- this._checkCapacity(length);
- var wrapMask = this._capacity - 1;
- this[(j + 0) & wrapMask] = fn;
- this[(j + 1) & wrapMask] = receiver;
- this[(j + 2) & wrapMask] = arg;
- this._length = length;
-};
-
-Queue.prototype.shift = function () {
- var front = this._front,
- ret = this[front];
-
- this[front] = undefined;
- this._front = (front + 1) & (this._capacity - 1);
- this._length--;
- return ret;
-};
-
-Queue.prototype.length = function () {
- return this._length;
-};
-
-Queue.prototype._checkCapacity = function (size) {
- if (this._capacity < size) {
- this._resizeTo(this._capacity << 1);
- }
-};
-
-Queue.prototype._resizeTo = function (capacity) {
- var oldCapacity = this._capacity;
- this._capacity = capacity;
- var front = this._front;
- var length = this._length;
- var moveItemsCount = (front + length) & (oldCapacity - 1);
- arrayMove(this, 0, this, oldCapacity, moveItemsCount);
-};
-
-module.exports = Queue;
diff --git a/node_modules/bluebird/js/release/race.js b/node_modules/bluebird/js/release/race.js
deleted file mode 100644
index b862f46d6..000000000
--- a/node_modules/bluebird/js/release/race.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-module.exports = function(
- Promise, INTERNAL, tryConvertToPromise, apiRejection) {
-var util = require("./util");
-
-var raceLater = function (promise) {
- return promise.then(function(array) {
- return race(array, promise);
- });
-};
-
-function race(promises, parent) {
- var maybePromise = tryConvertToPromise(promises);
-
- if (maybePromise instanceof Promise) {
- return raceLater(maybePromise);
- } else {
- promises = util.asArray(promises);
- if (promises === null)
- return apiRejection("expecting an array or an iterable object but got " + util.classString(promises));
- }
-
- var ret = new Promise(INTERNAL);
- if (parent !== undefined) {
- ret._propagateFrom(parent, 3);
- }
- var fulfill = ret._fulfill;
- var reject = ret._reject;
- for (var i = 0, len = promises.length; i < len; ++i) {
- var val = promises[i];
-
- if (val === undefined && !(i in promises)) {
- continue;
- }
-
- Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
- }
- return ret;
-}
-
-Promise.race = function (promises) {
- return race(promises, undefined);
-};
-
-Promise.prototype.race = function () {
- return race(this, undefined);
-};
-
-};
diff --git a/node_modules/bluebird/js/release/reduce.js b/node_modules/bluebird/js/release/reduce.js
deleted file mode 100644
index 26e2b1a97..000000000
--- a/node_modules/bluebird/js/release/reduce.js
+++ /dev/null
@@ -1,172 +0,0 @@
-"use strict";
-module.exports = function(Promise,
- PromiseArray,
- apiRejection,
- tryConvertToPromise,
- INTERNAL,
- debug) {
-var getDomain = Promise._getDomain;
-var util = require("./util");
-var tryCatch = util.tryCatch;
-
-function ReductionPromiseArray(promises, fn, initialValue, _each) {
- this.constructor$(promises);
- var domain = getDomain();
- this._fn = domain === null ? fn : util.domainBind(domain, fn);
- if (initialValue !== undefined) {
- initialValue = Promise.resolve(initialValue);
- initialValue._attachCancellationCallback(this);
- }
- this._initialValue = initialValue;
- this._currentCancellable = null;
- if(_each === INTERNAL) {
- this._eachValues = Array(this._length);
- } else if (_each === 0) {
- this._eachValues = null;
- } else {
- this._eachValues = undefined;
- }
- this._promise._captureStackTrace();
- this._init$(undefined, -5);
-}
-util.inherits(ReductionPromiseArray, PromiseArray);
-
-ReductionPromiseArray.prototype._gotAccum = function(accum) {
- if (this._eachValues !== undefined &&
- this._eachValues !== null &&
- accum !== INTERNAL) {
- this._eachValues.push(accum);
- }
-};
-
-ReductionPromiseArray.prototype._eachComplete = function(value) {
- if (this._eachValues !== null) {
- this._eachValues.push(value);
- }
- return this._eachValues;
-};
-
-ReductionPromiseArray.prototype._init = function() {};
-
-ReductionPromiseArray.prototype._resolveEmptyArray = function() {
- this._resolve(this._eachValues !== undefined ? this._eachValues
- : this._initialValue);
-};
-
-ReductionPromiseArray.prototype.shouldCopyValues = function () {
- return false;
-};
-
-ReductionPromiseArray.prototype._resolve = function(value) {
- this._promise._resolveCallback(value);
- this._values = null;
-};
-
-ReductionPromiseArray.prototype._resultCancelled = function(sender) {
- if (sender === this._initialValue) return this._cancel();
- if (this._isResolved()) return;
- this._resultCancelled$();
- if (this._currentCancellable instanceof Promise) {
- this._currentCancellable.cancel();
- }
- if (this._initialValue instanceof Promise) {
- this._initialValue.cancel();
- }
-};
-
-ReductionPromiseArray.prototype._iterate = function (values) {
- this._values = values;
- var value;
- var i;
- var length = values.length;
- if (this._initialValue !== undefined) {
- value = this._initialValue;
- i = 0;
- } else {
- value = Promise.resolve(values[0]);
- i = 1;
- }
-
- this._currentCancellable = value;
-
- if (!value.isRejected()) {
- for (; i < length; ++i) {
- var ctx = {
- accum: null,
- value: values[i],
- index: i,
- length: length,
- array: this
- };
- value = value._then(gotAccum, undefined, undefined, ctx, undefined);
- }
- }
-
- if (this._eachValues !== undefined) {
- value = value
- ._then(this._eachComplete, undefined, undefined, this, undefined);
- }
- value._then(completed, completed, undefined, value, this);
-};
-
-Promise.prototype.reduce = function (fn, initialValue) {
- return reduce(this, fn, initialValue, null);
-};
-
-Promise.reduce = function (promises, fn, initialValue, _each) {
- return reduce(promises, fn, initialValue, _each);
-};
-
-function completed(valueOrReason, array) {
- if (this.isFulfilled()) {
- array._resolve(valueOrReason);
- } else {
- array._reject(valueOrReason);
- }
-}
-
-function reduce(promises, fn, initialValue, _each) {
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
- return array.promise();
-}
-
-function gotAccum(accum) {
- this.accum = accum;
- this.array._gotAccum(accum);
- var value = tryConvertToPromise(this.value, this.array._promise);
- if (value instanceof Promise) {
- this.array._currentCancellable = value;
- return value._then(gotValue, undefined, undefined, this, undefined);
- } else {
- return gotValue.call(this, value);
- }
-}
-
-function gotValue(value) {
- var array = this.array;
- var promise = array._promise;
- var fn = tryCatch(array._fn);
- promise._pushContext();
- var ret;
- if (array._eachValues !== undefined) {
- ret = fn.call(promise._boundValue(), value, this.index, this.length);
- } else {
- ret = fn.call(promise._boundValue(),
- this.accum, value, this.index, this.length);
- }
- if (ret instanceof Promise) {
- array._currentCancellable = ret;
- }
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret,
- promiseCreated,
- array._eachValues !== undefined ? "Promise.each" : "Promise.reduce",
- promise
- );
- return ret;
-}
-};
diff --git a/node_modules/bluebird/js/release/schedule.js b/node_modules/bluebird/js/release/schedule.js
deleted file mode 100644
index 15197d143..000000000
--- a/node_modules/bluebird/js/release/schedule.js
+++ /dev/null
@@ -1,62 +0,0 @@
-"use strict";
-var util = require("./util");
-var schedule;
-var noAsyncScheduler = function() {
- throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/MqrFmX\u000a");
-};
-var NativePromise = util.getNativePromise();
-if (util.isNode && typeof MutationObserver === "undefined") {
- var GlobalSetImmediate = global.setImmediate;
- var ProcessNextTick = process.nextTick;
- schedule = util.isRecentNode
- ? function(fn) { GlobalSetImmediate.call(global, fn); }
- : function(fn) { ProcessNextTick.call(process, fn); };
-} else if (typeof NativePromise === "function" &&
- typeof NativePromise.resolve === "function") {
- var nativePromise = NativePromise.resolve();
- schedule = function(fn) {
- nativePromise.then(fn);
- };
-} else if ((typeof MutationObserver !== "undefined") &&
- !(typeof window !== "undefined" &&
- window.navigator &&
- (window.navigator.standalone || window.cordova)) &&
- ("classList" in document.documentElement)) {
- schedule = (function() {
- var div = document.createElement("div");
- var opts = {attributes: true};
- var toggleScheduled = false;
- var div2 = document.createElement("div");
- var o2 = new MutationObserver(function() {
- div.classList.toggle("foo");
- toggleScheduled = false;
- });
- o2.observe(div2, opts);
-
- var scheduleToggle = function() {
- if (toggleScheduled) return;
- toggleScheduled = true;
- div2.classList.toggle("foo");
- };
-
- return function schedule(fn) {
- var o = new MutationObserver(function() {
- o.disconnect();
- fn();
- });
- o.observe(div, opts);
- scheduleToggle();
- };
- })();
-} else if (typeof setImmediate !== "undefined") {
- schedule = function (fn) {
- setImmediate(fn);
- };
-} else if (typeof setTimeout !== "undefined") {
- schedule = function (fn) {
- setTimeout(fn, 0);
- };
-} else {
- schedule = noAsyncScheduler;
-}
-module.exports = schedule;
diff --git a/node_modules/bluebird/js/release/settle.js b/node_modules/bluebird/js/release/settle.js
deleted file mode 100644
index fade3a174..000000000
--- a/node_modules/bluebird/js/release/settle.js
+++ /dev/null
@@ -1,43 +0,0 @@
-"use strict";
-module.exports =
- function(Promise, PromiseArray, debug) {
-var PromiseInspection = Promise.PromiseInspection;
-var util = require("./util");
-
-function SettledPromiseArray(values) {
- this.constructor$(values);
-}
-util.inherits(SettledPromiseArray, PromiseArray);
-
-SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
- this._values[index] = inspection;
- var totalResolved = ++this._totalResolved;
- if (totalResolved >= this._length) {
- this._resolve(this._values);
- return true;
- }
- return false;
-};
-
-SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
- var ret = new PromiseInspection();
- ret._bitField = 33554432;
- ret._settledValueField = value;
- return this._promiseResolved(index, ret);
-};
-SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
- var ret = new PromiseInspection();
- ret._bitField = 16777216;
- ret._settledValueField = reason;
- return this._promiseResolved(index, ret);
-};
-
-Promise.settle = function (promises) {
- debug.deprecated(".settle()", ".reflect()");
- return new SettledPromiseArray(promises).promise();
-};
-
-Promise.prototype.settle = function () {
- return Promise.settle(this);
-};
-};
diff --git a/node_modules/bluebird/js/release/some.js b/node_modules/bluebird/js/release/some.js
deleted file mode 100644
index 400d85207..000000000
--- a/node_modules/bluebird/js/release/some.js
+++ /dev/null
@@ -1,148 +0,0 @@
-"use strict";
-module.exports =
-function(Promise, PromiseArray, apiRejection) {
-var util = require("./util");
-var RangeError = require("./errors").RangeError;
-var AggregateError = require("./errors").AggregateError;
-var isArray = util.isArray;
-var CANCELLATION = {};
-
-
-function SomePromiseArray(values) {
- this.constructor$(values);
- this._howMany = 0;
- this._unwrap = false;
- this._initialized = false;
-}
-util.inherits(SomePromiseArray, PromiseArray);
-
-SomePromiseArray.prototype._init = function () {
- if (!this._initialized) {
- return;
- }
- if (this._howMany === 0) {
- this._resolve([]);
- return;
- }
- this._init$(undefined, -5);
- var isArrayResolved = isArray(this._values);
- if (!this._isResolved() &&
- isArrayResolved &&
- this._howMany > this._canPossiblyFulfill()) {
- this._reject(this._getRangeError(this.length()));
- }
-};
-
-SomePromiseArray.prototype.init = function () {
- this._initialized = true;
- this._init();
-};
-
-SomePromiseArray.prototype.setUnwrap = function () {
- this._unwrap = true;
-};
-
-SomePromiseArray.prototype.howMany = function () {
- return this._howMany;
-};
-
-SomePromiseArray.prototype.setHowMany = function (count) {
- this._howMany = count;
-};
-
-SomePromiseArray.prototype._promiseFulfilled = function (value) {
- this._addFulfilled(value);
- if (this._fulfilled() === this.howMany()) {
- this._values.length = this.howMany();
- if (this.howMany() === 1 && this._unwrap) {
- this._resolve(this._values[0]);
- } else {
- this._resolve(this._values);
- }
- return true;
- }
- return false;
-
-};
-SomePromiseArray.prototype._promiseRejected = function (reason) {
- this._addRejected(reason);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._promiseCancelled = function () {
- if (this._values instanceof Promise || this._values == null) {
- return this._cancel();
- }
- this._addRejected(CANCELLATION);
- return this._checkOutcome();
-};
-
-SomePromiseArray.prototype._checkOutcome = function() {
- if (this.howMany() > this._canPossiblyFulfill()) {
- var e = new AggregateError();
- for (var i = this.length(); i < this._values.length; ++i) {
- if (this._values[i] !== CANCELLATION) {
- e.push(this._values[i]);
- }
- }
- if (e.length > 0) {
- this._reject(e);
- } else {
- this._cancel();
- }
- return true;
- }
- return false;
-};
-
-SomePromiseArray.prototype._fulfilled = function () {
- return this._totalResolved;
-};
-
-SomePromiseArray.prototype._rejected = function () {
- return this._values.length - this.length();
-};
-
-SomePromiseArray.prototype._addRejected = function (reason) {
- this._values.push(reason);
-};
-
-SomePromiseArray.prototype._addFulfilled = function (value) {
- this._values[this._totalResolved++] = value;
-};
-
-SomePromiseArray.prototype._canPossiblyFulfill = function () {
- return this.length() - this._rejected();
-};
-
-SomePromiseArray.prototype._getRangeError = function (count) {
- var message = "Input array must contain at least " +
- this._howMany + " items but contains only " + count + " items";
- return new RangeError(message);
-};
-
-SomePromiseArray.prototype._resolveEmptyArray = function () {
- this._reject(this._getRangeError(0));
-};
-
-function some(promises, howMany) {
- if ((howMany | 0) !== howMany || howMany < 0) {
- return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- var ret = new SomePromiseArray(promises);
- var promise = ret.promise();
- ret.setHowMany(howMany);
- ret.init();
- return promise;
-}
-
-Promise.some = function (promises, howMany) {
- return some(promises, howMany);
-};
-
-Promise.prototype.some = function (howMany) {
- return some(this, howMany);
-};
-
-Promise._SomePromiseArray = SomePromiseArray;
-};
diff --git a/node_modules/bluebird/js/release/synchronous_inspection.js b/node_modules/bluebird/js/release/synchronous_inspection.js
deleted file mode 100644
index 9c49d2e60..000000000
--- a/node_modules/bluebird/js/release/synchronous_inspection.js
+++ /dev/null
@@ -1,103 +0,0 @@
-"use strict";
-module.exports = function(Promise) {
-function PromiseInspection(promise) {
- if (promise !== undefined) {
- promise = promise._target();
- this._bitField = promise._bitField;
- this._settledValueField = promise._isFateSealed()
- ? promise._settledValue() : undefined;
- }
- else {
- this._bitField = 0;
- this._settledValueField = undefined;
- }
-}
-
-PromiseInspection.prototype._settledValue = function() {
- return this._settledValueField;
-};
-
-var value = PromiseInspection.prototype.value = function () {
- if (!this.isFulfilled()) {
- throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var reason = PromiseInspection.prototype.error =
-PromiseInspection.prototype.reason = function () {
- if (!this.isRejected()) {
- throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/MqrFmX\u000a");
- }
- return this._settledValue();
-};
-
-var isFulfilled = PromiseInspection.prototype.isFulfilled = function() {
- return (this._bitField & 33554432) !== 0;
-};
-
-var isRejected = PromiseInspection.prototype.isRejected = function () {
- return (this._bitField & 16777216) !== 0;
-};
-
-var isPending = PromiseInspection.prototype.isPending = function () {
- return (this._bitField & 50397184) === 0;
-};
-
-var isResolved = PromiseInspection.prototype.isResolved = function () {
- return (this._bitField & 50331648) !== 0;
-};
-
-PromiseInspection.prototype.isCancelled = function() {
- return (this._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.__isCancelled = function() {
- return (this._bitField & 65536) === 65536;
-};
-
-Promise.prototype._isCancelled = function() {
- return this._target().__isCancelled();
-};
-
-Promise.prototype.isCancelled = function() {
- return (this._target()._bitField & 8454144) !== 0;
-};
-
-Promise.prototype.isPending = function() {
- return isPending.call(this._target());
-};
-
-Promise.prototype.isRejected = function() {
- return isRejected.call(this._target());
-};
-
-Promise.prototype.isFulfilled = function() {
- return isFulfilled.call(this._target());
-};
-
-Promise.prototype.isResolved = function() {
- return isResolved.call(this._target());
-};
-
-Promise.prototype.value = function() {
- return value.call(this._target());
-};
-
-Promise.prototype.reason = function() {
- var target = this._target();
- target._unsetRejectionIsUnhandled();
- return reason.call(target);
-};
-
-Promise.prototype._value = function() {
- return this._settledValue();
-};
-
-Promise.prototype._reason = function() {
- this._unsetRejectionIsUnhandled();
- return this._settledValue();
-};
-
-Promise.PromiseInspection = PromiseInspection;
-};
diff --git a/node_modules/bluebird/js/release/thenables.js b/node_modules/bluebird/js/release/thenables.js
deleted file mode 100644
index d6ab9aa27..000000000
--- a/node_modules/bluebird/js/release/thenables.js
+++ /dev/null
@@ -1,86 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL) {
-var util = require("./util");
-var errorObj = util.errorObj;
-var isObject = util.isObject;
-
-function tryConvertToPromise(obj, context) {
- if (isObject(obj)) {
- if (obj instanceof Promise) return obj;
- var then = getThen(obj);
- if (then === errorObj) {
- if (context) context._pushContext();
- var ret = Promise.reject(then.e);
- if (context) context._popContext();
- return ret;
- } else if (typeof then === "function") {
- if (isAnyBluebirdPromise(obj)) {
- var ret = new Promise(INTERNAL);
- obj._then(
- ret._fulfill,
- ret._reject,
- undefined,
- ret,
- null
- );
- return ret;
- }
- return doThenable(obj, then, context);
- }
- }
- return obj;
-}
-
-function doGetThen(obj) {
- return obj.then;
-}
-
-function getThen(obj) {
- try {
- return doGetThen(obj);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-
-var hasProp = {}.hasOwnProperty;
-function isAnyBluebirdPromise(obj) {
- try {
- return hasProp.call(obj, "_promise0");
- } catch (e) {
- return false;
- }
-}
-
-function doThenable(x, then, context) {
- var promise = new Promise(INTERNAL);
- var ret = promise;
- if (context) context._pushContext();
- promise._captureStackTrace();
- if (context) context._popContext();
- var synchronous = true;
- var result = util.tryCatch(then).call(x, resolve, reject);
- synchronous = false;
-
- if (promise && result === errorObj) {
- promise._rejectCallback(result.e, true, true);
- promise = null;
- }
-
- function resolve(value) {
- if (!promise) return;
- promise._resolveCallback(value);
- promise = null;
- }
-
- function reject(reason) {
- if (!promise) return;
- promise._rejectCallback(reason, synchronous, true);
- promise = null;
- }
- return ret;
-}
-
-return tryConvertToPromise;
-};
diff --git a/node_modules/bluebird/js/release/timers.js b/node_modules/bluebird/js/release/timers.js
deleted file mode 100644
index cb8f1f421..000000000
--- a/node_modules/bluebird/js/release/timers.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-module.exports = function(Promise, INTERNAL, debug) {
-var util = require("./util");
-var TimeoutError = Promise.TimeoutError;
-
-function HandleWrapper(handle) {
- this.handle = handle;
-}
-
-HandleWrapper.prototype._resultCancelled = function() {
- clearTimeout(this.handle);
-};
-
-var afterValue = function(value) { return delay(+this).thenReturn(value); };
-var delay = Promise.delay = function (ms, value) {
- var ret;
- var handle;
- if (value !== undefined) {
- ret = Promise.resolve(value)
- ._then(afterValue, null, null, ms, undefined);
- if (debug.cancellation() && value instanceof Promise) {
- ret._setOnCancel(value);
- }
- } else {
- ret = new Promise(INTERNAL);
- handle = setTimeout(function() { ret._fulfill(); }, +ms);
- if (debug.cancellation()) {
- ret._setOnCancel(new HandleWrapper(handle));
- }
- ret._captureStackTrace();
- }
- ret._setAsyncGuaranteed();
- return ret;
-};
-
-Promise.prototype.delay = function (ms) {
- return delay(ms, this);
-};
-
-var afterTimeout = function (promise, message, parent) {
- var err;
- if (typeof message !== "string") {
- if (message instanceof Error) {
- err = message;
- } else {
- err = new TimeoutError("operation timed out");
- }
- } else {
- err = new TimeoutError(message);
- }
- util.markAsOriginatingFromRejection(err);
- promise._attachExtraTrace(err);
- promise._reject(err);
-
- if (parent != null) {
- parent.cancel();
- }
-};
-
-function successClear(value) {
- clearTimeout(this.handle);
- return value;
-}
-
-function failureClear(reason) {
- clearTimeout(this.handle);
- throw reason;
-}
-
-Promise.prototype.timeout = function (ms, message) {
- ms = +ms;
- var ret, parent;
-
- var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {
- if (ret.isPending()) {
- afterTimeout(ret, message, parent);
- }
- }, ms));
-
- if (debug.cancellation()) {
- parent = this.then();
- ret = parent._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- ret._setOnCancel(handleWrapper);
- } else {
- ret = this._then(successClear, failureClear,
- undefined, handleWrapper, undefined);
- }
-
- return ret;
-};
-
-};
diff --git a/node_modules/bluebird/js/release/using.js b/node_modules/bluebird/js/release/using.js
deleted file mode 100644
index 65de531c1..000000000
--- a/node_modules/bluebird/js/release/using.js
+++ /dev/null
@@ -1,226 +0,0 @@
-"use strict";
-module.exports = function (Promise, apiRejection, tryConvertToPromise,
- createContext, INTERNAL, debug) {
- var util = require("./util");
- var TypeError = require("./errors").TypeError;
- var inherits = require("./util").inherits;
- var errorObj = util.errorObj;
- var tryCatch = util.tryCatch;
- var NULL = {};
-
- function thrower(e) {
- setTimeout(function(){throw e;}, 0);
- }
-
- function castPreservingDisposable(thenable) {
- var maybePromise = tryConvertToPromise(thenable);
- if (maybePromise !== thenable &&
- typeof thenable._isDisposable === "function" &&
- typeof thenable._getDisposer === "function" &&
- thenable._isDisposable()) {
- maybePromise._setDisposable(thenable._getDisposer());
- }
- return maybePromise;
- }
- function dispose(resources, inspection) {
- var i = 0;
- var len = resources.length;
- var ret = new Promise(INTERNAL);
- function iterator() {
- if (i >= len) return ret._fulfill();
- var maybePromise = castPreservingDisposable(resources[i++]);
- if (maybePromise instanceof Promise &&
- maybePromise._isDisposable()) {
- try {
- maybePromise = tryConvertToPromise(
- maybePromise._getDisposer().tryDispose(inspection),
- resources.promise);
- } catch (e) {
- return thrower(e);
- }
- if (maybePromise instanceof Promise) {
- return maybePromise._then(iterator, thrower,
- null, null, null);
- }
- }
- iterator();
- }
- iterator();
- return ret;
- }
-
- function Disposer(data, promise, context) {
- this._data = data;
- this._promise = promise;
- this._context = context;
- }
-
- Disposer.prototype.data = function () {
- return this._data;
- };
-
- Disposer.prototype.promise = function () {
- return this._promise;
- };
-
- Disposer.prototype.resource = function () {
- if (this.promise().isFulfilled()) {
- return this.promise().value();
- }
- return NULL;
- };
-
- Disposer.prototype.tryDispose = function(inspection) {
- var resource = this.resource();
- var context = this._context;
- if (context !== undefined) context._pushContext();
- var ret = resource !== NULL
- ? this.doDispose(resource, inspection) : null;
- if (context !== undefined) context._popContext();
- this._promise._unsetDisposable();
- this._data = null;
- return ret;
- };
-
- Disposer.isDisposer = function (d) {
- return (d != null &&
- typeof d.resource === "function" &&
- typeof d.tryDispose === "function");
- };
-
- function FunctionDisposer(fn, promise, context) {
- this.constructor$(fn, promise, context);
- }
- inherits(FunctionDisposer, Disposer);
-
- FunctionDisposer.prototype.doDispose = function (resource, inspection) {
- var fn = this.data();
- return fn.call(resource, resource, inspection);
- };
-
- function maybeUnwrapDisposer(value) {
- if (Disposer.isDisposer(value)) {
- this.resources[this.index]._setDisposable(value);
- return value.promise();
- }
- return value;
- }
-
- function ResourceList(length) {
- this.length = length;
- this.promise = null;
- this[length-1] = null;
- }
-
- ResourceList.prototype._resultCancelled = function() {
- var len = this.length;
- for (var i = 0; i < len; ++i) {
- var item = this[i];
- if (item instanceof Promise) {
- item.cancel();
- }
- }
- };
-
- Promise.using = function () {
- var len = arguments.length;
- if (len < 2) return apiRejection(
- "you must pass at least 2 arguments to Promise.using");
- var fn = arguments[len - 1];
- if (typeof fn !== "function") {
- return apiRejection("expecting a function but got " + util.classString(fn));
- }
- var input;
- var spreadArgs = true;
- if (len === 2 && Array.isArray(arguments[0])) {
- input = arguments[0];
- len = input.length;
- spreadArgs = false;
- } else {
- input = arguments;
- len--;
- }
- var resources = new ResourceList(len);
- for (var i = 0; i < len; ++i) {
- var resource = input[i];
- if (Disposer.isDisposer(resource)) {
- var disposer = resource;
- resource = resource.promise();
- resource._setDisposable(disposer);
- } else {
- var maybePromise = tryConvertToPromise(resource);
- if (maybePromise instanceof Promise) {
- resource =
- maybePromise._then(maybeUnwrapDisposer, null, null, {
- resources: resources,
- index: i
- }, undefined);
- }
- }
- resources[i] = resource;
- }
-
- var reflectedResources = new Array(resources.length);
- for (var i = 0; i < reflectedResources.length; ++i) {
- reflectedResources[i] = Promise.resolve(resources[i]).reflect();
- }
-
- var resultPromise = Promise.all(reflectedResources)
- .then(function(inspections) {
- for (var i = 0; i < inspections.length; ++i) {
- var inspection = inspections[i];
- if (inspection.isRejected()) {
- errorObj.e = inspection.error();
- return errorObj;
- } else if (!inspection.isFulfilled()) {
- resultPromise.cancel();
- return;
- }
- inspections[i] = inspection.value();
- }
- promise._pushContext();
-
- fn = tryCatch(fn);
- var ret = spreadArgs
- ? fn.apply(undefined, inspections) : fn(inspections);
- var promiseCreated = promise._popContext();
- debug.checkForgottenReturns(
- ret, promiseCreated, "Promise.using", promise);
- return ret;
- });
-
- var promise = resultPromise.lastly(function() {
- var inspection = new Promise.PromiseInspection(resultPromise);
- return dispose(resources, inspection);
- });
- resources.promise = promise;
- promise._setOnCancel(resources);
- return promise;
- };
-
- Promise.prototype._setDisposable = function (disposer) {
- this._bitField = this._bitField | 131072;
- this._disposer = disposer;
- };
-
- Promise.prototype._isDisposable = function () {
- return (this._bitField & 131072) > 0;
- };
-
- Promise.prototype._getDisposer = function () {
- return this._disposer;
- };
-
- Promise.prototype._unsetDisposable = function () {
- this._bitField = this._bitField & (~131072);
- this._disposer = undefined;
- };
-
- Promise.prototype.disposer = function (fn) {
- if (typeof fn === "function") {
- return new FunctionDisposer(fn, this, createContext());
- }
- throw new TypeError();
- };
-
-};
diff --git a/node_modules/bluebird/js/release/util.js b/node_modules/bluebird/js/release/util.js
deleted file mode 100644
index 74a24fa6c..000000000
--- a/node_modules/bluebird/js/release/util.js
+++ /dev/null
@@ -1,389 +0,0 @@
-"use strict";
-var es5 = require("./es5");
-var canEvaluate = typeof navigator == "undefined";
-
-var errorObj = {e: {}};
-var tryCatchTarget;
-var globalObject = typeof self !== "undefined" ? self :
- typeof window !== "undefined" ? window :
- typeof global !== "undefined" ? global :
- this !== undefined ? this : null;
-
-function tryCatcher() {
- try {
- var target = tryCatchTarget;
- tryCatchTarget = null;
- return target.apply(this, arguments);
- } catch (e) {
- errorObj.e = e;
- return errorObj;
- }
-}
-function tryCatch(fn) {
- tryCatchTarget = fn;
- return tryCatcher;
-}
-
-var inherits = function(Child, Parent) {
- var hasProp = {}.hasOwnProperty;
-
- function T() {
- this.constructor = Child;
- this.constructor$ = Parent;
- for (var propertyName in Parent.prototype) {
- if (hasProp.call(Parent.prototype, propertyName) &&
- propertyName.charAt(propertyName.length-1) !== "$"
- ) {
- this[propertyName + "$"] = Parent.prototype[propertyName];
- }
- }
- }
- T.prototype = Parent.prototype;
- Child.prototype = new T();
- return Child.prototype;
-};
-
-
-function isPrimitive(val) {
- return val == null || val === true || val === false ||
- typeof val === "string" || typeof val === "number";
-
-}
-
-function isObject(value) {
- return typeof value === "function" ||
- typeof value === "object" && value !== null;
-}
-
-function maybeWrapAsError(maybeError) {
- if (!isPrimitive(maybeError)) return maybeError;
-
- return new Error(safeToString(maybeError));
-}
-
-function withAppended(target, appendee) {
- var len = target.length;
- var ret = new Array(len + 1);
- var i;
- for (i = 0; i < len; ++i) {
- ret[i] = target[i];
- }
- ret[i] = appendee;
- return ret;
-}
-
-function getDataPropertyOrDefault(obj, key, defaultValue) {
- if (es5.isES5) {
- var desc = Object.getOwnPropertyDescriptor(obj, key);
-
- if (desc != null) {
- return desc.get == null && desc.set == null
- ? desc.value
- : defaultValue;
- }
- } else {
- return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
- }
-}
-
-function notEnumerableProp(obj, name, value) {
- if (isPrimitive(obj)) return obj;
- var descriptor = {
- value: value,
- configurable: true,
- enumerable: false,
- writable: true
- };
- es5.defineProperty(obj, name, descriptor);
- return obj;
-}
-
-function thrower(r) {
- throw r;
-}
-
-var inheritedDataKeys = (function() {
- var excludedPrototypes = [
- Array.prototype,
- Object.prototype,
- Function.prototype
- ];
-
- var isExcludedProto = function(val) {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (excludedPrototypes[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- if (es5.isES5) {
- var getKeys = Object.getOwnPropertyNames;
- return function(obj) {
- var ret = [];
- var visitedKeys = Object.create(null);
- while (obj != null && !isExcludedProto(obj)) {
- var keys;
- try {
- keys = getKeys(obj);
- } catch (e) {
- return ret;
- }
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (visitedKeys[key]) continue;
- visitedKeys[key] = true;
- var desc = Object.getOwnPropertyDescriptor(obj, key);
- if (desc != null && desc.get == null && desc.set == null) {
- ret.push(key);
- }
- }
- obj = es5.getPrototypeOf(obj);
- }
- return ret;
- };
- } else {
- var hasProp = {}.hasOwnProperty;
- return function(obj) {
- if (isExcludedProto(obj)) return [];
- var ret = [];
-
- /*jshint forin:false */
- enumeration: for (var key in obj) {
- if (hasProp.call(obj, key)) {
- ret.push(key);
- } else {
- for (var i = 0; i < excludedPrototypes.length; ++i) {
- if (hasProp.call(excludedPrototypes[i], key)) {
- continue enumeration;
- }
- }
- ret.push(key);
- }
- }
- return ret;
- };
- }
-
-})();
-
-var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
-function isClass(fn) {
- try {
- if (typeof fn === "function") {
- var keys = es5.names(fn.prototype);
-
- var hasMethods = es5.isES5 && keys.length > 1;
- var hasMethodsOtherThanConstructor = keys.length > 0 &&
- !(keys.length === 1 && keys[0] === "constructor");
- var hasThisAssignmentAndStaticMethods =
- thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
-
- if (hasMethods || hasMethodsOtherThanConstructor ||
- hasThisAssignmentAndStaticMethods) {
- return true;
- }
- }
- return false;
- } catch (e) {
- return false;
- }
-}
-
-function toFastProperties(obj) {
- /*jshint -W027,-W055,-W031*/
- function FakeConstructor() {}
- FakeConstructor.prototype = obj;
- var receiver = new FakeConstructor();
- function ic() {
- return typeof receiver.foo;
- }
- ic();
- ic();
- return obj;
- eval(obj);
-}
-
-var rident = /^[a-z$_][a-z$_0-9]*$/i;
-function isIdentifier(str) {
- return rident.test(str);
-}
-
-function filledRange(count, prefix, suffix) {
- var ret = new Array(count);
- for(var i = 0; i < count; ++i) {
- ret[i] = prefix + i + suffix;
- }
- return ret;
-}
-
-function safeToString(obj) {
- try {
- return obj + "";
- } catch (e) {
- return "[no string representation]";
- }
-}
-
-function isError(obj) {
- return obj instanceof Error ||
- (obj !== null &&
- typeof obj === "object" &&
- typeof obj.message === "string" &&
- typeof obj.name === "string");
-}
-
-function markAsOriginatingFromRejection(e) {
- try {
- notEnumerableProp(e, "isOperational", true);
- }
- catch(ignore) {}
-}
-
-function originatesFromRejection(e) {
- if (e == null) return false;
- return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
- e["isOperational"] === true);
-}
-
-function canAttachTrace(obj) {
- return isError(obj) && es5.propertyIsWritable(obj, "stack");
-}
-
-var ensureErrorObject = (function() {
- if (!("stack" in new Error())) {
- return function(value) {
- if (canAttachTrace(value)) return value;
- try {throw new Error(safeToString(value));}
- catch(err) {return err;}
- };
- } else {
- return function(value) {
- if (canAttachTrace(value)) return value;
- return new Error(safeToString(value));
- };
- }
-})();
-
-function classString(obj) {
- return {}.toString.call(obj);
-}
-
-function copyDescriptors(from, to, filter) {
- var keys = es5.names(from);
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (filter(key)) {
- try {
- es5.defineProperty(to, key, es5.getDescriptor(from, key));
- } catch (ignore) {}
- }
- }
-}
-
-var asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- }
- return null;
-};
-
-if (typeof Symbol !== "undefined" && Symbol.iterator) {
- var ArrayFrom = typeof Array.from === "function" ? function(v) {
- return Array.from(v);
- } : function(v) {
- var ret = [];
- var it = v[Symbol.iterator]();
- var itResult;
- while (!((itResult = it.next()).done)) {
- ret.push(itResult.value);
- }
- return ret;
- };
-
- asArray = function(v) {
- if (es5.isArray(v)) {
- return v;
- } else if (v != null && typeof v[Symbol.iterator] === "function") {
- return ArrayFrom(v);
- }
- return null;
- };
-}
-
-var isNode = typeof process !== "undefined" &&
- classString(process).toLowerCase() === "[object process]";
-
-var hasEnvVariables = typeof process !== "undefined" &&
- typeof process.env !== "undefined";
-
-function env(key) {
- return hasEnvVariables ? process.env[key] : undefined;
-}
-
-function getNativePromise() {
- if (typeof Promise === "function") {
- try {
- var promise = new Promise(function(){});
- if ({}.toString.call(promise) === "[object Promise]") {
- return Promise;
- }
- } catch (e) {}
- }
-}
-
-function domainBind(self, cb) {
- return self.bind(cb);
-}
-
-var ret = {
- isClass: isClass,
- isIdentifier: isIdentifier,
- inheritedDataKeys: inheritedDataKeys,
- getDataPropertyOrDefault: getDataPropertyOrDefault,
- thrower: thrower,
- isArray: es5.isArray,
- asArray: asArray,
- notEnumerableProp: notEnumerableProp,
- isPrimitive: isPrimitive,
- isObject: isObject,
- isError: isError,
- canEvaluate: canEvaluate,
- errorObj: errorObj,
- tryCatch: tryCatch,
- inherits: inherits,
- withAppended: withAppended,
- maybeWrapAsError: maybeWrapAsError,
- toFastProperties: toFastProperties,
- filledRange: filledRange,
- toString: safeToString,
- canAttachTrace: canAttachTrace,
- ensureErrorObject: ensureErrorObject,
- originatesFromRejection: originatesFromRejection,
- markAsOriginatingFromRejection: markAsOriginatingFromRejection,
- classString: classString,
- copyDescriptors: copyDescriptors,
- hasDevTools: typeof chrome !== "undefined" && chrome &&
- typeof chrome.loadTimes === "function",
- isNode: isNode,
- hasEnvVariables: hasEnvVariables,
- env: env,
- global: globalObject,
- getNativePromise: getNativePromise,
- domainBind: domainBind
-};
-ret.isRecentNode = ret.isNode && (function() {
- var version;
- if (process.versions && process.versions.node) {
- version = process.versions.node.split(".").map(Number);
- } else if (process.version) {
- version = process.version.split(".").map(Number);
- }
- return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
-})();
-
-if (ret.isNode) ret.toFastProperties(process);
-
-try {throw new Error(); } catch (e) {ret.lastLineError = e;}
-module.exports = ret;
diff --git a/node_modules/bluebird/package.json b/node_modules/bluebird/package.json
deleted file mode 100644
index fb1c7c821..000000000
--- a/node_modules/bluebird/package.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "_from": "bluebird@^3.5.3",
- "_id": "bluebird@3.5.5",
- "_inBundle": false,
- "_integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==",
- "_location": "/bluebird",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "bluebird@^3.5.3",
- "name": "bluebird",
- "escapedName": "bluebird",
- "rawSpec": "^3.5.3",
- "saveSpec": null,
- "fetchSpec": "^3.5.3"
- },
- "_requiredBy": [
- "#USER",
- "/",
- "/bin-links",
- "/cacache",
- "/libcipm",
- "/libnpm",
- "/npm-registry-fetch",
- "/pacote"
- ],
- "_resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz",
- "_shasum": "a8d0afd73251effbbd5fe384a77d73003c17a71f",
- "_spec": "bluebird@^3.5.3",
- "_where": "/Users/isaacs/dev/npm/cli",
- "author": {
- "name": "Petka Antonov",
- "email": "petka_antonov@hotmail.com",
- "url": "http://github.com/petkaantonov/"
- },
- "browser": "./js/browser/bluebird.js",
- "bugs": {
- "url": "http://github.com/petkaantonov/bluebird/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Full featured Promises/A+ implementation with exceptionally good performance",
- "devDependencies": {
- "acorn": "^6.0.2",
- "acorn-walk": "^6.1.0",
- "baconjs": "^0.7.43",
- "bluebird": "^2.9.2",
- "body-parser": "^1.10.2",
- "browserify": "^8.1.1",
- "cli-table": "~0.3.1",
- "co": "^4.2.0",
- "cross-spawn": "^0.2.3",
- "glob": "^4.3.2",
- "grunt-saucelabs": "~8.4.1",
- "highland": "^2.3.0",
- "istanbul": "^0.3.5",
- "jshint": "^2.6.0",
- "jshint-stylish": "~0.2.0",
- "kefir": "^2.4.1",
- "mkdirp": "~0.5.0",
- "mocha": "~2.1",
- "open": "~0.0.5",
- "optimist": "~0.6.1",
- "rimraf": "~2.2.6",
- "rx": "^2.3.25",
- "serve-static": "^1.7.1",
- "sinon": "~1.7.3",
- "uglify-js": "~2.4.16"
- },
- "files": [
- "js/browser",
- "js/release",
- "LICENSE"
- ],
- "homepage": "https://github.com/petkaantonov/bluebird",
- "keywords": [
- "promise",
- "performance",
- "promises",
- "promises-a",
- "promises-aplus",
- "async",
- "await",
- "deferred",
- "deferreds",
- "future",
- "flow control",
- "dsl",
- "fluent interface"
- ],
- "license": "MIT",
- "main": "./js/release/bluebird.js",
- "name": "bluebird",
- "repository": {
- "type": "git",
- "url": "git://github.com/petkaantonov/bluebird.git"
- },
- "scripts": {
- "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js",
- "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
- "istanbul": "istanbul",
- "lint": "node scripts/jshint.js",
- "prepublish": "npm run generate-browser-core && npm run generate-browser-full",
- "test": "node --expose-gc tools/test.js"
- },
- "version": "3.5.5",
- "webpack": "./js/release/bluebird.js"
-}
diff --git a/node_modules/byline/LICENSE b/node_modules/byline/LICENSE
deleted file mode 100644
index 68094b94a..000000000
--- a/node_modules/byline/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-node-byline (C) 2011-2015 John Hewson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/byline/README.md b/node_modules/byline/README.md
deleted file mode 100644
index 2de1a849e..000000000
--- a/node_modules/byline/README.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# byline — buffered stream for reading lines
-
-![npm package](https://nodei.co/npm/byline.png?downloads=true&downloadRank=true)
-
-`byline` is a simple module providing a `LineStream`.
-
-- node v0.10 `streams2` (transform stream)
-- supports `pipe`
-- supports both UNIX and Windows line endings
-- supports [Unicode UTS #18 line boundaries](http://www.unicode.org/reports/tr18/#Line_Boundaries)
-- can wrap any readable stream
-- can be used as a readable-writable "through-stream" (transform stream)
-- super-simple: `stream = byline(stream);`
-
-## Install
-
- npm install byline
-
-or from source:
-
- git clone git://github.com/jahewson/node-byline.git
- cd node-byline
- npm link
-
-# Convenience API
-
-The `byline` module can be used as a function to quickly wrap a readable stream:
-
-```javascript
-var fs = require('fs'),
- byline = require('byline');
-
-var stream = byline(fs.createReadStream('sample.txt', { encoding: 'utf8' }));
-```
-
-The `data` event then emits lines:
-
-```javascript
-stream.on('data', function(line) {
- console.log(line);
-});
-```
-
-# Standard API
-
-You just need to add one line to wrap your readable `Stream` with a `LineStream`.
-
-```javascript
-var fs = require('fs'),
- byline = require('byline');
-
-var stream = fs.createReadStream('sample.txt');
-stream = byline.createStream(stream);
-
-stream.on('data', function(line) {
- console.log(line);
-});
-```
-
-# Piping
-
-`byline` supports `pipe` (though it strips the line endings, of course).
-
-```javascript
-var stream = fs.createReadStream('sample.txt');
-stream = byline.createStream(stream);
-stream.pipe(fs.createWriteStream('nolines.txt'));
-```
-
-Alternatively, you can create a readable/writable "through-stream" which doesn't wrap any specific
-stream:
-
-```javascript
-var stream = fs.createReadStream('sample.txt');
-stream = byline.createStream(stream);
-stream.pipe(fs.createWriteStream('nolines.txt'));
-
-var input = fs.createReadStream('LICENSE');
-var lineStream = byline.createStream();
-input.pipe(lineStream);
-
-var output = fs.createWriteStream('test.txt');
-lineStream.pipe(output);
-```
-
-# Streams2 API
-
-Node v0.10 added a new streams2 API. This allows the stream to be used in non-flowing mode and is
-preferred over the legacy pause() and resume() methods.
-
-```javascript
-var stream = fs.createReadStream('sample.txt');
-stream = byline.createStream(stream);
-
-stream.on('readable', function() {
- var line;
- while (null !== (line = stream.read())) {
- console.log(line);
- }
-});
-```
-
-# Transform Stream
-
-The `byline` transform stream can be directly manipulated like so:
-
-```javascript
-var LineStream = require('byline').LineStream;
-
-var input = fs.createReadStream('sample.txt');
-var output = fs.createWriteStream('nolines.txt');
-
-var lineStream = new LineStream();
-input.pipe(lineStream);
-lineStream.pipe(output);
-
-```
-
-# Empty Lines
-
-By default byline skips empty lines, if you want to keep them, pass the `keepEmptyLines` option in
-the call to `byline.createStream(stream, options)` or `byline(stream, options)`.
-
-# Tests
-
- npm test
-
-# v0.8
-
-If you want to use `node-byline` with node v0.8 then you can use the 2.1.x series. Simply use the
-following in your `package.json`:
-
-```javascript
- "dependencies": {
- "byline": ">=2.1.0 <3.0.0"
-},
-```
-
-# Simple
-Unlike other modules (of which there are many), `byline` contains no:
-
-- monkeypatching
-- dependencies
-- non-standard 'line' events which break `pipe`
-- limitations to only file streams
-- CoffeeScript
-- unnecessary code
diff --git a/node_modules/byline/lib/byline.js b/node_modules/byline/lib/byline.js
deleted file mode 100644
index 21843cb2a..000000000
--- a/node_modules/byline/lib/byline.js
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright (C) 2011-2015 John Hewson
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-
-var stream = require('stream'),
- util = require('util'),
- timers = require('timers');
-
-// convinience API
-module.exports = function(readStream, options) {
- return module.exports.createStream(readStream, options);
-};
-
-// basic API
-module.exports.createStream = function(readStream, options) {
- if (readStream) {
- return createLineStream(readStream, options);
- } else {
- return new LineStream(options);
- }
-};
-
-// deprecated API
-module.exports.createLineStream = function(readStream) {
- console.log('WARNING: byline#createLineStream is deprecated and will be removed soon');
- return createLineStream(readStream);
-};
-
-function createLineStream(readStream, options) {
- if (!readStream) {
- throw new Error('expected readStream');
- }
- if (!readStream.readable) {
- throw new Error('readStream must be readable');
- }
- var ls = new LineStream(options);
- readStream.pipe(ls);
- return ls;
-}
-
-//
-// using the new node v0.10 "streams2" API
-//
-
-module.exports.LineStream = LineStream;
-
-function LineStream(options) {
- stream.Transform.call(this, options);
- options = options || {};
-
- // use objectMode to stop the output from being buffered
- // which re-concatanates the lines, just without newlines.
- this._readableState.objectMode = true;
- this._lineBuffer = [];
- this._keepEmptyLines = options.keepEmptyLines || false;
- this._lastChunkEndedWithCR = false;
-
- // take the source's encoding if we don't have one
- var self = this;
- this.on('pipe', function(src) {
- if (!self.encoding) {
- // but we can't do this for old-style streams
- if (src instanceof stream.Readable) {
- self.encoding = src._readableState.encoding;
- }
- }
- });
-}
-util.inherits(LineStream, stream.Transform);
-
-LineStream.prototype._transform = function(chunk, encoding, done) {
- // decode binary chunks as UTF-8
- encoding = encoding || 'utf8';
-
- if (Buffer.isBuffer(chunk)) {
- if (encoding == 'buffer') {
- chunk = chunk.toString(); // utf8
- encoding = 'utf8';
- }
- else {
- chunk = chunk.toString(encoding);
- }
- }
- this._chunkEncoding = encoding;
-
- // see: http://www.unicode.org/reports/tr18/#Line_Boundaries
- var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);
-
- // don't split CRLF which spans chunks
- if (this._lastChunkEndedWithCR && chunk[0] == '\n') {
- lines.shift();
- }
-
- if (this._lineBuffer.length > 0) {
- this._lineBuffer[this._lineBuffer.length - 1] += lines[0];
- lines.shift();
- }
-
- this._lastChunkEndedWithCR = chunk[chunk.length - 1] == '\r';
- this._lineBuffer = this._lineBuffer.concat(lines);
- this._pushBuffer(encoding, 1, done);
-};
-
-LineStream.prototype._pushBuffer = function(encoding, keep, done) {
- // always buffer the last (possibly partial) line
- while (this._lineBuffer.length > keep) {
- var line = this._lineBuffer.shift();
- // skip empty lines
- if (this._keepEmptyLines || line.length > 0 ) {
- if (!this.push(this._reencode(line, encoding))) {
- // when the high-water mark is reached, defer pushes until the next tick
- var self = this;
- timers.setImmediate(function() {
- self._pushBuffer(encoding, keep, done);
- });
- return;
- }
- }
- }
- done();
-};
-
-LineStream.prototype._flush = function(done) {
- this._pushBuffer(this._chunkEncoding, 0, done);
-};
-
-// see Readable::push
-LineStream.prototype._reencode = function(line, chunkEncoding) {
- if (this.encoding && this.encoding != chunkEncoding) {
- return new Buffer(line, chunkEncoding).toString(this.encoding);
- }
- else if (this.encoding) {
- // this should be the most common case, i.e. we're using an encoded source stream
- return line;
- }
- else {
- return new Buffer(line, chunkEncoding);
- }
-};
diff --git a/node_modules/byline/package.json b/node_modules/byline/package.json
deleted file mode 100644
index 21c319c7b..000000000
--- a/node_modules/byline/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "byline@^5.0.0",
- "_id": "byline@5.0.0",
- "_inBundle": false,
- "_integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=",
- "_location": "/byline",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "byline@^5.0.0",
- "name": "byline",
- "escapedName": "byline",
- "rawSpec": "^5.0.0",
- "saveSpec": null,
- "fetchSpec": "^5.0.0"
- },
- "_requiredBy": [
- "/npm-lifecycle"
- ],
- "_resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz",
- "_shasum": "741c5216468eadc457b03410118ad77de8c1ddb1",
- "_spec": "byline@^5.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/npm-lifecycle",
- "author": {
- "name": "John Hewson"
- },
- "bugs": {
- "url": "https://github.com/jahewson/node-byline/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "simple line-by-line stream reader",
- "devDependencies": {
- "mocha": "~2.1.0",
- "request": "~2.27.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://github.com/jahewson/node-byline",
- "license": "MIT",
- "main": "./lib/byline.js",
- "name": "byline",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jahewson/node-byline.git"
- },
- "scripts": {
- "test": "mocha -R spec --timeout 60000"
- },
- "version": "5.0.0"
-}
diff --git a/node_modules/cacache/CHANGELOG.md b/node_modules/cacache/CHANGELOG.md
index 649db2202..14eee0b38 100644
--- a/node_modules/cacache/CHANGELOG.md
+++ b/node_modules/cacache/CHANGELOG.md
@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+### [15.0.5](https://github.com/npm/cacache/compare/v15.0.4...v15.0.5) (2020-07-11)
+
### [15.0.4](https://github.com/npm/cacache/compare/v15.0.3...v15.0.4) (2020-06-03)
diff --git a/node_modules/cacache/node_modules/.bin/mkdirp b/node_modules/cacache/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896ceb..000000000
--- a/node_modules/cacache/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/cacache/node_modules/chownr/LICENSE b/node_modules/cacache/node_modules/chownr/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/cacache/node_modules/chownr/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/cacache/node_modules/mkdirp/CHANGELOG.md b/node_modules/cacache/node_modules/mkdirp/CHANGELOG.md
deleted file mode 100644
index 81458380b..000000000
--- a/node_modules/cacache/node_modules/mkdirp/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changers Lorgs!
-
-## 1.0
-
-Full rewrite. Essentially a brand new module.
-
-- Return a promise instead of taking a callback.
-- Use native `fs.mkdir(path, { recursive: true })` when available.
-- Drop support for outdated Node.js versions. (Technically still works on
- Node.js v8, but only 10 and above are officially supported.)
-
-## 0.x
-
-Original and most widely used recursive directory creation implementation
-in JavaScript, dating back to 2010.
diff --git a/node_modules/cacache/node_modules/mkdirp/LICENSE b/node_modules/cacache/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/cacache/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/cacache/node_modules/mkdirp/bin/cmd.js b/node_modules/cacache/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/cacache/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/cacache/node_modules/mkdirp/index.js b/node_modules/cacache/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/cacache/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/find-made.js b/node_modules/cacache/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492c0..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent)
- return Promise.resolve()
-
- return opts.statAsync(parent).then(
- st => st.isDirectory() ? path : undefined, // will fail later
- er => er.code === 'ENOENT'
- ? findMade(opts, dirname(parent), parent)
- : undefined
- )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
- if (path === parent)
- return undefined
-
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined
- } catch (er) {
- return er.code === 'ENOENT'
- ? findMadeSync(opts, dirname(parent), parent)
- : undefined
- }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd64..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
- opts.recursive = false
- const parent = dirname(path)
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- })
- }
-
- return opts.mkdirAsync(path, opts).then(() => made || path, er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(parent, opts)
- .then(made => mkdirpManual(path, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- return opts.statAsync(path).then(st => {
- if (st.isDirectory())
- return made
- else
- throw er
- }, () => { throw er })
- })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
- const parent = dirname(path)
- opts.recursive = false
-
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts)
- } catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- else
- return
- }
- }
-
- try {
- opts.mkdirSync(path, opts)
- return made || path
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- try {
- if (!opts.statSync(path).isDirectory())
- throw er
- } catch (_) {
- throw er
- }
- }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b6980..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirAsync(path, opts)
-
- return findMade(opts, path).then(made =>
- opts.mkdirAsync(path, opts).then(() => made)
- .catch(er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(path, opts)
- else
- throw er
- }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirSync(path, opts)
-
- const made = findMadeSync(opts, path)
- try {
- opts.mkdirSync(path, opts)
- return made
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts)
- else
- throw er
- }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/opts-arg.js b/node_modules/cacache/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 2fa4833fa..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
- if (!opts)
- opts = { mode: 0o777, fs }
- else if (typeof opts === 'object')
- opts = { mode: 0o777, fs, ...opts }
- else if (typeof opts === 'number')
- opts = { mode: opts, fs }
- else if (typeof opts === 'string')
- opts = { mode: parseInt(opts, 8), fs }
- else
- throw new TypeError('invalid options argument')
-
- opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
- opts.mkdirAsync = promisify(opts.mkdir)
- opts.stat = opts.stat || opts.fs.stat || fs.stat
- opts.statAsync = promisify(opts.stat)
- opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
- opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
- return opts
-}
-module.exports = optsArg
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/path-arg.js b/node_modules/cacache/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5a6..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
- if (/\0/.test(path)) {
- // simulate same failure that node raises
- throw Object.assign(
- new TypeError('path must be a string without null bytes'),
- {
- path,
- code: 'ERR_INVALID_ARG_VALUE',
- }
- )
- }
-
- path = resolve(path)
- if (platform === 'win32') {
- const badWinChars = /[*|"<>?:]/
- const {root} = parse(path)
- if (badWinChars.test(path.substr(root.length))) {
- throw Object.assign(new Error('Illegal characters in path.'), {
- path,
- code: 'EINVAL',
- })
- }
- }
-
- return path
-}
-module.exports = pathArg
diff --git a/node_modules/cacache/node_modules/mkdirp/lib/use-native.js b/node_modules/cacache/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361de1..000000000
--- a/node_modules/cacache/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/cacache/node_modules/mkdirp/package.json b/node_modules/cacache/node_modules/mkdirp/package.json
deleted file mode 100644
index bb46a363b..000000000
--- a/node_modules/cacache/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "_from": "mkdirp@^1.0.3",
- "_id": "mkdirp@1.0.4",
- "_inBundle": false,
- "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "_location": "/cacache/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.3",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/cacache",
- "/cacache/tar"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
- "_spec": "mkdirp@^1.0.3",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.7"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.4"
-}
diff --git a/node_modules/cacache/node_modules/mkdirp/readme.markdown b/node_modules/cacache/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/cacache/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/cacache/node_modules/tar/CHANGELOG.md b/node_modules/cacache/node_modules/tar/CHANGELOG.md
deleted file mode 100644
index 7058fe253..000000000
--- a/node_modules/cacache/node_modules/tar/CHANGELOG.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Charge Long
-
-## 6.0
-
-- Drop support for node 6 and 8
-- fix symlinks and hardlinks on windows being packed with `\`-style path
- targets
-
-## 5.0
-
-- Address unpack race conditions using path reservations
-- Change large-numbers errors from TypeError to Error
-- Add `TAR_*` error codes
-- Raise `TAR_BAD_ARCHIVE` warning/error when there are no valid entries
- found in an archive
-- do not treat ignored entries as an invalid archive
-- drop support for node v4
-- unpack: conditionally use a file mapping to write files on Windows
-- Set more portable 'mode' value in portable mode
-- Set `portable` gzip option in portable mode
-
-## 4.4
-
-- Add 'mtime' option to tar creation to force mtime
-- unpack: only reuse file fs entries if nlink = 1
-- unpack: rename before unlinking files on Windows
-- Fix encoding/decoding of base-256 numbers
-- Use `stat` instead of `lstat` when checking CWD
-- Always provide a callback to fs.close()
-
-## 4.3
-
-- Add 'transform' unpack option
-
-## 4.2
-
-- Fail when zlib fails
-
-## 4.1
-
-- Add noMtime flag for tar creation
-
-## 4.0
-
-- unpack: raise error if cwd is missing or not a dir
-- pack: don't drop dots from dotfiles when prefixing
-
-## 3.1
-
-- Support `@file.tar` as an entry argument to copy entries from one tar
- file to another.
-- Add `noPax` option
-- `noResume` option for tar.t
-- win32: convert `>|<?:` chars to windows-friendly form
-- Exclude mtime for dirs in portable mode
-
-## 3.0
-
-- Minipass-based implementation
-- Entirely new API surface, `tar.c()`, `tar.x()` etc., much closer to
- system tar semantics
-- Massive performance improvement
-- Require node 4.x and higher
-
-## 0.x, 1.x, 2.x - 2011-2014
-
-- fstream-based implementation
-- slow and kinda bad, but better than npm shelling out to the system `tar`
diff --git a/node_modules/cacache/node_modules/tar/LICENSE b/node_modules/cacache/node_modules/tar/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/cacache/node_modules/tar/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/cacache/node_modules/tar/README.md b/node_modules/cacache/node_modules/tar/README.md
deleted file mode 100644
index 5e635e622..000000000
--- a/node_modules/cacache/node_modules/tar/README.md
+++ /dev/null
@@ -1,1031 +0,0 @@
-# node-tar
-
-[![Build Status](https://travis-ci.org/npm/node-tar.svg?branch=master)](https://travis-ci.org/npm/node-tar)
-
-[Fast](./benchmarks) and full-featured Tar for Node.js
-
-The API is designed to mimic the behavior of `tar(1)` on unix systems.
-If you are familiar with how tar works, most of this will hopefully be
-straightforward for you. If not, then hopefully this module can teach
-you useful unix skills that may come in handy someday :)
-
-## Background
-
-A "tar file" or "tarball" is an archive of file system entries
-(directories, files, links, etc.) The name comes from "tape archive".
-If you run `man tar` on almost any Unix command line, you'll learn
-quite a bit about what it can do, and its history.
-
-Tar has 5 main top-level commands:
-
-* `c` Create an archive
-* `r` Replace entries within an archive
-* `u` Update entries within an archive (ie, replace if they're newer)
-* `t` List out the contents of an archive
-* `x` Extract an archive to disk
-
-The other flags and options modify how this top level function works.
-
-## High-Level API
-
-These 5 functions are the high-level API. All of them have a
-single-character name (for unix nerds familiar with `tar(1)`) as well
-as a long name (for everyone else).
-
-All the high-level functions take the following arguments, all three
-of which are optional and may be omitted.
-
-1. `options` - An optional object specifying various options
-2. `paths` - An array of paths to add or extract
-3. `callback` - Called when the command is completed, if async. (If
- sync or no file specified, providing a callback throws a
- `TypeError`.)
-
-If the command is sync (ie, if `options.sync=true`), then the
-callback is not allowed, since the action will be completed immediately.
-
-If a `file` argument is specified, and the command is async, then a
-`Promise` is returned. In this case, if async, a callback may be
-provided which is called when the command is completed.
-
-If a `file` option is not specified, then a stream is returned. For
-`create`, this is a readable stream of the generated archive. For
-`list` and `extract` this is a writable stream that an archive should
-be written into. If a file is not specified, then a callback is not
-allowed, because you're already getting a stream to work with.
-
-`replace` and `update` only work on existing archives, and so require
-a `file` argument.
-
-Sync commands without a file argument return a stream that acts on its
-input immediately in the same tick. For readable streams, this means
-that all of the data is immediately available by calling
-`stream.read()`. For writable streams, it will be acted upon as soon
-as it is provided, but this can be at any time.
-
-### Warnings and Errors
-
-Tar emits warnings and errors for recoverable and unrecoverable situations,
-respectively. In many cases, a warning only affects a single entry in an
-archive, or is simply informing you that it's modifying an entry to comply
-with the settings provided.
-
-Unrecoverable warnings will always raise an error (ie, emit `'error'` on
-streaming actions, throw for non-streaming sync actions, reject the
-returned Promise for non-streaming async operations, or call a provided
-callback with an `Error` as the first argument). Recoverable errors will
-raise an error only if `strict: true` is set in the options.
-
-Respond to (recoverable) warnings by listening to the `warn` event.
-Handlers receive 3 arguments:
-
-- `code` String. One of the error codes below. This may not match
- `data.code`, which preserves the original error code from fs and zlib.
-- `message` String. More details about the error.
-- `data` Metadata about the error. An `Error` object for errors raised by
- fs and zlib. All fields are attached to errors raisd by tar. Typically
- contains the following fields, as relevant:
- - `tarCode` The tar error code.
- - `code` Either the tar error code, or the error code set by the
- underlying system.
- - `file` The archive file being read or written.
- - `cwd` Working directory for creation and extraction operations.
- - `entry` The entry object (if it could be created) for `TAR_ENTRY_INFO`,
- `TAR_ENTRY_INVALID`, and `TAR_ENTRY_ERROR` warnings.
- - `header` The header object (if it could be created, and the entry could
- not be created) for `TAR_ENTRY_INFO` and `TAR_ENTRY_INVALID` warnings.
- - `recoverable` Boolean. If `false`, then the warning will emit an
- `error`, even in non-strict mode.
-
-#### Error Codes
-
-* `TAR_ENTRY_INFO` An informative error indicating that an entry is being
- modified, but otherwise processed normally. For example, removing `/` or
- `C:\` from absolute paths if `preservePaths` is not set.
-
-* `TAR_ENTRY_INVALID` An indication that a given entry is not a valid tar
- archive entry, and will be skipped. This occurs when:
- - a checksum fails,
- - a `linkpath` is missing for a link type, or
- - a `linkpath` is provided for a non-link type.
-
- If every entry in a parsed archive raises an `TAR_ENTRY_INVALID` error,
- then the archive is presumed to be unrecoverably broken, and
- `TAR_BAD_ARCHIVE` will be raised.
-
-* `TAR_ENTRY_ERROR` The entry appears to be a valid tar archive entry, but
- encountered an error which prevented it from being unpacked. This occurs
- when:
- - an unrecoverable fs error happens during unpacking,
- - an entry has `..` in the path and `preservePaths` is not set, or
- - an entry is extracting through a symbolic link, when `preservePaths` is
- not set.
-
-* `TAR_ENTRY_UNSUPPORTED` An indication that a given entry is
- a valid archive entry, but of a type that is unsupported, and so will be
- skipped in archive creation or extracting.
-
-* `TAR_ABORT` When parsing gzipped-encoded archives, the parser will
- abort the parse process raise a warning for any zlib errors encountered.
- Aborts are considered unrecoverable for both parsing and unpacking.
-
-* `TAR_BAD_ARCHIVE` The archive file is totally hosed. This can happen for
- a number of reasons, and always occurs at the end of a parse or extract:
-
- - An entry body was truncated before seeing the full number of bytes.
- - The archive contained only invalid entries, indicating that it is
- likely not an archive, or at least, not an archive this library can
- parse.
-
- `TAR_BAD_ARCHIVE` is considered informative for parse operations, but
- unrecoverable for extraction. Note that, if encountered at the end of an
- extraction, tar WILL still have extracted as much it could from the
- archive, so there may be some garbage files to clean up.
-
-Errors that occur deeper in the system (ie, either the filesystem or zlib)
-will have their error codes left intact, and a `tarCode` matching one of
-the above will be added to the warning metadata or the raised error object.
-
-Errors generated by tar will have one of the above codes set as the
-`error.code` field as well, but since errors originating in zlib or fs will
-have their original codes, it's better to read `error.tarCode` if you wish
-to see how tar is handling the issue.
-
-### Examples
-
-The API mimics the `tar(1)` command line functionality, with aliases
-for more human-readable option and function names. The goal is that
-if you know how to use `tar(1)` in Unix, then you know how to use
-`require('tar')` in JavaScript.
-
-To replicate `tar czf my-tarball.tgz files and folders`, you'd do:
-
-```js
-tar.c(
- {
- gzip: <true|gzip options>,
- file: 'my-tarball.tgz'
- },
- ['some', 'files', 'and', 'folders']
-).then(_ => { .. tarball has been created .. })
-```
-
-To replicate `tar cz files and folders > my-tarball.tgz`, you'd do:
-
-```js
-tar.c( // or tar.create
- {
- gzip: <true|gzip options>
- },
- ['some', 'files', 'and', 'folders']
-).pipe(fs.createWriteStream('my-tarball.tgz'))
-```
-
-To replicate `tar xf my-tarball.tgz` you'd do:
-
-```js
-tar.x( // or tar.extract(
- {
- file: 'my-tarball.tgz'
- }
-).then(_=> { .. tarball has been dumped in cwd .. })
-```
-
-To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`:
-
-```js
-fs.createReadStream('my-tarball.tgz').pipe(
- tar.x({
- strip: 1,
- C: 'some-dir' // alias for cwd:'some-dir', also ok
- })
-)
-```
-
-To replicate `tar tf my-tarball.tgz`, do this:
-
-```js
-tar.t({
- file: 'my-tarball.tgz',
- onentry: entry => { .. do whatever with it .. }
-})
-```
-
-To replicate `cat my-tarball.tgz | tar t` do:
-
-```js
-fs.createReadStream('my-tarball.tgz')
- .pipe(tar.t())
- .on('entry', entry => { .. do whatever with it .. })
-```
-
-To do anything synchronous, add `sync: true` to the options. Note
-that sync functions don't take a callback and don't return a promise.
-When the function returns, it's already done. Sync methods without a
-file argument return a sync stream, which flushes immediately. But,
-of course, it still won't be done until you `.end()` it.
-
-To filter entries, add `filter: <function>` to the options.
-Tar-creating methods call the filter with `filter(path, stat)`.
-Tar-reading methods (including extraction) call the filter with
-`filter(path, entry)`. The filter is called in the `this`-context of
-the `Pack` or `Unpack` stream object.
-
-The arguments list to `tar t` and `tar x` specify a list of filenames
-to extract or list, so they're equivalent to a filter that tests if
-the file is in the list.
-
-For those who _aren't_ fans of tar's single-character command names:
-
-```
-tar.c === tar.create
-tar.r === tar.replace (appends to archive, file is required)
-tar.u === tar.update (appends if newer, file is required)
-tar.x === tar.extract
-tar.t === tar.list
-```
-
-Keep reading for all the command descriptions and options, as well as
-the low-level API that they are built on.
-
-### tar.c(options, fileList, callback) [alias: tar.create]
-
-Create a tarball archive.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Write the tarball archive to the specified filename. If this
- is specified, then the callback will be fired when the file has been
- written, and a promise will be returned that resolves when the file
- is written. If a filename is not specified, then a Readable Stream
- will be returned which will emit the file data. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`. If this is set,
- and a file is not provided, then the resulting stream will already
- have the data ready to `read` or `emit('data')` as soon as you
- request it.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `mode` The mode to set on the created file archive
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-
-The following options are mostly internal, but can be modified in some
-advanced use cases, such as re-using caches between runs.
-
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `readdirCache` A Map object that caches calls to `readdir`.
-- `jobs` A number specifying how many concurrent jobs to run.
- Defaults to 4.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-
-### tar.x(options, fileList, callback) [alias: tar.extract]
-
-Extract a tarball archive.
-
-The `fileList` is an array of paths to extract from the tarball. If
-no paths are provided, then all the entries are extracted.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Note that all directories that are created will be forced to be
-writable, readable, and listable by their owner, to avoid cases where
-a directory prevents extraction of child entries by virtue of its
-mode.
-
-Most extraction errors will cause a `warn` event to be emitted. If
-the `cwd` is missing, or not a directory, then the extraction will
-fail completely.
-
-The following options are supported:
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. If provided, this must exist and must be a
- directory. [Alias: `C`]
-- `file` The archive file to extract. If not specified, then a
- Writable stream is returned where the archive data should be
- written. [Alias: `f`]
-- `sync` Create files and directories synchronously.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being unpacked. Return `true` to unpack the entry from the
- archive, or `false` to skip it.
-- `newer` Set to true to keep the existing file on disk if it's newer
- than the file in the archive. [Alias: `keep-newer`,
- `keep-newer-files`]
-- `keep` Do not overwrite existing files. In particular, if a file
- appears more than once in an archive, later copies will not
- overwrite earlier copies. [Alias: `k`, `keep-existing`]
-- `preservePaths` Allow absolute paths, paths containing `..`, and
- extracting through symbolic links. By default, `/` is stripped from
- absolute paths, `..` paths are not extracted, and any file whose
- location would be modified by a symbolic link is not extracted.
- [Alias: `P`]
-- `unlink` Unlink files before creating them. Without this option,
- tar overwrites existing files, which preserves existing hardlinks.
- With this option, existing hardlinks will be broken, as will any
- symlink that would affect the location of an extracted file. [Alias:
- `U`]
-- `strip` Remove the specified number of leading path elements.
- Pathnames with fewer elements will be silently skipped. Note that
- the pathname is edited after applying the filter, but before
- security checks. [Alias: `strip-components`, `stripComponents`]
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `preserveOwner` If true, tar will set the `uid` and `gid` of
- extracted entries to the `uid` and `gid` fields in the archive.
- This defaults to true when run as root, and false otherwise. If
- false, then files and directories will be set with the owner and
- group of the user running the process. This is similar to `-p` in
- `tar(1)`, but ACLs and other system-specific data is never unpacked
- in this implementation, and modes are set by default already.
- [Alias: `p`]
-- `uid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified user id, regardless of the `uid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `gid` option.
-- `gid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified group id, regardless of the `gid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `uid` option.
-- `noMtime` Set to true to omit writing `mtime` value for extracted
- entries. [Alias: `m`, `no-mtime`]
-- `transform` Provide a function that takes an `entry` object, and
- returns a stream, or any falsey value. If a stream is provided,
- then that stream's data will be written instead of the contents of
- the archive entry. If a falsey value is provided, then the entry is
- written to disk as normal. (To exclude items from extraction, use
- the `filter` option described above.)
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-
-The following options are mostly internal, but can be modified in some
-advanced use cases, such as re-using caches between runs.
-
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `umask` Filter the modes of entries like `process.umask()`.
-- `dmode` Default mode for directories
-- `fmode` Default mode for files
-- `dirCache` A Map object of which directories exist.
-- `maxMetaEntrySize` The maximum size of meta entries that is
- supported. Defaults to 1 MB.
-
-Note that using an asynchronous stream type with the `transform`
-option will cause undefined behavior in sync extractions.
-[MiniPass](http://npm.im/minipass)-based streams are designed for this
-use case.
-
-### tar.t(options, fileList, callback) [alias: tar.list]
-
-List the contents of a tarball archive.
-
-The `fileList` is an array of paths to list from the tarball. If
-no paths are provided, then all the entries are listed.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Returns an event emitter that emits `entry` events with
-`tar.ReadEntry` objects. However, they don't emit `'data'` or `'end'`
-events. (If you want to get actual readable entries, use the
-`tar.Parse` class instead.)
-
-The following options are supported:
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. [Alias: `C`]
-- `file` The archive file to list. If not specified, then a
- Writable stream is returned where the archive data should be
- written. [Alias: `f`]
-- `sync` Read the specified file synchronously. (This has no effect
- when a file option isn't specified, because entries are emitted as
- fast as they are parsed from the stream anyway.)
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being listed. Return `true` to emit the entry from the
- archive, or `false` to skip it.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter. This is important for when both `file` and
- `sync` are set, because it will be called synchronously.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noResume` By default, `entry` streams are resumed immediately after
- the call to `onentry`. Set `noResume: true` to suppress this
- behavior. Note that by opting into this, the stream will never
- complete until the entry data is consumed.
-
-### tar.u(options, fileList, callback) [alias: tar.update]
-
-Add files to an archive if they are newer than the entry already in
-the tarball archive.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Required. Write the tarball archive to the specified
- filename. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for adding entries to the
- archive. Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-### tar.r(options, fileList, callback) [alias: tar.replace]
-
-Add files to an existing archive. Because later entries override
-earlier entries, this effectively replaces any existing entries.
-
-The `fileList` is an array of paths to add to the tarball. Adding a
-directory also adds its children recursively.
-
-An entry in `fileList` that starts with an `@` symbol is a tar archive
-whose entries will be added. To add a file that starts with `@`,
-prepend it with `./`.
-
-The following options are supported:
-
-- `file` Required. Write the tarball archive to the specified
- filename. [Alias: `f`]
-- `sync` Act synchronously. If this is set, then any provided file
- will be fully written after the call to `tar.c`.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for adding entries to the
- archive. Defaults to `process.cwd()`. [Alias: `C`]
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()` [Alias: `z`]
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths. [Alias: `P`]
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories. [Alias: `n`]
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such. [Alias: `L`, `h`]
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
- [Alias: `m`, `no-mtime`]
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-
-## Low-Level API
-
-### class tar.Pack
-
-A readable tar stream.
-
-Has all the standard readable stream interface stuff. `'data'` and
-`'end'` events, `read()` method, `pause()` and `resume()`, etc.
-
-#### constructor(options)
-
-The following options are supported:
-
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `prefix` A path portion to prefix onto the entries in the archive.
-- `gzip` Set to any truthy value to create a gzipped archive, or an
- object with settings for `zlib.Gzip()`
-- `filter` A function that gets called with `(path, stat)` for each
- entry being added. Return `true` to add the entry to the archive,
- or `false` to omit it.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `readdirCache` A Map object that caches calls to `readdir`.
-- `jobs` A number specifying how many concurrent jobs to run.
- Defaults to 4.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 16 MB.
-- `noDirRecurse` Do not recursively archive the contents of
- directories.
-- `follow` Set to true to pack the targets of symbolic links. Without
- this option, symbolic links are archived as such.
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-- `mtime` Set to a `Date` object to force a specific `mtime` for
- everything added to the archive. Overridden by `noMtime`.
-
-#### add(path)
-
-Adds an entry to the archive. Returns the Pack stream.
-
-#### write(path)
-
-Adds an entry to the archive. Returns true if flushed.
-
-#### end()
-
-Finishes the archive.
-
-### class tar.Pack.Sync
-
-Synchronous version of `tar.Pack`.
-
-### class tar.Unpack
-
-A writable stream that unpacks a tar archive onto the file system.
-
-All the normal writable stream stuff is supported. `write()` and
-`end()` methods, `'drain'` events, etc.
-
-Note that all directories that are created will be forced to be
-writable, readable, and listable by their owner, to avoid cases where
-a directory prevents extraction of child entries by virtue of its
-mode.
-
-`'close'` is emitted when it's done writing stuff to the file system.
-
-Most unpack errors will cause a `warn` event to be emitted. If the
-`cwd` is missing, or not a directory, then an error will be emitted.
-
-#### constructor(options)
-
-- `cwd` Extract files relative to the specified directory. Defaults
- to `process.cwd()`. If provided, this must exist and must be a
- directory.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being unpacked. Return `true` to unpack the entry from the
- archive, or `false` to skip it.
-- `newer` Set to true to keep the existing file on disk if it's newer
- than the file in the archive.
-- `keep` Do not overwrite existing files. In particular, if a file
- appears more than once in an archive, later copies will not
- overwrite earlier copies.
-- `preservePaths` Allow absolute paths, paths containing `..`, and
- extracting through symbolic links. By default, `/` is stripped from
- absolute paths, `..` paths are not extracted, and any file whose
- location would be modified by a symbolic link is not extracted.
-- `unlink` Unlink files before creating them. Without this option,
- tar overwrites existing files, which preserves existing hardlinks.
- With this option, existing hardlinks will be broken, as will any
- symlink that would affect the location of an extracted file.
-- `strip` Remove the specified number of leading path elements.
- Pathnames with fewer elements will be silently skipped. Note that
- the pathname is edited after applying the filter, but before
- security checks.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `umask` Filter the modes of entries like `process.umask()`.
-- `dmode` Default mode for directories
-- `fmode` Default mode for files
-- `dirCache` A Map object of which directories exist.
-- `maxMetaEntrySize` The maximum size of meta entries that is
- supported. Defaults to 1 MB.
-- `preserveOwner` If true, tar will set the `uid` and `gid` of
- extracted entries to the `uid` and `gid` fields in the archive.
- This defaults to true when run as root, and false otherwise. If
- false, then files and directories will be set with the owner and
- group of the user running the process. This is similar to `-p` in
- `tar(1)`, but ACLs and other system-specific data is never unpacked
- in this implementation, and modes are set by default already.
-- `win32` True if on a windows platform. Causes behavior where
- filenames containing `<|>?` chars are converted to
- windows-compatible values while being unpacked.
-- `uid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified user id, regardless of the `uid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `gid` option.
-- `gid` Set to a number to force ownership of all extracted files and
- folders, and all implicitly created directories, to be owned by the
- specified group id, regardless of the `gid` field in the archive.
- Cannot be used along with `preserveOwner`. Requires also setting a
- `uid` option.
-- `noMtime` Set to true to omit writing `mtime` value for extracted
- entries.
-- `transform` Provide a function that takes an `entry` object, and
- returns a stream, or any falsey value. If a stream is provided,
- then that stream's data will be written instead of the contents of
- the archive entry. If a falsey value is provided, then the entry is
- written to disk as normal. (To exclude items from extraction, use
- the `filter` option described above.)
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-
-### class tar.Unpack.Sync
-
-Synchronous version of `tar.Unpack`.
-
-Note that using an asynchronous stream type with the `transform`
-option will cause undefined behavior in sync unpack streams.
-[MiniPass](http://npm.im/minipass)-based streams are designed for this
-use case.
-
-### class tar.Parse
-
-A writable stream that parses a tar archive stream. All the standard
-writable stream stuff is supported.
-
-If the archive is gzipped, then tar will detect this and unzip it.
-
-Emits `'entry'` events with `tar.ReadEntry` objects, which are
-themselves readable streams that you can pipe wherever.
-
-Each `entry` will not emit until the one before it is flushed through,
-so make sure to either consume the data (with `on('data', ...)` or
-`.pipe(...)`) or throw it away with `.resume()` to keep the stream
-flowing.
-
-#### constructor(options)
-
-Returns an event emitter that emits `entry` events with
-`tar.ReadEntry` objects.
-
-The following options are supported:
-
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `filter` A function that gets called with `(path, entry)` for each
- entry being listed. Return `true` to emit the entry from the
- archive, or `false` to skip it.
-- `onentry` A function that gets called with `(entry)` for each entry
- that passes the filter.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-
-#### abort(error)
-
-Stop all parsing activities. This is called when there are zlib
-errors. It also emits an unrecoverable warning with the error provided.
-
-### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass)
-
-A representation of an entry that is being read out of a tar archive.
-
-It has the following fields:
-
-- `extended` The extended metadata object provided to the constructor.
-- `globalExtended` The global extended metadata object provided to the
- constructor.
-- `remain` The number of bytes remaining to be written into the
- stream.
-- `blockRemain` The number of 512-byte blocks remaining to be written
- into the stream.
-- `ignore` Whether this entry should be ignored.
-- `meta` True if this represents metadata about the next entry, false
- if it represents a filesystem object.
-- All the fields from the header, extended header, and global extended
- header are added to the ReadEntry object. So it has `path`, `type`,
- `size, `mode`, and so on.
-
-#### constructor(header, extended, globalExtended)
-
-Create a new ReadEntry object with the specified header, extended
-header, and global extended header values.
-
-### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass)
-
-A representation of an entry that is being written from the file
-system into a tar archive.
-
-Emits data for the Header, and for the Pax Extended Header if one is
-required, as well as any body data.
-
-Creating a WriteEntry for a directory does not also create
-WriteEntry objects for all of the directory contents.
-
-It has the following fields:
-
-- `path` The path field that will be written to the archive. By
- default, this is also the path from the cwd to the file system
- object.
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `myuid` If supported, the uid of the user running the current
- process.
-- `myuser` The `env.USER` string if set, or `''`. Set as the entry
- `uname` field if the file's `uid` matches `this.myuid`.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 1 MB.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `absolute` The absolute path to the entry on the filesystem. By
- default, this is `path.resolve(this.cwd, this.path)`, but it can be
- overridden explicitly.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `win32` True if on a windows platform. Causes behavior where paths
- replace `\` with `/` and filenames containing the windows-compatible
- forms of `<|>?:` characters are converted to actual `<|>?:` characters
- in the archive.
-- `noPax` Suppress pax extended headers. Note that this means that
- long paths and linkpaths will be truncated, and large or negative
- numeric values may be interpreted incorrectly.
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-
-
-#### constructor(path, options)
-
-`path` is the path of the entry as it is written in the archive.
-
-The following options are supported:
-
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `maxReadSize` The maximum buffer size for `fs.read()` operations.
- Defaults to 1 MB.
-- `linkCache` A Map object containing the device and inode value for
- any file whose nlink is > 1, to identify hard links.
-- `statCache` A Map object that caches calls `lstat`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `cwd` The current working directory for creating the archive.
- Defaults to `process.cwd()`.
-- `absolute` The absolute path to the entry on the filesystem. By
- default, this is `path.resolve(this.cwd, this.path)`, but it can be
- overridden explicitly.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `win32` True if on a windows platform. Causes behavior where paths
- replace `\` with `/`.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-- `umask` Set to restrict the modes on the entries in the archive,
- somewhat like how umask works on file creation. Defaults to
- `process.umask()` on unix systems, or `0o22` on Windows.
-
-#### warn(message, data)
-
-If strict, emit an error with the provided message.
-
-Othewise, emit a `'warn'` event with the provided message and data.
-
-### class tar.WriteEntry.Sync
-
-Synchronous version of tar.WriteEntry
-
-### class tar.WriteEntry.Tar
-
-A version of tar.WriteEntry that gets its data from a tar.ReadEntry
-instead of from the filesystem.
-
-#### constructor(readEntry, options)
-
-`readEntry` is the entry being read out of another archive.
-
-The following options are supported:
-
-- `portable` Omit metadata that is system-specific: `ctime`, `atime`,
- `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note
- that `mtime` is still included, because this is necessary for other
- time-based operations. Additionally, `mode` is set to a "reasonable
- default" for most unix systems, based on a `umask` value of `0o22`.
-- `preservePaths` Allow absolute paths. By default, `/` is stripped
- from absolute paths.
-- `strict` Treat warnings as crash-worthy errors. Default false.
-- `onwarn` A function that will get called with `(code, message, data)` for
- any warnings encountered. (See "Warnings and Errors")
-- `noMtime` Set to true to omit writing `mtime` values for entries.
- Note that this prevents using other mtime-based features like
- `tar.update` or the `keepNewer` option with the resulting tar archive.
-
-### class tar.Header
-
-A class for reading and writing header blocks.
-
-It has the following fields:
-
-- `nullBlock` True if decoding a block which is entirely composed of
- `0x00` null bytes. (Useful because tar files are terminated by
- at least 2 null blocks.)
-- `cksumValid` True if the checksum in the header is valid, false
- otherwise.
-- `needPax` True if the values, as encoded, will require a Pax
- extended header.
-- `path` The path of the entry.
-- `mode` The 4 lowest-order octal digits of the file mode. That is,
- read/write/execute permissions for world, group, and owner, and the
- setuid, setgid, and sticky bits.
-- `uid` Numeric user id of the file owner
-- `gid` Numeric group id of the file owner
-- `size` Size of the file in bytes
-- `mtime` Modified time of the file
-- `cksum` The checksum of the header. This is generated by adding all
- the bytes of the header block, treating the checksum field itself as
- all ascii space characters (that is, `0x20`).
-- `type` The human-readable name of the type of entry this represents,
- or the alphanumeric key if unknown.
-- `typeKey` The alphanumeric key for the type of entry this header
- represents.
-- `linkpath` The target of Link and SymbolicLink entries.
-- `uname` Human-readable user name of the file owner
-- `gname` Human-readable group name of the file owner
-- `devmaj` The major portion of the device number. Always `0` for
- files, directories, and links.
-- `devmin` The minor portion of the device number. Always `0` for
- files, directories, and links.
-- `atime` File access time.
-- `ctime` File change time.
-
-#### constructor(data, [offset=0])
-
-`data` is optional. It is either a Buffer that should be interpreted
-as a tar Header starting at the specified offset and continuing for
-512 bytes, or a data object of keys and values to set on the header
-object, and eventually encode as a tar Header.
-
-#### decode(block, offset)
-
-Decode the provided buffer starting at the specified offset.
-
-Buffer length must be greater than 512 bytes.
-
-#### set(data)
-
-Set the fields in the data object.
-
-#### encode(buffer, offset)
-
-Encode the header fields into the buffer at the specified offset.
-
-Returns `this.needPax` to indicate whether a Pax Extended Header is
-required to properly encode the specified data.
-
-### class tar.Pax
-
-An object representing a set of key-value pairs in an Pax extended
-header entry.
-
-It has the following fields. Where the same name is used, they have
-the same semantics as the tar.Header field of the same name.
-
-- `global` True if this represents a global extended header, or false
- if it is for a single entry.
-- `atime`
-- `charset`
-- `comment`
-- `ctime`
-- `gid`
-- `gname`
-- `linkpath`
-- `mtime`
-- `path`
-- `size`
-- `uid`
-- `uname`
-- `dev`
-- `ino`
-- `nlink`
-
-#### constructor(object, global)
-
-Set the fields set in the object. `global` is a boolean that defaults
-to false.
-
-#### encode()
-
-Return a Buffer containing the header and body for the Pax extended
-header entry, or `null` if there is nothing to encode.
-
-#### encodeBody()
-
-Return a string representing the body of the pax extended header
-entry.
-
-#### encodeField(fieldName)
-
-Return a string representing the key/value encoding for the specified
-fieldName, or `''` if the field is unset.
-
-### tar.Pax.parse(string, extended, global)
-
-Return a new Pax object created by parsing the contents of the string
-provided.
-
-If the `extended` object is set, then also add the fields from that
-object. (This is necessary because multiple metadata entries can
-occur in sequence.)
-
-### tar.types
-
-A translation table for the `type` field in tar headers.
-
-#### tar.types.name.get(code)
-
-Get the human-readable name for a given alphanumeric code.
-
-#### tar.types.code.get(name)
-
-Get the alphanumeric code for a given human-readable name.
diff --git a/node_modules/cacache/node_modules/tar/index.js b/node_modules/cacache/node_modules/tar/index.js
deleted file mode 100644
index c9ae06e79..000000000
--- a/node_modules/cacache/node_modules/tar/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'use strict'
-
-// high-level commands
-exports.c = exports.create = require('./lib/create.js')
-exports.r = exports.replace = require('./lib/replace.js')
-exports.t = exports.list = require('./lib/list.js')
-exports.u = exports.update = require('./lib/update.js')
-exports.x = exports.extract = require('./lib/extract.js')
-
-// classes
-exports.Pack = require('./lib/pack.js')
-exports.Unpack = require('./lib/unpack.js')
-exports.Parse = require('./lib/parse.js')
-exports.ReadEntry = require('./lib/read-entry.js')
-exports.WriteEntry = require('./lib/write-entry.js')
-exports.Header = require('./lib/header.js')
-exports.Pax = require('./lib/pax.js')
-exports.types = require('./lib/types.js')
diff --git a/node_modules/cacache/node_modules/tar/lib/create.js b/node_modules/cacache/node_modules/tar/lib/create.js
deleted file mode 100644
index a37aa52e6..000000000
--- a/node_modules/cacache/node_modules/tar/lib/create.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-// tar -c
-const hlo = require('./high-level-opt.js')
-
-const Pack = require('./pack.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const t = require('./list.js')
-const path = require('path')
-
-const c = module.exports = (opt_, files, cb) => {
- if (typeof files === 'function')
- cb = files
-
- if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- return opt.file && opt.sync ? createFileSync(opt, files)
- : opt.file ? createFile(opt, files, cb)
- : opt.sync ? createSync(opt, files)
- : create(opt, files)
-}
-
-const createFileSync = (opt, files) => {
- const p = new Pack.Sync(opt)
- const stream = new fsm.WriteStreamSync(opt.file, {
- mode: opt.mode || 0o666
- })
- p.pipe(stream)
- addFilesSync(p, files)
-}
-
-const createFile = (opt, files, cb) => {
- const p = new Pack(opt)
- const stream = new fsm.WriteStream(opt.file, {
- mode: opt.mode || 0o666
- })
- p.pipe(stream)
-
- const promise = new Promise((res, rej) => {
- stream.on('error', rej)
- stream.on('close', res)
- p.on('error', rej)
- })
-
- addFilesAsync(p, files)
-
- return cb ? promise.then(cb, cb) : promise
-}
-
-const addFilesSync = (p, files) => {
- files.forEach(file => {
- if (file.charAt(0) === '@')
- t({
- file: path.resolve(p.cwd, file.substr(1)),
- sync: true,
- noResume: true,
- onentry: entry => p.add(entry)
- })
- else
- p.add(file)
- })
- p.end()
-}
-
-const addFilesAsync = (p, files) => {
- while (files.length) {
- const file = files.shift()
- if (file.charAt(0) === '@')
- return t({
- file: path.resolve(p.cwd, file.substr(1)),
- noResume: true,
- onentry: entry => p.add(entry)
- }).then(_ => addFilesAsync(p, files))
- else
- p.add(file)
- }
- p.end()
-}
-
-const createSync = (opt, files) => {
- const p = new Pack.Sync(opt)
- addFilesSync(p, files)
- return p
-}
-
-const create = (opt, files) => {
- const p = new Pack(opt)
- addFilesAsync(p, files)
- return p
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/extract.js b/node_modules/cacache/node_modules/tar/lib/extract.js
deleted file mode 100644
index cbb458a0a..000000000
--- a/node_modules/cacache/node_modules/tar/lib/extract.js
+++ /dev/null
@@ -1,112 +0,0 @@
-'use strict'
-
-// tar -x
-const hlo = require('./high-level-opt.js')
-const Unpack = require('./unpack.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-
-const x = module.exports = (opt_, files, cb) => {
- if (typeof opt_ === 'function')
- cb = opt_, files = null, opt_ = {}
- else if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (typeof files === 'function')
- cb = files, files = null
-
- if (!files)
- files = []
- else
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- if (files.length)
- filesFilter(opt, files)
-
- return opt.file && opt.sync ? extractFileSync(opt)
- : opt.file ? extractFile(opt, cb)
- : opt.sync ? extractSync(opt)
- : extract(opt)
-}
-
-// construct a filter that limits the file entries listed
-// include child entries if a dir is included
-const filesFilter = (opt, files) => {
- const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
- const filter = opt.filter
-
- const mapHas = (file, r) => {
- const root = r || path.parse(file).root || '.'
- const ret = file === root ? false
- : map.has(file) ? map.get(file)
- : mapHas(path.dirname(file), root)
-
- map.set(file, ret)
- return ret
- }
-
- opt.filter = filter
- ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
- : file => mapHas(file.replace(/\/+$/, ''))
-}
-
-const extractFileSync = opt => {
- const u = new Unpack.Sync(opt)
-
- const file = opt.file
- let threw = true
- let fd
- const stat = fs.statSync(file)
- // This trades a zero-byte read() syscall for a stat
- // However, it will usually result in less memory allocation
- const readSize = opt.maxReadSize || 16*1024*1024
- const stream = new fsm.ReadStreamSync(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.pipe(u)
-}
-
-const extractFile = (opt, cb) => {
- const u = new Unpack(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
-
- const file = opt.file
- const p = new Promise((resolve, reject) => {
- u.on('error', reject)
- u.on('close', resolve)
-
- // This trades a zero-byte read() syscall for a stat
- // However, it will usually result in less memory allocation
- fs.stat(file, (er, stat) => {
- if (er)
- reject(er)
- else {
- const stream = new fsm.ReadStream(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.on('error', reject)
- stream.pipe(u)
- }
- })
- })
- return cb ? p.then(cb, cb) : p
-}
-
-const extractSync = opt => {
- return new Unpack.Sync(opt)
-}
-
-const extract = opt => {
- return new Unpack(opt)
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/get-write-flag.js b/node_modules/cacache/node_modules/tar/lib/get-write-flag.js
deleted file mode 100644
index e86959996..000000000
--- a/node_modules/cacache/node_modules/tar/lib/get-write-flag.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Get the appropriate flag to use for creating files
-// We use fmap on Windows platforms for files less than
-// 512kb. This is a fairly low limit, but avoids making
-// things slower in some cases. Since most of what this
-// library is used for is extracting tarballs of many
-// relatively small files in npm packages and the like,
-// it can be a big boost on Windows platforms.
-// Only supported in Node v12.9.0 and above.
-const platform = process.env.__FAKE_PLATFORM__ || process.platform
-const isWindows = platform === 'win32'
-const fs = global.__FAKE_TESTING_FS__ || require('fs')
-
-/* istanbul ignore next */
-const { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs.constants
-
-const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP
-const fMapLimit = 512 * 1024
-const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY
-module.exports = !fMapEnabled ? () => 'w'
- : size => size < fMapLimit ? fMapFlag : 'w'
diff --git a/node_modules/cacache/node_modules/tar/lib/header.js b/node_modules/cacache/node_modules/tar/lib/header.js
deleted file mode 100644
index 5d88f6cf8..000000000
--- a/node_modules/cacache/node_modules/tar/lib/header.js
+++ /dev/null
@@ -1,288 +0,0 @@
-'use strict'
-// parse a 512-byte header block to a data object, or vice-versa
-// encode returns `true` if a pax extended header is needed, because
-// the data could not be faithfully encoded in a simple header.
-// (Also, check header.needPax to see if it needs a pax header.)
-
-const types = require('./types.js')
-const pathModule = require('path').posix
-const large = require('./large-numbers.js')
-
-const SLURP = Symbol('slurp')
-const TYPE = Symbol('type')
-
-class Header {
- constructor (data, off, ex, gex) {
- this.cksumValid = false
- this.needPax = false
- this.nullBlock = false
-
- this.block = null
- this.path = null
- this.mode = null
- this.uid = null
- this.gid = null
- this.size = null
- this.mtime = null
- this.cksum = null
- this[TYPE] = '0'
- this.linkpath = null
- this.uname = null
- this.gname = null
- this.devmaj = 0
- this.devmin = 0
- this.atime = null
- this.ctime = null
-
- if (Buffer.isBuffer(data))
- this.decode(data, off || 0, ex, gex)
- else if (data)
- this.set(data)
- }
-
- decode (buf, off, ex, gex) {
- if (!off)
- off = 0
-
- if (!buf || !(buf.length >= off + 512))
- throw new Error('need 512 bytes for header')
-
- this.path = decString(buf, off, 100)
- this.mode = decNumber(buf, off + 100, 8)
- this.uid = decNumber(buf, off + 108, 8)
- this.gid = decNumber(buf, off + 116, 8)
- this.size = decNumber(buf, off + 124, 12)
- this.mtime = decDate(buf, off + 136, 12)
- this.cksum = decNumber(buf, off + 148, 12)
-
- // if we have extended or global extended headers, apply them now
- // See https://github.com/npm/node-tar/pull/187
- this[SLURP](ex)
- this[SLURP](gex, true)
-
- // old tar versions marked dirs as a file with a trailing /
- this[TYPE] = decString(buf, off + 156, 1)
- if (this[TYPE] === '')
- this[TYPE] = '0'
- if (this[TYPE] === '0' && this.path.substr(-1) === '/')
- this[TYPE] = '5'
-
- // tar implementations sometimes incorrectly put the stat(dir).size
- // as the size in the tarball, even though Directory entries are
- // not able to have any body at all. In the very rare chance that
- // it actually DOES have a body, we weren't going to do anything with
- // it anyway, and it'll just be a warning about an invalid header.
- if (this[TYPE] === '5')
- this.size = 0
-
- this.linkpath = decString(buf, off + 157, 100)
- if (buf.slice(off + 257, off + 265).toString() === 'ustar\u000000') {
- this.uname = decString(buf, off + 265, 32)
- this.gname = decString(buf, off + 297, 32)
- this.devmaj = decNumber(buf, off + 329, 8)
- this.devmin = decNumber(buf, off + 337, 8)
- if (buf[off + 475] !== 0) {
- // definitely a prefix, definitely >130 chars.
- const prefix = decString(buf, off + 345, 155)
- this.path = prefix + '/' + this.path
- } else {
- const prefix = decString(buf, off + 345, 130)
- if (prefix)
- this.path = prefix + '/' + this.path
- this.atime = decDate(buf, off + 476, 12)
- this.ctime = decDate(buf, off + 488, 12)
- }
- }
-
- let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
- sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
- sum += buf[i]
- }
- this.cksumValid = sum === this.cksum
- if (this.cksum === null && sum === 8 * 0x20)
- this.nullBlock = true
- }
-
- [SLURP] (ex, global) {
- for (let k in ex) {
- // we slurp in everything except for the path attribute in
- // a global extended header, because that's weird.
- if (ex[k] !== null && ex[k] !== undefined &&
- !(global && k === 'path'))
- this[k] = ex[k]
- }
- }
-
- encode (buf, off) {
- if (!buf) {
- buf = this.block = Buffer.alloc(512)
- off = 0
- }
-
- if (!off)
- off = 0
-
- if (!(buf.length >= off + 512))
- throw new Error('need 512 bytes for header')
-
- const prefixSize = this.ctime || this.atime ? 130 : 155
- const split = splitPrefix(this.path || '', prefixSize)
- const path = split[0]
- const prefix = split[1]
- this.needPax = split[2]
-
- this.needPax = encString(buf, off, 100, path) || this.needPax
- this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax
- this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax
- this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax
- this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax
- this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax
- buf[off + 156] = this[TYPE].charCodeAt(0)
- this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax
- buf.write('ustar\u000000', off + 257, 8)
- this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax
- this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax
- this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax
- this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax
- this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax
- if (buf[off + 475] !== 0)
- this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax
- else {
- this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax
- this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax
- this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax
- }
-
- let sum = 8 * 0x20
- for (let i = off; i < off + 148; i++) {
- sum += buf[i]
- }
- for (let i = off + 156; i < off + 512; i++) {
- sum += buf[i]
- }
- this.cksum = sum
- encNumber(buf, off + 148, 8, this.cksum)
- this.cksumValid = true
-
- return this.needPax
- }
-
- set (data) {
- for (let i in data) {
- if (data[i] !== null && data[i] !== undefined)
- this[i] = data[i]
- }
- }
-
- get type () {
- return types.name.get(this[TYPE]) || this[TYPE]
- }
-
- get typeKey () {
- return this[TYPE]
- }
-
- set type (type) {
- if (types.code.has(type))
- this[TYPE] = types.code.get(type)
- else
- this[TYPE] = type
- }
-}
-
-const splitPrefix = (p, prefixSize) => {
- const pathSize = 100
- let pp = p
- let prefix = ''
- let ret
- const root = pathModule.parse(p).root || '.'
-
- if (Buffer.byteLength(pp) < pathSize)
- ret = [pp, prefix, false]
- else {
- // first set prefix to the dir, and path to the base
- prefix = pathModule.dirname(pp)
- pp = pathModule.basename(pp)
-
- do {
- // both fit!
- if (Buffer.byteLength(pp) <= pathSize &&
- Buffer.byteLength(prefix) <= prefixSize)
- ret = [pp, prefix, false]
-
- // prefix fits in prefix, but path doesn't fit in path
- else if (Buffer.byteLength(pp) > pathSize &&
- Buffer.byteLength(prefix) <= prefixSize)
- ret = [pp.substr(0, pathSize - 1), prefix, true]
-
- else {
- // make path take a bit from prefix
- pp = pathModule.join(pathModule.basename(prefix), pp)
- prefix = pathModule.dirname(prefix)
- }
- } while (prefix !== root && !ret)
-
- // at this point, found no resolution, just truncate
- if (!ret)
- ret = [p.substr(0, pathSize - 1), '', true]
- }
- return ret
-}
-
-const decString = (buf, off, size) =>
- buf.slice(off, off + size).toString('utf8').replace(/\0.*/, '')
-
-const decDate = (buf, off, size) =>
- numToDate(decNumber(buf, off, size))
-
-const numToDate = num => num === null ? null : new Date(num * 1000)
-
-const decNumber = (buf, off, size) =>
- buf[off] & 0x80 ? large.parse(buf.slice(off, off + size))
- : decSmallNumber(buf, off, size)
-
-const nanNull = value => isNaN(value) ? null : value
-
-const decSmallNumber = (buf, off, size) =>
- nanNull(parseInt(
- buf.slice(off, off + size)
- .toString('utf8').replace(/\0.*$/, '').trim(), 8))
-
-// the maximum encodable as a null-terminated octal, by field size
-const MAXNUM = {
- 12: 0o77777777777,
- 8 : 0o7777777
-}
-
-const encNumber = (buf, off, size, number) =>
- number === null ? false :
- number > MAXNUM[size] || number < 0
- ? (large.encode(number, buf.slice(off, off + size)), true)
- : (encSmallNumber(buf, off, size, number), false)
-
-const encSmallNumber = (buf, off, size, number) =>
- buf.write(octalString(number, size), off, size, 'ascii')
-
-const octalString = (number, size) =>
- padOctal(Math.floor(number).toString(8), size)
-
-const padOctal = (string, size) =>
- (string.length === size - 1 ? string
- : new Array(size - string.length - 1).join('0') + string + ' ') + '\0'
-
-const encDate = (buf, off, size, date) =>
- date === null ? false :
- encNumber(buf, off, size, date.getTime() / 1000)
-
-// enough to fill the longest string we've got
-const NULLS = new Array(156).join('\0')
-// pad with nulls, return true if it's longer or non-ascii
-const encString = (buf, off, size, string) =>
- string === null ? false :
- (buf.write(string + NULLS, off, size, 'utf8'),
- string.length !== Buffer.byteLength(string) || string.length > size)
-
-module.exports = Header
diff --git a/node_modules/cacache/node_modules/tar/lib/high-level-opt.js b/node_modules/cacache/node_modules/tar/lib/high-level-opt.js
deleted file mode 100644
index 7333db915..000000000
--- a/node_modules/cacache/node_modules/tar/lib/high-level-opt.js
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict'
-
-// turn tar(1) style args like `C` into the more verbose things like `cwd`
-
-const argmap = new Map([
- ['C', 'cwd'],
- ['f', 'file'],
- ['z', 'gzip'],
- ['P', 'preservePaths'],
- ['U', 'unlink'],
- ['strip-components', 'strip'],
- ['stripComponents', 'strip'],
- ['keep-newer', 'newer'],
- ['keepNewer', 'newer'],
- ['keep-newer-files', 'newer'],
- ['keepNewerFiles', 'newer'],
- ['k', 'keep'],
- ['keep-existing', 'keep'],
- ['keepExisting', 'keep'],
- ['m', 'noMtime'],
- ['no-mtime', 'noMtime'],
- ['p', 'preserveOwner'],
- ['L', 'follow'],
- ['h', 'follow']
-])
-
-const parse = module.exports = opt => opt ? Object.keys(opt).map(k => [
- argmap.has(k) ? argmap.get(k) : k, opt[k]
-]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {}
diff --git a/node_modules/cacache/node_modules/tar/lib/large-numbers.js b/node_modules/cacache/node_modules/tar/lib/large-numbers.js
deleted file mode 100644
index ad30bc350..000000000
--- a/node_modules/cacache/node_modules/tar/lib/large-numbers.js
+++ /dev/null
@@ -1,97 +0,0 @@
-'use strict'
-// Tar can encode large and negative numbers using a leading byte of
-// 0xff for negative, and 0x80 for positive.
-
-const encode = exports.encode = (num, buf) => {
- if (!Number.isSafeInteger(num))
- // The number is so large that javascript cannot represent it with integer
- // precision.
- throw Error('cannot encode number outside of javascript safe integer range')
- else if (num < 0)
- encodeNegative(num, buf)
- else
- encodePositive(num, buf)
- return buf
-}
-
-const encodePositive = (num, buf) => {
- buf[0] = 0x80
-
- for (var i = buf.length; i > 1; i--) {
- buf[i-1] = num & 0xff
- num = Math.floor(num / 0x100)
- }
-}
-
-const encodeNegative = (num, buf) => {
- buf[0] = 0xff
- var flipped = false
- num = num * -1
- for (var i = buf.length; i > 1; i--) {
- var byte = num & 0xff
- num = Math.floor(num / 0x100)
- if (flipped)
- buf[i-1] = onesComp(byte)
- else if (byte === 0)
- buf[i-1] = 0
- else {
- flipped = true
- buf[i-1] = twosComp(byte)
- }
- }
-}
-
-const parse = exports.parse = (buf) => {
- var post = buf[buf.length - 1]
- var pre = buf[0]
- var value;
- if (pre === 0x80)
- value = pos(buf.slice(1, buf.length))
- else if (pre === 0xff)
- value = twos(buf)
- else
- throw Error('invalid base256 encoding')
-
- if (!Number.isSafeInteger(value))
- // The number is so large that javascript cannot represent it with integer
- // precision.
- throw Error('parsed number outside of javascript safe integer range')
-
- return value
-}
-
-const twos = (buf) => {
- var len = buf.length
- var sum = 0
- var flipped = false
- for (var i = len - 1; i > -1; i--) {
- var byte = buf[i]
- var f
- if (flipped)
- f = onesComp(byte)
- else if (byte === 0)
- f = byte
- else {
- flipped = true
- f = twosComp(byte)
- }
- if (f !== 0)
- sum -= f * Math.pow(256, len - i - 1)
- }
- return sum
-}
-
-const pos = (buf) => {
- var len = buf.length
- var sum = 0
- for (var i = len - 1; i > -1; i--) {
- var byte = buf[i]
- if (byte !== 0)
- sum += byte * Math.pow(256, len - i - 1)
- }
- return sum
-}
-
-const onesComp = byte => (0xff ^ byte) & 0xff
-
-const twosComp = byte => ((0xff ^ byte) + 1) & 0xff
diff --git a/node_modules/cacache/node_modules/tar/lib/list.js b/node_modules/cacache/node_modules/tar/lib/list.js
deleted file mode 100644
index 9da3f812c..000000000
--- a/node_modules/cacache/node_modules/tar/lib/list.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict'
-
-// XXX: This shares a lot in common with extract.js
-// maybe some DRY opportunity here?
-
-// tar -t
-const hlo = require('./high-level-opt.js')
-const Parser = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-
-const t = module.exports = (opt_, files, cb) => {
- if (typeof opt_ === 'function')
- cb = opt_, files = null, opt_ = {}
- else if (Array.isArray(opt_))
- files = opt_, opt_ = {}
-
- if (typeof files === 'function')
- cb = files, files = null
-
- if (!files)
- files = []
- else
- files = Array.from(files)
-
- const opt = hlo(opt_)
-
- if (opt.sync && typeof cb === 'function')
- throw new TypeError('callback not supported for sync tar functions')
-
- if (!opt.file && typeof cb === 'function')
- throw new TypeError('callback only supported with file option')
-
- if (files.length)
- filesFilter(opt, files)
-
- if (!opt.noResume)
- onentryFunction(opt)
-
- return opt.file && opt.sync ? listFileSync(opt)
- : opt.file ? listFile(opt, cb)
- : list(opt)
-}
-
-const onentryFunction = opt => {
- const onentry = opt.onentry
- opt.onentry = onentry ? e => {
- onentry(e)
- e.resume()
- } : e => e.resume()
-}
-
-// construct a filter that limits the file entries listed
-// include child entries if a dir is included
-const filesFilter = (opt, files) => {
- const map = new Map(files.map(f => [f.replace(/\/+$/, ''), true]))
- const filter = opt.filter
-
- const mapHas = (file, r) => {
- const root = r || path.parse(file).root || '.'
- const ret = file === root ? false
- : map.has(file) ? map.get(file)
- : mapHas(path.dirname(file), root)
-
- map.set(file, ret)
- return ret
- }
-
- opt.filter = filter
- ? (file, entry) => filter(file, entry) && mapHas(file.replace(/\/+$/, ''))
- : file => mapHas(file.replace(/\/+$/, ''))
-}
-
-const listFileSync = opt => {
- const p = list(opt)
- const file = opt.file
- let threw = true
- let fd
- try {
- const stat = fs.statSync(file)
- const readSize = opt.maxReadSize || 16*1024*1024
- if (stat.size < readSize) {
- p.end(fs.readFileSync(file))
- } else {
- let pos = 0
- const buf = Buffer.allocUnsafe(readSize)
- fd = fs.openSync(file, 'r')
- while (pos < stat.size) {
- let bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
- pos += bytesRead
- p.write(buf.slice(0, bytesRead))
- }
- p.end()
- }
- threw = false
- } finally {
- if (threw && fd)
- try { fs.closeSync(fd) } catch (er) {}
- }
-}
-
-const listFile = (opt, cb) => {
- const parse = new Parser(opt)
- const readSize = opt.maxReadSize || 16*1024*1024
-
- const file = opt.file
- const p = new Promise((resolve, reject) => {
- parse.on('error', reject)
- parse.on('end', resolve)
-
- fs.stat(file, (er, stat) => {
- if (er)
- reject(er)
- else {
- const stream = new fsm.ReadStream(file, {
- readSize: readSize,
- size: stat.size
- })
- stream.on('error', reject)
- stream.pipe(parse)
- }
- })
- })
- return cb ? p.then(cb, cb) : p
-}
-
-const list = opt => new Parser(opt)
diff --git a/node_modules/cacache/node_modules/tar/lib/mkdir.js b/node_modules/cacache/node_modules/tar/lib/mkdir.js
deleted file mode 100644
index 381d0e1b3..000000000
--- a/node_modules/cacache/node_modules/tar/lib/mkdir.js
+++ /dev/null
@@ -1,206 +0,0 @@
-'use strict'
-// wrapper around mkdirp for tar's needs.
-
-// TODO: This should probably be a class, not functionally
-// passing around state in a gazillion args.
-
-const mkdirp = require('mkdirp')
-const fs = require('fs')
-const path = require('path')
-const chownr = require('chownr')
-
-class SymlinkError extends Error {
- constructor (symlink, path) {
- super('Cannot extract through symbolic link')
- this.path = path
- this.symlink = symlink
- }
-
- get name () {
- return 'SylinkError'
- }
-}
-
-class CwdError extends Error {
- constructor (path, code) {
- super(code + ': Cannot cd into \'' + path + '\'')
- this.path = path
- this.code = code
- }
-
- get name () {
- return 'CwdError'
- }
-}
-
-const mkdir = module.exports = (dir, opt, cb) => {
- // if there's any overlap between mask and mode,
- // then we'll need an explicit chmod
- const umask = opt.umask
- const mode = opt.mode | 0o0700
- const needChmod = (mode & umask) !== 0
-
- const uid = opt.uid
- const gid = opt.gid
- const doChown = typeof uid === 'number' &&
- typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
-
- const preserve = opt.preserve
- const unlink = opt.unlink
- const cache = opt.cache
- const cwd = opt.cwd
-
- const done = (er, created) => {
- if (er)
- cb(er)
- else {
- cache.set(dir, true)
- if (created && doChown)
- chownr(created, uid, gid, er => done(er))
- else if (needChmod)
- fs.chmod(dir, mode, cb)
- else
- cb()
- }
- }
-
- if (cache && cache.get(dir) === true)
- return done()
-
- if (dir === cwd)
- return fs.stat(dir, (er, st) => {
- if (er || !st.isDirectory())
- er = new CwdError(dir, er && er.code || 'ENOTDIR')
- done(er)
- })
-
- if (preserve)
- return mkdirp(dir, {mode}).then(made => done(null, made), done)
-
- const sub = path.relative(cwd, dir)
- const parts = sub.split(/\/|\\/)
- mkdir_(cwd, parts, mode, cache, unlink, cwd, null, done)
-}
-
-const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => {
- if (!parts.length)
- return cb(null, created)
- const p = parts.shift()
- const part = base + '/' + p
- if (cache.get(part))
- return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
-}
-
-const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => er => {
- if (er) {
- if (er.path && path.dirname(er.path) === cwd &&
- (er.code === 'ENOTDIR' || er.code === 'ENOENT'))
- return cb(new CwdError(cwd, er.code))
-
- fs.lstat(part, (statEr, st) => {
- if (statEr)
- cb(statEr)
- else if (st.isDirectory())
- mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- else if (unlink)
- fs.unlink(part, er => {
- if (er)
- return cb(er)
- fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb))
- })
- else if (st.isSymbolicLink())
- return cb(new SymlinkError(part, part + '/' + parts.join('/')))
- else
- cb(er)
- })
- } else {
- created = created || part
- mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)
- }
-}
-
-const mkdirSync = module.exports.sync = (dir, opt) => {
- // if there's any overlap between mask and mode,
- // then we'll need an explicit chmod
- const umask = opt.umask
- const mode = opt.mode | 0o0700
- const needChmod = (mode & umask) !== 0
-
- const uid = opt.uid
- const gid = opt.gid
- const doChown = typeof uid === 'number' &&
- typeof gid === 'number' &&
- ( uid !== opt.processUid || gid !== opt.processGid )
-
- const preserve = opt.preserve
- const unlink = opt.unlink
- const cache = opt.cache
- const cwd = opt.cwd
-
- const done = (created) => {
- cache.set(dir, true)
- if (created && doChown)
- chownr.sync(created, uid, gid)
- if (needChmod)
- fs.chmodSync(dir, mode)
- }
-
- if (cache && cache.get(dir) === true)
- return done()
-
- if (dir === cwd) {
- let ok = false
- let code = 'ENOTDIR'
- try {
- ok = fs.statSync(dir).isDirectory()
- } catch (er) {
- code = er.code
- } finally {
- if (!ok)
- throw new CwdError(dir, code)
- }
- done()
- return
- }
-
- if (preserve)
- return done(mkdirp.sync(dir, mode))
-
- const sub = path.relative(cwd, dir)
- const parts = sub.split(/\/|\\/)
- let created = null
- for (let p = parts.shift(), part = cwd;
- p && (part += '/' + p);
- p = parts.shift()) {
-
- if (cache.get(part))
- continue
-
- try {
- fs.mkdirSync(part, mode)
- created = created || part
- cache.set(part, true)
- } catch (er) {
- if (er.path && path.dirname(er.path) === cwd &&
- (er.code === 'ENOTDIR' || er.code === 'ENOENT'))
- return new CwdError(cwd, er.code)
-
- const st = fs.lstatSync(part)
- if (st.isDirectory()) {
- cache.set(part, true)
- continue
- } else if (unlink) {
- fs.unlinkSync(part)
- fs.mkdirSync(part, mode)
- created = created || part
- cache.set(part, true)
- continue
- } else if (st.isSymbolicLink())
- return new SymlinkError(part, part + '/' + parts.join('/'))
- }
- }
-
- return done(created)
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/mode-fix.js b/node_modules/cacache/node_modules/tar/lib/mode-fix.js
deleted file mode 100644
index c3758741c..000000000
--- a/node_modules/cacache/node_modules/tar/lib/mode-fix.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict'
-module.exports = (mode, isDir, portable) => {
- mode &= 0o7777
-
- // in portable mode, use the minimum reasonable umask
- // if this system creates files with 0o664 by default
- // (as some linux distros do), then we'll write the
- // archive with 0o644 instead. Also, don't ever create
- // a file that is not readable/writable by the owner.
- if (portable) {
- mode = (mode | 0o600) &~0o22
- }
-
- // if dirs are readable, then they should be listable
- if (isDir) {
- if (mode & 0o400)
- mode |= 0o100
- if (mode & 0o40)
- mode |= 0o10
- if (mode & 0o4)
- mode |= 0o1
- }
- return mode
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/pack.js b/node_modules/cacache/node_modules/tar/lib/pack.js
deleted file mode 100644
index 0fca4ae25..000000000
--- a/node_modules/cacache/node_modules/tar/lib/pack.js
+++ /dev/null
@@ -1,403 +0,0 @@
-'use strict'
-
-// A readable tar stream creator
-// Technically, this is a transform stream that you write paths into,
-// and tar format comes out of.
-// The `add()` method is like `write()` but returns this,
-// and end() return `this` as well, so you can
-// do `new Pack(opt).add('files').add('dir').end().pipe(output)
-// You could also do something like:
-// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))
-
-class PackJob {
- constructor (path, absolute) {
- this.path = path || './'
- this.absolute = absolute
- this.entry = null
- this.stat = null
- this.readdir = null
- this.pending = false
- this.ignore = false
- this.piped = false
- }
-}
-
-const MiniPass = require('minipass')
-const zlib = require('minizlib')
-const ReadEntry = require('./read-entry.js')
-const WriteEntry = require('./write-entry.js')
-const WriteEntrySync = WriteEntry.Sync
-const WriteEntryTar = WriteEntry.Tar
-const Yallist = require('yallist')
-const EOF = Buffer.alloc(1024)
-const ONSTAT = Symbol('onStat')
-const ENDED = Symbol('ended')
-const QUEUE = Symbol('queue')
-const CURRENT = Symbol('current')
-const PROCESS = Symbol('process')
-const PROCESSING = Symbol('processing')
-const PROCESSJOB = Symbol('processJob')
-const JOBS = Symbol('jobs')
-const JOBDONE = Symbol('jobDone')
-const ADDFSENTRY = Symbol('addFSEntry')
-const ADDTARENTRY = Symbol('addTarEntry')
-const STAT = Symbol('stat')
-const READDIR = Symbol('readdir')
-const ONREADDIR = Symbol('onreaddir')
-const PIPE = Symbol('pipe')
-const ENTRY = Symbol('entry')
-const ENTRYOPT = Symbol('entryOpt')
-const WRITEENTRYCLASS = Symbol('writeEntryClass')
-const WRITE = Symbol('write')
-const ONDRAIN = Symbol('ondrain')
-
-const fs = require('fs')
-const path = require('path')
-const warner = require('./warn-mixin.js')
-
-const Pack = warner(class Pack extends MiniPass {
- constructor (opt) {
- super(opt)
- opt = opt || Object.create(null)
- this.opt = opt
- this.file = opt.file || ''
- this.cwd = opt.cwd || process.cwd()
- this.maxReadSize = opt.maxReadSize
- this.preservePaths = !!opt.preservePaths
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.prefix = (opt.prefix || '').replace(/(\\|\/)+$/, '')
- this.linkCache = opt.linkCache || new Map()
- this.statCache = opt.statCache || new Map()
- this.readdirCache = opt.readdirCache || new Map()
-
- this[WRITEENTRYCLASS] = WriteEntry
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- this.portable = !!opt.portable
- this.zip = null
- if (opt.gzip) {
- if (typeof opt.gzip !== 'object')
- opt.gzip = {}
- if (this.portable)
- opt.gzip.portable = true
- this.zip = new zlib.Gzip(opt.gzip)
- this.zip.on('data', chunk => super.write(chunk))
- this.zip.on('end', _ => super.end())
- this.zip.on('drain', _ => this[ONDRAIN]())
- this.on('resume', _ => this.zip.resume())
- } else
- this.on('drain', this[ONDRAIN])
-
- this.noDirRecurse = !!opt.noDirRecurse
- this.follow = !!opt.follow
- this.noMtime = !!opt.noMtime
- this.mtime = opt.mtime || null
-
- this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
-
- this[QUEUE] = new Yallist
- this[JOBS] = 0
- this.jobs = +opt.jobs || 4
- this[PROCESSING] = false
- this[ENDED] = false
- }
-
- [WRITE] (chunk) {
- return super.write(chunk)
- }
-
- add (path) {
- this.write(path)
- return this
- }
-
- end (path) {
- if (path)
- this.write(path)
- this[ENDED] = true
- this[PROCESS]()
- return this
- }
-
- write (path) {
- if (this[ENDED])
- throw new Error('write after end')
-
- if (path instanceof ReadEntry)
- this[ADDTARENTRY](path)
- else
- this[ADDFSENTRY](path)
- return this.flowing
- }
-
- [ADDTARENTRY] (p) {
- const absolute = path.resolve(this.cwd, p.path)
- if (this.prefix)
- p.path = this.prefix + '/' + p.path.replace(/^\.(\/+|$)/, '')
-
- // in this case, we don't have to wait for the stat
- if (!this.filter(p.path, p))
- p.resume()
- else {
- const job = new PackJob(p.path, absolute, false)
- job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))
- job.entry.on('end', _ => this[JOBDONE](job))
- this[JOBS] += 1
- this[QUEUE].push(job)
- }
-
- this[PROCESS]()
- }
-
- [ADDFSENTRY] (p) {
- const absolute = path.resolve(this.cwd, p)
- if (this.prefix)
- p = this.prefix + '/' + p.replace(/^\.(\/+|$)/, '')
-
- this[QUEUE].push(new PackJob(p, absolute))
- this[PROCESS]()
- }
-
- [STAT] (job) {
- job.pending = true
- this[JOBS] += 1
- const stat = this.follow ? 'stat' : 'lstat'
- fs[stat](job.absolute, (er, stat) => {
- job.pending = false
- this[JOBS] -= 1
- if (er)
- this.emit('error', er)
- else
- this[ONSTAT](job, stat)
- })
- }
-
- [ONSTAT] (job, stat) {
- this.statCache.set(job.absolute, stat)
- job.stat = stat
-
- // now we have the stat, we can filter it.
- if (!this.filter(job.path, stat))
- job.ignore = true
-
- this[PROCESS]()
- }
-
- [READDIR] (job) {
- job.pending = true
- this[JOBS] += 1
- fs.readdir(job.absolute, (er, entries) => {
- job.pending = false
- this[JOBS] -= 1
- if (er)
- return this.emit('error', er)
- this[ONREADDIR](job, entries)
- })
- }
-
- [ONREADDIR] (job, entries) {
- this.readdirCache.set(job.absolute, entries)
- job.readdir = entries
- this[PROCESS]()
- }
-
- [PROCESS] () {
- if (this[PROCESSING])
- return
-
- this[PROCESSING] = true
- for (let w = this[QUEUE].head;
- w !== null && this[JOBS] < this.jobs;
- w = w.next) {
- this[PROCESSJOB](w.value)
- if (w.value.ignore) {
- const p = w.next
- this[QUEUE].removeNode(w)
- w.next = p
- }
- }
-
- this[PROCESSING] = false
-
- if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
- if (this.zip)
- this.zip.end(EOF)
- else {
- super.write(EOF)
- super.end()
- }
- }
- }
-
- get [CURRENT] () {
- return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value
- }
-
- [JOBDONE] (job) {
- this[QUEUE].shift()
- this[JOBS] -= 1
- this[PROCESS]()
- }
-
- [PROCESSJOB] (job) {
- if (job.pending)
- return
-
- if (job.entry) {
- if (job === this[CURRENT] && !job.piped)
- this[PIPE](job)
- return
- }
-
- if (!job.stat) {
- if (this.statCache.has(job.absolute))
- this[ONSTAT](job, this.statCache.get(job.absolute))
- else
- this[STAT](job)
- }
- if (!job.stat)
- return
-
- // filtered out!
- if (job.ignore)
- return
-
- if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
- if (this.readdirCache.has(job.absolute))
- this[ONREADDIR](job, this.readdirCache.get(job.absolute))
- else
- this[READDIR](job)
- if (!job.readdir)
- return
- }
-
- // we know it doesn't have an entry, because that got checked above
- job.entry = this[ENTRY](job)
- if (!job.entry) {
- job.ignore = true
- return
- }
-
- if (job === this[CURRENT] && !job.piped)
- this[PIPE](job)
- }
-
- [ENTRYOPT] (job) {
- return {
- onwarn: (code, msg, data) => this.warn(code, msg, data),
- noPax: this.noPax,
- cwd: this.cwd,
- absolute: job.absolute,
- preservePaths: this.preservePaths,
- maxReadSize: this.maxReadSize,
- strict: this.strict,
- portable: this.portable,
- linkCache: this.linkCache,
- statCache: this.statCache,
- noMtime: this.noMtime,
- mtime: this.mtime
- }
- }
-
- [ENTRY] (job) {
- this[JOBS] += 1
- try {
- return new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job))
- .on('end', () => this[JOBDONE](job))
- .on('error', er => this.emit('error', er))
- } catch (er) {
- this.emit('error', er)
- }
- }
-
- [ONDRAIN] () {
- if (this[CURRENT] && this[CURRENT].entry)
- this[CURRENT].entry.resume()
- }
-
- // like .pipe() but using super, because our write() is special
- [PIPE] (job) {
- job.piped = true
-
- if (job.readdir)
- job.readdir.forEach(entry => {
- const p = this.prefix ?
- job.path.slice(this.prefix.length + 1) || './'
- : job.path
-
- const base = p === './' ? '' : p.replace(/\/*$/, '/')
- this[ADDFSENTRY](base + entry)
- })
-
- const source = job.entry
- const zip = this.zip
-
- if (zip)
- source.on('data', chunk => {
- if (!zip.write(chunk))
- source.pause()
- })
- else
- source.on('data', chunk => {
- if (!super.write(chunk))
- source.pause()
- })
- }
-
- pause () {
- if (this.zip)
- this.zip.pause()
- return super.pause()
- }
-})
-
-class PackSync extends Pack {
- constructor (opt) {
- super(opt)
- this[WRITEENTRYCLASS] = WriteEntrySync
- }
-
- // pause/resume are no-ops in sync streams.
- pause () {}
- resume () {}
-
- [STAT] (job) {
- const stat = this.follow ? 'statSync' : 'lstatSync'
- this[ONSTAT](job, fs[stat](job.absolute))
- }
-
- [READDIR] (job, stat) {
- this[ONREADDIR](job, fs.readdirSync(job.absolute))
- }
-
- // gotta get it all in this tick
- [PIPE] (job) {
- const source = job.entry
- const zip = this.zip
-
- if (job.readdir)
- job.readdir.forEach(entry => {
- const p = this.prefix ?
- job.path.slice(this.prefix.length + 1) || './'
- : job.path
-
- const base = p === './' ? '' : p.replace(/\/*$/, '/')
- this[ADDFSENTRY](base + entry)
- })
-
- if (zip)
- source.on('data', chunk => {
- zip.write(chunk)
- })
- else
- source.on('data', chunk => {
- super[WRITE](chunk)
- })
- }
-}
-
-Pack.Sync = PackSync
-
-module.exports = Pack
diff --git a/node_modules/cacache/node_modules/tar/lib/parse.js b/node_modules/cacache/node_modules/tar/lib/parse.js
deleted file mode 100644
index d9a49ad1f..000000000
--- a/node_modules/cacache/node_modules/tar/lib/parse.js
+++ /dev/null
@@ -1,483 +0,0 @@
-'use strict'
-
-// this[BUFFER] is the remainder of a chunk if we're waiting for
-// the full 512 bytes of a header to come in. We will Buffer.concat()
-// it to the next write(), which is a mem copy, but a small one.
-//
-// this[QUEUE] is a Yallist of entries that haven't been emitted
-// yet this can only get filled up if the user keeps write()ing after
-// a write() returns false, or does a write() with more than one entry
-//
-// We don't buffer chunks, we always parse them and either create an
-// entry, or push it into the active entry. The ReadEntry class knows
-// to throw data away if .ignore=true
-//
-// Shift entry off the buffer when it emits 'end', and emit 'entry' for
-// the next one in the list.
-//
-// At any time, we're pushing body chunks into the entry at WRITEENTRY,
-// and waiting for 'end' on the entry at READENTRY
-//
-// ignored entries get .resume() called on them straight away
-
-const warner = require('./warn-mixin.js')
-const path = require('path')
-const Header = require('./header.js')
-const EE = require('events')
-const Yallist = require('yallist')
-const maxMetaEntrySize = 1024 * 1024
-const Entry = require('./read-entry.js')
-const Pax = require('./pax.js')
-const zlib = require('minizlib')
-
-const gzipHeader = Buffer.from([0x1f, 0x8b])
-const STATE = Symbol('state')
-const WRITEENTRY = Symbol('writeEntry')
-const READENTRY = Symbol('readEntry')
-const NEXTENTRY = Symbol('nextEntry')
-const PROCESSENTRY = Symbol('processEntry')
-const EX = Symbol('extendedHeader')
-const GEX = Symbol('globalExtendedHeader')
-const META = Symbol('meta')
-const EMITMETA = Symbol('emitMeta')
-const BUFFER = Symbol('buffer')
-const QUEUE = Symbol('queue')
-const ENDED = Symbol('ended')
-const EMITTEDEND = Symbol('emittedEnd')
-const EMIT = Symbol('emit')
-const UNZIP = Symbol('unzip')
-const CONSUMECHUNK = Symbol('consumeChunk')
-const CONSUMECHUNKSUB = Symbol('consumeChunkSub')
-const CONSUMEBODY = Symbol('consumeBody')
-const CONSUMEMETA = Symbol('consumeMeta')
-const CONSUMEHEADER = Symbol('consumeHeader')
-const CONSUMING = Symbol('consuming')
-const BUFFERCONCAT = Symbol('bufferConcat')
-const MAYBEEND = Symbol('maybeEnd')
-const WRITING = Symbol('writing')
-const ABORTED = Symbol('aborted')
-const DONE = Symbol('onDone')
-const SAW_VALID_ENTRY = Symbol('sawValidEntry')
-const SAW_NULL_BLOCK = Symbol('sawNullBlock')
-const SAW_EOF = Symbol('sawEOF')
-
-const noop = _ => true
-
-module.exports = warner(class Parser extends EE {
- constructor (opt) {
- opt = opt || {}
- super(opt)
-
- this.file = opt.file || ''
-
- // set to boolean false when an entry starts. 1024 bytes of \0
- // is technically a valid tarball, albeit a boring one.
- this[SAW_VALID_ENTRY] = null
-
- // these BADARCHIVE errors can't be detected early. listen on DONE.
- this.on(DONE, _ => {
- if (this[STATE] === 'begin' || this[SAW_VALID_ENTRY] === false) {
- // either less than 1 block of data, or all entries were invalid.
- // Either way, probably not even a tarball.
- this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')
- }
- })
-
- if (opt.ondone)
- this.on(DONE, opt.ondone)
- else
- this.on(DONE, _ => {
- this.emit('prefinish')
- this.emit('finish')
- this.emit('end')
- this.emit('close')
- })
-
- this.strict = !!opt.strict
- this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize
- this.filter = typeof opt.filter === 'function' ? opt.filter : noop
-
- // have to set this so that streams are ok piping into it
- this.writable = true
- this.readable = false
-
- this[QUEUE] = new Yallist()
- this[BUFFER] = null
- this[READENTRY] = null
- this[WRITEENTRY] = null
- this[STATE] = 'begin'
- this[META] = ''
- this[EX] = null
- this[GEX] = null
- this[ENDED] = false
- this[UNZIP] = null
- this[ABORTED] = false
- this[SAW_NULL_BLOCK] = false
- this[SAW_EOF] = false
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
- if (typeof opt.onentry === 'function')
- this.on('entry', opt.onentry)
- }
-
- [CONSUMEHEADER] (chunk, position) {
- if (this[SAW_VALID_ENTRY] === null)
- this[SAW_VALID_ENTRY] = false
- let header
- try {
- header = new Header(chunk, position, this[EX], this[GEX])
- } catch (er) {
- return this.warn('TAR_ENTRY_INVALID', er)
- }
-
- if (header.nullBlock) {
- if (this[SAW_NULL_BLOCK]) {
- this[SAW_EOF] = true
- // ending an archive with no entries. pointless, but legal.
- if (this[STATE] === 'begin')
- this[STATE] = 'header'
- this[EMIT]('eof')
- } else {
- this[SAW_NULL_BLOCK] = true
- this[EMIT]('nullBlock')
- }
- } else {
- this[SAW_NULL_BLOCK] = false
- if (!header.cksumValid)
- this.warn('TAR_ENTRY_INVALID', 'checksum failure', {header})
- else if (!header.path)
- this.warn('TAR_ENTRY_INVALID', 'path is required', {header})
- else {
- const type = header.type
- if (/^(Symbolic)?Link$/.test(type) && !header.linkpath)
- this.warn('TAR_ENTRY_INVALID', 'linkpath required', {header})
- else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath)
- this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {header})
- else {
- const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX])
-
- // we do this for meta & ignored entries as well, because they
- // are still valid tar, or else we wouldn't know to ignore them
- if (!this[SAW_VALID_ENTRY]) {
- if (entry.remain) {
- // this might be the one!
- const onend = () => {
- if (!entry.invalid)
- this[SAW_VALID_ENTRY] = true
- }
- entry.on('end', onend)
- } else {
- this[SAW_VALID_ENTRY] = true
- }
- }
-
- if (entry.meta) {
- if (entry.size > this.maxMetaEntrySize) {
- entry.ignore = true
- this[EMIT]('ignoredEntry', entry)
- this[STATE] = 'ignore'
- entry.resume()
- } else if (entry.size > 0) {
- this[META] = ''
- entry.on('data', c => this[META] += c)
- this[STATE] = 'meta'
- }
- } else {
- this[EX] = null
- entry.ignore = entry.ignore || !this.filter(entry.path, entry)
-
- if (entry.ignore) {
- // probably valid, just not something we care about
- this[EMIT]('ignoredEntry', entry)
- this[STATE] = entry.remain ? 'ignore' : 'header'
- entry.resume()
- } else {
- if (entry.remain)
- this[STATE] = 'body'
- else {
- this[STATE] = 'header'
- entry.end()
- }
-
- if (!this[READENTRY]) {
- this[QUEUE].push(entry)
- this[NEXTENTRY]()
- } else
- this[QUEUE].push(entry)
- }
- }
- }
- }
- }
- }
-
- [PROCESSENTRY] (entry) {
- let go = true
-
- if (!entry) {
- this[READENTRY] = null
- go = false
- } else if (Array.isArray(entry))
- this.emit.apply(this, entry)
- else {
- this[READENTRY] = entry
- this.emit('entry', entry)
- if (!entry.emittedEnd) {
- entry.on('end', _ => this[NEXTENTRY]())
- go = false
- }
- }
-
- return go
- }
-
- [NEXTENTRY] () {
- do {} while (this[PROCESSENTRY](this[QUEUE].shift()))
-
- if (!this[QUEUE].length) {
- // At this point, there's nothing in the queue, but we may have an
- // entry which is being consumed (readEntry).
- // If we don't, then we definitely can handle more data.
- // If we do, and either it's flowing, or it has never had any data
- // written to it, then it needs more.
- // The only other possibility is that it has returned false from a
- // write() call, so we wait for the next drain to continue.
- const re = this[READENTRY]
- const drainNow = !re || re.flowing || re.size === re.remain
- if (drainNow) {
- if (!this[WRITING])
- this.emit('drain')
- } else
- re.once('drain', _ => this.emit('drain'))
- }
- }
-
- [CONSUMEBODY] (chunk, position) {
- // write up to but no more than writeEntry.blockRemain
- const entry = this[WRITEENTRY]
- const br = entry.blockRemain
- const c = (br >= chunk.length && position === 0) ? chunk
- : chunk.slice(position, position + br)
-
- entry.write(c)
-
- if (!entry.blockRemain) {
- this[STATE] = 'header'
- this[WRITEENTRY] = null
- entry.end()
- }
-
- return c.length
- }
-
- [CONSUMEMETA] (chunk, position) {
- const entry = this[WRITEENTRY]
- const ret = this[CONSUMEBODY](chunk, position)
-
- // if we finished, then the entry is reset
- if (!this[WRITEENTRY])
- this[EMITMETA](entry)
-
- return ret
- }
-
- [EMIT] (ev, data, extra) {
- if (!this[QUEUE].length && !this[READENTRY])
- this.emit(ev, data, extra)
- else
- this[QUEUE].push([ev, data, extra])
- }
-
- [EMITMETA] (entry) {
- this[EMIT]('meta', this[META])
- switch (entry.type) {
- case 'ExtendedHeader':
- case 'OldExtendedHeader':
- this[EX] = Pax.parse(this[META], this[EX], false)
- break
-
- case 'GlobalExtendedHeader':
- this[GEX] = Pax.parse(this[META], this[GEX], true)
- break
-
- case 'NextFileHasLongPath':
- case 'OldGnuLongPath':
- this[EX] = this[EX] || Object.create(null)
- this[EX].path = this[META].replace(/\0.*/, '')
- break
-
- case 'NextFileHasLongLinkpath':
- this[EX] = this[EX] || Object.create(null)
- this[EX].linkpath = this[META].replace(/\0.*/, '')
- break
-
- /* istanbul ignore next */
- default: throw new Error('unknown meta: ' + entry.type)
- }
- }
-
- abort (error) {
- this[ABORTED] = true
- this.emit('abort', error)
- // always throws, even in non-strict mode
- this.warn('TAR_ABORT', error, { recoverable: false })
- }
-
- write (chunk) {
- if (this[ABORTED])
- return
-
- // first write, might be gzipped
- if (this[UNZIP] === null && chunk) {
- if (this[BUFFER]) {
- chunk = Buffer.concat([this[BUFFER], chunk])
- this[BUFFER] = null
- }
- if (chunk.length < gzipHeader.length) {
- this[BUFFER] = chunk
- return true
- }
- for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
- if (chunk[i] !== gzipHeader[i])
- this[UNZIP] = false
- }
- if (this[UNZIP] === null) {
- const ended = this[ENDED]
- this[ENDED] = false
- this[UNZIP] = new zlib.Unzip()
- this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))
- this[UNZIP].on('error', er => this.abort(er))
- this[UNZIP].on('end', _ => {
- this[ENDED] = true
- this[CONSUMECHUNK]()
- })
- this[WRITING] = true
- const ret = this[UNZIP][ended ? 'end' : 'write' ](chunk)
- this[WRITING] = false
- return ret
- }
- }
-
- this[WRITING] = true
- if (this[UNZIP])
- this[UNZIP].write(chunk)
- else
- this[CONSUMECHUNK](chunk)
- this[WRITING] = false
-
- // return false if there's a queue, or if the current entry isn't flowing
- const ret =
- this[QUEUE].length ? false :
- this[READENTRY] ? this[READENTRY].flowing :
- true
-
- // if we have no queue, then that means a clogged READENTRY
- if (!ret && !this[QUEUE].length)
- this[READENTRY].once('drain', _ => this.emit('drain'))
-
- return ret
- }
-
- [BUFFERCONCAT] (c) {
- if (c && !this[ABORTED])
- this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c
- }
-
- [MAYBEEND] () {
- if (this[ENDED] &&
- !this[EMITTEDEND] &&
- !this[ABORTED] &&
- !this[CONSUMING]) {
- this[EMITTEDEND] = true
- const entry = this[WRITEENTRY]
- if (entry && entry.blockRemain) {
- // truncated, likely a damaged file
- const have = this[BUFFER] ? this[BUFFER].length : 0
- this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${
- entry.blockRemain} more bytes, only ${have} available)`, {entry})
- if (this[BUFFER])
- entry.write(this[BUFFER])
- entry.end()
- }
- this[EMIT](DONE)
- }
- }
-
- [CONSUMECHUNK] (chunk) {
- if (this[CONSUMING])
- this[BUFFERCONCAT](chunk)
- else if (!chunk && !this[BUFFER])
- this[MAYBEEND]()
- else {
- this[CONSUMING] = true
- if (this[BUFFER]) {
- this[BUFFERCONCAT](chunk)
- const c = this[BUFFER]
- this[BUFFER] = null
- this[CONSUMECHUNKSUB](c)
- } else {
- this[CONSUMECHUNKSUB](chunk)
- }
-
- while (this[BUFFER] &&
- this[BUFFER].length >= 512 &&
- !this[ABORTED] &&
- !this[SAW_EOF]) {
- const c = this[BUFFER]
- this[BUFFER] = null
- this[CONSUMECHUNKSUB](c)
- }
- this[CONSUMING] = false
- }
-
- if (!this[BUFFER] || this[ENDED])
- this[MAYBEEND]()
- }
-
- [CONSUMECHUNKSUB] (chunk) {
- // we know that we are in CONSUMING mode, so anything written goes into
- // the buffer. Advance the position and put any remainder in the buffer.
- let position = 0
- let length = chunk.length
- while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) {
- switch (this[STATE]) {
- case 'begin':
- case 'header':
- this[CONSUMEHEADER](chunk, position)
- position += 512
- break
-
- case 'ignore':
- case 'body':
- position += this[CONSUMEBODY](chunk, position)
- break
-
- case 'meta':
- position += this[CONSUMEMETA](chunk, position)
- break
-
- /* istanbul ignore next */
- default:
- throw new Error('invalid state: ' + this[STATE])
- }
- }
-
- if (position < length) {
- if (this[BUFFER])
- this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]])
- else
- this[BUFFER] = chunk.slice(position)
- }
- }
-
- end (chunk) {
- if (!this[ABORTED]) {
- if (this[UNZIP])
- this[UNZIP].end(chunk)
- else {
- this[ENDED] = true
- this.write(chunk)
- }
- }
- }
-})
diff --git a/node_modules/cacache/node_modules/tar/lib/path-reservations.js b/node_modules/cacache/node_modules/tar/lib/path-reservations.js
deleted file mode 100644
index 3cf0c2c12..000000000
--- a/node_modules/cacache/node_modules/tar/lib/path-reservations.js
+++ /dev/null
@@ -1,125 +0,0 @@
-// A path exclusive reservation system
-// reserve([list, of, paths], fn)
-// When the fn is first in line for all its paths, it
-// is called with a cb that clears the reservation.
-//
-// Used by async unpack to avoid clobbering paths in use,
-// while still allowing maximal safe parallelization.
-
-const assert = require('assert')
-
-module.exports = () => {
- // path => [function or Set]
- // A Set object means a directory reservation
- // A fn is a direct reservation on that path
- const queues = new Map()
-
- // fn => {paths:[path,...], dirs:[path, ...]}
- const reservations = new Map()
-
- // return a set of parent dirs for a given path
- const { join } = require('path')
- const getDirs = path =>
- join(path).split(/[\\\/]/).slice(0, -1).reduce((set, path) =>
- set.length ? set.concat(join(set[set.length-1], path)) : [path], [])
-
- // functions currently running
- const running = new Set()
-
- // return the queues for each path the function cares about
- // fn => {paths, dirs}
- const getQueues = fn => {
- const res = reservations.get(fn)
- /* istanbul ignore if - unpossible */
- if (!res)
- throw new Error('function does not have any path reservations')
- return {
- paths: res.paths.map(path => queues.get(path)),
- dirs: [...res.dirs].map(path => queues.get(path)),
- }
- }
-
- // check if fn is first in line for all its paths, and is
- // included in the first set for all its dir queues
- const check = fn => {
- const {paths, dirs} = getQueues(fn)
- return paths.every(q => q[0] === fn) &&
- dirs.every(q => q[0] instanceof Set && q[0].has(fn))
- }
-
- // run the function if it's first in line and not already running
- const run = fn => {
- if (running.has(fn) || !check(fn))
- return false
- running.add(fn)
- fn(() => clear(fn))
- return true
- }
-
- const clear = fn => {
- if (!running.has(fn))
- return false
-
- const { paths, dirs } = reservations.get(fn)
- const next = new Set()
-
- paths.forEach(path => {
- const q = queues.get(path)
- assert.equal(q[0], fn)
- if (q.length === 1)
- queues.delete(path)
- else {
- q.shift()
- if (typeof q[0] === 'function')
- next.add(q[0])
- else
- q[0].forEach(fn => next.add(fn))
- }
- })
-
- dirs.forEach(dir => {
- const q = queues.get(dir)
- assert(q[0] instanceof Set)
- if (q[0].size === 1 && q.length === 1) {
- queues.delete(dir)
- } else if (q[0].size === 1) {
- q.shift()
-
- // must be a function or else the Set would've been reused
- next.add(q[0])
- } else
- q[0].delete(fn)
- })
- running.delete(fn)
-
- next.forEach(fn => run(fn))
- return true
- }
-
- const reserve = (paths, fn) => {
- const dirs = new Set(
- paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))
- )
- reservations.set(fn, {dirs, paths})
- paths.forEach(path => {
- const q = queues.get(path)
- if (!q)
- queues.set(path, [fn])
- else
- q.push(fn)
- })
- dirs.forEach(dir => {
- const q = queues.get(dir)
- if (!q)
- queues.set(dir, [new Set([fn])])
- else if (q[q.length-1] instanceof Set)
- q[q.length-1].add(fn)
- else
- q.push(new Set([fn]))
- })
-
- return run(fn)
- }
-
- return { check, reserve }
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/pax.js b/node_modules/cacache/node_modules/tar/lib/pax.js
deleted file mode 100644
index 214a459f3..000000000
--- a/node_modules/cacache/node_modules/tar/lib/pax.js
+++ /dev/null
@@ -1,145 +0,0 @@
-'use strict'
-const Header = require('./header.js')
-const path = require('path')
-
-class Pax {
- constructor (obj, global) {
- this.atime = obj.atime || null
- this.charset = obj.charset || null
- this.comment = obj.comment || null
- this.ctime = obj.ctime || null
- this.gid = obj.gid || null
- this.gname = obj.gname || null
- this.linkpath = obj.linkpath || null
- this.mtime = obj.mtime || null
- this.path = obj.path || null
- this.size = obj.size || null
- this.uid = obj.uid || null
- this.uname = obj.uname || null
- this.dev = obj.dev || null
- this.ino = obj.ino || null
- this.nlink = obj.nlink || null
- this.global = global || false
- }
-
- encode () {
- const body = this.encodeBody()
- if (body === '')
- return null
-
- const bodyLen = Buffer.byteLength(body)
- // round up to 512 bytes
- // add 512 for header
- const bufLen = 512 * Math.ceil(1 + bodyLen / 512)
- const buf = Buffer.allocUnsafe(bufLen)
-
- // 0-fill the header section, it might not hit every field
- for (let i = 0; i < 512; i++) {
- buf[i] = 0
- }
-
- new Header({
- // XXX split the path
- // then the path should be PaxHeader + basename, but less than 99,
- // prepend with the dirname
- path: ('PaxHeader/' + path.basename(this.path)).slice(0, 99),
- mode: this.mode || 0o644,
- uid: this.uid || null,
- gid: this.gid || null,
- size: bodyLen,
- mtime: this.mtime || null,
- type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',
- linkpath: '',
- uname: this.uname || '',
- gname: this.gname || '',
- devmaj: 0,
- devmin: 0,
- atime: this.atime || null,
- ctime: this.ctime || null
- }).encode(buf)
-
- buf.write(body, 512, bodyLen, 'utf8')
-
- // null pad after the body
- for (let i = bodyLen + 512; i < buf.length; i++) {
- buf[i] = 0
- }
-
- return buf
- }
-
- encodeBody () {
- return (
- this.encodeField('path') +
- this.encodeField('ctime') +
- this.encodeField('atime') +
- this.encodeField('dev') +
- this.encodeField('ino') +
- this.encodeField('nlink') +
- this.encodeField('charset') +
- this.encodeField('comment') +
- this.encodeField('gid') +
- this.encodeField('gname') +
- this.encodeField('linkpath') +
- this.encodeField('mtime') +
- this.encodeField('size') +
- this.encodeField('uid') +
- this.encodeField('uname')
- )
- }
-
- encodeField (field) {
- if (this[field] === null || this[field] === undefined)
- return ''
- const v = this[field] instanceof Date ? this[field].getTime() / 1000
- : this[field]
- const s = ' ' +
- (field === 'dev' || field === 'ino' || field === 'nlink'
- ? 'SCHILY.' : '') +
- field + '=' + v + '\n'
- const byteLen = Buffer.byteLength(s)
- // the digits includes the length of the digits in ascii base-10
- // so if it's 9 characters, then adding 1 for the 9 makes it 10
- // which makes it 11 chars.
- let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1
- if (byteLen + digits >= Math.pow(10, digits))
- digits += 1
- const len = digits + byteLen
- return len + s
- }
-}
-
-Pax.parse = (string, ex, g) => new Pax(merge(parseKV(string), ex), g)
-
-const merge = (a, b) =>
- b ? Object.keys(a).reduce((s, k) => (s[k] = a[k], s), b) : a
-
-const parseKV = string =>
- string
- .replace(/\n$/, '')
- .split('\n')
- .reduce(parseKVLine, Object.create(null))
-
-const parseKVLine = (set, line) => {
- const n = parseInt(line, 10)
-
- // XXX Values with \n in them will fail this.
- // Refactor to not be a naive line-by-line parse.
- if (n !== Buffer.byteLength(line) + 1)
- return set
-
- line = line.substr((n + ' ').length)
- const kv = line.split('=')
- const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, '$1')
- if (!k)
- return set
-
- const v = kv.join('=')
- set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k)
- ? new Date(v * 1000)
- : /^[0-9]+$/.test(v) ? +v
- : v
- return set
-}
-
-module.exports = Pax
diff --git a/node_modules/cacache/node_modules/tar/lib/read-entry.js b/node_modules/cacache/node_modules/tar/lib/read-entry.js
deleted file mode 100644
index 8acee94ba..000000000
--- a/node_modules/cacache/node_modules/tar/lib/read-entry.js
+++ /dev/null
@@ -1,98 +0,0 @@
-'use strict'
-const types = require('./types.js')
-const MiniPass = require('minipass')
-
-const SLURP = Symbol('slurp')
-module.exports = class ReadEntry extends MiniPass {
- constructor (header, ex, gex) {
- super()
- // read entries always start life paused. this is to avoid the
- // situation where Minipass's auto-ending empty streams results
- // in an entry ending before we're ready for it.
- this.pause()
- this.extended = ex
- this.globalExtended = gex
- this.header = header
- this.startBlockSize = 512 * Math.ceil(header.size / 512)
- this.blockRemain = this.startBlockSize
- this.remain = header.size
- this.type = header.type
- this.meta = false
- this.ignore = false
- switch (this.type) {
- case 'File':
- case 'OldFile':
- case 'Link':
- case 'SymbolicLink':
- case 'CharacterDevice':
- case 'BlockDevice':
- case 'Directory':
- case 'FIFO':
- case 'ContiguousFile':
- case 'GNUDumpDir':
- break
-
- case 'NextFileHasLongLinkpath':
- case 'NextFileHasLongPath':
- case 'OldGnuLongPath':
- case 'GlobalExtendedHeader':
- case 'ExtendedHeader':
- case 'OldExtendedHeader':
- this.meta = true
- break
-
- // NOTE: gnutar and bsdtar treat unrecognized types as 'File'
- // it may be worth doing the same, but with a warning.
- default:
- this.ignore = true
- }
-
- this.path = header.path
- this.mode = header.mode
- if (this.mode)
- this.mode = this.mode & 0o7777
- this.uid = header.uid
- this.gid = header.gid
- this.uname = header.uname
- this.gname = header.gname
- this.size = header.size
- this.mtime = header.mtime
- this.atime = header.atime
- this.ctime = header.ctime
- this.linkpath = header.linkpath
- this.uname = header.uname
- this.gname = header.gname
-
- if (ex) this[SLURP](ex)
- if (gex) this[SLURP](gex, true)
- }
-
- write (data) {
- const writeLen = data.length
- if (writeLen > this.blockRemain)
- throw new Error('writing more to entry than is appropriate')
-
- const r = this.remain
- const br = this.blockRemain
- this.remain = Math.max(0, r - writeLen)
- this.blockRemain = Math.max(0, br - writeLen)
- if (this.ignore)
- return true
-
- if (r >= writeLen)
- return super.write(data)
-
- // r < writeLen
- return super.write(data.slice(0, r))
- }
-
- [SLURP] (ex, global) {
- for (let k in ex) {
- // we slurp in everything except for the path attribute in
- // a global extended header, because that's weird.
- if (ex[k] !== null && ex[k] !== undefined &&
- !(global && k === 'path'))
- this[k] = ex[k]
- }
- }
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/replace.js b/node_modules/cacache/node_modules/tar/lib/replace.js
deleted file mode 100644
index 44126d1f8..000000000
--- a/node_modules/cacache/node_modules/tar/lib/replace.js
+++ /dev/null
@@ -1,219 +0,0 @@
-'use strict'
-
-// tar -r
-const hlo = require('./high-level-opt.js')
-const Pack = require('./pack.js')
-const Parse = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const t = require('./list.js')
-const path = require('path')
-
-// starting at the head of the file, read a Header
-// If the checksum is invalid, that's our position to start writing
-// If it is, jump forward by the specified size (round up to 512)
-// and try again.
-// Write the new Pack stream starting there.
-
-const Header = require('./header.js')
-
-const r = module.exports = (opt_, files, cb) => {
- const opt = hlo(opt_)
-
- if (!opt.file)
- throw new TypeError('file is required')
-
- if (opt.gzip)
- throw new TypeError('cannot append to compressed archives')
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- return opt.sync ? replaceSync(opt, files)
- : replace(opt, files, cb)
-}
-
-const replaceSync = (opt, files) => {
- const p = new Pack.Sync(opt)
-
- let threw = true
- let fd
- let position
-
- try {
- try {
- fd = fs.openSync(opt.file, 'r+')
- } catch (er) {
- if (er.code === 'ENOENT')
- fd = fs.openSync(opt.file, 'w+')
- else
- throw er
- }
-
- const st = fs.fstatSync(fd)
- const headBuf = Buffer.alloc(512)
-
- POSITION: for (position = 0; position < st.size; position += 512) {
- for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
- bytes = fs.readSync(
- fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos
- )
-
- if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b)
- throw new Error('cannot append to compressed archives')
-
- if (!bytes)
- break POSITION
- }
-
- let h = new Header(headBuf)
- if (!h.cksumValid)
- break
- let entryBlockSize = 512 * Math.ceil(h.size / 512)
- if (position + entryBlockSize + 512 > st.size)
- break
- // the 512 for the header we just parsed will be added as well
- // also jump ahead all the blocks for the body
- position += entryBlockSize
- if (opt.mtimeCache)
- opt.mtimeCache.set(h.path, h.mtime)
- }
- threw = false
-
- streamSync(opt, p, position, fd, files)
- } finally {
- if (threw)
- try { fs.closeSync(fd) } catch (er) {}
- }
-}
-
-const streamSync = (opt, p, position, fd, files) => {
- const stream = new fsm.WriteStreamSync(opt.file, {
- fd: fd,
- start: position
- })
- p.pipe(stream)
- addFilesSync(p, files)
-}
-
-const replace = (opt, files, cb) => {
- files = Array.from(files)
- const p = new Pack(opt)
-
- const getPos = (fd, size, cb_) => {
- const cb = (er, pos) => {
- if (er)
- fs.close(fd, _ => cb_(er))
- else
- cb_(null, pos)
- }
-
- let position = 0
- if (size === 0)
- return cb(null, 0)
-
- let bufPos = 0
- const headBuf = Buffer.alloc(512)
- const onread = (er, bytes) => {
- if (er)
- return cb(er)
- bufPos += bytes
- if (bufPos < 512 && bytes)
- return fs.read(
- fd, headBuf, bufPos, headBuf.length - bufPos,
- position + bufPos, onread
- )
-
- if (position === 0 && headBuf[0] === 0x1f && headBuf[1] === 0x8b)
- return cb(new Error('cannot append to compressed archives'))
-
- // truncated header
- if (bufPos < 512)
- return cb(null, position)
-
- const h = new Header(headBuf)
- if (!h.cksumValid)
- return cb(null, position)
-
- const entryBlockSize = 512 * Math.ceil(h.size / 512)
- if (position + entryBlockSize + 512 > size)
- return cb(null, position)
-
- position += entryBlockSize + 512
- if (position >= size)
- return cb(null, position)
-
- if (opt.mtimeCache)
- opt.mtimeCache.set(h.path, h.mtime)
- bufPos = 0
- fs.read(fd, headBuf, 0, 512, position, onread)
- }
- fs.read(fd, headBuf, 0, 512, position, onread)
- }
-
- const promise = new Promise((resolve, reject) => {
- p.on('error', reject)
- let flag = 'r+'
- const onopen = (er, fd) => {
- if (er && er.code === 'ENOENT' && flag === 'r+') {
- flag = 'w+'
- return fs.open(opt.file, flag, onopen)
- }
-
- if (er)
- return reject(er)
-
- fs.fstat(fd, (er, st) => {
- if (er)
- return reject(er)
- getPos(fd, st.size, (er, position) => {
- if (er)
- return reject(er)
- const stream = new fsm.WriteStream(opt.file, {
- fd: fd,
- start: position
- })
- p.pipe(stream)
- stream.on('error', reject)
- stream.on('close', resolve)
- addFilesAsync(p, files)
- })
- })
- }
- fs.open(opt.file, flag, onopen)
- })
-
- return cb ? promise.then(cb, cb) : promise
-}
-
-const addFilesSync = (p, files) => {
- files.forEach(file => {
- if (file.charAt(0) === '@')
- t({
- file: path.resolve(p.cwd, file.substr(1)),
- sync: true,
- noResume: true,
- onentry: entry => p.add(entry)
- })
- else
- p.add(file)
- })
- p.end()
-}
-
-const addFilesAsync = (p, files) => {
- while (files.length) {
- const file = files.shift()
- if (file.charAt(0) === '@')
- return t({
- file: path.resolve(p.cwd, file.substr(1)),
- noResume: true,
- onentry: entry => p.add(entry)
- }).then(_ => addFilesAsync(p, files))
- else
- p.add(file)
- }
- p.end()
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/types.js b/node_modules/cacache/node_modules/tar/lib/types.js
deleted file mode 100644
index df425652b..000000000
--- a/node_modules/cacache/node_modules/tar/lib/types.js
+++ /dev/null
@@ -1,44 +0,0 @@
-'use strict'
-// map types from key to human-friendly name
-exports.name = new Map([
- ['0', 'File'],
- // same as File
- ['', 'OldFile'],
- ['1', 'Link'],
- ['2', 'SymbolicLink'],
- // Devices and FIFOs aren't fully supported
- // they are parsed, but skipped when unpacking
- ['3', 'CharacterDevice'],
- ['4', 'BlockDevice'],
- ['5', 'Directory'],
- ['6', 'FIFO'],
- // same as File
- ['7', 'ContiguousFile'],
- // pax headers
- ['g', 'GlobalExtendedHeader'],
- ['x', 'ExtendedHeader'],
- // vendor-specific stuff
- // skip
- ['A', 'SolarisACL'],
- // like 5, but with data, which should be skipped
- ['D', 'GNUDumpDir'],
- // metadata only, skip
- ['I', 'Inode'],
- // data = link path of next file
- ['K', 'NextFileHasLongLinkpath'],
- // data = path of next file
- ['L', 'NextFileHasLongPath'],
- // skip
- ['M', 'ContinuationFile'],
- // like L
- ['N', 'OldGnuLongPath'],
- // skip
- ['S', 'SparseFile'],
- // skip
- ['V', 'TapeVolumeHeader'],
- // like x
- ['X', 'OldExtendedHeader']
-])
-
-// map the other direction
-exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]]))
diff --git a/node_modules/cacache/node_modules/tar/lib/unpack.js b/node_modules/cacache/node_modules/tar/lib/unpack.js
deleted file mode 100644
index af0e0ffa0..000000000
--- a/node_modules/cacache/node_modules/tar/lib/unpack.js
+++ /dev/null
@@ -1,680 +0,0 @@
-'use strict'
-
-// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.
-// but the path reservations are required to avoid race conditions where
-// parallelized unpack ops may mess with one another, due to dependencies
-// (like a Link depending on its target) or destructive operations (like
-// clobbering an fs object to create one of a different type.)
-
-const assert = require('assert')
-const EE = require('events').EventEmitter
-const Parser = require('./parse.js')
-const fs = require('fs')
-const fsm = require('fs-minipass')
-const path = require('path')
-const mkdir = require('./mkdir.js')
-const mkdirSync = mkdir.sync
-const wc = require('./winchars.js')
-const pathReservations = require('./path-reservations.js')
-
-const ONENTRY = Symbol('onEntry')
-const CHECKFS = Symbol('checkFs')
-const CHECKFS2 = Symbol('checkFs2')
-const ISREUSABLE = Symbol('isReusable')
-const MAKEFS = Symbol('makeFs')
-const FILE = Symbol('file')
-const DIRECTORY = Symbol('directory')
-const LINK = Symbol('link')
-const SYMLINK = Symbol('symlink')
-const HARDLINK = Symbol('hardlink')
-const UNSUPPORTED = Symbol('unsupported')
-const UNKNOWN = Symbol('unknown')
-const CHECKPATH = Symbol('checkPath')
-const MKDIR = Symbol('mkdir')
-const ONERROR = Symbol('onError')
-const PENDING = Symbol('pending')
-const PEND = Symbol('pend')
-const UNPEND = Symbol('unpend')
-const ENDED = Symbol('ended')
-const MAYBECLOSE = Symbol('maybeClose')
-const SKIP = Symbol('skip')
-const DOCHOWN = Symbol('doChown')
-const UID = Symbol('uid')
-const GID = Symbol('gid')
-const crypto = require('crypto')
-const getFlag = require('./get-write-flag.js')
-
-/* istanbul ignore next */
-const neverCalled = () => {
- throw new Error('sync function called cb somehow?!?')
-}
-
-// Unlinks on Windows are not atomic.
-//
-// This means that if you have a file entry, followed by another
-// file entry with an identical name, and you cannot re-use the file
-// (because it's a hardlink, or because unlink:true is set, or it's
-// Windows, which does not have useful nlink values), then the unlink
-// will be committed to the disk AFTER the new file has been written
-// over the old one, deleting the new file.
-//
-// To work around this, on Windows systems, we rename the file and then
-// delete the renamed file. It's a sloppy kludge, but frankly, I do not
-// know of a better way to do this, given windows' non-atomic unlink
-// semantics.
-//
-// See: https://github.com/npm/node-tar/issues/183
-/* istanbul ignore next */
-const unlinkFile = (path, cb) => {
- if (process.platform !== 'win32')
- return fs.unlink(path, cb)
-
- const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
- fs.rename(path, name, er => {
- if (er)
- return cb(er)
- fs.unlink(name, cb)
- })
-}
-
-/* istanbul ignore next */
-const unlinkFileSync = path => {
- if (process.platform !== 'win32')
- return fs.unlinkSync(path)
-
- const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
- fs.renameSync(path, name)
- fs.unlinkSync(name)
-}
-
-// this.gid, entry.gid, this.processUid
-const uint32 = (a, b, c) =>
- a === a >>> 0 ? a
- : b === b >>> 0 ? b
- : c
-
-class Unpack extends Parser {
- constructor (opt) {
- if (!opt)
- opt = {}
-
- opt.ondone = _ => {
- this[ENDED] = true
- this[MAYBECLOSE]()
- }
-
- super(opt)
-
- this.reservations = pathReservations()
-
- this.transform = typeof opt.transform === 'function' ? opt.transform : null
-
- this.writable = true
- this.readable = false
-
- this[PENDING] = 0
- this[ENDED] = false
-
- this.dirCache = opt.dirCache || new Map()
-
- if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {
- // need both or neither
- if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number')
- throw new TypeError('cannot set owner without number uid and gid')
- if (opt.preserveOwner)
- throw new TypeError(
- 'cannot preserve owner in archive and also set owner explicitly')
- this.uid = opt.uid
- this.gid = opt.gid
- this.setOwner = true
- } else {
- this.uid = null
- this.gid = null
- this.setOwner = false
- }
-
- // default true for root
- if (opt.preserveOwner === undefined && typeof opt.uid !== 'number')
- this.preserveOwner = process.getuid && process.getuid() === 0
- else
- this.preserveOwner = !!opt.preserveOwner
-
- this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ?
- process.getuid() : null
- this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ?
- process.getgid() : null
-
- // mostly just for testing, but useful in some cases.
- // Forcibly trigger a chown on every entry, no matter what
- this.forceChown = opt.forceChown === true
-
- // turn ><?| in filenames into 0xf000-higher encoded forms
- this.win32 = !!opt.win32 || process.platform === 'win32'
-
- // do not unpack over files that are newer than what's in the archive
- this.newer = !!opt.newer
-
- // do not unpack over ANY files
- this.keep = !!opt.keep
-
- // do not set mtime/atime of extracted entries
- this.noMtime = !!opt.noMtime
-
- // allow .., absolute path entries, and unpacking through symlinks
- // without this, warn and skip .., relativize absolutes, and error
- // on symlinks in extraction path
- this.preservePaths = !!opt.preservePaths
-
- // unlink files and links before writing. This breaks existing hard
- // links, and removes symlink directories rather than erroring
- this.unlink = !!opt.unlink
-
- this.cwd = path.resolve(opt.cwd || process.cwd())
- this.strip = +opt.strip || 0
- this.processUmask = process.umask()
- this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask
- // default mode for dirs created as parents
- this.dmode = opt.dmode || (0o0777 & (~this.umask))
- this.fmode = opt.fmode || (0o0666 & (~this.umask))
- this.on('entry', entry => this[ONENTRY](entry))
- }
-
- // a bad or damaged archive is a warning for Parser, but an error
- // when extracting. Mark those errors as unrecoverable, because
- // the Unpack contract cannot be met.
- warn (code, msg, data = {}) {
- if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT')
- data.recoverable = false
- return super.warn(code, msg, data)
- }
-
- [MAYBECLOSE] () {
- if (this[ENDED] && this[PENDING] === 0) {
- this.emit('prefinish')
- this.emit('finish')
- this.emit('end')
- this.emit('close')
- }
- }
-
- [CHECKPATH] (entry) {
- if (this.strip) {
- const parts = entry.path.split(/\/|\\/)
- if (parts.length < this.strip)
- return false
- entry.path = parts.slice(this.strip).join('/')
-
- if (entry.type === 'Link') {
- const linkparts = entry.linkpath.split(/\/|\\/)
- if (linkparts.length >= this.strip)
- entry.linkpath = linkparts.slice(this.strip).join('/')
- }
- }
-
- if (!this.preservePaths) {
- const p = entry.path
- if (p.match(/(^|\/|\\)\.\.(\\|\/|$)/)) {
- this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {
- entry,
- path: p,
- })
- return false
- }
-
- // absolutes on posix are also absolutes on win32
- // so we only need to test this one to get both
- if (path.win32.isAbsolute(p)) {
- const parsed = path.win32.parse(p)
- entry.path = p.substr(parsed.root.length)
- const r = parsed.root
- this.warn('TAR_ENTRY_INFO', `stripping ${r} from absolute path`, {
- entry,
- path: p,
- })
- }
- }
-
- // only encode : chars that aren't drive letter indicators
- if (this.win32) {
- const parsed = path.win32.parse(entry.path)
- entry.path = parsed.root === '' ? wc.encode(entry.path)
- : parsed.root + wc.encode(entry.path.substr(parsed.root.length))
- }
-
- if (path.isAbsolute(entry.path))
- entry.absolute = entry.path
- else
- entry.absolute = path.resolve(this.cwd, entry.path)
-
- return true
- }
-
- [ONENTRY] (entry) {
- if (!this[CHECKPATH](entry))
- return entry.resume()
-
- assert.equal(typeof entry.absolute, 'string')
-
- switch (entry.type) {
- case 'Directory':
- case 'GNUDumpDir':
- if (entry.mode)
- entry.mode = entry.mode | 0o700
-
- case 'File':
- case 'OldFile':
- case 'ContiguousFile':
- case 'Link':
- case 'SymbolicLink':
- return this[CHECKFS](entry)
-
- case 'CharacterDevice':
- case 'BlockDevice':
- case 'FIFO':
- return this[UNSUPPORTED](entry)
- }
- }
-
- [ONERROR] (er, entry) {
- // Cwd has to exist, or else nothing works. That's serious.
- // Other errors are warnings, which raise the error in strict
- // mode, but otherwise continue on.
- if (er.name === 'CwdError')
- this.emit('error', er)
- else {
- this.warn('TAR_ENTRY_ERROR', er, {entry})
- this[UNPEND]()
- entry.resume()
- }
- }
-
- [MKDIR] (dir, mode, cb) {
- mkdir(dir, {
- uid: this.uid,
- gid: this.gid,
- processUid: this.processUid,
- processGid: this.processGid,
- umask: this.processUmask,
- preserve: this.preservePaths,
- unlink: this.unlink,
- cache: this.dirCache,
- cwd: this.cwd,
- mode: mode
- }, cb)
- }
-
- [DOCHOWN] (entry) {
- // in preserve owner mode, chown if the entry doesn't match process
- // in set owner mode, chown if setting doesn't match process
- return this.forceChown ||
- this.preserveOwner &&
- ( typeof entry.uid === 'number' && entry.uid !== this.processUid ||
- typeof entry.gid === 'number' && entry.gid !== this.processGid )
- ||
- ( typeof this.uid === 'number' && this.uid !== this.processUid ||
- typeof this.gid === 'number' && this.gid !== this.processGid )
- }
-
- [UID] (entry) {
- return uint32(this.uid, entry.uid, this.processUid)
- }
-
- [GID] (entry) {
- return uint32(this.gid, entry.gid, this.processGid)
- }
-
- [FILE] (entry, fullyDone) {
- const mode = entry.mode & 0o7777 || this.fmode
- const stream = new fsm.WriteStream(entry.absolute, {
- flags: getFlag(entry.size),
- mode: mode,
- autoClose: false
- })
- stream.on('error', er => this[ONERROR](er, entry))
-
- let actions = 1
- const done = er => {
- if (er)
- return this[ONERROR](er, entry)
-
- if (--actions === 0) {
- fs.close(stream.fd, er => {
- fullyDone()
- er ? this[ONERROR](er, entry) : this[UNPEND]()
- })
- }
- }
-
- stream.on('finish', _ => {
- // if futimes fails, try utimes
- // if utimes fails, fail with the original error
- // same for fchown/chown
- const abs = entry.absolute
- const fd = stream.fd
-
- if (entry.mtime && !this.noMtime) {
- actions++
- const atime = entry.atime || new Date()
- const mtime = entry.mtime
- fs.futimes(fd, atime, mtime, er =>
- er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er))
- : done())
- }
-
- if (this[DOCHOWN](entry)) {
- actions++
- const uid = this[UID](entry)
- const gid = this[GID](entry)
- fs.fchown(fd, uid, gid, er =>
- er ? fs.chown(abs, uid, gid, er2 => done(er2 && er))
- : done())
- }
-
- done()
- })
-
- const tx = this.transform ? this.transform(entry) || entry : entry
- if (tx !== entry) {
- tx.on('error', er => this[ONERROR](er, entry))
- entry.pipe(tx)
- }
- tx.pipe(stream)
- }
-
- [DIRECTORY] (entry, fullyDone) {
- const mode = entry.mode & 0o7777 || this.dmode
- this[MKDIR](entry.absolute, mode, er => {
- if (er) {
- fullyDone()
- return this[ONERROR](er, entry)
- }
-
- let actions = 1
- const done = _ => {
- if (--actions === 0) {
- fullyDone()
- this[UNPEND]()
- entry.resume()
- }
- }
-
- if (entry.mtime && !this.noMtime) {
- actions++
- fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done)
- }
-
- if (this[DOCHOWN](entry)) {
- actions++
- fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done)
- }
-
- done()
- })
- }
-
- [UNSUPPORTED] (entry) {
- entry.unsupported = true
- this.warn('TAR_ENTRY_UNSUPPORTED',
- `unsupported entry type: ${entry.type}`, {entry})
- entry.resume()
- }
-
- [SYMLINK] (entry, done) {
- this[LINK](entry, entry.linkpath, 'symlink', done)
- }
-
- [HARDLINK] (entry, done) {
- this[LINK](entry, path.resolve(this.cwd, entry.linkpath), 'link', done)
- }
-
- [PEND] () {
- this[PENDING]++
- }
-
- [UNPEND] () {
- this[PENDING]--
- this[MAYBECLOSE]()
- }
-
- [SKIP] (entry) {
- this[UNPEND]()
- entry.resume()
- }
-
- // Check if we can reuse an existing filesystem entry safely and
- // overwrite it, rather than unlinking and recreating
- // Windows doesn't report a useful nlink, so we just never reuse entries
- [ISREUSABLE] (entry, st) {
- return entry.type === 'File' &&
- !this.unlink &&
- st.isFile() &&
- st.nlink <= 1 &&
- process.platform !== 'win32'
- }
-
- // check if a thing is there, and if so, try to clobber it
- [CHECKFS] (entry) {
- this[PEND]()
- const paths = [entry.path]
- if (entry.linkpath)
- paths.push(entry.linkpath)
- this.reservations.reserve(paths, done => this[CHECKFS2](entry, done))
- }
- [CHECKFS2] (entry, done) {
- this[MKDIR](path.dirname(entry.absolute), this.dmode, er => {
- if (er) {
- done()
- return this[ONERROR](er, entry)
- }
- fs.lstat(entry.absolute, (er, st) => {
- if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
- this[SKIP](entry)
- done()
- } else if (er || this[ISREUSABLE](entry, st)) {
- this[MAKEFS](null, entry, done)
- }
- else if (st.isDirectory()) {
- if (entry.type === 'Directory') {
- if (!entry.mode || (st.mode & 0o7777) === entry.mode)
- this[MAKEFS](null, entry, done)
- else
- fs.chmod(entry.absolute, entry.mode,
- er => this[MAKEFS](er, entry, done))
- } else
- fs.rmdir(entry.absolute, er => this[MAKEFS](er, entry, done))
- } else
- unlinkFile(entry.absolute, er => this[MAKEFS](er, entry, done))
- })
- })
- }
-
- [MAKEFS] (er, entry, done) {
- if (er)
- return this[ONERROR](er, entry)
-
- switch (entry.type) {
- case 'File':
- case 'OldFile':
- case 'ContiguousFile':
- return this[FILE](entry, done)
-
- case 'Link':
- return this[HARDLINK](entry, done)
-
- case 'SymbolicLink':
- return this[SYMLINK](entry, done)
-
- case 'Directory':
- case 'GNUDumpDir':
- return this[DIRECTORY](entry, done)
- }
- }
-
- [LINK] (entry, linkpath, link, done) {
- // XXX: get the type ('file' or 'dir') for windows
- fs[link](linkpath, entry.absolute, er => {
- if (er)
- return this[ONERROR](er, entry)
- done()
- this[UNPEND]()
- entry.resume()
- })
- }
-}
-
-class UnpackSync extends Unpack {
- constructor (opt) {
- super(opt)
- }
-
- [CHECKFS] (entry) {
- const er = this[MKDIR](path.dirname(entry.absolute), this.dmode, neverCalled)
- if (er)
- return this[ONERROR](er, entry)
- try {
- const st = fs.lstatSync(entry.absolute)
- if (this.keep || this.newer && st.mtime > entry.mtime)
- return this[SKIP](entry)
- else if (this[ISREUSABLE](entry, st))
- return this[MAKEFS](null, entry, neverCalled)
- else {
- try {
- if (st.isDirectory()) {
- if (entry.type === 'Directory') {
- if (entry.mode && (st.mode & 0o7777) !== entry.mode)
- fs.chmodSync(entry.absolute, entry.mode)
- } else
- fs.rmdirSync(entry.absolute)
- } else
- unlinkFileSync(entry.absolute)
- return this[MAKEFS](null, entry, neverCalled)
- } catch (er) {
- return this[ONERROR](er, entry)
- }
- }
- } catch (er) {
- return this[MAKEFS](null, entry, neverCalled)
- }
- }
-
- [FILE] (entry, _) {
- const mode = entry.mode & 0o7777 || this.fmode
-
- const oner = er => {
- let closeError
- try {
- fs.closeSync(fd)
- } catch (e) {
- closeError = e
- }
- if (er || closeError)
- this[ONERROR](er || closeError, entry)
- }
-
- let stream
- let fd
- try {
- fd = fs.openSync(entry.absolute, getFlag(entry.size), mode)
- } catch (er) {
- return oner(er)
- }
- const tx = this.transform ? this.transform(entry) || entry : entry
- if (tx !== entry) {
- tx.on('error', er => this[ONERROR](er, entry))
- entry.pipe(tx)
- }
-
- tx.on('data', chunk => {
- try {
- fs.writeSync(fd, chunk, 0, chunk.length)
- } catch (er) {
- oner(er)
- }
- })
-
- tx.on('end', _ => {
- let er = null
- // try both, falling futimes back to utimes
- // if either fails, handle the first error
- if (entry.mtime && !this.noMtime) {
- const atime = entry.atime || new Date()
- const mtime = entry.mtime
- try {
- fs.futimesSync(fd, atime, mtime)
- } catch (futimeser) {
- try {
- fs.utimesSync(entry.absolute, atime, mtime)
- } catch (utimeser) {
- er = futimeser
- }
- }
- }
-
- if (this[DOCHOWN](entry)) {
- const uid = this[UID](entry)
- const gid = this[GID](entry)
-
- try {
- fs.fchownSync(fd, uid, gid)
- } catch (fchowner) {
- try {
- fs.chownSync(entry.absolute, uid, gid)
- } catch (chowner) {
- er = er || fchowner
- }
- }
- }
-
- oner(er)
- })
- }
-
- [DIRECTORY] (entry, _) {
- const mode = entry.mode & 0o7777 || this.dmode
- const er = this[MKDIR](entry.absolute, mode)
- if (er)
- return this[ONERROR](er, entry)
- if (entry.mtime && !this.noMtime) {
- try {
- fs.utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime)
- } catch (er) {}
- }
- if (this[DOCHOWN](entry)) {
- try {
- fs.chownSync(entry.absolute, this[UID](entry), this[GID](entry))
- } catch (er) {}
- }
- entry.resume()
- }
-
- [MKDIR] (dir, mode) {
- try {
- return mkdir.sync(dir, {
- uid: this.uid,
- gid: this.gid,
- processUid: this.processUid,
- processGid: this.processGid,
- umask: this.processUmask,
- preserve: this.preservePaths,
- unlink: this.unlink,
- cache: this.dirCache,
- cwd: this.cwd,
- mode: mode
- })
- } catch (er) {
- return er
- }
- }
-
- [LINK] (entry, linkpath, link, _) {
- try {
- fs[link + 'Sync'](linkpath, entry.absolute)
- entry.resume()
- } catch (er) {
- return this[ONERROR](er, entry)
- }
- }
-}
-
-Unpack.Sync = UnpackSync
-module.exports = Unpack
diff --git a/node_modules/cacache/node_modules/tar/lib/update.js b/node_modules/cacache/node_modules/tar/lib/update.js
deleted file mode 100644
index 16c3e93ed..000000000
--- a/node_modules/cacache/node_modules/tar/lib/update.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict'
-
-// tar -u
-
-const hlo = require('./high-level-opt.js')
-const r = require('./replace.js')
-// just call tar.r with the filter and mtimeCache
-
-const u = module.exports = (opt_, files, cb) => {
- const opt = hlo(opt_)
-
- if (!opt.file)
- throw new TypeError('file is required')
-
- if (opt.gzip)
- throw new TypeError('cannot append to compressed archives')
-
- if (!files || !Array.isArray(files) || !files.length)
- throw new TypeError('no files or directories specified')
-
- files = Array.from(files)
-
- mtimeFilter(opt)
- return r(opt, files, cb)
-}
-
-const mtimeFilter = opt => {
- const filter = opt.filter
-
- if (!opt.mtimeCache)
- opt.mtimeCache = new Map()
-
- opt.filter = filter ? (path, stat) =>
- filter(path, stat) && !(opt.mtimeCache.get(path) > stat.mtime)
- : (path, stat) => !(opt.mtimeCache.get(path) > stat.mtime)
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/warn-mixin.js b/node_modules/cacache/node_modules/tar/lib/warn-mixin.js
deleted file mode 100644
index 11eb52cc6..000000000
--- a/node_modules/cacache/node_modules/tar/lib/warn-mixin.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-module.exports = Base => class extends Base {
- warn (code, message, data = {}) {
- if (this.file)
- data.file = this.file
- if (this.cwd)
- data.cwd = this.cwd
- data.code = message instanceof Error && message.code || code
- data.tarCode = code
- if (!this.strict && data.recoverable !== false) {
- if (message instanceof Error) {
- data = Object.assign(message, data)
- message = message.message
- }
- this.emit('warn', data.tarCode, message, data)
- } else if (message instanceof Error) {
- this.emit('error', Object.assign(message, data))
- } else
- this.emit('error', Object.assign(new Error(`${code}: ${message}`), data))
- }
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/winchars.js b/node_modules/cacache/node_modules/tar/lib/winchars.js
deleted file mode 100644
index cf6ea0606..000000000
--- a/node_modules/cacache/node_modules/tar/lib/winchars.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-
-// When writing files on Windows, translate the characters to their
-// 0xf000 higher-encoded versions.
-
-const raw = [
- '|',
- '<',
- '>',
- '?',
- ':'
-]
-
-const win = raw.map(char =>
- String.fromCharCode(0xf000 + char.charCodeAt(0)))
-
-const toWin = new Map(raw.map((char, i) => [char, win[i]]))
-const toRaw = new Map(win.map((char, i) => [char, raw[i]]))
-
-module.exports = {
- encode: s => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s),
- decode: s => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)
-}
diff --git a/node_modules/cacache/node_modules/tar/lib/write-entry.js b/node_modules/cacache/node_modules/tar/lib/write-entry.js
deleted file mode 100644
index 0e33cb59d..000000000
--- a/node_modules/cacache/node_modules/tar/lib/write-entry.js
+++ /dev/null
@@ -1,436 +0,0 @@
-'use strict'
-const MiniPass = require('minipass')
-const Pax = require('./pax.js')
-const Header = require('./header.js')
-const ReadEntry = require('./read-entry.js')
-const fs = require('fs')
-const path = require('path')
-
-const types = require('./types.js')
-const maxReadSize = 16 * 1024 * 1024
-const PROCESS = Symbol('process')
-const FILE = Symbol('file')
-const DIRECTORY = Symbol('directory')
-const SYMLINK = Symbol('symlink')
-const HARDLINK = Symbol('hardlink')
-const HEADER = Symbol('header')
-const READ = Symbol('read')
-const LSTAT = Symbol('lstat')
-const ONLSTAT = Symbol('onlstat')
-const ONREAD = Symbol('onread')
-const ONREADLINK = Symbol('onreadlink')
-const OPENFILE = Symbol('openfile')
-const ONOPENFILE = Symbol('onopenfile')
-const CLOSE = Symbol('close')
-const MODE = Symbol('mode')
-const warner = require('./warn-mixin.js')
-const winchars = require('./winchars.js')
-
-const modeFix = require('./mode-fix.js')
-
-const WriteEntry = warner(class WriteEntry extends MiniPass {
- constructor (p, opt) {
- opt = opt || {}
- super(opt)
- if (typeof p !== 'string')
- throw new TypeError('path is required')
- this.path = p
- // suppress atime, ctime, uid, gid, uname, gname
- this.portable = !!opt.portable
- // until node has builtin pwnam functions, this'll have to do
- this.myuid = process.getuid && process.getuid()
- this.myuser = process.env.USER || ''
- this.maxReadSize = opt.maxReadSize || maxReadSize
- this.linkCache = opt.linkCache || new Map()
- this.statCache = opt.statCache || new Map()
- this.preservePaths = !!opt.preservePaths
- this.cwd = opt.cwd || process.cwd()
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.noMtime = !!opt.noMtime
- this.mtime = opt.mtime || null
-
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- let pathWarn = false
- if (!this.preservePaths && path.win32.isAbsolute(p)) {
- // absolutes on posix are also absolutes on win32
- // so we only need to test this one to get both
- const parsed = path.win32.parse(p)
- this.path = p.substr(parsed.root.length)
- pathWarn = parsed.root
- }
-
- this.win32 = !!opt.win32 || process.platform === 'win32'
- if (this.win32) {
- this.path = winchars.decode(this.path.replace(/\\/g, '/'))
- p = p.replace(/\\/g, '/')
- }
-
- this.absolute = opt.absolute || path.resolve(this.cwd, p)
-
- if (this.path === '')
- this.path = './'
-
- if (pathWarn) {
- this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, {
- entry: this,
- path: pathWarn + this.path,
- })
- }
-
- if (this.statCache.has(this.absolute))
- this[ONLSTAT](this.statCache.get(this.absolute))
- else
- this[LSTAT]()
- }
-
- [LSTAT] () {
- fs.lstat(this.absolute, (er, stat) => {
- if (er)
- return this.emit('error', er)
- this[ONLSTAT](stat)
- })
- }
-
- [ONLSTAT] (stat) {
- this.statCache.set(this.absolute, stat)
- this.stat = stat
- if (!stat.isFile())
- stat.size = 0
- this.type = getType(stat)
- this.emit('stat', stat)
- this[PROCESS]()
- }
-
- [PROCESS] () {
- switch (this.type) {
- case 'File': return this[FILE]()
- case 'Directory': return this[DIRECTORY]()
- case 'SymbolicLink': return this[SYMLINK]()
- // unsupported types are ignored.
- default: return this.end()
- }
- }
-
- [MODE] (mode) {
- return modeFix(mode, this.type === 'Directory', this.portable)
- }
-
- [HEADER] () {
- if (this.type === 'Directory' && this.portable)
- this.noMtime = true
-
- this.header = new Header({
- path: this.path,
- linkpath: this.linkpath,
- // only the permissions and setuid/setgid/sticky bitflags
- // not the higher-order bits that specify file type
- mode: this[MODE](this.stat.mode),
- uid: this.portable ? null : this.stat.uid,
- gid: this.portable ? null : this.stat.gid,
- size: this.stat.size,
- mtime: this.noMtime ? null : this.mtime || this.stat.mtime,
- type: this.type,
- uname: this.portable ? null :
- this.stat.uid === this.myuid ? this.myuser : '',
- atime: this.portable ? null : this.stat.atime,
- ctime: this.portable ? null : this.stat.ctime
- })
-
- if (this.header.encode() && !this.noPax)
- this.write(new Pax({
- atime: this.portable ? null : this.header.atime,
- ctime: this.portable ? null : this.header.ctime,
- gid: this.portable ? null : this.header.gid,
- mtime: this.noMtime ? null : this.mtime || this.header.mtime,
- path: this.path,
- linkpath: this.linkpath,
- size: this.header.size,
- uid: this.portable ? null : this.header.uid,
- uname: this.portable ? null : this.header.uname,
- dev: this.portable ? null : this.stat.dev,
- ino: this.portable ? null : this.stat.ino,
- nlink: this.portable ? null : this.stat.nlink
- }).encode())
- this.write(this.header.block)
- }
-
- [DIRECTORY] () {
- if (this.path.substr(-1) !== '/')
- this.path += '/'
- this.stat.size = 0
- this[HEADER]()
- this.end()
- }
-
- [SYMLINK] () {
- fs.readlink(this.absolute, (er, linkpath) => {
- if (er)
- return this.emit('error', er)
- this[ONREADLINK](linkpath)
- })
- }
-
- [ONREADLINK] (linkpath) {
- this.linkpath = linkpath.replace(/\\/g, '/')
- this[HEADER]()
- this.end()
- }
-
- [HARDLINK] (linkpath) {
- this.type = 'Link'
- this.linkpath = path.relative(this.cwd, linkpath).replace(/\\/g, '/')
- this.stat.size = 0
- this[HEADER]()
- this.end()
- }
-
- [FILE] () {
- if (this.stat.nlink > 1) {
- const linkKey = this.stat.dev + ':' + this.stat.ino
- if (this.linkCache.has(linkKey)) {
- const linkpath = this.linkCache.get(linkKey)
- if (linkpath.indexOf(this.cwd) === 0)
- return this[HARDLINK](linkpath)
- }
- this.linkCache.set(linkKey, this.absolute)
- }
-
- this[HEADER]()
- if (this.stat.size === 0)
- return this.end()
-
- this[OPENFILE]()
- }
-
- [OPENFILE] () {
- fs.open(this.absolute, 'r', (er, fd) => {
- if (er)
- return this.emit('error', er)
- this[ONOPENFILE](fd)
- })
- }
-
- [ONOPENFILE] (fd) {
- const blockLen = 512 * Math.ceil(this.stat.size / 512)
- const bufLen = Math.min(blockLen, this.maxReadSize)
- const buf = Buffer.allocUnsafe(bufLen)
- this[READ](fd, buf, 0, buf.length, 0, this.stat.size, blockLen)
- }
-
- [READ] (fd, buf, offset, length, pos, remain, blockRemain) {
- fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {
- if (er) {
- // ignoring the error from close(2) is a bad practice, but at
- // this point we already have an error, don't need another one
- return this[CLOSE](fd, () => this.emit('error', er))
- }
- this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead)
- })
- }
-
- [CLOSE] (fd, cb) {
- fs.close(fd, cb)
- }
-
- [ONREAD] (fd, buf, offset, length, pos, remain, blockRemain, bytesRead) {
- if (bytesRead <= 0 && remain > 0) {
- const er = new Error('encountered unexpected EOF')
- er.path = this.absolute
- er.syscall = 'read'
- er.code = 'EOF'
- return this[CLOSE](fd, () => this.emit('error', er))
- }
-
- if (bytesRead > remain) {
- const er = new Error('did not encounter expected EOF')
- er.path = this.absolute
- er.syscall = 'read'
- er.code = 'EOF'
- return this[CLOSE](fd, () => this.emit('error', er))
- }
-
- // null out the rest of the buffer, if we could fit the block padding
- if (bytesRead === remain) {
- for (let i = bytesRead; i < length && bytesRead < blockRemain; i++) {
- buf[i + offset] = 0
- bytesRead ++
- remain ++
- }
- }
-
- const writeBuf = offset === 0 && bytesRead === buf.length ?
- buf : buf.slice(offset, offset + bytesRead)
- remain -= bytesRead
- blockRemain -= bytesRead
- pos += bytesRead
- offset += bytesRead
-
- this.write(writeBuf)
-
- if (!remain) {
- if (blockRemain)
- this.write(Buffer.alloc(blockRemain))
- return this[CLOSE](fd, er => er ? this.emit('error', er) : this.end())
- }
-
- if (offset >= length) {
- buf = Buffer.allocUnsafe(length)
- offset = 0
- }
- length = buf.length - offset
- this[READ](fd, buf, offset, length, pos, remain, blockRemain)
- }
-})
-
-class WriteEntrySync extends WriteEntry {
- constructor (path, opt) {
- super(path, opt)
- }
-
- [LSTAT] () {
- this[ONLSTAT](fs.lstatSync(this.absolute))
- }
-
- [SYMLINK] () {
- this[ONREADLINK](fs.readlinkSync(this.absolute))
- }
-
- [OPENFILE] () {
- this[ONOPENFILE](fs.openSync(this.absolute, 'r'))
- }
-
- [READ] (fd, buf, offset, length, pos, remain, blockRemain) {
- let threw = true
- try {
- const bytesRead = fs.readSync(fd, buf, offset, length, pos)
- this[ONREAD](fd, buf, offset, length, pos, remain, blockRemain, bytesRead)
- threw = false
- } finally {
- // ignoring the error from close(2) is a bad practice, but at
- // this point we already have an error, don't need another one
- if (threw)
- try { this[CLOSE](fd, () => {}) } catch (er) {}
- }
- }
-
- [CLOSE] (fd, cb) {
- fs.closeSync(fd)
- cb()
- }
-}
-
-const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
- constructor (readEntry, opt) {
- opt = opt || {}
- super(opt)
- this.preservePaths = !!opt.preservePaths
- this.portable = !!opt.portable
- this.strict = !!opt.strict
- this.noPax = !!opt.noPax
- this.noMtime = !!opt.noMtime
-
- this.readEntry = readEntry
- this.type = readEntry.type
- if (this.type === 'Directory' && this.portable)
- this.noMtime = true
-
- this.path = readEntry.path
- this.mode = this[MODE](readEntry.mode)
- this.uid = this.portable ? null : readEntry.uid
- this.gid = this.portable ? null : readEntry.gid
- this.uname = this.portable ? null : readEntry.uname
- this.gname = this.portable ? null : readEntry.gname
- this.size = readEntry.size
- this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
- this.atime = this.portable ? null : readEntry.atime
- this.ctime = this.portable ? null : readEntry.ctime
- this.linkpath = readEntry.linkpath
-
- if (typeof opt.onwarn === 'function')
- this.on('warn', opt.onwarn)
-
- let pathWarn = false
- if (path.isAbsolute(this.path) && !this.preservePaths) {
- const parsed = path.parse(this.path)
- pathWarn = parsed.root
- this.path = this.path.substr(parsed.root.length)
- }
-
- this.remain = readEntry.size
- this.blockRemain = readEntry.startBlockSize
-
- this.header = new Header({
- path: this.path,
- linkpath: this.linkpath,
- // only the permissions and setuid/setgid/sticky bitflags
- // not the higher-order bits that specify file type
- mode: this.mode,
- uid: this.portable ? null : this.uid,
- gid: this.portable ? null : this.gid,
- size: this.size,
- mtime: this.noMtime ? null : this.mtime,
- type: this.type,
- uname: this.portable ? null : this.uname,
- atime: this.portable ? null : this.atime,
- ctime: this.portable ? null : this.ctime
- })
-
- if (pathWarn) {
- this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, {
- entry: this,
- path: pathWarn + this.path,
- })
- }
-
- if (this.header.encode() && !this.noPax)
- super.write(new Pax({
- atime: this.portable ? null : this.atime,
- ctime: this.portable ? null : this.ctime,
- gid: this.portable ? null : this.gid,
- mtime: this.noMtime ? null : this.mtime,
- path: this.path,
- linkpath: this.linkpath,
- size: this.size,
- uid: this.portable ? null : this.uid,
- uname: this.portable ? null : this.uname,
- dev: this.portable ? null : this.readEntry.dev,
- ino: this.portable ? null : this.readEntry.ino,
- nlink: this.portable ? null : this.readEntry.nlink
- }).encode())
-
- super.write(this.header.block)
- readEntry.pipe(this)
- }
-
- [MODE] (mode) {
- return modeFix(mode, this.type === 'Directory', this.portable)
- }
-
- write (data) {
- const writeLen = data.length
- if (writeLen > this.blockRemain)
- throw new Error('writing more to entry than is appropriate')
- this.blockRemain -= writeLen
- return super.write(data)
- }
-
- end () {
- if (this.blockRemain)
- this.write(Buffer.alloc(this.blockRemain))
- return super.end()
- }
-})
-
-WriteEntry.Sync = WriteEntrySync
-WriteEntry.Tar = WriteEntryTar
-
-const getType = stat =>
- stat.isFile() ? 'File'
- : stat.isDirectory() ? 'Directory'
- : stat.isSymbolicLink() ? 'SymbolicLink'
- : 'Unsupported'
-
-module.exports = WriteEntry
diff --git a/node_modules/cacache/node_modules/tar/package.json b/node_modules/cacache/node_modules/tar/package.json
deleted file mode 100644
index 55b356790..000000000
--- a/node_modules/cacache/node_modules/tar/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_from": "tar@^6.0.2",
- "_id": "tar@6.0.2",
- "_inBundle": false,
- "_integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==",
- "_location": "/cacache/tar",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "tar@^6.0.2",
- "name": "tar",
- "escapedName": "tar",
- "rawSpec": "^6.0.2",
- "saveSpec": null,
- "fetchSpec": "^6.0.2"
- },
- "_requiredBy": [
- "/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz",
- "_shasum": "5df17813468a6264ff14f766886c622b84ae2f39",
- "_spec": "tar@^6.0.2",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/node-tar/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^3.0.0",
- "minizlib": "^2.1.0",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- },
- "deprecated": false,
- "description": "tar for node",
- "devDependencies": {
- "chmodr": "^1.2.0",
- "end-of-stream": "^1.4.3",
- "events-to-array": "^1.1.2",
- "mutate-fs": "^2.1.1",
- "rimraf": "^2.7.1",
- "tap": "^14.9.2",
- "tar-fs": "^1.16.3",
- "tar-stream": "^1.6.2"
- },
- "engines": {
- "node": ">= 10"
- },
- "files": [
- "index.js",
- "lib/*.js"
- ],
- "homepage": "https://github.com/npm/node-tar#readme",
- "license": "ISC",
- "name": "tar",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-tar.git"
- },
- "scripts": {
- "bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done",
- "genparse": "node scripts/generate-parse-fixtures.js",
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "coverage-map": "map.js",
- "check-coverage": true
- },
- "version": "6.0.2"
-}
diff --git a/node_modules/cacache/package.json b/node_modules/cacache/package.json
index e5e0bcc71..3d57c0cc5 100644
--- a/node_modules/cacache/package.json
+++ b/node_modules/cacache/package.json
@@ -1,15 +1,11 @@
{
"_from": "cacache@latest",
- "_id": "cacache@15.0.4",
+ "_id": "cacache@15.0.5",
"_inBundle": false,
- "_integrity": "sha512-YlnKQqTbD/6iyoJvEY3KJftjrdBYroCbxxYXzhOzsFLWlp6KX4BOlEf4mTx0cMUfVaTS3ENL2QtDWeRYoGLkkw==",
+ "_integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==",
"_location": "/cacache",
"_phantomChildren": {
- "fs-minipass": "2.1.0",
- "glob": "7.1.4",
- "minipass": "3.1.1",
- "minizlib": "2.1.0",
- "yallist": "4.0.0"
+ "glob": "7.1.4"
},
"_requested": {
"type": "tag",
@@ -26,11 +22,10 @@
"/",
"/@npmcli/arborist",
"/make-fetch-happen",
- "/pacote",
- "/pacote/make-fetch-happen"
+ "/pacote"
],
- "_resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.4.tgz",
- "_shasum": "b2c23cf4ac4f5ead004fb15a0efb0a20340741f1",
+ "_resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz",
+ "_shasum": "69162833da29170d6732334643c60e005f5f17d0",
"_spec": "cacache@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -61,7 +56,7 @@
"fs-minipass": "^2.0.0",
"glob": "^7.1.4",
"infer-owner": "^1.0.4",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"minipass": "^3.1.1",
"minipass-collect": "^1.0.2",
"minipass-flush": "^1.0.5",
@@ -131,5 +126,5 @@
"100": true,
"test-regex": "test/[^/]*.js"
},
- "version": "15.0.4"
+ "version": "15.0.5"
}
diff --git a/node_modules/chownr/chownr.js b/node_modules/chownr/chownr.js
index 9f04393b7..0d4093216 100644
--- a/node_modules/chownr/chownr.js
+++ b/node_modules/chownr/chownr.js
@@ -7,10 +7,30 @@ const LCHOWN = fs.lchown ? 'lchown' : 'chown'
/* istanbul ignore next */
const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
+/* istanbul ignore next */
const needEISDIRHandled = fs.lchown &&
!process.version.match(/v1[1-9]+\./) &&
!process.version.match(/v10\.[6-9]/)
+const lchownSync = (path, uid, gid) => {
+ try {
+ return fs[LCHOWNSYNC](path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
+/* istanbul ignore next */
+const chownSync = (path, uid, gid) => {
+ try {
+ return fs.chownSync(path, uid, gid)
+ } catch (er) {
+ if (er.code !== 'ENOENT')
+ throw er
+ }
+}
+
/* istanbul ignore next */
const handleEISDIR =
needEISDIRHandled ? (path, uid, gid, cb) => er => {
@@ -28,14 +48,14 @@ const handleEISDIR =
const handleEISDirSync =
needEISDIRHandled ? (path, uid, gid) => {
try {
- return fs[LCHOWNSYNC](path, uid, gid)
+ return lchownSync(path, uid, gid)
} catch (er) {
if (er.code !== 'EISDIR')
throw er
- fs.chownSync(path, uid, gid)
+ chownSync(path, uid, gid)
}
}
- : (path, uid, gid) => fs[LCHOWNSYNC](path, uid, gid)
+ : (path, uid, gid) => lchownSync(path, uid, gid)
// fs.readdir could only accept an options object as of node v6
const nodeVersion = process.version
@@ -45,11 +65,19 @@ let readdirSync = (path, options) => fs.readdirSync(path, options)
if (/^v4\./.test(nodeVersion))
readdir = (path, options, cb) => fs.readdir(path, cb)
+const chown = (cpath, uid, gid, cb) => {
+ fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
+ // Skip ENOENT error
+ cb(er && er.code !== 'ENOENT' ? er : null)
+ }))
+}
+
const chownrKid = (p, child, uid, gid, cb) => {
if (typeof child === 'string')
return fs.lstat(path.resolve(p, child), (er, stats) => {
+ // Skip ENOENT error
if (er)
- return cb(er)
+ return cb(er.code !== 'ENOENT' ? er : null)
stats.name = child
chownrKid(p, stats, uid, gid, cb)
})
@@ -59,11 +87,11 @@ const chownrKid = (p, child, uid, gid, cb) => {
if (er)
return cb(er)
const cpath = path.resolve(p, child.name)
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb))
+ chown(cpath, uid, gid, cb)
})
} else {
const cpath = path.resolve(p, child.name)
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, cb))
+ chown(cpath, uid, gid, cb)
}
}
@@ -72,10 +100,14 @@ const chownr = (p, uid, gid, cb) => {
readdir(p, { withFileTypes: true }, (er, children) => {
// any error other than ENOTDIR or ENOTSUP means it's not readable,
// or doesn't exist. give up.
- if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er)
+ if (er) {
+ if (er.code === 'ENOENT')
+ return cb()
+ else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
+ return cb(er)
+ }
if (er || !children.length)
- return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb))
+ return chown(p, uid, gid, cb)
let len = children.length
let errState = null
@@ -85,7 +117,7 @@ const chownr = (p, uid, gid, cb) => {
if (er)
return cb(errState = er)
if (-- len === 0)
- return fs[LCHOWN](p, uid, gid, handleEISDIR(p, uid, gid, cb))
+ return chown(p, uid, gid, cb)
}
children.forEach(child => chownrKid(p, child, uid, gid, then))
@@ -94,9 +126,16 @@ const chownr = (p, uid, gid, cb) => {
const chownrKidSync = (p, child, uid, gid) => {
if (typeof child === 'string') {
- const stats = fs.lstatSync(path.resolve(p, child))
- stats.name = child
- child = stats
+ try {
+ const stats = fs.lstatSync(path.resolve(p, child))
+ stats.name = child
+ child = stats
+ } catch (er) {
+ if (er.code === 'ENOENT')
+ return
+ else
+ throw er
+ }
}
if (child.isDirectory())
@@ -110,12 +149,15 @@ const chownrSync = (p, uid, gid) => {
try {
children = readdirSync(p, { withFileTypes: true })
} catch (er) {
- if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP')
+ if (er.code === 'ENOENT')
+ return
+ else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP')
return handleEISDirSync(p, uid, gid)
- throw er
+ else
+ throw er
}
- if (children.length)
+ if (children && children.length)
children.forEach(child => chownrKidSync(p, child, uid, gid))
return handleEISDirSync(p, uid, gid)
diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json
index cc48dc912..f12ea9560 100644
--- a/node_modules/chownr/package.json
+++ b/node_modules/chownr/package.json
@@ -1,32 +1,28 @@
{
- "_from": "chownr@1.1.3",
- "_id": "chownr@1.1.3",
+ "_from": "chownr@latest",
+ "_id": "chownr@2.0.0",
"_inBundle": false,
- "_integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==",
+ "_integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
"_location": "/chownr",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "chownr@1.1.3",
+ "raw": "chownr@latest",
"name": "chownr",
"escapedName": "chownr",
- "rawSpec": "1.1.3",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "1.1.3"
+ "fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
- "/",
- "/cacache",
- "/gentle-fs",
- "/pacote",
- "/tar"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
- "_shasum": "42d837d5239688d55f303003a508230fa6727142",
- "_spec": "chownr@1.1.3",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "_shasum": "15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece",
+ "_spec": "chownr@latest",
+ "_where": "/Users/isaacs/dev/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -40,8 +36,11 @@
"description": "like `chown -R`",
"devDependencies": {
"mkdirp": "0.3",
- "rimraf": "",
- "tap": "^12.0.1"
+ "rimraf": "^2.7.1",
+ "tap": "^14.10.6"
+ },
+ "engines": {
+ "node": ">=10"
},
"files": [
"chownr.js"
@@ -55,10 +54,13 @@
"url": "git://github.com/isaacs/chownr.git"
},
"scripts": {
- "postpublish": "git push origin --follow-tags",
"postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
"preversion": "npm test",
- "test": "tap test/*.js --cov"
+ "test": "tap"
+ },
+ "tap": {
+ "check-coverage": true
},
- "version": "1.1.3"
+ "version": "2.0.0"
}
diff --git a/node_modules/cmd-shim/README.md b/node_modules/cmd-shim/README.md
index 2b8b2f468..60e6625f3 100644
--- a/node_modules/cmd-shim/README.md
+++ b/node_modules/cmd-shim/README.md
@@ -7,7 +7,7 @@ On Unix systems, you should use a symbolic link instead.
[![Build Status](https://img.shields.io/travis/npm/cmd-shim/master.svg)](https://travis-ci.org/npm/cmd-shim)
[![Dependency Status](https://img.shields.io/david/npm/cmd-shim.svg)](https://david-dm.org/npm/cmd-shim)
-[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim)
+[![npm version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim)
## Installation
@@ -17,28 +17,18 @@ npm install cmd-shim
## API
-### cmdShim(from, to, cb)
+### cmdShim(from, to) -> Promise
Create a cmd shim at `to` for the command line program at `from`.
e.g.
```javascript
var cmdShim = require('cmd-shim');
-cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {
- if (err) throw err;
-});
+cmdShim(__dirname + '/cli.js', '/usr/bin/command-name').then(() => {
+ // shims are created!
+})
```
-### cmdShim.ifExists(from, to, cb)
+### cmdShim.ifExists(from, to) -> Promise
The same as above, but will just continue if the file does not exist.
-Source:
-
-```javascript
-function cmdShimIfExists (from, to, cb) {
- fs.stat(from, function (er) {
- if (er) return cb()
- cmdShim(from, to, cb)
- })
-}
-```
diff --git a/node_modules/cmd-shim/index.js b/node_modules/cmd-shim/index.js
index 010bd38d3..8b2e6d295 100644
--- a/node_modules/cmd-shim/index.js
+++ b/node_modules/cmd-shim/index.js
@@ -8,97 +8,77 @@
// Write a binroot/pkg.bin + ".cmd" file that has this line in it:
// @<prog> <args...> %dp0%<target> %*
-module.exports = cmdShim
-cmdShim.ifExists = cmdShimIfExists
-
-var fs = require("graceful-fs")
-
-var mkdir = require("mkdirp")
- , path = require("path")
- , toBatchSyntax = require("./lib/to-batch-syntax")
- , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+=[^ \t]+\s+)*\s*([^ \t]+)(.*)$/
-
-function cmdShimIfExists (from, to, cb) {
- fs.stat(from, function (er) {
- if (er) return cb()
- cmdShim(from, to, cb)
- })
-}
+const {promisify} = require('util')
+const fs = require('fs')
+const writeFile = promisify(fs.writeFile)
+const readFile = promisify(fs.readFile)
+const chmod = promisify(fs.chmod)
+const stat = promisify(fs.stat)
+const unlink = promisify(fs.unlink)
+
+const {dirname, relative} = require('path')
+const mkdir = require('mkdirp-infer-owner')
+const toBatchSyntax = require('./lib/to-batch-syntax')
+const shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+=[^ \t]+\s+)*\s*([^ \t]+)(.*)$/
+
+const cmdShimIfExists = (from, to) =>
+ stat(from).then(() => cmdShim(from, to), () => {})
// Try to unlink, but ignore errors.
// Any problems will surface later.
-function rm (path, cb) {
- fs.unlink(path, function(er) {
- cb()
- })
-}
-
-function cmdShim (from, to, cb) {
- fs.stat(from, function (er, stat) {
- if (er)
- return cb(er)
+const rm = path => unlink(path).catch(() => {})
- cmdShim_(from, to, cb)
- })
-}
+const cmdShim = (from, to) =>
+ stat(from).then(() => cmdShim_(from, to))
-function cmdShim_ (from, to, cb) {
- var then = times(3, next, cb)
- rm(to, then)
- rm(to + ".cmd", then)
- rm(to + ".ps1", then)
+const cmdShim_ = (from, to) => Promise.all([
+ rm(to),
+ rm(to + '.cmd'),
+ rm(to + '.ps1'),
+]).then(() => writeShim(from, to))
- function next(er) {
- writeShim(from, to, cb)
- }
-}
-
-function writeShim (from, to, cb) {
+const writeShim = (from, to) =>
// make a cmd file and a sh script
// First, check if the bin is a #! of some sort.
// If not, then assume it's something that'll be compiled, or some other
// sort of script, and just call it directly.
- mkdir(path.dirname(to), function (er) {
- if (er)
- return cb(er)
- fs.readFile(from, "utf8", function (er, data) {
- if (er) return writeShim_(from, to, null, null, null, cb)
- var firstLine = data.trim().split(/\r*\n/)[0]
- , shebang = firstLine.match(shebangExpr)
- if (!shebang) return writeShim_(from, to, null, null, null, cb)
- var vars = shebang[1] || ""
- , prog = shebang[2]
- , args = shebang[3] || ""
- return writeShim_(from, to, prog, args, vars, cb)
- })
- })
-}
-
-
-function writeShim_ (from, to, prog, args, variables, cb) {
- var shTarget = path.relative(path.dirname(to), from)
- , target = shTarget.split("/").join("\\")
- , longProg
- , shProg = prog && prog.split("\\").join("/")
- , shLongProg
- , pwshProg = shProg && "\"" + shProg + "$exe\""
- , pwshLongProg
- shTarget = shTarget.split("\\").join("/")
- args = args || ""
- variables = variables || ""
+ mkdir(dirname(to))
+ .then(() => readFile(from, 'utf8'))
+ .then(data => {
+ const firstLine = data.trim().split(/\r*\n/)[0]
+ const shebang = firstLine.match(shebangExpr)
+ if (!shebang) return writeShim_(from, to)
+ const vars = shebang[1] || ''
+ const prog = shebang[2]
+ const args = shebang[3] || ''
+ return writeShim_(from, to, prog, args, vars)
+ }, er => writeShim_(from, to))
+
+
+const writeShim_ = (from, to, prog, args, variables) => {
+ let shTarget = relative(dirname(to), from)
+ let target = shTarget.split('/').join('\\')
+ let longProg
+ let shProg = prog && prog.split('\\').join('/')
+ let shLongProg
+ let pwshProg = shProg && `"${shProg}$exe"`
+ let pwshLongProg
+ shTarget = shTarget.split('\\').join('/')
+ args = args || ''
+ variables = variables || ''
if (!prog) {
- prog = "\"%dp0%\\" + target + "\""
- shProg = "\"$basedir/" + shTarget + "\""
+ prog = `"%dp0%\\${target}"`
+ shProg = `"$basedir/${shTarget}"`
pwshProg = shProg
- args = ""
- target = ""
- shTarget = ""
+ args = ''
+ target = ''
+ shTarget = ''
} else {
- longProg = "\"%dp0%\\" + prog + ".exe\""
- shLongProg = "\"$basedir/" + prog + "\""
- pwshLongProg = "\"$basedir/" + prog + "$exe\""
- target = "\"%dp0%\\" + target + "\""
- shTarget = "\"$basedir/" + shTarget + "\""
+ longProg = `"%dp0%\\${prog}.exe"`
+ shLongProg = `"$basedir/${prog}"`
+ pwshLongProg = `"$basedir/${prog}$exe"`
+ target = `"%dp0%\\${target}"`
+ shTarget = `"$basedir/${shTarget}"`
}
// @SETLOCAL
@@ -120,34 +100,34 @@ function writeShim_ (from, to, prog, args, variables, cb) {
// EXIT /b
//
// Subroutine trick to fix https://github.com/npm/cmd-shim/issues/10
- var head = '@ECHO off\r\n' +
+ const head = '@ECHO off\r\n' +
'SETLOCAL\r\n' +
'CALL :find_dp0\r\n'
- var foot = 'ENDLOCAL\r\n' +
+ const foot = 'ENDLOCAL\r\n' +
'EXIT /b %errorlevel%\r\n' +
':find_dp0\r\n' +
'SET dp0=%~dp0\r\n' +
'EXIT /b\r\n'
- var cmd
+ let cmd
if (longProg) {
shLongProg = shLongProg.trim();
args = args.trim();
- var variableDeclarationsAsBatch = toBatchSyntax.convertToSetCommands(variables)
+ const variablesBatch = toBatchSyntax.convertToSetCommands(variables)
cmd = head
- + variableDeclarationsAsBatch
- + "\r\n"
- + "IF EXIST " + longProg + " (\r\n"
- + " SET \"_prog=" + longProg.replace(/(^")|("$)/g, '') + "\"\r\n"
- + ") ELSE (\r\n"
- + " SET \"_prog=" + prog.replace(/(^")|("$)/g, '') + "\"\r\n"
- + " SET PATHEXT=%PATHEXT:;.JS;=;%\r\n"
- + ")\r\n"
- + "\r\n"
- + "\"%_prog%\" " + args + " " + target + " %*\r\n"
+ + variablesBatch
+ + '\r\n'
+ + `IF EXIST ${longProg} (\r\n`
+ + ` SET "_prog=${longProg.replace(/(^")|("$)/g, '')}"\r\n`
+ + ') ELSE (\r\n'
+ + ` SET "_prog=${prog.replace(/(^")|("$)/g, '')}"\r\n`
+ + ' SET PATHEXT=%PATHEXT:;.JS;=;%\r\n'
+ + ')\r\n'
+ + '\r\n'
+ + `"%_prog%" ${args} ${target} %*\r\n`
+ foot
} else {
- cmd = head + prog + " " + args + " " + target + " %*\r\n" + foot
+ cmd = `${head}${prog} ${args} ${target} %*\r\n${foot}`
}
// #!/bin/sh
@@ -166,30 +146,30 @@ function writeShim_ (from, to, prog, args, variables, cb) {
// fi
// exit $ret
- var sh = "#!/bin/sh\n"
+ let sh = "#!/bin/sh\n"
sh = sh
- + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n"
- + "\n"
- + "case `uname` in\n"
- + " *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w \"$basedir\"`;;\n"
- + "esac\n"
- + "\n"
+ + `basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")\n`
+ + '\n'
+ + 'case `uname` in\n'
+ + ' *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;\n'
+ + 'esac\n'
+ + '\n'
if (shLongProg) {
sh = sh
- + "if [ -x "+shLongProg+" ]; then\n"
- + " " + variables + shLongProg + " " + args + " " + shTarget + " \"$@\"\n"
- + " ret=$?\n"
- + "else \n"
- + " " + variables + shProg + " " + args + " " + shTarget + " \"$@\"\n"
- + " ret=$?\n"
- + "fi\n"
- + "exit $ret\n"
+ + `if [ -x ${shLongProg} ]; then\n`
+ + ` ${variables}${shLongProg} ${args} ${shTarget} "$@"\n`
+ + ' ret=$?\n'
+ + 'else \n'
+ + ` ${variables}${shProg} ${args} ${shTarget} "$@"\n`
+ + ' ret=$?\n'
+ + 'fi\n'
+ + 'exit $ret\n'
} else {
sh = sh
- + shProg + " " + args + " " + shTarget + " \"$@\"\n"
- + "exit $?\n"
+ + `${shProg} ${args} ${shTarget} "$@"\n`
+ + 'exit $?\n'
}
// #!/usr/bin/env pwsh
@@ -210,56 +190,44 @@ function writeShim_ (from, to, prog, args, variables, cb) {
// $ret=$LASTEXITCODE
// }
// exit $ret
- var pwsh = "#!/usr/bin/env pwsh\n"
- + "$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n"
- + "\n"
- + "$exe=\"\"\n"
- + "if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n"
- + " # Fix case when both the Windows and Linux builds of Node\n"
- + " # are installed in the same directory\n"
- + " $exe=\".exe\"\n"
- + "}\n"
+ let pwsh = '#!/usr/bin/env pwsh\n'
+ + '$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n'
+ + '\n'
+ + '$exe=""\n'
+ + 'if ($PSVersionTable.PSVersion -lt \"6.0\" -or $IsWindows) {\n'
+ + ' # Fix case when both the Windows and Linux builds of Node\n'
+ + ' # are installed in the same directory\n'
+ + ' $exe=".exe"\n'
+ + '}\n'
if (shLongProg) {
pwsh = pwsh
- + "$ret=0\n"
- + "if (Test-Path " + pwshLongProg + ") {\n"
- + " & " + pwshLongProg + " " + args + " " + shTarget + " $args\n"
- + " $ret=$LASTEXITCODE\n"
- + "} else {\n"
- + " & " + pwshProg + " " + args + " " + shTarget + " $args\n"
- + " $ret=$LASTEXITCODE\n"
- + "}\n"
- + "exit $ret\n"
+ + '$ret=0\n'
+ + `if (Test-Path ${pwshLongProg}) {\n`
+ + ` & ${pwshLongProg} ${args} ${shTarget} $args\n`
+ + ' $ret=$LASTEXITCODE\n'
+ + '} else {\n'
+ + ` & ${pwshProg} ${args} ${shTarget} $args\n`
+ + ' $ret=$LASTEXITCODE\n'
+ + '}\n'
+ + 'exit $ret\n'
} else {
pwsh = pwsh
- + "& " + pwshProg + " " + args + " " + shTarget + " $args\n"
- + "exit $LASTEXITCODE\n"
+ + `& ${pwshProg} ${args} ${shTarget} $args\n`
+ + 'exit $LASTEXITCODE\n'
}
- var then = times(3, next, cb)
- fs.writeFile(to + ".ps1", pwsh, "utf8", then)
- fs.writeFile(to + ".cmd", cmd, "utf8", then)
- fs.writeFile(to, sh, "utf8", then)
- function next () {
- chmodShim(to, cb)
- }
+ return Promise.all([
+ writeFile(to + '.ps1', pwsh, 'utf8'),
+ writeFile(to + '.cmd', cmd, 'utf8'),
+ writeFile(to, sh, 'utf8'),
+ ]).then(() => chmodShim(to))
}
-function chmodShim (to, cb) {
- var then = times(3, cb, cb)
- fs.chmod(to, "0755", then)
- fs.chmod(to + ".cmd", "0755", then)
- fs.chmod(to + ".ps1", "0755", then)
-}
+const chmodShim = to => Promise.all([
+ chmod(to, 0o755),
+ chmod(to + '.cmd', 0o755),
+ chmod(to + '.ps1', 0o755),
+])
-function times(n, ok, cb) {
- var errState = null
- return function(er) {
- if (!errState) {
- if (er)
- cb(errState = er)
- else if (--n === 0)
- ok()
- }
- }
-}
+module.exports = cmdShim
+cmdShim.ifExists = cmdShimIfExists
diff --git a/node_modules/cmd-shim/lib/to-batch-syntax.js b/node_modules/cmd-shim/lib/to-batch-syntax.js
index 734be551d..f3f5ffa63 100644
--- a/node_modules/cmd-shim/lib/to-batch-syntax.js
+++ b/node_modules/cmd-shim/lib/to-batch-syntax.js
@@ -1,51 +1,51 @@
-exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair
-exports.convertToSetCommand = convertToSetCommand
-exports.convertToSetCommands = convertToSetCommands
-
-function convertToSetCommand(key, value) {
- var line = ""
- key = key || ""
- key = key.trim()
- value = value || ""
- value = value.trim()
- if(key && value && value.length > 0) {
- line = "@SET " + key + "=" + replaceDollarWithPercentPair(value) + "\r\n"
- }
- return line
-}
-
-function extractVariableValuePairs(declarations) {
- var pairs = {}
- declarations.map(function(declaration) {
- var split = declaration.split("=")
- pairs[split[0]]=split[1]
- })
- return pairs
-}
-
-function convertToSetCommands(variableString) {
- var variableValuePairs = extractVariableValuePairs(variableString.split(" "))
- var variableDeclarationsAsBatch = ""
- Object.keys(variableValuePairs).forEach(function (key) {
- variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key])
- })
- return variableDeclarationsAsBatch
-}
-
-function replaceDollarWithPercentPair(value) {
- var dollarExpressions = /\$\{?([^\$@#\?\- \t{}:]+)\}?/g
- var result = ""
- var startIndex = 0
- do {
- var match = dollarExpressions.exec(value)
- if(match) {
- var betweenMatches = value.substring(startIndex, match.index) || ""
- result += betweenMatches + "%" + match[1] + "%"
- startIndex = dollarExpressions.lastIndex
- }
- } while (dollarExpressions.lastIndex > 0)
- result += value.substr(startIndex)
- return result
-}
-
-
+exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair
+exports.convertToSetCommand = convertToSetCommand
+exports.convertToSetCommands = convertToSetCommands
+
+function convertToSetCommand(key, value) {
+ var line = ""
+ key = key || ""
+ key = key.trim()
+ value = value || ""
+ value = value.trim()
+ if(key && value && value.length > 0) {
+ line = "@SET " + key + "=" + replaceDollarWithPercentPair(value) + "\r\n"
+ }
+ return line
+}
+
+function extractVariableValuePairs(declarations) {
+ var pairs = {}
+ declarations.map(function(declaration) {
+ var split = declaration.split("=")
+ pairs[split[0]]=split[1]
+ })
+ return pairs
+}
+
+function convertToSetCommands(variableString) {
+ var variableValuePairs = extractVariableValuePairs(variableString.split(" "))
+ var variableDeclarationsAsBatch = ""
+ Object.keys(variableValuePairs).forEach(function (key) {
+ variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key])
+ })
+ return variableDeclarationsAsBatch
+}
+
+function replaceDollarWithPercentPair(value) {
+ var dollarExpressions = /\$\{?([^\$@#\?\- \t{}:]+)\}?/g
+ var result = ""
+ var startIndex = 0
+ do {
+ var match = dollarExpressions.exec(value)
+ if(match) {
+ var betweenMatches = value.substring(startIndex, match.index) || ""
+ result += betweenMatches + "%" + match[1] + "%"
+ startIndex = dollarExpressions.lastIndex
+ }
+ } while (dollarExpressions.lastIndex > 0)
+ result += value.substr(startIndex)
+ return result
+}
+
+
diff --git a/node_modules/cmd-shim/package.json b/node_modules/cmd-shim/package.json
index 43a7b36a8..5a051901a 100644
--- a/node_modules/cmd-shim/package.json
+++ b/node_modules/cmd-shim/package.json
@@ -1,42 +1,47 @@
{
- "_from": "cmd-shim@3.0.3",
- "_id": "cmd-shim@3.0.3",
+ "_from": "cmd-shim@^4.0.1",
+ "_id": "cmd-shim@4.0.2",
"_inBundle": false,
- "_integrity": "sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA==",
+ "_integrity": "sha512-yuOHOon6oFX6kcxVl2jIkvPJsQ/yiKp9fd2dnuoBRZB9GEJ3USWAFCIqfB4xmFou93C3MjjhAprcDwrw+O29VA==",
"_location": "/cmd-shim",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "chownr": "2.0.0",
+ "infer-owner": "1.0.4",
+ "mkdirp": "1.0.4"
+ },
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "cmd-shim@3.0.3",
+ "raw": "cmd-shim@^4.0.1",
"name": "cmd-shim",
"escapedName": "cmd-shim",
- "rawSpec": "3.0.3",
+ "rawSpec": "^4.0.1",
"saveSpec": null,
- "fetchSpec": "3.0.3"
+ "fetchSpec": "^4.0.1"
},
"_requiredBy": [
- "#USER",
- "/",
"/bin-links"
],
- "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz",
- "_shasum": "2c35238d3df37d98ecdd7d5f6b8dc6b21cadc7cb",
- "_spec": "cmd-shim@3.0.3",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-4.0.2.tgz",
+ "_shasum": "600c8b5962eea0cfd8cb809826b9584a59380c01",
+ "_spec": "cmd-shim@^4.0.1",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/bin-links",
"bugs": {
"url": "https://github.com/npm/cmd-shim/issues"
},
"bundleDependencies": false,
"dependencies": {
"graceful-fs": "^4.1.2",
- "mkdirp": "~0.5.0"
+ "mkdirp-infer-owner": "^2.0.0"
},
"deprecated": false,
"description": "Used in npm for command line application support",
"devDependencies": {
"rimraf": "~2.2.8",
- "tap": "^12.7.0"
+ "tap": "^14.10.6"
+ },
+ "engines": {
+ "node": ">=10"
},
"files": [
"index.js",
@@ -53,8 +58,13 @@
"postpublish": "git push origin --follow-tags",
"postversion": "npm publish",
"preversion": "npm test",
- "snap": "TAP_SNAPSHOT=1 tap test/*.js --100",
- "test": "tap test/*.js --100"
+ "snap": "tap",
+ "test": "tap"
+ },
+ "tap": {
+ "before": "test/00-setup.js",
+ "after": "test/zz-cleanup.js",
+ "check-coverage": true
},
- "version": "3.0.3"
+ "version": "4.0.2"
}
diff --git a/node_modules/copy-concurrently/LICENSE b/node_modules/copy-concurrently/LICENSE
deleted file mode 100644
index 83e7c4c62..000000000
--- a/node_modules/copy-concurrently/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/copy-concurrently/README.md b/node_modules/copy-concurrently/README.md
deleted file mode 100644
index 3f6f97426..000000000
--- a/node_modules/copy-concurrently/README.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# copy-concurrently
-
-Copy files, directories and symlinks
-
-```
-const copy = require('copy-concurrently')
-copy('/path/to/thing', '/new/path/thing').then(() => {
- // this is now copied
-}).catch(err => {
- // oh noooo
-})
-```
-
-Copies files, directories and symlinks. Ownership is maintained when
-running as root, permissions are always maintained. On Windows, if symlinks
-are unavailable then junctions will be used.
-
-## PUBLIC INTERFACE
-
-### copy(from, to, [options]) → Promise
-
-Recursively copies `from` to `to` and resolves its promise when finished.
-If `to` already exists then the promise will be rejected with an `EEXIST`
-error.
-
-Options are:
-
-* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once.
-* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
-* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
- an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
- fails then we'll try making a junction instead.
-
-Options can also include dependency injection:
-
-* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
- implementation of `writeStreamAtomic` to use. Used to inject a mock.
-* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
-
-## EXTENSION INTERFACE
-
-Ordinarily you'd only call `copy` above. But it's possible to use it's
-component functions directly. This is useful if, say, you're writing
-[move-concurently](https://npmjs.com/package/move-concurrently).
-
-### copy.file(from, to, options) → Promise
-
-Copies an ordinary file `from` to destination `to`. Uses
-`fs-write-stream-atomic` to ensure that the file is either entirely copied
-or not at all.
-
-Options are:
-
-* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
- set the user and group of `to`. If uid is present then gid must be too.
-* mode - (Optional) If set then `to` will have its perms set to `mode`.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
-* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The
- implementation of `writeStreamAtomic` to use. Used to inject a mock.
-
-### copy.symlink(from, to, options) → Promise
-
-Copies a symlink `from` to destination `to`. If you're using Windows and
-symlinking fails and what you're linking is a directory then junctions will
-be tried instead.
-
-Options are:
-
-* top - The top level the copy is being run from. This is used to determine
- if the symlink destination is within the set of files we're copying or
- outside it.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
-* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
- an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
- fails then we'll try making a junction instead.
-
-### copy.recurse(from, to, options) → Promise
-
-Reads all of the files in directory `from` and adds them to the `queue`
-using `recurseWith` (by default `copy.item`).
-
-Options are:
-
-* queue - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to.
-* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
-* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
- set the user and group of `to`. If uid is present then gid must be too.
-* mode - (Optional) If set then `to` will have its perms set to `mode`.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
-
-### copy.item(from, to, options) → Promise
-
-Copies some kind of `from` to destination `to`. This looks at the filetype
-and calls `copy.file`, `copy.symlink` or `copy.recurse` as appropriate.
-
-Symlink copies are queued with a priority such that they happen after all
-file and directory copies as you can't create a junction on windows to a
-file that doesn't exist yet.
-
-Options are:
-
-* top - The top level the copy is being run from. This is used to determine
- if the symlink destination is within the set of files we're copying or
- outside it.
-* queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to
- pass to `copy.recurse` if `from` is a directory.
-* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory.
-* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to
- set the user and group of `to`. If uid is present then gid must be too.
-* mode - (Optional) If set then `to` will have its perms set to `mode`.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
-* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
- an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
- fails then we'll try making a junction instead.
-* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
-* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The
- implementation of `writeStreamAtomic` to use. Used to inject a mock.
diff --git a/node_modules/copy-concurrently/copy.js b/node_modules/copy-concurrently/copy.js
deleted file mode 100644
index 36ce9f46f..000000000
--- a/node_modules/copy-concurrently/copy.js
+++ /dev/null
@@ -1,225 +0,0 @@
-'use strict'
-module.exports = copy
-module.exports.item = copyItem
-module.exports.recurse = recurseDir
-module.exports.symlink = copySymlink
-module.exports.file = copyFile
-
-var nodeFs = require('fs')
-var path = require('path')
-var validate = require('aproba')
-var stockWriteStreamAtomic = require('fs-write-stream-atomic')
-var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
-var isWindows = require('./is-windows')
-var RunQueue = require('run-queue')
-var extend = Object.assign || require('util')._extend
-
-function promisify (Promise, fn) {
- return function () {
- var args = [].slice.call(arguments)
- return new Promise(function (resolve, reject) {
- return fn.apply(null, args.concat(function (err, value) {
- if (err) {
- reject(err)
- } else {
- resolve(value)
- }
- }))
- })
- }
-}
-
-function copy (from, to, opts) {
- validate('SSO|SS', arguments)
- opts = extend({}, opts || {})
-
- var Promise = opts.Promise || global.Promise
- var fs = opts.fs || nodeFs
-
- if (opts.isWindows == null) opts.isWindows = isWindows
- if (!opts.Promise) opts.Promise = Promise
- if (!opts.fs) opts.fs = fs
- if (!opts.recurseWith) opts.recurseWith = copyItem
- if (!opts.lstat) opts.lstat = promisify(opts.Promise, fs.lstat)
- if (!opts.stat) opts.stat = promisify(opts.Promise, fs.stat)
- if (!opts.chown) opts.chown = promisify(opts.Promise, fs.chown)
- if (!opts.readdir) opts.readdir = promisify(opts.Promise, fs.readdir)
- if (!opts.readlink) opts.readlink = promisify(opts.Promise, fs.readlink)
- if (!opts.symlink) opts.symlink = promisify(opts.Promise, fs.symlink)
- if (!opts.chmod) opts.chmod = promisify(opts.Promise, fs.chmod)
-
- opts.top = from
- opts.mkdirpAsync = promisify(opts.Promise, mkdirp)
- var rimrafAsync = promisify(opts.Promise, rimraf)
-
- var queue = new RunQueue({
- maxConcurrency: opts.maxConcurrency,
- Promise: Promise
- })
- opts.queue = queue
-
- queue.add(0, copyItem, [from, to, opts])
-
- return queue.run().catch(function (err) {
- // if the target already exists don't clobber it
- if (err.code === 'EEXIST' || err.code === 'EPERM') {
- return passThroughError()
- } else {
- return remove(to).then(passThroughError, passThroughError)
- }
- function passThroughError () {
- return Promise.reject(err)
- }
- })
-
- function remove (target) {
- var opts = {
- unlink: fs.unlink,
- chmod: fs.chmod,
- stat: fs.stat,
- lstat: fs.lstat,
- rmdir: fs.rmdir,
- readdir: fs.readdir,
- glob: false
- }
- return rimrafAsync(target, opts)
- }
-}
-
-function copyItem (from, to, opts) {
- validate('SSO', [from, to, opts])
- var fs = opts.fs || nodeFs
- var Promise = opts.Promise || global.Promise
- var lstat = opts.lstat || promisify(Promise, fs.lstat)
-
- return lstat(to).then(function () {
- return Promise.reject(eexists(from, to))
- }, function (err) {
- if (err && err.code !== 'ENOENT') return Promise.reject(err)
- return lstat(from)
- }).then(function (fromStat) {
- var cmdOpts = extend(extend({}, opts), fromStat)
- if (fromStat.isDirectory()) {
- return recurseDir(from, to, cmdOpts)
- } else if (fromStat.isSymbolicLink()) {
- opts.queue.add(1, copySymlink, [from, to, cmdOpts])
- } else if (fromStat.isFile()) {
- return copyFile(from, to, cmdOpts)
- } else if (fromStat.isBlockDevice()) {
- return Promise.reject(eunsupported(from + " is a block device, and we don't know how to copy those."))
- } else if (fromStat.isCharacterDevice()) {
- return Promise.reject(eunsupported(from + " is a character device, and we don't know how to copy those."))
- } else if (fromStat.isFIFO()) {
- return Promise.reject(eunsupported(from + " is a FIFO, and we don't know how to copy those."))
- } else if (fromStat.isSocket()) {
- return Promise.reject(eunsupported(from + " is a socket, and we don't know how to copy those."))
- } else {
- return Promise.reject(eunsupported("We can't tell what " + from + " is and so we can't copy it."))
- }
- })
-}
-
-function recurseDir (from, to, opts) {
- validate('SSO', [from, to, opts])
- var recurseWith = opts.recurseWith || copyItem
- var fs = opts.fs || nodeFs
- var chown = opts.chown || promisify(Promise, fs.chown)
- var readdir = opts.readdir || promisify(Promise, fs.readdir)
- var mkdirpAsync = opts.mkdirpAsync || promisify(Promise, mkdirp)
-
- return mkdirpAsync(to, {fs: fs, mode: opts.mode}).then(function () {
- var getuid = opts.getuid || process.getuid
- if (getuid && opts.uid != null && getuid() === 0) {
- return chown(to, opts.uid, opts.gid)
- }
- }).then(function () {
- return readdir(from)
- }).then(function (files) {
- files.forEach(function (file) {
- opts.queue.add(0, recurseWith, [path.join(from, file), path.join(to, file), opts])
- })
- })
-}
-
-function copySymlink (from, to, opts) {
- validate('SSO', [from, to, opts])
- var fs = opts.fs || nodeFs
- var readlink = opts.readlink || promisify(Promise, fs.readlink)
- var stat = opts.stat || promisify(Promise, fs.symlink)
- var symlink = opts.symlink || promisify(Promise, fs.symlink)
- var Promise = opts.Promise || global.Promise
-
- return readlink(from).then(function (fromDest) {
- var absoluteDest = path.resolve(path.dirname(from), fromDest)
- // Treat absolute paths that are inside the tree we're
- // copying as relative. This necessary to properly support junctions
- // on windows (which are always absolute) but is also DWIM with symlinks.
- var relativeDest = path.relative(opts.top, absoluteDest)
- var linkFrom = relativeDest.substr(0, 2) === '..' ? fromDest : path.relative(path.dirname(from), absoluteDest)
- if (opts.isWindows) {
- return stat(absoluteDest).catch(function () { return null }).then(function (destStat) {
- var isDir = destStat && destStat.isDirectory()
- var type = isDir ? 'dir' : 'file'
- return symlink(linkFrom, to, type).catch(function (err) {
- if (type === 'dir') {
- return symlink(linkFrom, to, 'junction')
- } else {
- return Promise.reject(err)
- }
- })
- })
- } else {
- return symlink(linkFrom, to)
- }
- })
-}
-
-function copyFile (from, to, opts) {
- validate('SSO', [from, to, opts])
- var fs = opts.fs || nodeFs
- var writeStreamAtomic = opts.writeStreamAtomic || stockWriteStreamAtomic
- var Promise = opts.Promise || global.Promise
- var chmod = opts.chmod || promisify(Promise, fs.chmod)
-
- var writeOpts = {}
- var getuid = opts.getuid || process.getuid
- if (getuid && opts.uid != null && getuid() === 0) {
- writeOpts.chown = {
- uid: opts.uid,
- gid: opts.gid
- }
- }
-
- return new Promise(function (resolve, reject) {
- var errored = false
- function onError (err) {
- errored = true
- reject(err)
- }
- fs.createReadStream(from)
- .once('error', onError)
- .pipe(writeStreamAtomic(to, writeOpts))
- .once('error', onError)
- .once('close', function () {
- if (errored) return
- if (opts.mode != null) {
- resolve(chmod(to, opts.mode))
- } else {
- resolve()
- }
- })
- })
-}
-
-function eexists (from, to) {
- var err = new Error('Could not move ' + from + ' to ' + to + ': destination already exists.')
- err.code = 'EEXIST'
- return err
-}
-
-function eunsupported (msg) {
- var err = new Error(msg)
- err.code = 'EUNSUPPORTED'
- return err
-}
diff --git a/node_modules/copy-concurrently/is-windows.js b/node_modules/copy-concurrently/is-windows.js
deleted file mode 100644
index 8a991d54f..000000000
--- a/node_modules/copy-concurrently/is-windows.js
+++ /dev/null
@@ -1,2 +0,0 @@
-'use strict'
-module.exports = process.platform === 'win32'
diff --git a/node_modules/copy-concurrently/node_modules/aproba/LICENSE b/node_modules/copy-concurrently/node_modules/aproba/LICENSE
deleted file mode 100644
index f4be44d88..000000000
--- a/node_modules/copy-concurrently/node_modules/aproba/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/copy-concurrently/node_modules/aproba/README.md b/node_modules/copy-concurrently/node_modules/aproba/README.md
deleted file mode 100644
index 0bfc594c5..000000000
--- a/node_modules/copy-concurrently/node_modules/aproba/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-aproba
-======
-
-A ridiculously light-weight function argument validator
-
-```
-var validate = require("aproba")
-
-function myfunc(a, b, c) {
- // `a` must be a string, `b` a number, `c` a function
- validate('SNF', arguments) // [a,b,c] is also valid
-}
-
-myfunc('test', 23, function () {}) // ok
-myfunc(123, 23, function () {}) // type error
-myfunc('test', 23) // missing arg error
-myfunc('test', 23, function () {}, true) // too many args error
-
-```
-
-Valid types are:
-
-| type | description
-| :--: | :----------
-| * | matches any type
-| A | `Array.isArray` OR an `arguments` object
-| S | typeof == string
-| N | typeof == number
-| F | typeof == function
-| O | typeof == object and not type A and not type E
-| B | typeof == boolean
-| E | `instanceof Error` OR `null` **(special: see below)**
-| Z | == `null`
-
-Validation failures throw one of three exception types, distinguished by a
-`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
-
-If you pass in an invalid type then it will throw with a code of
-`EUNKNOWNTYPE`.
-
-If an **error** argument is found and is not null then the remaining
-arguments are optional. That is, if you say `ESO` then that's like using a
-non-magical `E` in: `E|ESO|ZSO`.
-
-### But I have optional arguments?!
-
-You can provide more than one signature by separating them with pipes `|`.
-If any signature matches the arguments then they'll be considered valid.
-
-So for example, say you wanted to write a signature for
-`fs.createWriteStream`. The docs for it describe it thusly:
-
-```
-fs.createWriteStream(path[, options])
-```
-
-This would be a signature of `SO|S`. That is, a string and and object, or
-just a string.
-
-Now, if you read the full `fs` docs, you'll see that actually path can ALSO
-be a buffer. And options can be a string, that is:
-```
-path <String> | <Buffer>
-options <String> | <Object>
-```
-
-To reproduce this you have to fully enumerate all of the possible
-combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
-awkwardness is a feature: It reminds you of the complexity you're adding to
-your API when you do this sort of thing.
-
-
-### Browser support
-
-This has no dependencies and should work in browsers, though you'll have
-noisier stack traces.
-
-### Why this exists
-
-I wanted a very simple argument validator. It needed to do two things:
-
-1. Be more concise and easier to use than assertions
-
-2. Not encourage an infinite bikeshed of DSLs
-
-This is why types are specified by a single character and there's no such
-thing as an optional argument.
-
-This is not intended to validate user data. This is specifically about
-asserting the interface of your functions.
-
-If you need greater validation, I encourage you to write them by hand or
-look elsewhere.
-
diff --git a/node_modules/copy-concurrently/node_modules/aproba/index.js b/node_modules/copy-concurrently/node_modules/aproba/index.js
deleted file mode 100644
index 6f3f797c0..000000000
--- a/node_modules/copy-concurrently/node_modules/aproba/index.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-function isArguments (thingy) {
- return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
-}
-
-var types = {
- '*': {label: 'any', check: function () { return true }},
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
-}
-
-function addSchema (schema, arity) {
- var group = arity[schema.length] = arity[schema.length] || []
- if (group.indexOf(schema) === -1) group.push(schema)
-}
-
-var validate = module.exports = function (rawSchemas, args) {
- if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
- if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
- if (!args) throw missingRequiredArg(1, 'args')
- if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
- if (!types.A.check(args)) throw invalidType(1, ['array'], args)
- var schemas = rawSchemas.split('|')
- var arity = {}
-
- schemas.forEach(function (schema) {
- for (var ii = 0; ii < schema.length; ++ii) {
- var type = schema[ii]
- if (!types[type]) throw unknownType(ii, type)
- }
- if (/E.*E/.test(schema)) throw moreThanOneError(schema)
- addSchema(schema, arity)
- if (/E/.test(schema)) {
- addSchema(schema.replace(/E.*$/, 'E'), arity)
- addSchema(schema.replace(/E/, 'Z'), arity)
- if (schema.length === 1) addSchema('', arity)
- }
- })
- var matching = arity[args.length]
- if (!matching) {
- throw wrongNumberOfArgs(Object.keys(arity), args.length)
- }
- for (var ii = 0; ii < args.length; ++ii) {
- var newMatching = matching.filter(function (schema) {
- var type = schema[ii]
- var typeCheck = types[type].check
- return typeCheck(args[ii])
- })
- if (!newMatching.length) {
- var labels = matching.map(function (schema) {
- return types[schema[ii]].label
- }).filter(function (schema) { return schema != null })
- throw invalidType(ii, labels, args[ii])
- }
- matching = newMatching
- }
-}
-
-function missingRequiredArg (num) {
- return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
-}
-
-function unknownType (num, type) {
- return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
-}
-
-function invalidType (num, expectedTypes, value) {
- var valueType
- Object.keys(types).forEach(function (typeCode) {
- if (types[typeCode].check(value)) valueType = types[typeCode].label
- })
- return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
- englishList(expectedTypes) + ' but got ' + valueType)
-}
-
-function englishList (list) {
- return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
-}
-
-function wrongNumberOfArgs (expected, got) {
- var english = englishList(expected)
- var args = expected.every(function (ex) { return ex.length === 1 })
- ? 'argument'
- : 'arguments'
- return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
-}
-
-function moreThanOneError (schema) {
- return newException('ETOOMANYERRORTYPES',
- 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
-}
-
-function newException (code, msg) {
- var e = new Error(msg)
- e.code = code
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
- return e
-}
diff --git a/node_modules/copy-concurrently/node_modules/aproba/package.json b/node_modules/copy-concurrently/node_modules/aproba/package.json
deleted file mode 100644
index e16eea157..000000000
--- a/node_modules/copy-concurrently/node_modules/aproba/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "aproba@^1.1.1",
- "_id": "aproba@1.2.0",
- "_inBundle": false,
- "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
- "_location": "/copy-concurrently/aproba",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "aproba@^1.1.1",
- "name": "aproba",
- "escapedName": "aproba",
- "rawSpec": "^1.1.1",
- "saveSpec": null,
- "fetchSpec": "^1.1.1"
- },
- "_requiredBy": [
- "/copy-concurrently"
- ],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
- "_spec": "aproba@^1.1.1",
- "_where": "/Users/aeschright/code/cli/node_modules/copy-concurrently",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- },
- "bugs": {
- "url": "https://github.com/iarna/aproba/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A ridiculously light-weight argument validator (now browser friendly)",
- "devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.0.2"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/iarna/aproba",
- "keywords": [
- "argument",
- "validate"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "aproba",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/aproba.git"
- },
- "scripts": {
- "test": "standard && tap -j3 test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/node_modules/copy-concurrently/node_modules/iferr/.npmignore b/node_modules/copy-concurrently/node_modules/iferr/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/copy-concurrently/node_modules/iferr/LICENSE b/node_modules/copy-concurrently/node_modules/iferr/LICENSE
deleted file mode 100644
index 19d5f4bce..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Nadav Ivgi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. \ No newline at end of file
diff --git a/node_modules/copy-concurrently/node_modules/iferr/README.md b/node_modules/copy-concurrently/node_modules/iferr/README.md
deleted file mode 100644
index 0940763fa..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# iferr
-
-Higher-order functions for easier error handling.
-
-`if (err) return cb(err);` be gone!
-
-## Install
-```bash
-npm install iferr
-```
-
-## Use
-
-### JavaScript example
-```js
-var iferr = require('iferr');
-
-function get_friends_count(id, cb) {
- User.load_user(id, iferr(cb, function(user) {
- user.load_friends(iferr(cb, function(friends) {
- cb(null, friends.length);
- }));
- }));
-}
-```
-
-### CoffeeScript example
-```coffee
-iferr = require 'iferr'
-
-get_friends_count = (id, cb) ->
- User.load_user id, iferr cb, (user) ->
- user.load_friends iferr cb, (friends) ->
- cb null, friends.length
-```
-
-(TODO: document tiferr, throwerr and printerr)
-
-## License
-MIT
diff --git a/node_modules/copy-concurrently/node_modules/iferr/index.coffee b/node_modules/copy-concurrently/node_modules/iferr/index.coffee
deleted file mode 100644
index da6d00719..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/index.coffee
+++ /dev/null
@@ -1,24 +0,0 @@
-# Delegates to `succ` on sucecss or to `fail` on error
-# ex: Thing.load 123, iferr cb, (thing) -> ...
-iferr = (fail, succ) -> (err, a...) ->
- if err? then fail err
- else succ? a...
-
-# Like iferr, but also catches errors thrown from `succ` and passes to `fail`
-tiferr = (fail, succ) -> iferr fail, (a...) ->
- try succ a...
- catch err then fail err
-
-# Delegate to the success function on success, or throw the error otherwise
-# ex: Thing.load 123, throwerr (thing) -> ...
-throwerr = iferr.bind null, (err) -> throw err
-
-# Prints errors when one is passed, or does nothing otherwise
-# ex: thing.save printerr
-printerr = iferr (err) -> console.error err.stack or err
-
-module.exports = exports = iferr
-exports.iferr = iferr
-exports.tiferr = tiferr
-exports.throwerr = throwerr
-exports.printerr = printerr
diff --git a/node_modules/copy-concurrently/node_modules/iferr/index.js b/node_modules/copy-concurrently/node_modules/iferr/index.js
deleted file mode 100644
index 78fce3d2b..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-(function() {
- var exports, iferr, printerr, throwerr, tiferr,
- __slice = [].slice;
-
- iferr = function(fail, succ) {
- return function() {
- var a, err;
- err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- if (err != null) {
- return fail(err);
- } else {
- return typeof succ === "function" ? succ.apply(null, a) : void 0;
- }
- };
- };
-
- tiferr = function(fail, succ) {
- return iferr(fail, function() {
- var a, err;
- a = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
- try {
- return succ.apply(null, a);
- } catch (_error) {
- err = _error;
- return fail(err);
- }
- });
- };
-
- throwerr = iferr.bind(null, function(err) {
- throw err;
- });
-
- printerr = iferr(function(err) {
- return console.error(err.stack || err);
- });
-
- module.exports = exports = iferr;
-
- exports.iferr = iferr;
-
- exports.tiferr = tiferr;
-
- exports.throwerr = throwerr;
-
- exports.printerr = printerr;
-
-}).call(this);
diff --git a/node_modules/copy-concurrently/node_modules/iferr/package.json b/node_modules/copy-concurrently/node_modules/iferr/package.json
deleted file mode 100644
index 3dfa53fe6..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "_from": "iferr@^0.1.5",
- "_id": "iferr@0.1.5",
- "_inBundle": false,
- "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
- "_location": "/copy-concurrently/iferr",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "iferr@^0.1.5",
- "name": "iferr",
- "escapedName": "iferr",
- "rawSpec": "^0.1.5",
- "saveSpec": null,
- "fetchSpec": "^0.1.5"
- },
- "_requiredBy": [
- "/copy-concurrently"
- ],
- "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
- "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501",
- "_spec": "iferr@^0.1.5",
- "_where": "/Users/rebecca/code/npm/node_modules/copy-concurrently",
- "author": {
- "name": "Nadav Ivgi"
- },
- "bugs": {
- "url": "https://github.com/shesek/iferr/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Higher-order functions for easier error handling",
- "devDependencies": {
- "coffee-script": "^1.7.1",
- "mocha": "^1.18.2"
- },
- "homepage": "https://github.com/shesek/iferr",
- "keywords": [
- "error",
- "errors"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "iferr",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/shesek/iferr.git"
- },
- "scripts": {
- "prepublish": "coffee -c index.coffee",
- "test": "mocha"
- },
- "version": "0.1.5"
-}
diff --git a/node_modules/copy-concurrently/node_modules/iferr/test/index.coffee b/node_modules/copy-concurrently/node_modules/iferr/test/index.coffee
deleted file mode 100644
index be0bc56fd..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/test/index.coffee
+++ /dev/null
@@ -1,42 +0,0 @@
-{ iferr, tiferr, throwerr } = require '../index.coffee'
-{ equal: eq, throws } = require 'assert'
-
-invoke_fail = (cb) -> cb new Error 'callback error'
-invoke_succ = (cb) -> cb null
-throw_error = -> throw new Error 'thrown'
-
-describe 'iferr', ->
- it 'calls the error callback on errors', (done) ->
- invoke_fail iferr(
- (err) ->
- eq err.message, 'callback error'
- do done
- ->
- done new Error 'shouldn\'t call the success callback'
- )
-
- it 'calls the success callback on success', (done) ->
- invoke_succ iferr(
- -> done new Error 'shouldn\'t call the error callback'
- done
- )
-
-describe 'tiferr', ->
- it 'catches errors in the success callback', (done) ->
- invoke_succ tiferr(
- (err) ->
- eq err.message, 'thrown'
- do done
- throw_error
- )
-
-describe 'throwerr', ->
- it 'throws errors passed to the callback', (done)->
- try invoke_fail throwerr ->
- done 'shouldn\'t call the success callback'
- catch err
- eq err.message, 'callback error'
- do done
-
- it 'delegates to the success callback otherwise', (done) ->
- invoke_succ throwerr done
diff --git a/node_modules/copy-concurrently/node_modules/iferr/test/mocha.opts b/node_modules/copy-concurrently/node_modules/iferr/test/mocha.opts
deleted file mode 100644
index 019defcf1..000000000
--- a/node_modules/copy-concurrently/node_modules/iferr/test/mocha.opts
+++ /dev/null
@@ -1,2 +0,0 @@
---compilers coffee:coffee-script/register
---reporter spec
diff --git a/node_modules/copy-concurrently/package.json b/node_modules/copy-concurrently/package.json
deleted file mode 100644
index 5a89b02e7..000000000
--- a/node_modules/copy-concurrently/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "_from": "copy-concurrently@^1.0.0",
- "_id": "copy-concurrently@1.0.5",
- "_inBundle": false,
- "_integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
- "_location": "/copy-concurrently",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "copy-concurrently@^1.0.0",
- "name": "copy-concurrently",
- "escapedName": "copy-concurrently",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/move-concurrently"
- ],
- "_resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
- "_shasum": "92297398cae34937fcafd6ec8139c18051f0b5e0",
- "_spec": "copy-concurrently@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/move-concurrently",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org",
- "url": "http://re-becca.org/"
- },
- "bugs": {
- "url": "https://github.com/npm/copy-concurrently/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "aproba": "^1.1.1",
- "fs-write-stream-atomic": "^1.0.8",
- "iferr": "^0.1.5",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.4",
- "run-queue": "^1.0.0"
- },
- "deprecated": false,
- "description": "Promises of copies of files, directories and symlinks, with concurrency controls and win32 junction fallback.",
- "devDependencies": {
- "standard": "^8.6.0",
- "tacks": "^1.2.6",
- "tap": "^10.1.1"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "copy.js",
- "is-windows.js"
- ],
- "homepage": "https://www.npmjs.com/package/copy-concurrently",
- "keywords": [
- "copy",
- "cpr"
- ],
- "license": "ISC",
- "main": "copy.js",
- "name": "copy-concurrently",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/copy-concurrently.git"
- },
- "scripts": {
- "test": "standard && tap --coverage test"
- },
- "version": "1.0.5"
-}
diff --git a/node_modules/encoding/.npmignore b/node_modules/encoding/.npmignore
deleted file mode 100644
index b512c09d4..000000000
--- a/node_modules/encoding/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules \ No newline at end of file
diff --git a/node_modules/encoding/.prettierrc.js b/node_modules/encoding/.prettierrc.js
new file mode 100644
index 000000000..3f83654ec
--- /dev/null
+++ b/node_modules/encoding/.prettierrc.js
@@ -0,0 +1,8 @@
+module.exports = {
+ printWidth: 160,
+ tabWidth: 4,
+ singleQuote: true,
+ endOfLine: 'lf',
+ trailingComma: 'none',
+ arrowParens: 'avoid'
+};
diff --git a/node_modules/encoding/README.md b/node_modules/encoding/README.md
index 62e6bf88f..618891888 100644
--- a/node_modules/encoding/README.md
+++ b/node_modules/encoding/README.md
@@ -1,11 +1,12 @@
# Encoding
-**encoding** is a simple wrapper around [node-iconv](https://github.com/bnoordhuis/node-iconv) and [iconv-lite](https://github.com/ashtuchkin/iconv-lite/) to convert strings from one encoding to another. If node-iconv is not available for some reason,
-iconv-lite will be used instead of it as a fallback.
+**encoding** is a simple wrapper around [iconv-lite](https://github.com/ashtuchkin/iconv-lite/) to convert strings from one encoding to another.
[![Build Status](https://secure.travis-ci.org/andris9/encoding.svg)](http://travis-ci.org/andris9/Nodemailer)
[![npm version](https://badge.fury.io/js/encoding.svg)](http://badge.fury.io/js/encoding)
+Initially _encoding_ was a wrapper around _node-iconv_ (main) and _iconv-lite_ (fallback) and was used as the encoding layer for Nodemailer/mailparser. Somehow it also ended up as a dependency for a bunch of other project, none of these actually using _node-iconv_. The loading mechanics caused issues for front-end projects and Nodemailer/malparser had moved on, so _node-iconv_ was removed.
+
## Install
Install through npm
@@ -24,9 +25,9 @@ Convert with encoding.convert()
Where
- * **text** is either a Buffer or a String to be converted
- * **toCharset** is the characterset to convert the string
- * **fromCharset** (*optional*, defaults to UTF-8) is the source charset
+- **text** is either a Buffer or a String to be converted
+- **toCharset** is the characterset to convert the string
+- **fromCharset** (_optional_, defaults to UTF-8) is the source charset
Output of the conversion is always a Buffer object.
@@ -35,18 +36,6 @@ Example
var result = encoding.convert("ÕÄÖÜ", "Latin_1");
console.log(result); //<Buffer d5 c4 d6 dc>
-## iconv support
-
-By default only iconv-lite is bundled. If you need node-iconv support, you need to add it
-as an additional dependency for your project:
-
- ...,
- "dependencies":{
- "encoding": "*",
- "iconv": "*"
- },
- ...
-
## License
**MIT**
diff --git a/node_modules/encoding/lib/encoding.js b/node_modules/encoding/lib/encoding.js
index cbea3ced2..865c24bce 100644
--- a/node_modules/encoding/lib/encoding.js
+++ b/node_modules/encoding/lib/encoding.js
@@ -1,9 +1,6 @@
'use strict';
var iconvLite = require('iconv-lite');
-// Load Iconv from an external file to be able to disable Iconv for webpack
-// Add /\/iconv-loader$/ to webpack.IgnorePlugin to ignore it
-var Iconv = require('./iconv-loader');
// Expose to the world
module.exports.convert = convert;
@@ -14,10 +11,9 @@ module.exports.convert = convert;
* @param {String|Buffer} str String to be converted
* @param {String} to Encoding to be converted to
* @param {String} [from='UTF-8'] Encoding to be converted from
- * @param {Boolean} useLite If set to ture, force to use iconvLite
* @return {Buffer} Encoded string
*/
-function convert(str, to, from, useLite) {
+function convert(str, to, from) {
from = checkEncoding(from || 'UTF-8');
to = checkEncoding(to || 'UTF-8');
str = str || '';
@@ -25,27 +21,15 @@ function convert(str, to, from, useLite) {
var result;
if (from !== 'UTF-8' && typeof str === 'string') {
- str = new Buffer(str, 'binary');
+ str = Buffer.from(str, 'binary');
}
if (from === to) {
if (typeof str === 'string') {
- result = new Buffer(str);
+ result = Buffer.from(str);
} else {
result = str;
}
- } else if (Iconv && !useLite) {
- try {
- result = convertIconv(str, to, from);
- } catch (E) {
- console.error(E);
- try {
- result = convertIconvLite(str, to, from);
- } catch (E) {
- console.error(E);
- result = str;
- }
- }
} else {
try {
result = convertIconvLite(str, to, from);
@@ -55,30 +39,14 @@ function convert(str, to, from, useLite) {
}
}
-
if (typeof result === 'string') {
- result = new Buffer(result, 'utf-8');
+ result = Buffer.from(result, 'utf-8');
}
return result;
}
/**
- * Convert encoding of a string with node-iconv (if available)
- *
- * @param {String|Buffer} str String to be converted
- * @param {String} to Encoding to be converted to
- * @param {String} [from='UTF-8'] Encoding to be converted from
- * @return {Buffer} Encoded string
- */
-function convertIconv(str, to, from) {
- var response, iconv;
- iconv = new Iconv(from, to + '//TRANSLIT//IGNORE');
- response = iconv.convert(str);
- return response.slice(0, response.length);
-}
-
-/**
* Convert encoding of astring with iconv-lite
*
* @param {String|Buffer} str String to be converted
@@ -103,11 +71,13 @@ function convertIconvLite(str, to, from) {
* @return {String} Character set name
*/
function checkEncoding(name) {
- return (name || '').toString().trim().
- replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1').
- replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1').
- replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1').
- replace(/^ks_c_5601\-1987$/i, 'CP949').
- replace(/^us[\-_]?ascii$/i, 'ASCII').
- toUpperCase();
+ return (name || '')
+ .toString()
+ .trim()
+ .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1')
+ .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1')
+ .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1')
+ .replace(/^ks_c_5601\-1987$/i, 'CP949')
+ .replace(/^us[\-_]?ascii$/i, 'ASCII')
+ .toUpperCase();
}
diff --git a/node_modules/encoding/lib/iconv-loader.js b/node_modules/encoding/lib/iconv-loader.js
deleted file mode 100644
index 8e925fd8e..000000000
--- a/node_modules/encoding/lib/iconv-loader.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var iconv_package;
-var Iconv;
-
-try {
- // this is to fool browserify so it doesn't try (in vain) to install iconv.
- iconv_package = 'iconv';
- Iconv = require(iconv_package).Iconv;
-} catch (E) {
- // node-iconv not present
-}
-
-module.exports = Iconv;
diff --git a/node_modules/encoding/node_modules/iconv-lite/.github/dependabot.yml b/node_modules/encoding/node_modules/iconv-lite/.github/dependabot.yml
new file mode 100644
index 000000000..e4a0e0afd
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/.github/dependabot.yml
@@ -0,0 +1,11 @@
+# Please see the documentation for all configuration options:
+# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "npm"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ allow:
+ - dependency-type: production
diff --git a/node_modules/encoding/node_modules/iconv-lite/Changelog.md b/node_modules/encoding/node_modules/iconv-lite/Changelog.md
new file mode 100644
index 000000000..c299cc06a
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/Changelog.md
@@ -0,0 +1,208 @@
+## 0.6.2 / 2020-07-08
+ * Support Uint8Array-s decoding without conversion to Buffers, plus fix an edge case.
+
+
+## 0.6.1 / 2020-06-28
+ * Support Uint8Array-s directly when decoding (#246, by @gyzerok)
+ * Unify package.json version ranges to be strictly semver-compatible (#241)
+ * Fix minor issue in UTF-32 decoder's endianness detection code.
+
+
+## 0.6.0 / 2020-06-08
+ * Updated 'gb18030' encoding to :2005 edition (see https://github.com/whatwg/encoding/issues/22).
+ * Removed `iconv.extendNodeEncodings()` mechanism. It was deprecated 5 years ago and didn't work
+ in recent Node versions.
+ * Reworked Streaming API behavior in browser environments to fix #204. Streaming API will be
+ excluded by default in browser packs, saving ~100Kb bundle size, unless enabled explicitly using
+ `iconv.enableStreamingAPI(require('stream'))`.
+ * Updates to development environment & tests:
+ * Added ./test/webpack private package to test complex new use cases that need custom environment.
+ It's tested as a separate job in Travis CI.
+ * Updated generation code for the new EUC-KR index file format from Encoding Standard.
+ * Removed Buffer() constructor in tests (#197 by @gabrielschulhof).
+
+
+## 0.5.2 / 2020-06-08
+ * Added `iconv.getEncoder()` and `iconv.getDecoder()` methods to typescript definitions (#229).
+ * Fixed semver version to 6.1.2 to support Node 8.x (by @tanandara).
+ * Capped iconv version to 2.x as 3.x has dropped support for older Node versions.
+ * Switched from instanbul to c8 for code coverage.
+
+
+## 0.5.1 / 2020-01-18
+
+ * Added cp720 encoding (#221, by @kr-deps)
+ * (minor) Changed Changelog.md formatting to use h2.
+
+
+## 0.5.0 / 2019-06-26
+
+ * Added UTF-32 encoding, both little-endian and big-endian variants (UTF-32LE, UTF32-BE). If endianness
+ is not provided for decoding, it's deduced automatically from the stream using a heuristic similar to
+ what we use in UTF-16. (great work in #216 by @kshetline)
+ * Several minor updates to README (#217 by @oldj, plus some more)
+ * Added Node versions 10 and 12 to Travis test harness.
+
+
+## 0.4.24 / 2018-08-22
+
+ * Added MIK encoding (#196, by @Ivan-Kalatchev)
+
+
+## 0.4.23 / 2018-05-07
+
+ * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann)
+ * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn)
+
+
+## 0.4.22 / 2018-05-05
+
+ * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson)
+ * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson)
+
+
+## 0.4.21 / 2018-04-06
+
+ * Fix encoding canonicalization (#156)
+ * Fix the paths in the "browser" field in package.json (#174 by @LMLB)
+ * Removed "contributors" section in package.json - see Git history instead.
+
+
+## 0.4.20 / 2018-04-06
+
+ * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR)
+
+
+## 0.4.19 / 2017-09-09
+
+ * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147)
+ * Re-generated windows1255 codec, because it was updated in iconv project
+ * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8
+
+
+## 0.4.18 / 2017-06-13
+
+ * Fixed CESU-8 regression in Node v8.
+
+
+## 0.4.17 / 2017-04-22
+
+ * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn)
+
+
+## 0.4.16 / 2017-04-22
+
+ * Added support for React Native (#150)
+ * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex)
+ * Fixed typo in Readme (#138 by @jiangzhuo)
+ * Fixed build for Node v6.10+ by making correct version comparison
+ * Added a warning if iconv-lite is loaded not as utf-8 (see #142)
+
+
+## 0.4.15 / 2016-11-21
+
+ * Fixed typescript type definition (#137)
+
+
+## 0.4.14 / 2016-11-20
+
+ * Preparation for v1.0
+ * Added Node v6 and latest Node versions to Travis CI test rig
+ * Deprecated Node v0.8 support
+ * Typescript typings (@larssn)
+ * Fix encoding of Euro character in GB 18030 (inspired by @lygstate)
+ * Add ms prefix to dbcs windows encodings (@rokoroku)
+
+
+## 0.4.13 / 2015-10-01
+
+ * Fix silly mistake in deprecation notice.
+
+
+## 0.4.12 / 2015-09-26
+
+ * Node v4 support:
+ * Added CESU-8 decoding (#106)
+ * Added deprecation notice for `extendNodeEncodings`
+ * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol)
+
+
+## 0.4.11 / 2015-07-03
+
+ * Added CESU-8 encoding.
+
+
+## 0.4.10 / 2015-05-26
+
+ * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not
+ just spaces. This should minimize the importance of "default" endianness.
+
+
+## 0.4.9 / 2015-05-24
+
+ * Streamlined BOM handling: strip BOM by default, add BOM when encoding if
+ addBOM: true. Added docs to Readme.
+ * UTF16 now uses UTF16-LE by default.
+ * Fixed minor issue with big5 encoding.
+ * Added io.js testing on Travis; updated node-iconv version to test against.
+ Now we just skip testing SBCS encodings that node-iconv doesn't support.
+ * (internal refactoring) Updated codec interface to use classes.
+ * Use strict mode in all files.
+
+
+## 0.4.8 / 2015-04-14
+
+ * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94)
+
+
+## 0.4.7 / 2015-02-05
+
+ * stop official support of Node.js v0.8. Should still work, but no guarantees.
+ reason: Packages needed for testing are hard to get on Travis CI.
+ * work in environment where Object.prototype is monkey patched with enumerable
+ props (#89).
+
+
+## 0.4.6 / 2015-01-12
+
+ * fix rare aliases of single-byte encodings (thanks @mscdex)
+ * double the timeout for dbcs tests to make them less flaky on travis
+
+
+## 0.4.5 / 2014-11-20
+
+ * fix windows-31j and x-sjis encoding support (@nleush)
+ * minor fix: undefined variable reference when internal error happens
+
+
+## 0.4.4 / 2014-07-16
+
+ * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
+ * fixed streaming base64 encoding
+
+
+## 0.4.3 / 2014-06-14
+
+ * added encodings UTF-16BE and UTF-16 with BOM
+
+
+## 0.4.2 / 2014-06-12
+
+ * don't throw exception if `extendNodeEncodings()` is called more than once
+
+
+## 0.4.1 / 2014-06-11
+
+ * codepage 808 added
+
+
+## 0.4.0 / 2014-06-10
+
+ * code is rewritten from scratch
+ * all widespread encodings are supported
+ * streaming interface added
+ * browserify compatibility added
+ * (optional) extend core primitive encodings to make usage even simpler
+ * moved from vows to mocha as the testing framework
+
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/LICENSE b/node_modules/encoding/node_modules/iconv-lite/LICENSE
new file mode 100644
index 000000000..d518d8376
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011 Alexander Shtuchkin
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/README.md b/node_modules/encoding/node_modules/iconv-lite/README.md
new file mode 100644
index 000000000..3c97f8730
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/README.md
@@ -0,0 +1,130 @@
+## iconv-lite: Pure JS character encoding conversion
+
+ * No need for native code compilation. Quick to install, works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
+ * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser),
+ [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
+ * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
+ * Intuitive encode/decode API, including Streaming support.
+ * In-browser usage via [browserify](https://github.com/substack/node-browserify) or [webpack](https://webpack.js.org/) (~180kb gzip compressed with Buffer shim included).
+ * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included.
+ * React Native is supported (need to install `stream` module to enable Streaming API).
+ * License: MIT.
+
+[![NPM Stats](https://nodei.co/npm/iconv-lite.png)](https://npmjs.org/package/iconv-lite/)
+[![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite)
+[![npm](https://img.shields.io/npm/v/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/)
+[![npm downloads](https://img.shields.io/npm/dm/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/)
+[![npm bundle size](https://img.shields.io/bundlephobia/min/iconv-lite.svg)](https://npmjs.org/package/iconv-lite/)
+
+## Usage
+### Basic API
+```javascript
+var iconv = require('iconv-lite');
+
+// Convert from an encoded buffer to a js string.
+str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');
+
+// Convert from a js string to an encoded buffer.
+buf = iconv.encode("Sample input string", 'win1251');
+
+// Check if encoding is supported
+iconv.encodingExists("us-ascii")
+```
+
+### Streaming API
+```javascript
+
+// Decode stream (from binary data stream to js strings)
+http.createServer(function(req, res) {
+ var converterStream = iconv.decodeStream('win1251');
+ req.pipe(converterStream);
+
+ converterStream.on('data', function(str) {
+ console.log(str); // Do something with decoded strings, chunk-by-chunk.
+ });
+});
+
+// Convert encoding streaming example
+fs.createReadStream('file-in-win1251.txt')
+ .pipe(iconv.decodeStream('win1251'))
+ .pipe(iconv.encodeStream('ucs2'))
+ .pipe(fs.createWriteStream('file-in-ucs2.txt'));
+
+// Sugar: all encode/decode streams have .collect(cb) method to accumulate data.
+http.createServer(function(req, res) {
+ req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) {
+ assert(typeof body == 'string');
+ console.log(body); // full request body string
+ });
+});
+```
+
+## Supported encodings
+
+ * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex.
+ * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap, utf32, utf32-le, and utf32-be.
+ * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family,
+ IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library.
+ Aliases like 'latin1', 'us-ascii' also supported.
+ * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP.
+
+See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings).
+
+Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors!
+
+Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors!
+
+
+## Encoding/decoding speed
+
+Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0).
+Note: your results may vary, so please always check on your hardware.
+
+ operation iconv@2.1.4 iconv-lite@0.4.7
+ ----------------------------------------------------------
+ encode('win1251') ~96 Mb/s ~320 Mb/s
+ decode('win1251') ~95 Mb/s ~246 Mb/s
+
+## BOM handling
+
+ * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options
+ (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`).
+ A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found.
+ * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module.
+ * Encoding: No BOM added, unless overridden by `addBOM: true` option.
+
+## UTF-16 Encodings
+
+This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be
+smart about endianness in the following ways:
+ * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be
+ overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`.
+ * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override.
+
+## UTF-32 Encodings
+
+This library supports UTF-32LE, UTF-32BE and UTF-32 encodings. Like the UTF-16 encoding above, UTF-32 defaults to UTF-32LE, but uses BOM and 'spaces heuristics' to determine input endianness.
+ * The default of UTF-32LE can be overridden with the `defaultEncoding: 'utf-32be'` option. Strips BOM unless `stripBOM: false`.
+ * Encoding: uses UTF-32LE and writes BOM by default. Use `addBOM: false` to override. (`defaultEncoding: 'utf-32be'` can also be used here to change encoding.)
+
+## Other notes
+
+When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).
+Untranslatable characters are set to � or ?. No transliteration is currently supported.
+Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).
+
+## Testing
+
+```bash
+$ git clone git@github.com:ashtuchkin/iconv-lite.git
+$ cd iconv-lite
+$ npm install
+$ npm test
+
+$ # To view performance:
+$ node test/performance.js
+
+$ # To view test coverage:
+$ npm run coverage
+$ open coverage/lcov-report/index.html
+```
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js
new file mode 100644
index 000000000..fa8391703
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js
@@ -0,0 +1,597 @@
+"use strict";
+var Buffer = require("safer-buffer").Buffer;
+
+// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
+// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
+// To save memory and loading time, we read table files only when requested.
+
+exports._dbcs = DBCSCodec;
+
+var UNASSIGNED = -1,
+ GB18030_CODE = -2,
+ SEQ_START = -10,
+ NODE_START = -1000,
+ UNASSIGNED_NODE = new Array(0x100),
+ DEF_CHAR = -1;
+
+for (var i = 0; i < 0x100; i++)
+ UNASSIGNED_NODE[i] = UNASSIGNED;
+
+
+// Class DBCSCodec reads and initializes mapping tables.
+function DBCSCodec(codecOptions, iconv) {
+ this.encodingName = codecOptions.encodingName;
+ if (!codecOptions)
+ throw new Error("DBCS codec is called without the data.")
+ if (!codecOptions.table)
+ throw new Error("Encoding '" + this.encodingName + "' has no data.");
+
+ // Load tables.
+ var mappingTable = codecOptions.table();
+
+
+ // Decode tables: MBCS -> Unicode.
+
+ // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
+ // Trie root is decodeTables[0].
+ // Values: >= 0 -> unicode character code. can be > 0xFFFF
+ // == UNASSIGNED -> unknown/unassigned sequence.
+ // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
+ // <= NODE_START -> index of the next node in our trie to process next byte.
+ // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
+ this.decodeTables = [];
+ this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
+
+ // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
+ this.decodeTableSeq = [];
+
+ // Actual mapping tables consist of chunks. Use them to fill up decode tables.
+ for (var i = 0; i < mappingTable.length; i++)
+ this._addDecodeChunk(mappingTable[i]);
+
+ // Load & create GB18030 tables when needed.
+ if (typeof codecOptions.gb18030 === 'function') {
+ this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
+
+ // Add GB18030 common decode nodes.
+ var commonThirdByteNodeIdx = this.decodeTables.length;
+ this.decodeTables.push(UNASSIGNED_NODE.slice(0));
+
+ var commonFourthByteNodeIdx = this.decodeTables.length;
+ this.decodeTables.push(UNASSIGNED_NODE.slice(0));
+
+ // Fill out the tree
+ var firstByteNode = this.decodeTables[0];
+ for (var i = 0x81; i <= 0xFE; i++) {
+ var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
+ for (var j = 0x30; j <= 0x39; j++) {
+ if (secondByteNode[j] === UNASSIGNED) {
+ secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
+ } else if (secondByteNode[j] > NODE_START) {
+ throw new Error("gb18030 decode tables conflict at byte 2");
+ }
+
+ var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];
+ for (var k = 0x81; k <= 0xFE; k++) {
+ if (thirdByteNode[k] === UNASSIGNED) {
+ thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;
+ } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {
+ continue;
+ } else if (thirdByteNode[k] > NODE_START) {
+ throw new Error("gb18030 decode tables conflict at byte 3");
+ }
+
+ var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];
+ for (var l = 0x30; l <= 0x39; l++) {
+ if (fourthByteNode[l] === UNASSIGNED)
+ fourthByteNode[l] = GB18030_CODE;
+ }
+ }
+ }
+ }
+ }
+
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+
+
+ // Encode tables: Unicode -> DBCS.
+
+ // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
+ // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
+ // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
+ // == UNASSIGNED -> no conversion found. Output a default char.
+ // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
+ this.encodeTable = [];
+
+ // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
+ // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
+ // means end of sequence (needed when one sequence is a strict subsequence of another).
+ // Objects are kept separately from encodeTable to increase performance.
+ this.encodeTableSeq = [];
+
+ // Some chars can be decoded, but need not be encoded.
+ var skipEncodeChars = {};
+ if (codecOptions.encodeSkipVals)
+ for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
+ var val = codecOptions.encodeSkipVals[i];
+ if (typeof val === 'number')
+ skipEncodeChars[val] = true;
+ else
+ for (var j = val.from; j <= val.to; j++)
+ skipEncodeChars[j] = true;
+ }
+
+ // Use decode trie to recursively fill out encode tables.
+ this._fillEncodeTable(0, 0, skipEncodeChars);
+
+ // Add more encoding pairs when needed.
+ if (codecOptions.encodeAdd) {
+ for (var uChar in codecOptions.encodeAdd)
+ if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
+ this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
+ }
+
+ this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
+ if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
+}
+
+DBCSCodec.prototype.encoder = DBCSEncoder;
+DBCSCodec.prototype.decoder = DBCSDecoder;
+
+// Decoder helpers
+DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
+ var bytes = [];
+ for (; addr > 0; addr >>>= 8)
+ bytes.push(addr & 0xFF);
+ if (bytes.length == 0)
+ bytes.push(0);
+
+ var node = this.decodeTables[0];
+ for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
+ var val = node[bytes[i]];
+
+ if (val == UNASSIGNED) { // Create new node.
+ node[bytes[i]] = NODE_START - this.decodeTables.length;
+ this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
+ }
+ else if (val <= NODE_START) { // Existing node.
+ node = this.decodeTables[NODE_START - val];
+ }
+ else
+ throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
+ }
+ return node;
+}
+
+
+DBCSCodec.prototype._addDecodeChunk = function(chunk) {
+ // First element of chunk is the hex mbcs code where we start.
+ var curAddr = parseInt(chunk[0], 16);
+
+ // Choose the decoding node where we'll write our chars.
+ var writeTable = this._getDecodeTrieNode(curAddr);
+ curAddr = curAddr & 0xFF;
+
+ // Write all other elements of the chunk to the table.
+ for (var k = 1; k < chunk.length; k++) {
+ var part = chunk[k];
+ if (typeof part === "string") { // String, write as-is.
+ for (var l = 0; l < part.length;) {
+ var code = part.charCodeAt(l++);
+ if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
+ var codeTrail = part.charCodeAt(l++);
+ if (0xDC00 <= codeTrail && codeTrail < 0xE000)
+ writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
+ else
+ throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
+ var len = 0xFFF - code + 2;
+ var seq = [];
+ for (var m = 0; m < len; m++)
+ seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
+
+ writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
+ this.decodeTableSeq.push(seq);
+ }
+ else
+ writeTable[curAddr++] = code; // Basic char
+ }
+ }
+ else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
+ var charCode = writeTable[curAddr - 1] + 1;
+ for (var l = 0; l < part; l++)
+ writeTable[curAddr++] = charCode++;
+ }
+ else
+ throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
+ }
+ if (curAddr > 0xFF)
+ throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
+}
+
+// Encoder helpers
+DBCSCodec.prototype._getEncodeBucket = function(uCode) {
+ var high = uCode >> 8; // This could be > 0xFF because of astral characters.
+ if (this.encodeTable[high] === undefined)
+ this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
+ return this.encodeTable[high];
+}
+
+DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+ if (bucket[low] <= SEQ_START)
+ this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
+ else if (bucket[low] == UNASSIGNED)
+ bucket[low] = dbcsCode;
+}
+
+DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
+
+ // Get the root of character tree according to first character of the sequence.
+ var uCode = seq[0];
+ var bucket = this._getEncodeBucket(uCode);
+ var low = uCode & 0xFF;
+
+ var node;
+ if (bucket[low] <= SEQ_START) {
+ // There's already a sequence with - use it.
+ node = this.encodeTableSeq[SEQ_START-bucket[low]];
+ }
+ else {
+ // There was no sequence object - allocate a new one.
+ node = {};
+ if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
+ bucket[low] = SEQ_START - this.encodeTableSeq.length;
+ this.encodeTableSeq.push(node);
+ }
+
+ // Traverse the character tree, allocating new nodes as needed.
+ for (var j = 1; j < seq.length-1; j++) {
+ var oldVal = node[uCode];
+ if (typeof oldVal === 'object')
+ node = oldVal;
+ else {
+ node = node[uCode] = {}
+ if (oldVal !== undefined)
+ node[DEF_CHAR] = oldVal
+ }
+ }
+
+ // Set the leaf to given dbcsCode.
+ uCode = seq[seq.length-1];
+ node[uCode] = dbcsCode;
+}
+
+DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
+ var node = this.decodeTables[nodeIdx];
+ var hasValues = false;
+ var subNodeEmpty = {};
+ for (var i = 0; i < 0x100; i++) {
+ var uCode = node[i];
+ var mbCode = prefix + i;
+ if (skipEncodeChars[mbCode])
+ continue;
+
+ if (uCode >= 0) {
+ this._setEncodeChar(uCode, mbCode);
+ hasValues = true;
+ } else if (uCode <= NODE_START) {
+ var subNodeIdx = NODE_START - uCode;
+ if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).
+ var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.
+ if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))
+ hasValues = true;
+ else
+ subNodeEmpty[subNodeIdx] = true;
+ }
+ } else if (uCode <= SEQ_START) {
+ this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
+ hasValues = true;
+ }
+ }
+ return hasValues;
+}
+
+
+
+// == Encoder ==================================================================
+
+function DBCSEncoder(options, codec) {
+ // Encoder state
+ this.leadSurrogate = -1;
+ this.seqObj = undefined;
+
+ // Static data
+ this.encodeTable = codec.encodeTable;
+ this.encodeTableSeq = codec.encodeTableSeq;
+ this.defaultCharSingleByte = codec.defCharSB;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSEncoder.prototype.write = function(str) {
+ var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),
+ leadSurrogate = this.leadSurrogate,
+ seqObj = this.seqObj, nextChar = -1,
+ i = 0, j = 0;
+
+ while (true) {
+ // 0. Get next character.
+ if (nextChar === -1) {
+ if (i == str.length) break;
+ var uCode = str.charCodeAt(i++);
+ }
+ else {
+ var uCode = nextChar;
+ nextChar = -1;
+ }
+
+ // 1. Handle surrogates.
+ if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
+ if (uCode < 0xDC00) { // We've got lead surrogate.
+ if (leadSurrogate === -1) {
+ leadSurrogate = uCode;
+ continue;
+ } else {
+ leadSurrogate = uCode;
+ // Double lead surrogate found.
+ uCode = UNASSIGNED;
+ }
+ } else { // We've got trail surrogate.
+ if (leadSurrogate !== -1) {
+ uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
+ leadSurrogate = -1;
+ } else {
+ // Incomplete surrogate pair - only trail surrogate found.
+ uCode = UNASSIGNED;
+ }
+
+ }
+ }
+ else if (leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
+ leadSurrogate = -1;
+ }
+
+ // 2. Convert uCode character.
+ var dbcsCode = UNASSIGNED;
+ if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
+ var resCode = seqObj[uCode];
+ if (typeof resCode === 'object') { // Sequence continues.
+ seqObj = resCode;
+ continue;
+
+ } else if (typeof resCode == 'number') { // Sequence finished. Write it.
+ dbcsCode = resCode;
+
+ } else if (resCode == undefined) { // Current character is not part of the sequence.
+
+ // Try default character for this sequence
+ resCode = seqObj[DEF_CHAR];
+ if (resCode !== undefined) {
+ dbcsCode = resCode; // Found. Write it.
+ nextChar = uCode; // Current character will be written too in the next iteration.
+
+ } else {
+ // TODO: What if we have no default? (resCode == undefined)
+ // Then, we should write first char of the sequence as-is and try the rest recursively.
+ // Didn't do it for now because no encoding has this situation yet.
+ // Currently, just skip the sequence and write current char.
+ }
+ }
+ seqObj = undefined;
+ }
+ else if (uCode >= 0) { // Regular character
+ var subtable = this.encodeTable[uCode >> 8];
+ if (subtable !== undefined)
+ dbcsCode = subtable[uCode & 0xFF];
+
+ if (dbcsCode <= SEQ_START) { // Sequence start
+ seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
+ continue;
+ }
+
+ if (dbcsCode == UNASSIGNED && this.gb18030) {
+ // Use GB18030 algorithm to find character(s) to write.
+ var idx = findIdx(this.gb18030.uChars, uCode);
+ if (idx != -1) {
+ var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
+ newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
+ newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
+ newBuf[j++] = 0x30 + dbcsCode;
+ continue;
+ }
+ }
+ }
+
+ // 3. Write dbcsCode character.
+ if (dbcsCode === UNASSIGNED)
+ dbcsCode = this.defaultCharSingleByte;
+
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else if (dbcsCode < 0x10000) {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ else if (dbcsCode < 0x1000000) {
+ newBuf[j++] = dbcsCode >> 16;
+ newBuf[j++] = (dbcsCode >> 8) & 0xFF;
+ newBuf[j++] = dbcsCode & 0xFF;
+ } else {
+ newBuf[j++] = dbcsCode >>> 24;
+ newBuf[j++] = (dbcsCode >>> 16) & 0xFF;
+ newBuf[j++] = (dbcsCode >>> 8) & 0xFF;
+ newBuf[j++] = dbcsCode & 0xFF;
+ }
+ }
+
+ this.seqObj = seqObj;
+ this.leadSurrogate = leadSurrogate;
+ return newBuf.slice(0, j);
+}
+
+DBCSEncoder.prototype.end = function() {
+ if (this.leadSurrogate === -1 && this.seqObj === undefined)
+ return; // All clean. Most often case.
+
+ var newBuf = Buffer.alloc(10), j = 0;
+
+ if (this.seqObj) { // We're in the sequence.
+ var dbcsCode = this.seqObj[DEF_CHAR];
+ if (dbcsCode !== undefined) { // Write beginning of the sequence.
+ if (dbcsCode < 0x100) {
+ newBuf[j++] = dbcsCode;
+ }
+ else {
+ newBuf[j++] = dbcsCode >> 8; // high byte
+ newBuf[j++] = dbcsCode & 0xFF; // low byte
+ }
+ } else {
+ // See todo above.
+ }
+ this.seqObj = undefined;
+ }
+
+ if (this.leadSurrogate !== -1) {
+ // Incomplete surrogate pair - only lead surrogate found.
+ newBuf[j++] = this.defaultCharSingleByte;
+ this.leadSurrogate = -1;
+ }
+
+ return newBuf.slice(0, j);
+}
+
+// Export for testing
+DBCSEncoder.prototype.findIdx = findIdx;
+
+
+// == Decoder ==================================================================
+
+function DBCSDecoder(options, codec) {
+ // Decoder state
+ this.nodeIdx = 0;
+ this.prevBytes = [];
+
+ // Static data
+ this.decodeTables = codec.decodeTables;
+ this.decodeTableSeq = codec.decodeTableSeq;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+ this.gb18030 = codec.gb18030;
+}
+
+DBCSDecoder.prototype.write = function(buf) {
+ var newBuf = Buffer.alloc(buf.length*2),
+ nodeIdx = this.nodeIdx,
+ prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,
+ seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.
+ uCode;
+
+ for (var i = 0, j = 0; i < buf.length; i++) {
+ var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];
+
+ // Lookup in current trie node.
+ var uCode = this.decodeTables[nodeIdx][curByte];
+
+ if (uCode >= 0) {
+ // Normal character, just use it.
+ }
+ else if (uCode === UNASSIGNED) { // Unknown char.
+ // TODO: Callback with seq.
+ uCode = this.defaultCharUnicode.charCodeAt(0);
+ i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.
+ }
+ else if (uCode === GB18030_CODE) {
+ if (i >= 3) {
+ var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);
+ } else {
+ var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 +
+ (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 +
+ (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 +
+ (curByte-0x30);
+ }
+ var idx = findIdx(this.gb18030.gbChars, ptr);
+ uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
+ }
+ else if (uCode <= NODE_START) { // Go to next trie node.
+ nodeIdx = NODE_START - uCode;
+ continue;
+ }
+ else if (uCode <= SEQ_START) { // Output a sequence of chars.
+ var seq = this.decodeTableSeq[SEQ_START - uCode];
+ for (var k = 0; k < seq.length - 1; k++) {
+ uCode = seq[k];
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+ }
+ uCode = seq[seq.length-1];
+ }
+ else
+ throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
+
+ // Write the character to buffer, handling higher planes using surrogate pair.
+ if (uCode >= 0x10000) {
+ uCode -= 0x10000;
+ var uCodeLead = 0xD800 | (uCode >> 10);
+ newBuf[j++] = uCodeLead & 0xFF;
+ newBuf[j++] = uCodeLead >> 8;
+
+ uCode = 0xDC00 | (uCode & 0x3FF);
+ }
+ newBuf[j++] = uCode & 0xFF;
+ newBuf[j++] = uCode >> 8;
+
+ // Reset trie node.
+ nodeIdx = 0; seqStart = i+1;
+ }
+
+ this.nodeIdx = nodeIdx;
+ this.prevBytes = (seqStart >= 0)
+ ? Array.prototype.slice.call(buf, seqStart)
+ : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));
+
+ return newBuf.slice(0, j).toString('ucs2');
+}
+
+DBCSDecoder.prototype.end = function() {
+ var ret = '';
+
+ // Try to parse all remaining chars.
+ while (this.prevBytes.length > 0) {
+ // Skip 1 character in the buffer.
+ ret += this.defaultCharUnicode;
+ var bytesArr = this.prevBytes.slice(1);
+
+ // Parse remaining as usual.
+ this.prevBytes = [];
+ this.nodeIdx = 0;
+ if (bytesArr.length > 0)
+ ret += this.write(bytesArr);
+ }
+
+ this.prevBytes = [];
+ this.nodeIdx = 0;
+ return ret;
+}
+
+// Binary search for GB18030. Returns largest i such that table[i] <= val.
+function findIdx(table, val) {
+ if (table[0] > val)
+ return -1;
+
+ var l = 0, r = table.length;
+ while (l < r-1) { // always table[l] <= val < table[r]
+ var mid = l + ((r-l+1) >> 1);
+ if (table[mid] <= val)
+ l = mid;
+ else
+ r = mid;
+ }
+ return l;
+}
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js
new file mode 100644
index 000000000..4b6191434
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js
@@ -0,0 +1,176 @@
+"use strict";
+
+// Description of supported double byte encodings and aliases.
+// Tables are not require()-d until they are needed to speed up library load.
+// require()-s are direct to support Browserify.
+
+module.exports = {
+
+ // == Japanese/ShiftJIS ====================================================
+ // All japanese encodings are based on JIS X set of standards:
+ // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
+ // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
+ // Has several variations in 1978, 1983, 1990 and 1997.
+ // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
+ // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
+ // 2 planes, first is superset of 0208, second - revised 0212.
+ // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
+
+ // Byte encodings are:
+ // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
+ // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
+ // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
+ // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
+ // 0x00-0x7F - lower part of 0201
+ // 0x8E, 0xA1-0xDF - upper part of 0201
+ // (0xA1-0xFE)x2 - 0208 plane (94x94).
+ // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
+ // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
+ // Used as-is in ISO2022 family.
+ // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
+ // 0201-1976 Roman, 0208-1978, 0208-1983.
+ // * ISO2022-JP-1: Adds esc seq for 0212-1990.
+ // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
+ // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
+ // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
+ //
+ // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
+ //
+ // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
+
+ 'shiftjis': {
+ type: '_dbcs',
+ table: function() { return require('./tables/shiftjis.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ encodeSkipVals: [{from: 0xED40, to: 0xF940}],
+ },
+ 'csshiftjis': 'shiftjis',
+ 'mskanji': 'shiftjis',
+ 'sjis': 'shiftjis',
+ 'windows31j': 'shiftjis',
+ 'ms31j': 'shiftjis',
+ 'xsjis': 'shiftjis',
+ 'windows932': 'shiftjis',
+ 'ms932': 'shiftjis',
+ '932': 'shiftjis',
+ 'cp932': 'shiftjis',
+
+ 'eucjp': {
+ type: '_dbcs',
+ table: function() { return require('./tables/eucjp.json') },
+ encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
+ },
+
+ // TODO: KDDI extension to Shift_JIS
+ // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
+ // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
+
+
+ // == Chinese/GBK ==========================================================
+ // http://en.wikipedia.org/wiki/GBK
+ // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
+
+ // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
+ 'gb2312': 'cp936',
+ 'gb231280': 'cp936',
+ 'gb23121980': 'cp936',
+ 'csgb2312': 'cp936',
+ 'csiso58gb231280': 'cp936',
+ 'euccn': 'cp936',
+
+ // Microsoft's CP936 is a subset and approximation of GBK.
+ 'windows936': 'cp936',
+ 'ms936': 'cp936',
+ '936': 'cp936',
+ 'cp936': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json') },
+ },
+
+ // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
+ 'gbk': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ },
+ 'xgbk': 'gbk',
+ 'isoir58': 'gbk',
+
+ // GB18030 is an algorithmic extension of GBK.
+ // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
+ // http://icu-project.org/docs/papers/gb18030.html
+ // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
+ // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
+ 'gb18030': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
+ gb18030: function() { return require('./tables/gb18030-ranges.json') },
+ encodeSkipVals: [0x80],
+ encodeAdd: {'€': 0xA2E3},
+ },
+
+ 'chinese': 'gb18030',
+
+
+ // == Korean ===============================================================
+ // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
+ 'windows949': 'cp949',
+ 'ms949': 'cp949',
+ '949': 'cp949',
+ 'cp949': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp949.json') },
+ },
+
+ 'cseuckr': 'cp949',
+ 'csksc56011987': 'cp949',
+ 'euckr': 'cp949',
+ 'isoir149': 'cp949',
+ 'korean': 'cp949',
+ 'ksc56011987': 'cp949',
+ 'ksc56011989': 'cp949',
+ 'ksc5601': 'cp949',
+
+
+ // == Big5/Taiwan/Hong Kong ================================================
+ // There are lots of tables for Big5 and cp950. Please see the following links for history:
+ // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
+ // Variations, in roughly number of defined chars:
+ // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
+ // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
+ // * Big5-2003 (Taiwan standard) almost superset of cp950.
+ // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
+ // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
+ // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
+ // Plus, it has 4 combining sequences.
+ // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
+ // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
+ // Implementations are not consistent within browsers; sometimes labeled as just big5.
+ // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
+ // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
+ // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
+ // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
+ // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
+ //
+ // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
+ // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
+
+ 'windows950': 'cp950',
+ 'ms950': 'cp950',
+ '950': 'cp950',
+ 'cp950': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json') },
+ },
+
+ // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
+ 'big5': 'big5hkscs',
+ 'big5hkscs': {
+ type: '_dbcs',
+ table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
+ encodeSkipVals: [0xa2cc],
+ },
+
+ 'cnbig5': 'big5hkscs',
+ 'csbig5': 'big5hkscs',
+ 'xxbig5': 'big5hkscs',
+};
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/index.js b/node_modules/encoding/node_modules/iconv-lite/encodings/index.js
new file mode 100644
index 000000000..d95c24411
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/index.js
@@ -0,0 +1,23 @@
+"use strict";
+
+// Update this array if you add/rename/remove files in this directory.
+// We support Browserify by skipping automatic module discovery and requiring modules directly.
+var modules = [
+ require("./internal"),
+ require("./utf32"),
+ require("./utf16"),
+ require("./utf7"),
+ require("./sbcs-codec"),
+ require("./sbcs-data"),
+ require("./sbcs-data-generated"),
+ require("./dbcs-codec"),
+ require("./dbcs-data"),
+];
+
+// Put all encoding/alias/codec definitions to single object and export it.
+for (var i = 0; i < modules.length; i++) {
+ var module = modules[i];
+ for (var enc in module)
+ if (Object.prototype.hasOwnProperty.call(module, enc))
+ exports[enc] = module[enc];
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js b/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js
new file mode 100644
index 000000000..dc1074f04
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js
@@ -0,0 +1,198 @@
+"use strict";
+var Buffer = require("safer-buffer").Buffer;
+
+// Export Node.js internal encodings.
+
+module.exports = {
+ // Encodings
+ utf8: { type: "_internal", bomAware: true},
+ cesu8: { type: "_internal", bomAware: true},
+ unicode11utf8: "utf8",
+
+ ucs2: { type: "_internal", bomAware: true},
+ utf16le: "ucs2",
+
+ binary: { type: "_internal" },
+ base64: { type: "_internal" },
+ hex: { type: "_internal" },
+
+ // Codec.
+ _internal: InternalCodec,
+};
+
+//------------------------------------------------------------------------------
+
+function InternalCodec(codecOptions, iconv) {
+ this.enc = codecOptions.encodingName;
+ this.bomAware = codecOptions.bomAware;
+
+ if (this.enc === "base64")
+ this.encoder = InternalEncoderBase64;
+ else if (this.enc === "cesu8") {
+ this.enc = "utf8"; // Use utf8 for decoding.
+ this.encoder = InternalEncoderCesu8;
+
+ // Add decoder for versions of Node not supporting CESU-8
+ if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {
+ this.decoder = InternalDecoderCesu8;
+ this.defaultCharUnicode = iconv.defaultCharUnicode;
+ }
+ }
+}
+
+InternalCodec.prototype.encoder = InternalEncoder;
+InternalCodec.prototype.decoder = InternalDecoder;
+
+//------------------------------------------------------------------------------
+
+// We use node.js internal decoder. Its signature is the same as ours.
+var StringDecoder = require('string_decoder').StringDecoder;
+
+if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
+ StringDecoder.prototype.end = function() {};
+
+
+function InternalDecoder(options, codec) {
+ this.decoder = new StringDecoder(codec.enc);
+}
+
+InternalDecoder.prototype.write = function(buf) {
+ if (!Buffer.isBuffer(buf)) {
+ buf = Buffer.from(buf);
+ }
+
+ return this.decoder.write(buf);
+}
+
+InternalDecoder.prototype.end = function() {
+ return this.decoder.end();
+}
+
+
+//------------------------------------------------------------------------------
+// Encoder is mostly trivial
+
+function InternalEncoder(options, codec) {
+ this.enc = codec.enc;
+}
+
+InternalEncoder.prototype.write = function(str) {
+ return Buffer.from(str, this.enc);
+}
+
+InternalEncoder.prototype.end = function() {
+}
+
+
+//------------------------------------------------------------------------------
+// Except base64 encoder, which must keep its state.
+
+function InternalEncoderBase64(options, codec) {
+ this.prevStr = '';
+}
+
+InternalEncoderBase64.prototype.write = function(str) {
+ str = this.prevStr + str;
+ var completeQuads = str.length - (str.length % 4);
+ this.prevStr = str.slice(completeQuads);
+ str = str.slice(0, completeQuads);
+
+ return Buffer.from(str, "base64");
+}
+
+InternalEncoderBase64.prototype.end = function() {
+ return Buffer.from(this.prevStr, "base64");
+}
+
+
+//------------------------------------------------------------------------------
+// CESU-8 encoder is also special.
+
+function InternalEncoderCesu8(options, codec) {
+}
+
+InternalEncoderCesu8.prototype.write = function(str) {
+ var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
+ for (var i = 0; i < str.length; i++) {
+ var charCode = str.charCodeAt(i);
+ // Naive implementation, but it works because CESU-8 is especially easy
+ // to convert from UTF-16 (which all JS strings are encoded in).
+ if (charCode < 0x80)
+ buf[bufIdx++] = charCode;
+ else if (charCode < 0x800) {
+ buf[bufIdx++] = 0xC0 + (charCode >>> 6);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ else { // charCode will always be < 0x10000 in javascript.
+ buf[bufIdx++] = 0xE0 + (charCode >>> 12);
+ buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
+ buf[bufIdx++] = 0x80 + (charCode & 0x3f);
+ }
+ }
+ return buf.slice(0, bufIdx);
+}
+
+InternalEncoderCesu8.prototype.end = function() {
+}
+
+//------------------------------------------------------------------------------
+// CESU-8 decoder is not implemented in Node v4.0+
+
+function InternalDecoderCesu8(options, codec) {
+ this.acc = 0;
+ this.contBytes = 0;
+ this.accBytes = 0;
+ this.defaultCharUnicode = codec.defaultCharUnicode;
+}
+
+InternalDecoderCesu8.prototype.write = function(buf) {
+ var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
+ res = '';
+ for (var i = 0; i < buf.length; i++) {
+ var curByte = buf[i];
+ if ((curByte & 0xC0) !== 0x80) { // Leading byte
+ if (contBytes > 0) { // Previous code is invalid
+ res += this.defaultCharUnicode;
+ contBytes = 0;
+ }
+
+ if (curByte < 0x80) { // Single-byte code
+ res += String.fromCharCode(curByte);
+ } else if (curByte < 0xE0) { // Two-byte code
+ acc = curByte & 0x1F;
+ contBytes = 1; accBytes = 1;
+ } else if (curByte < 0xF0) { // Three-byte code
+ acc = curByte & 0x0F;
+ contBytes = 2; accBytes = 1;
+ } else { // Four or more are not supported for CESU-8.
+ res += this.defaultCharUnicode;
+ }
+ } else { // Continuation byte
+ if (contBytes > 0) { // We're waiting for it.
+ acc = (acc << 6) | (curByte & 0x3f);
+ contBytes--; accBytes++;
+ if (contBytes === 0) {
+ // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
+ if (accBytes === 2 && acc < 0x80 && acc > 0)
+ res += this.defaultCharUnicode;
+ else if (accBytes === 3 && acc < 0x800)
+ res += this.defaultCharUnicode;
+ else
+ // Actually add character.
+ res += String.fromCharCode(acc);
+ }
+ } else { // Unexpected continuation byte
+ res += this.defaultCharUnicode;
+ }
+ }
+ }
+ this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
+ return res;
+}
+
+InternalDecoderCesu8.prototype.end = function() {
+ var res = 0;
+ if (this.contBytes > 0)
+ res += this.defaultCharUnicode;
+ return res;
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js
new file mode 100644
index 000000000..abac5ffaa
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js
@@ -0,0 +1,72 @@
+"use strict";
+var Buffer = require("safer-buffer").Buffer;
+
+// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
+// correspond to encoded bytes (if 128 - then lower half is ASCII).
+
+exports._sbcs = SBCSCodec;
+function SBCSCodec(codecOptions, iconv) {
+ if (!codecOptions)
+ throw new Error("SBCS codec is called without the data.")
+
+ // Prepare char buffer for decoding.
+ if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
+ throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
+
+ if (codecOptions.chars.length === 128) {
+ var asciiString = "";
+ for (var i = 0; i < 128; i++)
+ asciiString += String.fromCharCode(i);
+ codecOptions.chars = asciiString + codecOptions.chars;
+ }
+
+ this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
+
+ // Encoding buffer.
+ var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
+
+ for (var i = 0; i < codecOptions.chars.length; i++)
+ encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
+
+ this.encodeBuf = encodeBuf;
+}
+
+SBCSCodec.prototype.encoder = SBCSEncoder;
+SBCSCodec.prototype.decoder = SBCSDecoder;
+
+
+function SBCSEncoder(options, codec) {
+ this.encodeBuf = codec.encodeBuf;
+}
+
+SBCSEncoder.prototype.write = function(str) {
+ var buf = Buffer.alloc(str.length);
+ for (var i = 0; i < str.length; i++)
+ buf[i] = this.encodeBuf[str.charCodeAt(i)];
+
+ return buf;
+}
+
+SBCSEncoder.prototype.end = function() {
+}
+
+
+function SBCSDecoder(options, codec) {
+ this.decodeBuf = codec.decodeBuf;
+}
+
+SBCSDecoder.prototype.write = function(buf) {
+ // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
+ var decodeBuf = this.decodeBuf;
+ var newBuf = Buffer.alloc(buf.length*2);
+ var idx1 = 0, idx2 = 0;
+ for (var i = 0; i < buf.length; i++) {
+ idx1 = buf[i]*2; idx2 = i*2;
+ newBuf[idx2] = decodeBuf[idx1];
+ newBuf[idx2+1] = decodeBuf[idx1+1];
+ }
+ return newBuf.toString('ucs2');
+}
+
+SBCSDecoder.prototype.end = function() {
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js
new file mode 100644
index 000000000..9b4823607
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js
@@ -0,0 +1,451 @@
+"use strict";
+
+// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
+module.exports = {
+ "437": "cp437",
+ "737": "cp737",
+ "775": "cp775",
+ "850": "cp850",
+ "852": "cp852",
+ "855": "cp855",
+ "856": "cp856",
+ "857": "cp857",
+ "858": "cp858",
+ "860": "cp860",
+ "861": "cp861",
+ "862": "cp862",
+ "863": "cp863",
+ "864": "cp864",
+ "865": "cp865",
+ "866": "cp866",
+ "869": "cp869",
+ "874": "windows874",
+ "922": "cp922",
+ "1046": "cp1046",
+ "1124": "cp1124",
+ "1125": "cp1125",
+ "1129": "cp1129",
+ "1133": "cp1133",
+ "1161": "cp1161",
+ "1162": "cp1162",
+ "1163": "cp1163",
+ "1250": "windows1250",
+ "1251": "windows1251",
+ "1252": "windows1252",
+ "1253": "windows1253",
+ "1254": "windows1254",
+ "1255": "windows1255",
+ "1256": "windows1256",
+ "1257": "windows1257",
+ "1258": "windows1258",
+ "28591": "iso88591",
+ "28592": "iso88592",
+ "28593": "iso88593",
+ "28594": "iso88594",
+ "28595": "iso88595",
+ "28596": "iso88596",
+ "28597": "iso88597",
+ "28598": "iso88598",
+ "28599": "iso88599",
+ "28600": "iso885910",
+ "28601": "iso885911",
+ "28603": "iso885913",
+ "28604": "iso885914",
+ "28605": "iso885915",
+ "28606": "iso885916",
+ "windows874": {
+ "type": "_sbcs",
+ "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "win874": "windows874",
+ "cp874": "windows874",
+ "windows1250": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "win1250": "windows1250",
+ "cp1250": "windows1250",
+ "windows1251": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "win1251": "windows1251",
+ "cp1251": "windows1251",
+ "windows1252": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "win1252": "windows1252",
+ "cp1252": "windows1252",
+ "windows1253": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "win1253": "windows1253",
+ "cp1253": "windows1253",
+ "windows1254": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "win1254": "windows1254",
+ "cp1254": "windows1254",
+ "windows1255": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
+ },
+ "win1255": "windows1255",
+ "cp1255": "windows1255",
+ "windows1256": {
+ "type": "_sbcs",
+ "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے"
+ },
+ "win1256": "windows1256",
+ "cp1256": "windows1256",
+ "windows1257": {
+ "type": "_sbcs",
+ "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
+ },
+ "win1257": "windows1257",
+ "cp1257": "windows1257",
+ "windows1258": {
+ "type": "_sbcs",
+ "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "win1258": "windows1258",
+ "cp1258": "windows1258",
+ "iso88591": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28591": "iso88591",
+ "iso88592": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
+ },
+ "cp28592": "iso88592",
+ "iso88593": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙"
+ },
+ "cp28593": "iso88593",
+ "iso88594": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
+ },
+ "cp28594": "iso88594",
+ "iso88595": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
+ },
+ "cp28595": "iso88595",
+ "iso88596": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������"
+ },
+ "cp28596": "iso88596",
+ "iso88597": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
+ },
+ "cp28597": "iso88597",
+ "iso88598": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
+ },
+ "cp28598": "iso88598",
+ "iso88599": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
+ },
+ "cp28599": "iso88599",
+ "iso885910": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
+ },
+ "cp28600": "iso885910",
+ "iso885911": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "cp28601": "iso885911",
+ "iso885913": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
+ },
+ "cp28603": "iso885913",
+ "iso885914": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
+ },
+ "cp28604": "iso885914",
+ "iso885915": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "cp28605": "iso885915",
+ "iso885916": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
+ },
+ "cp28606": "iso885916",
+ "cp437": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm437": "cp437",
+ "csibm437": "cp437",
+ "cp737": {
+ "type": "_sbcs",
+ "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
+ },
+ "ibm737": "cp737",
+ "csibm737": "cp737",
+ "cp775": {
+ "type": "_sbcs",
+ "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
+ },
+ "ibm775": "cp775",
+ "csibm775": "cp775",
+ "cp850": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm850": "cp850",
+ "csibm850": "cp850",
+ "cp852": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ "
+ },
+ "ibm852": "cp852",
+ "csibm852": "cp852",
+ "cp855": {
+ "type": "_sbcs",
+ "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ "
+ },
+ "ibm855": "cp855",
+ "csibm855": "cp855",
+ "cp856": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm856": "cp856",
+ "csibm856": "cp856",
+ "cp857": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm857": "cp857",
+ "csibm857": "cp857",
+ "cp858": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
+ },
+ "ibm858": "cp858",
+ "csibm858": "cp858",
+ "cp860": {
+ "type": "_sbcs",
+ "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm860": "cp860",
+ "csibm860": "cp860",
+ "cp861": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm861": "cp861",
+ "csibm861": "cp861",
+ "cp862": {
+ "type": "_sbcs",
+ "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm862": "cp862",
+ "csibm862": "cp862",
+ "cp863": {
+ "type": "_sbcs",
+ "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm863": "cp863",
+ "csibm863": "cp863",
+ "cp864": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�"
+ },
+ "ibm864": "cp864",
+ "csibm864": "cp864",
+ "cp865": {
+ "type": "_sbcs",
+ "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+ "ibm865": "cp865",
+ "csibm865": "cp865",
+ "cp866": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
+ },
+ "ibm866": "cp866",
+ "csibm866": "cp866",
+ "cp869": {
+ "type": "_sbcs",
+ "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
+ },
+ "ibm869": "cp869",
+ "csibm869": "cp869",
+ "cp922": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
+ },
+ "ibm922": "cp922",
+ "csibm922": "cp922",
+ "cp1046": {
+ "type": "_sbcs",
+ "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
+ },
+ "ibm1046": "cp1046",
+ "csibm1046": "cp1046",
+ "cp1124": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
+ },
+ "ibm1124": "cp1124",
+ "csibm1124": "cp1124",
+ "cp1125": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
+ },
+ "ibm1125": "cp1125",
+ "csibm1125": "cp1125",
+ "cp1129": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1129": "cp1129",
+ "csibm1129": "cp1129",
+ "cp1133": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"
+ },
+ "ibm1133": "cp1133",
+ "csibm1133": "cp1133",
+ "cp1161": {
+ "type": "_sbcs",
+ "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
+ },
+ "ibm1161": "cp1161",
+ "csibm1161": "cp1161",
+ "cp1162": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ },
+ "ibm1162": "cp1162",
+ "csibm1162": "cp1162",
+ "cp1163": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
+ },
+ "ibm1163": "cp1163",
+ "csibm1163": "cp1163",
+ "maccroatian": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
+ },
+ "maccyrillic": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "macgreek": {
+ "type": "_sbcs",
+ "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"
+ },
+ "maciceland": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macroman": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macromania": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macthai": {
+ "type": "_sbcs",
+ "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"
+ },
+ "macturkish": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "macukraine": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
+ },
+ "koi8r": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8u": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8ru": {
+ "type": "_sbcs",
+ "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "koi8t": {
+ "type": "_sbcs",
+ "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
+ },
+ "armscii8": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"
+ },
+ "rk1048": {
+ "type": "_sbcs",
+ "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "tcvn": {
+ "type": "_sbcs",
+ "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
+ },
+ "georgianacademy": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "georgianps": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
+ },
+ "pt154": {
+ "type": "_sbcs",
+ "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
+ },
+ "viscii": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
+ },
+ "iso646cn": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "iso646jp": {
+ "type": "_sbcs",
+ "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "hproman8": {
+ "type": "_sbcs",
+ "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
+ },
+ "macintosh": {
+ "type": "_sbcs",
+ "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
+ },
+ "ascii": {
+ "type": "_sbcs",
+ "chars": "��������������������������������������������������������������������������������������������������������������������������������"
+ },
+ "tis620": {
+ "type": "_sbcs",
+ "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
+ }
+} \ No newline at end of file
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js
new file mode 100644
index 000000000..066f904e5
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js
@@ -0,0 +1,179 @@
+"use strict";
+
+// Manually added data to be used by sbcs codec in addition to generated one.
+
+module.exports = {
+ // Not supported by iconv, not sure why.
+ "10029": "maccenteuro",
+ "maccenteuro": {
+ "type": "_sbcs",
+ "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
+ },
+
+ "808": "cp808",
+ "ibm808": "cp808",
+ "cp808": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
+ },
+
+ "mik": {
+ "type": "_sbcs",
+ "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
+ },
+
+ "cp720": {
+ "type": "_sbcs",
+ "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0"
+ },
+
+ // Aliases of generated encodings.
+ "ascii8bit": "ascii",
+ "usascii": "ascii",
+ "ansix34": "ascii",
+ "ansix341968": "ascii",
+ "ansix341986": "ascii",
+ "csascii": "ascii",
+ "cp367": "ascii",
+ "ibm367": "ascii",
+ "isoir6": "ascii",
+ "iso646us": "ascii",
+ "iso646irv": "ascii",
+ "us": "ascii",
+
+ "latin1": "iso88591",
+ "latin2": "iso88592",
+ "latin3": "iso88593",
+ "latin4": "iso88594",
+ "latin5": "iso88599",
+ "latin6": "iso885910",
+ "latin7": "iso885913",
+ "latin8": "iso885914",
+ "latin9": "iso885915",
+ "latin10": "iso885916",
+
+ "csisolatin1": "iso88591",
+ "csisolatin2": "iso88592",
+ "csisolatin3": "iso88593",
+ "csisolatin4": "iso88594",
+ "csisolatincyrillic": "iso88595",
+ "csisolatinarabic": "iso88596",
+ "csisolatingreek" : "iso88597",
+ "csisolatinhebrew": "iso88598",
+ "csisolatin5": "iso88599",
+ "csisolatin6": "iso885910",
+
+ "l1": "iso88591",
+ "l2": "iso88592",
+ "l3": "iso88593",
+ "l4": "iso88594",
+ "l5": "iso88599",
+ "l6": "iso885910",
+ "l7": "iso885913",
+ "l8": "iso885914",
+ "l9": "iso885915",
+ "l10": "iso885916",
+
+ "isoir14": "iso646jp",
+ "isoir57": "iso646cn",
+ "isoir100": "iso88591",
+ "isoir101": "iso88592",
+ "isoir109": "iso88593",
+ "isoir110": "iso88594",
+ "isoir144": "iso88595",
+ "isoir127": "iso88596",
+ "isoir126": "iso88597",
+ "isoir138": "iso88598",
+ "isoir148": "iso88599",
+ "isoir157": "iso885910",
+ "isoir166": "tis620",
+ "isoir179": "iso885913",
+ "isoir199": "iso885914",
+ "isoir203": "iso885915",
+ "isoir226": "iso885916",
+
+ "cp819": "iso88591",
+ "ibm819": "iso88591",
+
+ "cyrillic": "iso88595",
+
+ "arabic": "iso88596",
+ "arabic8": "iso88596",
+ "ecma114": "iso88596",
+ "asmo708": "iso88596",
+
+ "greek" : "iso88597",
+ "greek8" : "iso88597",
+ "ecma118" : "iso88597",
+ "elot928" : "iso88597",
+
+ "hebrew": "iso88598",
+ "hebrew8": "iso88598",
+
+ "turkish": "iso88599",
+ "turkish8": "iso88599",
+
+ "thai": "iso885911",
+ "thai8": "iso885911",
+
+ "celtic": "iso885914",
+ "celtic8": "iso885914",
+ "isoceltic": "iso885914",
+
+ "tis6200": "tis620",
+ "tis62025291": "tis620",
+ "tis62025330": "tis620",
+
+ "10000": "macroman",
+ "10006": "macgreek",
+ "10007": "maccyrillic",
+ "10079": "maciceland",
+ "10081": "macturkish",
+
+ "cspc8codepage437": "cp437",
+ "cspc775baltic": "cp775",
+ "cspc850multilingual": "cp850",
+ "cspcp852": "cp852",
+ "cspc862latinhebrew": "cp862",
+ "cpgr": "cp869",
+
+ "msee": "cp1250",
+ "mscyrl": "cp1251",
+ "msansi": "cp1252",
+ "msgreek": "cp1253",
+ "msturk": "cp1254",
+ "mshebr": "cp1255",
+ "msarab": "cp1256",
+ "winbaltrim": "cp1257",
+
+ "cp20866": "koi8r",
+ "20866": "koi8r",
+ "ibm878": "koi8r",
+ "cskoi8r": "koi8r",
+
+ "cp21866": "koi8u",
+ "21866": "koi8u",
+ "ibm1168": "koi8u",
+
+ "strk10482002": "rk1048",
+
+ "tcvn5712": "tcvn",
+ "tcvn57121": "tcvn",
+
+ "gb198880": "iso646cn",
+ "cn": "iso646cn",
+
+ "csiso14jisc6220ro": "iso646jp",
+ "jisc62201969ro": "iso646jp",
+ "jp": "iso646jp",
+
+ "cshproman8": "hproman8",
+ "r8": "hproman8",
+ "roman8": "hproman8",
+ "xroman8": "hproman8",
+ "ibm1051": "hproman8",
+
+ "mac": "macintosh",
+ "csmacintosh": "macintosh",
+};
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json
new file mode 100644
index 000000000..3c3d3c2f7
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json
@@ -0,0 +1,122 @@
+[
+["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
+["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
+["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],
+["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],
+["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],
+["8940","𪎩𡅅"],
+["8943","攊"],
+["8946","丽滝鵎釟"],
+["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],
+["89a1","琑糼緍楆竉刧"],
+["89ab","醌碸酞肼"],
+["89b0","贋胶𠧧"],
+["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],
+["89c1","溚舾甙"],
+["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],
+["8a40","𧶄唥"],
+["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],
+["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],
+["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],
+["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],
+["8aac","䠋𠆩㿺塳𢶍"],
+["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],
+["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],
+["8ac9","𪘁𠸉𢫏𢳉"],
+["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],
+["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],
+["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],
+["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],
+["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],
+["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],
+["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],
+["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],
+["8ca1","𣏹椙橃𣱣泿"],
+["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],
+["8cc9","顨杫䉶圽"],
+["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],
+["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],
+["8d40","𠮟"],
+["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],
+["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],
+["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],
+["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],
+["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],
+["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],
+["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],
+["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],
+["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],
+["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],
+["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],
+["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],
+["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],
+["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],
+["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],
+["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],
+["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],
+["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],
+["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],
+["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],
+["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],
+["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],
+["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],
+["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],
+["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],
+["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],
+["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],
+["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],
+["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],
+["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],
+["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],
+["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],
+["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],
+["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],
+["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],
+["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],
+["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],
+["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],
+["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],
+["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],
+["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],
+["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],
+["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],
+["9fae","酙隁酜"],
+["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],
+["9fc1","𤤙盖鮝个𠳔莾衂"],
+["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],
+["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],
+["9fe7","毺蠘罸"],
+["9feb","嘠𪙊蹷齓"],
+["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],
+["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],
+["a055","𡠻𦸅"],
+["a058","詾𢔛"],
+["a05b","惽癧髗鵄鍮鮏蟵"],
+["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],
+["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],
+["a0a1","嵗𨯂迚𨸹"],
+["a0a6","僙𡵆礆匲阸𠼻䁥"],
+["a0ae","矾"],
+["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],
+["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],
+["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],
+["a3c0","␀",31,"␡"],
+["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],
+["c740","す",58,"ァアィイ"],
+["c7a1","ゥ",81,"А",5,"ЁЖ",4],
+["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],
+["c8a1","龰冈龱𧘇"],
+["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],
+["c8f5","ʃɐɛɔɵœøŋʊɪ"],
+["f9fe","■"],
+["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],
+["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],
+["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],
+["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],
+["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],
+["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],
+["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],
+["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],
+["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],
+["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json
new file mode 100644
index 000000000..49ddb9a1d
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json
@@ -0,0 +1,264 @@
+[
+["0","\u0000",127,"€"],
+["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
+["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],
+["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],
+["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],
+["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],
+["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],
+["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],
+["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],
+["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],
+["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],
+["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],
+["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],
+["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],
+["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],
+["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],
+["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],
+["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],
+["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],
+["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],
+["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],
+["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],
+["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],
+["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],
+["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],
+["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],
+["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],
+["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],
+["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],
+["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],
+["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],
+["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],
+["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],
+["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],
+["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],
+["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],
+["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],
+["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],
+["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],
+["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],
+["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],
+["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],
+["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],
+["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],
+["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],
+["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],
+["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],
+["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],
+["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],
+["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],
+["9980","檧檨檪檭",114,"欥欦欨",6],
+["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],
+["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],
+["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],
+["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],
+["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],
+["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],
+["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],
+["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],
+["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],
+["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],
+["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],
+["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],
+["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],
+["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],
+["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],
+["a2a1","ⅰ",9],
+["a2b1","⒈",19,"⑴",19,"①",9],
+["a2e5","㈠",9],
+["a2f1","Ⅰ",11],
+["a3a1","!"#¥%",88," ̄"],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],
+["a6ee","︻︼︷︸︱"],
+["a6f4","︳︴"],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],
+["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],
+["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],
+["a8bd","ńň"],
+["a8c0","ɡ"],
+["a8c5","ㄅ",36],
+["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],
+["a959","℡㈱"],
+["a95c","‐"],
+["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],
+["a980","﹢",4,"﹨﹩﹪﹫"],
+["a996","〇"],
+["a9a4","─",75],
+["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],
+["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],
+["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],
+["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],
+["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],
+["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],
+["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],
+["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],
+["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],
+["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],
+["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],
+["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],
+["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],
+["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],
+["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],
+["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],
+["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],
+["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],
+["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],
+["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],
+["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],
+["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],
+["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],
+["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],
+["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],
+["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],
+["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],
+["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],
+["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],
+["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],
+["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],
+["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],
+["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],
+["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],
+["bb40","籃",9,"籎",36,"籵",5,"籾",9],
+["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],
+["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],
+["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],
+["bd40","紷",54,"絯",7],
+["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],
+["be40","継",12,"綧",6,"綯",42],
+["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],
+["bf40","緻",62],
+["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],
+["c040","繞",35,"纃",23,"纜纝纞"],
+["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],
+["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],
+["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],
+["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],
+["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],
+["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],
+["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],
+["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],
+["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],
+["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],
+["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],
+["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],
+["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],
+["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],
+["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],
+["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],
+["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],
+["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],
+["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],
+["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],
+["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],
+["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],
+["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],
+["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],
+["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],
+["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],
+["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],
+["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],
+["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],
+["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],
+["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],
+["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],
+["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],
+["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],
+["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],
+["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],
+["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],
+["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],
+["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],
+["d440","訞",31,"訿",8,"詉",21],
+["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],
+["d540","誁",7,"誋",7,"誔",46],
+["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],
+["d640","諤",34,"謈",27],
+["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],
+["d740","譆",31,"譧",4,"譭",25],
+["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],
+["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],
+["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],
+["d940","貮",62],
+["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],
+["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],
+["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],
+["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],
+["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],
+["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],
+["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],
+["dd40","軥",62],
+["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],
+["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],
+["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],
+["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],
+["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],
+["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],
+["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],
+["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],
+["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],
+["e240","釦",62],
+["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],
+["e340","鉆",45,"鉵",16],
+["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],
+["e440","銨",5,"銯",24,"鋉",31],
+["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],
+["e540","錊",51,"錿",10],
+["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],
+["e640","鍬",34,"鎐",27],
+["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],
+["e740","鏎",7,"鏗",54],
+["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],
+["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],
+["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],
+["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],
+["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],
+["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],
+["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],
+["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],
+["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],
+["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],
+["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],
+["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],
+["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],
+["ee40","頏",62],
+["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],
+["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],
+["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],
+["f040","餈",4,"餎餏餑",28,"餯",26],
+["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],
+["f140","馌馎馚",10,"馦馧馩",47],
+["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],
+["f240","駺",62],
+["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],
+["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],
+["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],
+["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],
+["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],
+["f540","魼",62],
+["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],
+["f640","鯜",62],
+["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],
+["f740","鰼",62],
+["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],
+["f840","鳣",62],
+["f880","鴢",32],
+["f940","鵃",62],
+["f980","鶂",32],
+["fa40","鶣",62],
+["fa80","鷢",32],
+["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],
+["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],
+["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],
+["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],
+["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],
+["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],
+["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json
new file mode 100644
index 000000000..2022a007f
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json
@@ -0,0 +1,273 @@
+[
+["0","\u0000",127],
+["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],
+["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],
+["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],
+["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],
+["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],
+["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],
+["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],
+["8361","긝",18,"긲긳긵긶긹긻긼"],
+["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],
+["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],
+["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],
+["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],
+["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],
+["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],
+["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],
+["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],
+["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],
+["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],
+["8741","놞",9,"놩",15],
+["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],
+["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],
+["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],
+["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],
+["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],
+["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],
+["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],
+["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],
+["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],
+["8a61","둧",4,"둭",18,"뒁뒂"],
+["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],
+["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],
+["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],
+["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],
+["8c41","똀",15,"똒똓똕똖똗똙",4],
+["8c61","똞",6,"똦",5,"똭",6,"똵",5],
+["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],
+["8d41","뛃",16,"뛕",8],
+["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],
+["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],
+["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],
+["8e61","럂",4,"럈럊",19],
+["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],
+["8f41","뢅",7,"뢎",17],
+["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],
+["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],
+["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],
+["9061","륾",5,"릆릈릋릌릏",15],
+["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],
+["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],
+["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],
+["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],
+["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],
+["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],
+["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],
+["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],
+["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],
+["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],
+["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],
+["9461","봞",5,"봥",6,"봭",12],
+["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],
+["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],
+["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],
+["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],
+["9641","뺸",23,"뻒뻓"],
+["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],
+["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],
+["9741","뾃",16,"뾕",8],
+["9761","뾞",17,"뾱",7],
+["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],
+["9841","쁀",16,"쁒",5,"쁙쁚쁛"],
+["9861","쁝쁞쁟쁡",6,"쁪",15],
+["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],
+["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],
+["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],
+["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],
+["9a41","숤숥숦숧숪숬숮숰숳숵",16],
+["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],
+["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],
+["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],
+["9b61","쌳",17,"썆",7],
+["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],
+["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],
+["9c61","쏿",8,"쐉",6,"쐑",9],
+["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],
+["9d41","쒪",13,"쒹쒺쒻쒽",8],
+["9d61","쓆",25],
+["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],
+["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],
+["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],
+["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],
+["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],
+["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],
+["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],
+["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],
+["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],
+["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],
+["a141","좥좦좧좩",18,"좾좿죀죁"],
+["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],
+["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],
+["a241","줐줒",5,"줙",18],
+["a261","줭",6,"줵",18],
+["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],
+["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],
+["a361","즑",6,"즚즜즞",16],
+["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],
+["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],
+["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],
+["a481","쨦쨧쨨쨪",28,"ㄱ",93],
+["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],
+["a561","쩫",17,"쩾",5,"쪅쪆"],
+["a581","쪇",16,"쪙",14,"ⅰ",9],
+["a5b0","Ⅰ",9],
+["a5c1","Α",16,"Σ",6],
+["a5e1","α",16,"σ",6],
+["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],
+["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],
+["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],
+["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],
+["a761","쬪",22,"쭂쭃쭄"],
+["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],
+["a841","쭭",10,"쭺",14],
+["a861","쮉",18,"쮝",6],
+["a881","쮤",19,"쮹",11,"ÆЪĦ"],
+["a8a6","IJ"],
+["a8a8","ĿŁØŒºÞŦŊ"],
+["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],
+["a941","쯅",14,"쯕",10],
+["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],
+["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],
+["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],
+["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],
+["aa81","챳챴챶",29,"ぁ",82],
+["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],
+["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],
+["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],
+["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],
+["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],
+["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],
+["acd1","а",5,"ёж",25],
+["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],
+["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],
+["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],
+["ae41","췆",5,"췍췎췏췑",16],
+["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],
+["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],
+["af41","츬츭츮츯츲츴츶",19],
+["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],
+["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],
+["b041","캚",5,"캢캦",5,"캮",12],
+["b061","캻",5,"컂",19],
+["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],
+["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],
+["b161","켥",6,"켮켲",5,"켹",11],
+["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],
+["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],
+["b261","쾎",18,"쾢",5,"쾩"],
+["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],
+["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],
+["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],
+["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],
+["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],
+["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],
+["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],
+["b541","킕",14,"킦킧킩킪킫킭",5],
+["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],
+["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],
+["b641","턅",7,"턎",17],
+["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],
+["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],
+["b741","텮",13,"텽",6,"톅톆톇톉톊"],
+["b761","톋",20,"톢톣톥톦톧"],
+["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],
+["b841","퇐",7,"퇙",17],
+["b861","퇫",8,"퇵퇶퇷퇹",13],
+["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],
+["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],
+["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],
+["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],
+["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],
+["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],
+["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],
+["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],
+["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],
+["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],
+["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],
+["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],
+["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],
+["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],
+["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],
+["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],
+["be41","퐸",7,"푁푂푃푅",14],
+["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],
+["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],
+["bf41","풞",10,"풪",14],
+["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],
+["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],
+["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],
+["c061","픞",25],
+["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],
+["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],
+["c161","햌햍햎햏햑",19,"햦햧"],
+["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],
+["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],
+["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],
+["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],
+["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],
+["c361","홢",4,"홨홪",5,"홲홳홵",11],
+["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],
+["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],
+["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],
+["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],
+["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],
+["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],
+["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],
+["c641","힍힎힏힑",6,"힚힜힞",5],
+["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],
+["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],
+["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],
+["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],
+["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],
+["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],
+["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],
+["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],
+["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],
+["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],
+["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],
+["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],
+["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],
+["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],
+["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],
+["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],
+["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],
+["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],
+["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],
+["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],
+["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],
+["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],
+["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],
+["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],
+["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],
+["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],
+["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],
+["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],
+["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],
+["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],
+["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],
+["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],
+["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],
+["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],
+["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],
+["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],
+["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],
+["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],
+["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],
+["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],
+["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],
+["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],
+["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],
+["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],
+["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],
+["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],
+["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],
+["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],
+["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],
+["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],
+["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],
+["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],
+["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],
+["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],
+["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json
new file mode 100644
index 000000000..d8bc87178
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json
@@ -0,0 +1,177 @@
+[
+["0","\u0000",127],
+["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],
+["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],
+["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],
+["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],
+["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],
+["a3a1","ㄐ",25,"˙ˉˊˇˋ"],
+["a3e1","€"],
+["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],
+["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],
+["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],
+["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],
+["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],
+["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],
+["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],
+["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],
+["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],
+["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],
+["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],
+["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],
+["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],
+["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],
+["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],
+["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],
+["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],
+["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],
+["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],
+["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],
+["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],
+["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],
+["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],
+["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],
+["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],
+["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],
+["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],
+["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],
+["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],
+["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],
+["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],
+["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],
+["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],
+["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],
+["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],
+["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],
+["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],
+["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],
+["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],
+["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],
+["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],
+["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],
+["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],
+["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],
+["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],
+["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],
+["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],
+["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],
+["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],
+["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],
+["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],
+["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],
+["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],
+["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],
+["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],
+["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],
+["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],
+["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],
+["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],
+["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],
+["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],
+["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],
+["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],
+["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],
+["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],
+["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],
+["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],
+["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],
+["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],
+["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],
+["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],
+["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],
+["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],
+["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],
+["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],
+["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],
+["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],
+["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],
+["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],
+["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],
+["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],
+["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],
+["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],
+["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],
+["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],
+["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],
+["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],
+["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],
+["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],
+["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],
+["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],
+["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],
+["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],
+["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],
+["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],
+["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],
+["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],
+["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],
+["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],
+["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],
+["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],
+["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],
+["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],
+["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],
+["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],
+["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],
+["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],
+["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],
+["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],
+["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],
+["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],
+["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],
+["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],
+["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],
+["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],
+["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],
+["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],
+["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],
+["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],
+["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],
+["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],
+["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],
+["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],
+["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],
+["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],
+["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],
+["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],
+["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],
+["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],
+["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],
+["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],
+["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],
+["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],
+["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],
+["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],
+["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],
+["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],
+["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],
+["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],
+["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],
+["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],
+["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],
+["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],
+["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],
+["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],
+["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],
+["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],
+["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],
+["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],
+["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],
+["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],
+["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],
+["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],
+["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],
+["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],
+["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],
+["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],
+["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],
+["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],
+["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],
+["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],
+["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],
+["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],
+["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],
+["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],
+["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],
+["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json
new file mode 100644
index 000000000..4fa61ca11
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json
@@ -0,0 +1,182 @@
+[
+["0","\u0000",127],
+["8ea1","。",62],
+["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],
+["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],
+["a2ba","∈∋⊆⊇⊂⊃∪∩"],
+["a2ca","∧∨¬⇒⇔∀∃"],
+["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["a2f2","ʼn♯♭♪†‡¶"],
+["a2fe","◯"],
+["a3b0","0",9],
+["a3c1","A",25],
+["a3e1","a",25],
+["a4a1","ぁ",82],
+["a5a1","ァ",85],
+["a6a1","Α",16,"Σ",6],
+["a6c1","α",16,"σ",6],
+["a7a1","А",5,"ЁЖ",25],
+["a7d1","а",5,"ёж",25],
+["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["ada1","①",19,"Ⅰ",9],
+["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],
+["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],
+["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],
+["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],
+["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],
+["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],
+["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],
+["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],
+["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],
+["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],
+["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],
+["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],
+["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],
+["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],
+["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],
+["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],
+["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],
+["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],
+["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],
+["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],
+["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],
+["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],
+["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],
+["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],
+["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],
+["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],
+["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],
+["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],
+["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],
+["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],
+["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],
+["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],
+["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],
+["f4a1","堯槇遙瑤凜熙"],
+["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],
+["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],
+["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["fcf1","ⅰ",9,"¬¦'""],
+["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],
+["8fa2c2","¡¦¿"],
+["8fa2eb","ºª©®™¤№"],
+["8fa6e1","ΆΈΉΊΪ"],
+["8fa6e7","Ό"],
+["8fa6e9","ΎΫ"],
+["8fa6ec","Ώ"],
+["8fa6f1","άέήίϊΐόςύϋΰώ"],
+["8fa7c2","Ђ",10,"ЎЏ"],
+["8fa7f2","ђ",10,"ўџ"],
+["8fa9a1","ÆĐ"],
+["8fa9a4","Ħ"],
+["8fa9a6","IJ"],
+["8fa9a8","ŁĿ"],
+["8fa9ab","ŊØŒ"],
+["8fa9af","ŦÞ"],
+["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],
+["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],
+["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],
+["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],
+["8fabbd","ġĥíìïîǐ"],
+["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],
+["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],
+["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],
+["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],
+["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],
+["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],
+["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],
+["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],
+["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],
+["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],
+["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],
+["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],
+["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],
+["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],
+["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],
+["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],
+["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],
+["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],
+["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],
+["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],
+["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],
+["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],
+["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],
+["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],
+["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],
+["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],
+["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],
+["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],
+["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],
+["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],
+["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],
+["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],
+["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],
+["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],
+["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],
+["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],
+["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],
+["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],
+["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],
+["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],
+["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],
+["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],
+["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],
+["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],
+["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],
+["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],
+["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],
+["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],
+["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],
+["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],
+["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],
+["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],
+["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],
+["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],
+["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],
+["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],
+["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],
+["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],
+["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],
+["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],
+["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],
+["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],
+["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
new file mode 100644
index 000000000..85c693475
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json
@@ -0,0 +1 @@
+{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json
new file mode 100644
index 000000000..b742e368f
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json
@@ -0,0 +1,56 @@
+[
+["a140","",62],
+["a180","",32],
+["a240","",62],
+["a280","",32],
+["a2ab","",5],
+["a2e3","€"],
+["a2ef",""],
+["a2fd",""],
+["a340","",62],
+["a380","",31," "],
+["a440","",62],
+["a480","",32],
+["a4f4","",10],
+["a540","",62],
+["a580","",32],
+["a5f7","",7],
+["a640","",62],
+["a680","",32],
+["a6b9","",7],
+["a6d9","",6],
+["a6ec",""],
+["a6f3",""],
+["a6f6","",8],
+["a740","",62],
+["a780","",32],
+["a7c2","",14],
+["a7f2","",12],
+["a896","",10],
+["a8bc","ḿ"],
+["a8bf","ǹ"],
+["a8c1",""],
+["a8ea","",20],
+["a958",""],
+["a95b",""],
+["a95d",""],
+["a989","〾⿰",11],
+["a997","",12],
+["a9f0","",14],
+["aaa1","",93],
+["aba1","",93],
+["aca1","",93],
+["ada1","",93],
+["aea1","",93],
+["afa1","",93],
+["d7fa","",4],
+["f8a1","",93],
+["f9a1","",93],
+["faa1","",93],
+["fba1","",93],
+["fca1","",93],
+["fda1","",93],
+["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],
+["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93],
+["8135f437",""]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json
new file mode 100644
index 000000000..5a3a43cf8
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json
@@ -0,0 +1,125 @@
+[
+["0","\u0000",128],
+["a1","。",62],
+["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],
+["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],
+["81b8","∈∋⊆⊇⊂⊃∪∩"],
+["81c8","∧∨¬⇒⇔∀∃"],
+["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
+["81f0","ʼn♯♭♪†‡¶"],
+["81fc","◯"],
+["824f","0",9],
+["8260","A",25],
+["8281","a",25],
+["829f","ぁ",82],
+["8340","ァ",62],
+["8380","ム",22],
+["839f","Α",16,"Σ",6],
+["83bf","α",16,"σ",6],
+["8440","А",5,"ЁЖ",25],
+["8470","а",5,"ёж",7],
+["8480","о",17],
+["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
+["8740","①",19,"Ⅰ",9],
+["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
+["877e","㍻"],
+["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
+["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
+["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],
+["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
+["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],
+["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
+["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],
+["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
+["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],
+["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
+["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],
+["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
+["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],
+["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
+["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],
+["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
+["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],
+["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
+["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],
+["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
+["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],
+["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
+["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],
+["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
+["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],
+["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
+["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],
+["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
+["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],
+["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
+["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],
+["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
+["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
+["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
+["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],
+["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
+["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],
+["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
+["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],
+["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
+["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],
+["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
+["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],
+["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
+["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],
+["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
+["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],
+["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
+["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],
+["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
+["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],
+["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
+["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],
+["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
+["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],
+["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
+["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],
+["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
+["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],
+["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
+["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],
+["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
+["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],
+["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
+["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],
+["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
+["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],
+["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
+["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],
+["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],
+["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],
+["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
+["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],
+["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
+["eeef","ⅰ",9,"¬¦'""],
+["f040","",62],
+["f080","",124],
+["f140","",62],
+["f180","",124],
+["f240","",62],
+["f280","",124],
+["f340","",62],
+["f380","",124],
+["f440","",62],
+["f480","",124],
+["f540","",62],
+["f580","",124],
+["f640","",62],
+["f680","",124],
+["f740","",62],
+["f780","",124],
+["f840","",62],
+["f880","",124],
+["f940",""],
+["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],
+["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],
+["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],
+["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],
+["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]
+]
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js b/node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js
new file mode 100644
index 000000000..97d066925
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js
@@ -0,0 +1,197 @@
+"use strict";
+var Buffer = require("safer-buffer").Buffer;
+
+// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
+
+// == UTF16-BE codec. ==========================================================
+
+exports.utf16be = Utf16BECodec;
+function Utf16BECodec() {
+}
+
+Utf16BECodec.prototype.encoder = Utf16BEEncoder;
+Utf16BECodec.prototype.decoder = Utf16BEDecoder;
+Utf16BECodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf16BEEncoder() {
+}
+
+Utf16BEEncoder.prototype.write = function(str) {
+ var buf = Buffer.from(str, 'ucs2');
+ for (var i = 0; i < buf.length; i += 2) {
+ var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
+ }
+ return buf;
+}
+
+Utf16BEEncoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf16BEDecoder() {
+ this.overflowByte = -1;
+}
+
+Utf16BEDecoder.prototype.write = function(buf) {
+ if (buf.length == 0)
+ return '';
+
+ var buf2 = Buffer.alloc(buf.length + 1),
+ i = 0, j = 0;
+
+ if (this.overflowByte !== -1) {
+ buf2[0] = buf[0];
+ buf2[1] = this.overflowByte;
+ i = 1; j = 2;
+ }
+
+ for (; i < buf.length-1; i += 2, j+= 2) {
+ buf2[j] = buf[i+1];
+ buf2[j+1] = buf[i];
+ }
+
+ this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
+
+ return buf2.slice(0, j).toString('ucs2');
+}
+
+Utf16BEDecoder.prototype.end = function() {
+ this.overflowByte = -1;
+}
+
+
+// == UTF-16 codec =============================================================
+// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
+// Defaults to UTF-16LE, as it's prevalent and default in Node.
+// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
+// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
+
+// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
+
+exports.utf16 = Utf16Codec;
+function Utf16Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+}
+
+Utf16Codec.prototype.encoder = Utf16Encoder;
+Utf16Codec.prototype.decoder = Utf16Decoder;
+
+
+// -- Encoding (pass-through)
+
+function Utf16Encoder(options, codec) {
+ options = options || {};
+ if (options.addBOM === undefined)
+ options.addBOM = true;
+ this.encoder = codec.iconv.getEncoder('utf-16le', options);
+}
+
+Utf16Encoder.prototype.write = function(str) {
+ return this.encoder.write(str);
+}
+
+Utf16Encoder.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+// -- Decoding
+
+function Utf16Decoder(options, codec) {
+ this.decoder = null;
+ this.initialBufs = [];
+ this.initialBufsLen = 0;
+
+ this.options = options || {};
+ this.iconv = codec.iconv;
+}
+
+Utf16Decoder.prototype.write = function(buf) {
+ if (!this.decoder) {
+ // Codec is not chosen yet. Accumulate initial bytes.
+ this.initialBufs.push(buf);
+ this.initialBufsLen += buf.length;
+
+ if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)
+ return '';
+
+ // We have enough bytes -> detect endianness.
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var resStr = '';
+ for (var i = 0; i < this.initialBufs.length; i++)
+ resStr += this.decoder.write(this.initialBufs[i]);
+
+ this.initialBufs.length = this.initialBufsLen = 0;
+ return resStr;
+ }
+
+ return this.decoder.write(buf);
+}
+
+Utf16Decoder.prototype.end = function() {
+ if (!this.decoder) {
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var resStr = '';
+ for (var i = 0; i < this.initialBufs.length; i++)
+ resStr += this.decoder.write(this.initialBufs[i]);
+
+ var trail = this.decoder.end();
+ if (trail)
+ resStr += trail;
+
+ this.initialBufs.length = this.initialBufsLen = 0;
+ return resStr;
+ }
+ return this.decoder.end();
+}
+
+function detectEncoding(bufs, defaultEncoding) {
+ var b = [];
+ var charsProcessed = 0;
+ var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE.
+
+ outer_loop:
+ for (var i = 0; i < bufs.length; i++) {
+ var buf = bufs[i];
+ for (var j = 0; j < buf.length; j++) {
+ b.push(buf[j]);
+ if (b.length === 2) {
+ if (charsProcessed === 0) {
+ // Check BOM first.
+ if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';
+ if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';
+ }
+
+ if (b[0] === 0 && b[1] !== 0) asciiCharsBE++;
+ if (b[0] !== 0 && b[1] === 0) asciiCharsLE++;
+
+ b.length = 0;
+ charsProcessed++;
+
+ if (charsProcessed >= 100) {
+ break outer_loop;
+ }
+ }
+ }
+ }
+
+ // Make decisions.
+ // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
+ // So, we count ASCII as if it was LE or BE, and decide from that.
+ if (asciiCharsBE > asciiCharsLE) return 'utf-16be';
+ if (asciiCharsBE < asciiCharsLE) return 'utf-16le';
+
+ // Couldn't decide (likely all zeros or not enough data).
+ return defaultEncoding || 'utf-16le';
+}
+
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js b/node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js
new file mode 100644
index 000000000..2fa900a12
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/utf32.js
@@ -0,0 +1,319 @@
+'use strict';
+
+var Buffer = require('safer-buffer').Buffer;
+
+// == UTF32-LE/BE codec. ==========================================================
+
+exports._utf32 = Utf32Codec;
+
+function Utf32Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+ this.bomAware = true;
+ this.isLE = codecOptions.isLE;
+}
+
+exports.utf32le = { type: '_utf32', isLE: true };
+exports.utf32be = { type: '_utf32', isLE: false };
+
+// Aliases
+exports.ucs4le = 'utf32le';
+exports.ucs4be = 'utf32be';
+
+Utf32Codec.prototype.encoder = Utf32Encoder;
+Utf32Codec.prototype.decoder = Utf32Decoder;
+
+// -- Encoding
+
+function Utf32Encoder(options, codec) {
+ this.isLE = codec.isLE;
+ this.highSurrogate = 0;
+}
+
+Utf32Encoder.prototype.write = function(str) {
+ var src = Buffer.from(str, 'ucs2');
+ var dst = Buffer.alloc(src.length * 2);
+ var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;
+ var offset = 0;
+
+ for (var i = 0; i < src.length; i += 2) {
+ var code = src.readUInt16LE(i);
+ var isHighSurrogate = (0xD800 <= code && code < 0xDC00);
+ var isLowSurrogate = (0xDC00 <= code && code < 0xE000);
+
+ if (this.highSurrogate) {
+ if (isHighSurrogate || !isLowSurrogate) {
+ // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low
+ // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
+ // (technically wrong, but expected by some applications, like Windows file names).
+ write32.call(dst, this.highSurrogate, offset);
+ offset += 4;
+ }
+ else {
+ // Create 32-bit value from high and low surrogates;
+ var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;
+
+ write32.call(dst, codepoint, offset);
+ offset += 4;
+ this.highSurrogate = 0;
+
+ continue;
+ }
+ }
+
+ if (isHighSurrogate)
+ this.highSurrogate = code;
+ else {
+ // Even if the current character is a low surrogate, with no previous high surrogate, we'll
+ // encode it as a semi-invalid stand-alone character for the same reasons expressed above for
+ // unpaired high surrogates.
+ write32.call(dst, code, offset);
+ offset += 4;
+ this.highSurrogate = 0;
+ }
+ }
+
+ if (offset < dst.length)
+ dst = dst.slice(0, offset);
+
+ return dst;
+};
+
+Utf32Encoder.prototype.end = function() {
+ // Treat any leftover high surrogate as a semi-valid independent character.
+ if (!this.highSurrogate)
+ return;
+
+ var buf = Buffer.alloc(4);
+
+ if (this.isLE)
+ buf.writeUInt32LE(this.highSurrogate, 0);
+ else
+ buf.writeUInt32BE(this.highSurrogate, 0);
+
+ this.highSurrogate = 0;
+
+ return buf;
+};
+
+// -- Decoding
+
+function Utf32Decoder(options, codec) {
+ this.isLE = codec.isLE;
+ this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0);
+ this.overflow = [];
+}
+
+Utf32Decoder.prototype.write = function(src) {
+ if (src.length === 0)
+ return '';
+
+ var i = 0;
+ var codepoint = 0;
+ var dst = Buffer.alloc(src.length + 4);
+ var offset = 0;
+ var isLE = this.isLE;
+ var overflow = this.overflow;
+ var badChar = this.badChar;
+
+ if (overflow.length > 0) {
+ for (; i < src.length && overflow.length < 4; i++)
+ overflow.push(src[i]);
+
+ if (overflow.length === 4) {
+ // NOTE: codepoint is a signed int32 and can be negative.
+ // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
+ if (isLE) {
+ codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24);
+ } else {
+ codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24);
+ }
+ overflow.length = 0;
+
+ offset = _writeCodepoint(dst, offset, codepoint, badChar);
+ }
+ }
+
+ // Main loop. Should be as optimized as possible.
+ for (; i < src.length - 3; i += 4) {
+ // NOTE: codepoint is a signed int32 and can be negative.
+ if (isLE) {
+ codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24);
+ } else {
+ codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24);
+ }
+ offset = _writeCodepoint(dst, offset, codepoint, badChar);
+ }
+
+ // Keep overflowing bytes.
+ for (; i < src.length; i++) {
+ overflow.push(src[i]);
+ }
+
+ return dst.slice(0, offset).toString('ucs2');
+};
+
+function _writeCodepoint(dst, offset, codepoint, badChar) {
+ // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.
+ if (codepoint < 0 || codepoint > 0x10FFFF) {
+ // Not a valid Unicode codepoint
+ codepoint = badChar;
+ }
+
+ // Ephemeral Planes: Write high surrogate.
+ if (codepoint >= 0x10000) {
+ codepoint -= 0x10000;
+
+ var high = 0xD800 | (codepoint >> 10);
+ dst[offset++] = high & 0xff;
+ dst[offset++] = high >> 8;
+
+ // Low surrogate is written below.
+ var codepoint = 0xDC00 | (codepoint & 0x3FF);
+ }
+
+ // Write BMP char or low surrogate.
+ dst[offset++] = codepoint & 0xff;
+ dst[offset++] = codepoint >> 8;
+
+ return offset;
+};
+
+Utf32Decoder.prototype.end = function() {
+ this.overflow.length = 0;
+};
+
+// == UTF-32 Auto codec =============================================================
+// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
+// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
+// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});
+
+// Encoder prepends BOM (which can be overridden with (addBOM: false}).
+
+exports.utf32 = Utf32AutoCodec;
+exports.ucs4 = 'utf32';
+
+function Utf32AutoCodec(options, iconv) {
+ this.iconv = iconv;
+}
+
+Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder;
+Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder;
+
+// -- Encoding
+
+function Utf32AutoEncoder(options, codec) {
+ options = options || {};
+
+ if (options.addBOM === undefined)
+ options.addBOM = true;
+
+ this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);
+}
+
+Utf32AutoEncoder.prototype.write = function(str) {
+ return this.encoder.write(str);
+};
+
+Utf32AutoEncoder.prototype.end = function() {
+ return this.encoder.end();
+};
+
+// -- Decoding
+
+function Utf32AutoDecoder(options, codec) {
+ this.decoder = null;
+ this.initialBufs = [];
+ this.initialBufsLen = 0;
+ this.options = options || {};
+ this.iconv = codec.iconv;
+}
+
+Utf32AutoDecoder.prototype.write = function(buf) {
+ if (!this.decoder) {
+ // Codec is not chosen yet. Accumulate initial bytes.
+ this.initialBufs.push(buf);
+ this.initialBufsLen += buf.length;
+
+ if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)
+ return '';
+
+ // We have enough bytes -> detect endianness.
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var resStr = '';
+ for (var i = 0; i < this.initialBufs.length; i++)
+ resStr += this.decoder.write(this.initialBufs[i]);
+
+ this.initialBufs.length = this.initialBufsLen = 0;
+ return resStr;
+ }
+
+ return this.decoder.write(buf);
+};
+
+Utf32AutoDecoder.prototype.end = function() {
+ if (!this.decoder) {
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
+
+ var resStr = '';
+ for (var i = 0; i < this.initialBufs.length; i++)
+ resStr += this.decoder.write(this.initialBufs[i]);
+
+ var trail = this.decoder.end();
+ if (trail)
+ resStr += trail;
+
+ this.initialBufs.length = this.initialBufsLen = 0;
+ return resStr;
+ }
+
+ return this.decoder.end();
+};
+
+function detectEncoding(bufs, defaultEncoding) {
+ var b = [];
+ var charsProcessed = 0;
+ var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE.
+ var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE.
+
+ outer_loop:
+ for (var i = 0; i < bufs.length; i++) {
+ var buf = bufs[i];
+ for (var j = 0; j < buf.length; j++) {
+ b.push(buf[j]);
+ if (b.length === 4) {
+ if (charsProcessed === 0) {
+ // Check BOM first.
+ if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {
+ return 'utf-32le';
+ }
+ if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {
+ return 'utf-32be';
+ }
+ }
+
+ if (b[0] !== 0 || b[1] > 0x10) invalidBE++;
+ if (b[3] !== 0 || b[2] > 0x10) invalidLE++;
+
+ if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++;
+ if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++;
+
+ b.length = 0;
+ charsProcessed++;
+
+ if (charsProcessed >= 100) {
+ break outer_loop;
+ }
+ }
+ }
+ }
+
+ // Make decisions.
+ if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';
+ if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';
+
+ // Couldn't decide (likely all zeros or not enough data).
+ return defaultEncoding || 'utf-32le';
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js b/node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js
new file mode 100644
index 000000000..eacae34d5
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js
@@ -0,0 +1,290 @@
+"use strict";
+var Buffer = require("safer-buffer").Buffer;
+
+// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
+// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
+
+exports.utf7 = Utf7Codec;
+exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
+function Utf7Codec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7Codec.prototype.encoder = Utf7Encoder;
+Utf7Codec.prototype.decoder = Utf7Decoder;
+Utf7Codec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
+
+function Utf7Encoder(options, codec) {
+ this.iconv = codec.iconv;
+}
+
+Utf7Encoder.prototype.write = function(str) {
+ // Naive implementation.
+ // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
+ return Buffer.from(str.replace(nonDirectChars, function(chunk) {
+ return "+" + (chunk === '+' ? '' :
+ this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
+ + "-";
+ }.bind(this)));
+}
+
+Utf7Encoder.prototype.end = function() {
+}
+
+
+// -- Decoding
+
+function Utf7Decoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64Regex = /[A-Za-z0-9\/+]/;
+var base64Chars = [];
+for (var i = 0; i < 256; i++)
+ base64Chars[i] = base64Regex.test(String.fromCharCode(i));
+
+var plusChar = '+'.charCodeAt(0),
+ minusChar = '-'.charCodeAt(0),
+ andChar = '&'.charCodeAt(0);
+
+Utf7Decoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '+'
+ if (buf[i] == plusChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64Chars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
+ res += "+";
+ } else {
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii");
+ res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus is absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii");
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7Decoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
+// UTF-7-IMAP codec.
+// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
+// Differences:
+// * Base64 part is started by "&" instead of "+"
+// * Direct characters are 0x20-0x7E, except "&" (0x26)
+// * In Base64, "," is used instead of "/"
+// * Base64 must not be used to represent direct characters.
+// * No implicit shift back from Base64 (should always end with '-')
+// * String must end in non-shifted position.
+// * "-&" while in base64 is not allowed.
+
+
+exports.utf7imap = Utf7IMAPCodec;
+function Utf7IMAPCodec(codecOptions, iconv) {
+ this.iconv = iconv;
+};
+
+Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
+Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
+Utf7IMAPCodec.prototype.bomAware = true;
+
+
+// -- Encoding
+
+function Utf7IMAPEncoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = Buffer.alloc(6);
+ this.base64AccumIdx = 0;
+}
+
+Utf7IMAPEncoder.prototype.write = function(str) {
+ var inBase64 = this.inBase64,
+ base64Accum = this.base64Accum,
+ base64AccumIdx = this.base64AccumIdx,
+ buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var uChar = str.charCodeAt(i);
+ if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
+ if (inBase64) {
+ if (base64AccumIdx > 0) {
+ bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ inBase64 = false;
+ }
+
+ if (!inBase64) {
+ buf[bufIdx++] = uChar; // Write direct character
+
+ if (uChar === andChar) // Ampersand -> '&-'
+ buf[bufIdx++] = minusChar;
+ }
+
+ } else { // Non-direct character
+ if (!inBase64) {
+ buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
+ inBase64 = true;
+ }
+ if (inBase64) {
+ base64Accum[base64AccumIdx++] = uChar >> 8;
+ base64Accum[base64AccumIdx++] = uChar & 0xFF;
+
+ if (base64AccumIdx == base64Accum.length) {
+ bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
+ base64AccumIdx = 0;
+ }
+ }
+ }
+ }
+
+ this.inBase64 = inBase64;
+ this.base64AccumIdx = base64AccumIdx;
+
+ return buf.slice(0, bufIdx);
+}
+
+Utf7IMAPEncoder.prototype.end = function() {
+ var buf = Buffer.alloc(10), bufIdx = 0;
+ if (this.inBase64) {
+ if (this.base64AccumIdx > 0) {
+ bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
+ this.base64AccumIdx = 0;
+ }
+
+ buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
+ this.inBase64 = false;
+ }
+
+ return buf.slice(0, bufIdx);
+}
+
+
+// -- Decoding
+
+function Utf7IMAPDecoder(options, codec) {
+ this.iconv = codec.iconv;
+ this.inBase64 = false;
+ this.base64Accum = '';
+}
+
+var base64IMAPChars = base64Chars.slice();
+base64IMAPChars[','.charCodeAt(0)] = true;
+
+Utf7IMAPDecoder.prototype.write = function(buf) {
+ var res = "", lastI = 0,
+ inBase64 = this.inBase64,
+ base64Accum = this.base64Accum;
+
+ // The decoder is more involved as we must handle chunks in stream.
+ // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
+
+ for (var i = 0; i < buf.length; i++) {
+ if (!inBase64) { // We're in direct mode.
+ // Write direct chars until '&'
+ if (buf[i] == andChar) {
+ res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
+ lastI = i+1;
+ inBase64 = true;
+ }
+ } else { // We decode base64.
+ if (!base64IMAPChars[buf[i]]) { // Base64 ended.
+ if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
+ res += "&";
+ } else {
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/');
+ res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
+ }
+
+ if (buf[i] != minusChar) // Minus may be absorbed after base64.
+ i--;
+
+ lastI = i+1;
+ inBase64 = false;
+ base64Accum = '';
+ }
+ }
+ }
+
+ if (!inBase64) {
+ res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
+ } else {
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/');
+
+ var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
+ base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
+ b64str = b64str.slice(0, canBeDecoded);
+
+ res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
+ }
+
+ this.inBase64 = inBase64;
+ this.base64Accum = base64Accum;
+
+ return res;
+}
+
+Utf7IMAPDecoder.prototype.end = function() {
+ var res = "";
+ if (this.inBase64 && this.base64Accum.length > 0)
+ res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
+
+ this.inBase64 = false;
+ this.base64Accum = '';
+ return res;
+}
+
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js
new file mode 100644
index 000000000..105087238
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js
@@ -0,0 +1,52 @@
+"use strict";
+
+var BOMChar = '\uFEFF';
+
+exports.PrependBOM = PrependBOMWrapper
+function PrependBOMWrapper(encoder, options) {
+ this.encoder = encoder;
+ this.addBOM = true;
+}
+
+PrependBOMWrapper.prototype.write = function(str) {
+ if (this.addBOM) {
+ str = BOMChar + str;
+ this.addBOM = false;
+ }
+
+ return this.encoder.write(str);
+}
+
+PrependBOMWrapper.prototype.end = function() {
+ return this.encoder.end();
+}
+
+
+//------------------------------------------------------------------------------
+
+exports.StripBOM = StripBOMWrapper;
+function StripBOMWrapper(decoder, options) {
+ this.decoder = decoder;
+ this.pass = false;
+ this.options = options || {};
+}
+
+StripBOMWrapper.prototype.write = function(buf) {
+ var res = this.decoder.write(buf);
+ if (this.pass || !res)
+ return res;
+
+ if (res[0] === BOMChar) {
+ res = res.slice(1);
+ if (typeof this.options.stripBOM === 'function')
+ this.options.stripBOM();
+ }
+
+ this.pass = true;
+ return res;
+}
+
+StripBOMWrapper.prototype.end = function() {
+ return this.decoder.end();
+}
+
diff --git a/node_modules/encoding/node_modules/iconv-lite/lib/index.d.ts b/node_modules/encoding/node_modules/iconv-lite/lib/index.d.ts
new file mode 100644
index 000000000..99f200f4a
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/lib/index.d.ts
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License.
+ * REQUIREMENT: This definition is dependent on the @types/node definition.
+ * Install with `npm install @types/node --save-dev`
+ *--------------------------------------------------------------------------------------------*/
+
+declare module 'iconv-lite' {
+ // Basic API
+ export function decode(buffer: Buffer, encoding: string, options?: Options): string;
+
+ export function encode(content: string, encoding: string, options?: Options): Buffer;
+
+ export function encodingExists(encoding: string): boolean;
+
+ // Stream API
+ export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
+
+ export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream;
+
+ // Low-level stream APIs
+ export function getEncoder(encoding: string, options?: Options): EncoderStream;
+
+ export function getDecoder(encoding: string, options?: Options): DecoderStream;
+}
+
+export interface Options {
+ stripBOM?: boolean;
+ addBOM?: boolean;
+ defaultEncoding?: string;
+}
+
+export interface EncoderStream {
+ write(str: string): Buffer;
+ end(): Buffer | undefined;
+}
+
+export interface DecoderStream {
+ write(buf: Buffer): string;
+ end(): string | undefined;
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/lib/index.js b/node_modules/encoding/node_modules/iconv-lite/lib/index.js
new file mode 100644
index 000000000..657701c38
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/lib/index.js
@@ -0,0 +1,180 @@
+"use strict";
+
+var Buffer = require("safer-buffer").Buffer;
+
+var bomHandling = require("./bom-handling"),
+ iconv = module.exports;
+
+// All codecs and aliases are kept here, keyed by encoding name/alias.
+// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
+iconv.encodings = null;
+
+// Characters emitted in case of error.
+iconv.defaultCharUnicode = '�';
+iconv.defaultCharSingleByte = '?';
+
+// Public API.
+iconv.encode = function encode(str, encoding, options) {
+ str = "" + (str || ""); // Ensure string.
+
+ var encoder = iconv.getEncoder(encoding, options);
+
+ var res = encoder.write(str);
+ var trail = encoder.end();
+
+ return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
+}
+
+iconv.decode = function decode(buf, encoding, options) {
+ if (typeof buf === 'string') {
+ if (!iconv.skipDecodeWarning) {
+ console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
+ iconv.skipDecodeWarning = true;
+ }
+
+ buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer.
+ }
+
+ var decoder = iconv.getDecoder(encoding, options);
+
+ var res = decoder.write(buf);
+ var trail = decoder.end();
+
+ return trail ? (res + trail) : res;
+}
+
+iconv.encodingExists = function encodingExists(enc) {
+ try {
+ iconv.getCodec(enc);
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+// Legacy aliases to convert functions
+iconv.toEncoding = iconv.encode;
+iconv.fromEncoding = iconv.decode;
+
+// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
+iconv._codecDataCache = {};
+iconv.getCodec = function getCodec(encoding) {
+ if (!iconv.encodings)
+ iconv.encodings = require("../encodings"); // Lazy load all encoding definitions.
+
+ // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
+ var enc = iconv._canonicalizeEncoding(encoding);
+
+ // Traverse iconv.encodings to find actual codec.
+ var codecOptions = {};
+ while (true) {
+ var codec = iconv._codecDataCache[enc];
+ if (codec)
+ return codec;
+
+ var codecDef = iconv.encodings[enc];
+
+ switch (typeof codecDef) {
+ case "string": // Direct alias to other encoding.
+ enc = codecDef;
+ break;
+
+ case "object": // Alias with options. Can be layered.
+ for (var key in codecDef)
+ codecOptions[key] = codecDef[key];
+
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ enc = codecDef.type;
+ break;
+
+ case "function": // Codec itself.
+ if (!codecOptions.encodingName)
+ codecOptions.encodingName = enc;
+
+ // The codec function must load all tables and return object with .encoder and .decoder methods.
+ // It'll be called only once (for each different options object).
+ codec = new codecDef(codecOptions, iconv);
+
+ iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
+ return codec;
+
+ default:
+ throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
+ }
+ }
+}
+
+iconv._canonicalizeEncoding = function(encoding) {
+ // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
+ return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
+}
+
+iconv.getEncoder = function getEncoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ encoder = new codec.encoder(options, codec);
+
+ if (codec.bomAware && options && options.addBOM)
+ encoder = new bomHandling.PrependBOM(encoder, options);
+
+ return encoder;
+}
+
+iconv.getDecoder = function getDecoder(encoding, options) {
+ var codec = iconv.getCodec(encoding),
+ decoder = new codec.decoder(options, codec);
+
+ if (codec.bomAware && !(options && options.stripBOM === false))
+ decoder = new bomHandling.StripBOM(decoder, options);
+
+ return decoder;
+}
+
+// Streaming API
+// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add
+// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.
+// If you would like to enable it explicitly, please add the following code to your app:
+// > iconv.enableStreamingAPI(require('stream'));
+iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {
+ if (iconv.supportsStreams)
+ return;
+
+ // Dependency-inject stream module to create IconvLite stream classes.
+ var streams = require("./streams")(stream_module);
+
+ // Not public API yet, but expose the stream classes.
+ iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
+ iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
+
+ // Streaming API.
+ iconv.encodeStream = function encodeStream(encoding, options) {
+ return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
+ }
+
+ iconv.decodeStream = function decodeStream(encoding, options) {
+ return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
+ }
+
+ iconv.supportsStreams = true;
+}
+
+// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).
+var stream_module;
+try {
+ stream_module = require("stream");
+} catch (e) {}
+
+if (stream_module && stream_module.Transform) {
+ iconv.enableStreamingAPI(stream_module);
+
+} else {
+ // In rare cases where 'stream' module is not available by default, throw a helpful exception.
+ iconv.encodeStream = iconv.decodeStream = function() {
+ throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
+ };
+}
+
+if ("Ā" != "\u0100") {
+ console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
+}
diff --git a/node_modules/encoding/node_modules/iconv-lite/lib/streams.js b/node_modules/encoding/node_modules/iconv-lite/lib/streams.js
new file mode 100644
index 000000000..a1506482f
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/lib/streams.js
@@ -0,0 +1,109 @@
+"use strict";
+
+var Buffer = require("safer-buffer").Buffer;
+
+// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments),
+// we opt to dependency-inject it instead of creating a hard dependency.
+module.exports = function(stream_module) {
+ var Transform = stream_module.Transform;
+
+ // == Encoder stream =======================================================
+
+ function IconvLiteEncoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
+ Transform.call(this, options);
+ }
+
+ IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteEncoderStream }
+ });
+
+ IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (typeof chunk != 'string')
+ return done(new Error("Iconv encoding stream needs strings as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+ }
+
+ IconvLiteEncoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+ }
+
+ IconvLiteEncoderStream.prototype.collect = function(cb) {
+ var chunks = [];
+ this.on('error', cb);
+ this.on('data', function(chunk) { chunks.push(chunk); });
+ this.on('end', function() {
+ cb(null, Buffer.concat(chunks));
+ });
+ return this;
+ }
+
+
+ // == Decoder stream =======================================================
+
+ function IconvLiteDecoderStream(conv, options) {
+ this.conv = conv;
+ options = options || {};
+ options.encoding = this.encoding = 'utf8'; // We output strings.
+ Transform.call(this, options);
+ }
+
+ IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
+ constructor: { value: IconvLiteDecoderStream }
+ });
+
+ IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
+ if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array))
+ return done(new Error("Iconv decoding stream needs buffers as its input."));
+ try {
+ var res = this.conv.write(chunk);
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+ }
+
+ IconvLiteDecoderStream.prototype._flush = function(done) {
+ try {
+ var res = this.conv.end();
+ if (res && res.length) this.push(res, this.encoding);
+ done();
+ }
+ catch (e) {
+ done(e);
+ }
+ }
+
+ IconvLiteDecoderStream.prototype.collect = function(cb) {
+ var res = '';
+ this.on('error', cb);
+ this.on('data', function(chunk) { res += chunk; });
+ this.on('end', function() {
+ cb(null, res);
+ });
+ return this;
+ }
+
+ return {
+ IconvLiteEncoderStream: IconvLiteEncoderStream,
+ IconvLiteDecoderStream: IconvLiteDecoderStream,
+ };
+};
diff --git a/node_modules/encoding/node_modules/iconv-lite/package.json b/node_modules/encoding/node_modules/iconv-lite/package.json
new file mode 100644
index 000000000..074f6f857
--- /dev/null
+++ b/node_modules/encoding/node_modules/iconv-lite/package.json
@@ -0,0 +1,74 @@
+{
+ "_from": "iconv-lite@^0.6.2",
+ "_id": "iconv-lite@0.6.2",
+ "_inBundle": false,
+ "_integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
+ "_location": "/encoding/iconv-lite",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "iconv-lite@^0.6.2",
+ "name": "iconv-lite",
+ "escapedName": "iconv-lite",
+ "rawSpec": "^0.6.2",
+ "saveSpec": null,
+ "fetchSpec": "^0.6.2"
+ },
+ "_requiredBy": [
+ "/encoding"
+ ],
+ "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
+ "_shasum": "ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01",
+ "_spec": "iconv-lite@^0.6.2",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/encoding",
+ "author": {
+ "name": "Alexander Shtuchkin",
+ "email": "ashtuchkin@gmail.com"
+ },
+ "browser": {
+ "stream": false
+ },
+ "bugs": {
+ "url": "https://github.com/ashtuchkin/iconv-lite/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "deprecated": false,
+ "description": "Convert character encodings in pure javascript.",
+ "devDependencies": {
+ "async": "^3.2.0",
+ "c8": "^7.2.0",
+ "errto": "^0.2.1",
+ "iconv": "^2.3.5",
+ "mocha": "^3.5.3",
+ "request": "^2.88.2",
+ "semver": "^6.3.0",
+ "unorm": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "homepage": "https://github.com/ashtuchkin/iconv-lite",
+ "keywords": [
+ "iconv",
+ "convert",
+ "charset",
+ "icu"
+ ],
+ "license": "MIT",
+ "main": "./lib/index.js",
+ "name": "iconv-lite",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ashtuchkin/iconv-lite.git"
+ },
+ "scripts": {
+ "coverage": "c8 _mocha --grep .",
+ "test": "mocha --reporter spec --grep ."
+ },
+ "typings": "./lib/index.d.ts",
+ "version": "0.6.2"
+}
diff --git a/node_modules/encoding/package.json b/node_modules/encoding/package.json
index 94bdb8152..cf78f4db7 100644
--- a/node_modules/encoding/package.json
+++ b/node_modules/encoding/package.json
@@ -1,28 +1,29 @@
{
- "_from": "encoding@^0.1.11",
- "_id": "encoding@0.1.12",
+ "_from": "encoding@^0.1.12",
+ "_id": "encoding@0.1.13",
"_inBundle": false,
- "_integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
+ "_integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"_location": "/encoding",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "safer-buffer": "2.1.2"
+ },
"_requested": {
"type": "range",
"registry": true,
- "raw": "encoding@^0.1.11",
+ "raw": "encoding@^0.1.12",
"name": "encoding",
"escapedName": "encoding",
- "rawSpec": "^0.1.11",
+ "rawSpec": "^0.1.12",
"saveSpec": null,
- "fetchSpec": "^0.1.11"
+ "fetchSpec": "^0.1.12"
},
"_requiredBy": [
- "/node-fetch",
- "/node-fetch-npm"
+ "/minipass-fetch"
],
- "_resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
- "_shasum": "538b66f3ee62cd1ab51ec323829d1f9480c74beb",
- "_spec": "encoding@^0.1.11",
- "_where": "/Users/rebecca/code/npm/node_modules/node-fetch-npm",
+ "_resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
+ "_shasum": "56574afdd791f54a8e9b2785c0582a2d26210fa9",
+ "_spec": "encoding@^0.1.12",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/minipass-fetch",
"author": {
"name": "Andris Reinman"
},
@@ -31,13 +32,12 @@
},
"bundleDependencies": false,
"dependencies": {
- "iconv-lite": "~0.4.13"
+ "iconv-lite": "^0.6.2"
},
"deprecated": false,
- "description": "Convert encodings, uses iconv by default and fallbacks to iconv-lite if needed",
+ "description": "Convert encodings, uses iconv-lite",
"devDependencies": {
- "iconv": "~2.1.11",
- "nodeunit": "~0.9.1"
+ "nodeunit": "0.11.3"
},
"homepage": "https://github.com/andris9/encoding#readme",
"license": "MIT",
@@ -50,5 +50,5 @@
"scripts": {
"test": "nodeunit test"
},
- "version": "0.1.12"
+ "version": "0.1.13"
}
diff --git a/node_modules/encoding/test/test.js b/node_modules/encoding/test/test.js
index 0de4dcb17..3a7dfee98 100644
--- a/node_modules/encoding/test/test.js
+++ b/node_modules/encoding/test/test.js
@@ -1,75 +1,49 @@
'use strict';
-var Iconv = require('../lib/iconv-loader');
var encoding = require('../lib/encoding');
exports['General tests'] = {
-
- 'Iconv is available': function (test) {
- test.ok(Iconv);
- test.done();
- },
-
- 'From UTF-8 to Latin_1 with Iconv': function (test) {
+ 'From UTF-8 to Latin_1': function (test) {
var input = 'ÕÄÖÜ',
- expected = new Buffer([0xd5, 0xc4, 0xd6, 0xdc]);
+ expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]);
test.deepEqual(encoding.convert(input, 'latin1'), expected);
test.done();
},
- 'From Latin_1 to UTF-8 with Iconv': function (test) {
- var input = new Buffer([0xd5, 0xc4, 0xd6, 0xdc]),
+ 'From Latin_1 to UTF-8': function (test) {
+ var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]),
expected = 'ÕÄÖÜ';
test.deepEqual(encoding.convert(input, 'utf-8', 'latin1').toString(), expected);
test.done();
},
- 'From UTF-8 to UTF-8 with Iconv': function (test) {
+ 'From UTF-8 to UTF-8': function (test) {
var input = 'ÕÄÖÜ',
- expected = new Buffer('ÕÄÖÜ');
+ expected = Buffer.from('ÕÄÖÜ');
test.deepEqual(encoding.convert(input, 'utf-8', 'utf-8'), expected);
test.done();
},
- 'From Latin_13 to Latin_15 with Iconv': function (test) {
- var input = new Buffer([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]),
- expected = new Buffer([0xd5, 0xc4, 0xd6, 0xdc, 0xA6]);
+ 'From Latin_13 to Latin_15': function (test) {
+ var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]),
+ expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xa6]);
test.deepEqual(encoding.convert(input, 'latin_15', 'latin13'), expected);
test.done();
- },
-
- 'From ISO-2022-JP to UTF-8 with Iconv': function (test) {
- var input = new Buffer('GyRCM1g5OzU7PVEwdzgmPSQ4IUYkMnFKczlwGyhC', 'base64'),
- expected = new Buffer('5a2m5qCh5oqA6KGT5ZOh56CU5L+u5qSc6KiO5Lya5aCx5ZGK', 'base64');
- test.deepEqual(encoding.convert(input, 'utf-8', 'ISO-2022-JP'), expected);
- test.done();
- },
-
- 'From UTF-8 to Latin_1 with iconv-lite': function (test) {
- var input = 'ÕÄÖÜ',
- expected = new Buffer([0xd5, 0xc4, 0xd6, 0xdc]);
- test.deepEqual(encoding.convert(input, 'latin1', false, true), expected);
- test.done();
- },
-
- 'From Latin_1 to UTF-8 with iconv-lite': function (test) {
- var input = new Buffer([0xd5, 0xc4, 0xd6, 0xdc]),
- expected = 'ÕÄÖÜ';
- test.deepEqual(encoding.convert(input, 'utf-8', 'latin1', true).toString(), expected);
- test.done();
- },
-
- 'From UTF-8 to UTF-8 with iconv-lite': function (test) {
- var input = 'ÕÄÖÜ',
- expected = new Buffer('ÕÄÖÜ');
- test.deepEqual(encoding.convert(input, 'utf-8', 'utf-8', true), expected);
- test.done();
- },
-
- 'From Latin_13 to Latin_15 with iconv-lite': function (test) {
- var input = new Buffer([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]),
- expected = new Buffer([0xd5, 0xc4, 0xd6, 0xdc, 0xA6]);
- test.deepEqual(encoding.convert(input, 'latin_15', 'latin13', true), expected);
- test.done();
}
+
+ /*
+ // ISO-2022-JP is not supported by iconv-lite
+ "From ISO-2022-JP to UTF-8 with Iconv": function (test) {
+ var input = Buffer.from(
+ "GyRCM1g5OzU7PVEwdzgmPSQ4IUYkMnFKczlwGyhC",
+ "base64"
+ ),
+ expected = Buffer.from(
+ "5a2m5qCh5oqA6KGT5ZOh56CU5L+u5qSc6KiO5Lya5aCx5ZGK",
+ "base64"
+ );
+ test.deepEqual(encoding.convert(input, "utf-8", "ISO-2022-JP"), expected);
+ test.done();
+ },
+ */
};
diff --git a/node_modules/fs-vacuum/.eslintrc b/node_modules/fs-vacuum/.eslintrc
deleted file mode 100644
index 5c39c67ec..000000000
--- a/node_modules/fs-vacuum/.eslintrc
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "env" : {
- "node" : true
- },
- "rules" : {
- "curly" : 0,
- "no-lonely-if" : 1,
- "no-mixed-requires" : 0,
- "no-underscore-dangle" : 0,
- "no-unused-vars" : [2, {"vars" : "all", "args" : "after-used"}],
- "no-use-before-define" : [2, "nofunc"],
- "quotes" : [1, "double", "avoid-escape"],
- "semi" : [2, "never"],
- "space-after-keywords" : 1,
- "space-infix-ops" : 0,
- "strict" : 0
- }
-}
diff --git a/node_modules/fs-vacuum/.npmignore b/node_modules/fs-vacuum/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/fs-vacuum/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/fs-vacuum/.travis.yml b/node_modules/fs-vacuum/.travis.yml
deleted file mode 100644
index 2325eae02..000000000
--- a/node_modules/fs-vacuum/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: node_js
-node_js:
- - "5"
- - "4"
- - iojs
- - "0.12"
- - "0.10"
- - "0.8"
-sudo: false
-script: "npm test"
-before_install:
- - "npm -g install npm"
-notifications:
- slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8
diff --git a/node_modules/fs-vacuum/LICENSE b/node_modules/fs-vacuum/LICENSE
deleted file mode 100644
index d07fa9743..000000000
--- a/node_modules/fs-vacuum/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2015, Forrest L Norvell
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/fs-vacuum/README.md b/node_modules/fs-vacuum/README.md
deleted file mode 100644
index 8af1cb248..000000000
--- a/node_modules/fs-vacuum/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# fs-vacuum
-
-Remove the empty branches of a directory tree, optionally up to (but not
-including) a specified base directory. Optionally nukes the leaf directory.
-
-## Usage
-
-```javascript
-var logger = require("npmlog");
-var vacuum = require("fs-vacuum");
-
-var options = {
- base : "/path/to/my/tree/root",
- purge : true,
- log : logger.silly.bind(logger, "myCleanup")
-};
-
-/* Assuming there are no other files or directories in "out", "to", or "my",
- * the final path will just be "/path/to/my/tree/root".
- */
-vacuum("/path/to/my/tree/root/out/to/my/files", options, function (error) {
- if (error) console.error("Unable to cleanly vacuum:", error.message);
-});
-```
-# vacuum(directory, options, callback)
-
-* `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.**
-* `options` {Object}
- * `base` {String} No directories at or above this level of the filesystem will be removed.
- * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents.
- * `log` {Function} A logging function that takes `npmlog`-compatible argument lists.
-* `callback` {Function} Function to call once vacuuming is complete.
- * `error` {Error} What went wrong along the way, if anything.
diff --git a/node_modules/fs-vacuum/package.json b/node_modules/fs-vacuum/package.json
deleted file mode 100644
index 69529764d..000000000
--- a/node_modules/fs-vacuum/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "_args": [
- [
- "fs-vacuum@1.2.10",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "fs-vacuum@1.2.10",
- "_id": "fs-vacuum@1.2.10",
- "_inBundle": false,
- "_integrity": "sha1-t2Kb7AekAxolSP35n17PHMizHjY=",
- "_location": "/fs-vacuum",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "fs-vacuum@1.2.10",
- "name": "fs-vacuum",
- "escapedName": "fs-vacuum",
- "rawSpec": "1.2.10",
- "saveSpec": null,
- "fetchSpec": "1.2.10"
- },
- "_requiredBy": [
- "/",
- "/gentle-fs"
- ],
- "_resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz",
- "_spec": "1.2.10",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Forrest L Norvell",
- "email": "ogd@aoaioxxysz.net"
- },
- "bugs": {
- "url": "https://github.com/npm/fs-vacuum/issues"
- },
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "path-is-inside": "^1.0.1",
- "rimraf": "^2.5.2"
- },
- "description": "recursively remove empty directories -- to a point",
- "devDependencies": {
- "errno": "~0.1.0",
- "mkdirp": "^0.5.1",
- "require-inject": "~1.3.0",
- "standard": "^6.0.8",
- "tap": "^5.7.1",
- "tmp": "0.0.28"
- },
- "homepage": "https://github.com/npm/fs-vacuum",
- "keywords": [
- "rm",
- "rimraf",
- "clean"
- ],
- "license": "ISC",
- "main": "vacuum.js",
- "name": "fs-vacuum",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/fs-vacuum.git"
- },
- "scripts": {
- "test": "standard && tap test/*.js"
- },
- "version": "1.2.10"
-}
diff --git a/node_modules/fs-vacuum/test/arguments.js b/node_modules/fs-vacuum/test/arguments.js
deleted file mode 100644
index 17ff2ee59..000000000
--- a/node_modules/fs-vacuum/test/arguments.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var test = require('tap').test
-
-var vacuum = require('../vacuum.js')
-
-test('vacuum throws on missing parameters', function (t) {
- t.throws(vacuum, 'called with no parameters')
- t.throws(function () { vacuum('directory', {}) }, 'called with no callback')
-
- t.end()
-})
-
-test('vacuum throws on incorrect types ("Forrest is pedantic" section)', function (t) {
- t.throws(function () {
- vacuum({}, {}, function () {})
- }, 'called with path parameter of incorrect type')
- t.throws(function () {
- vacuum('directory', 'directory', function () {})
- }, 'called with options of wrong type')
- t.throws(function () {
- vacuum('directory', {}, 'whoops')
- }, "called with callback that isn't callable")
-
- t.end()
-})
diff --git a/node_modules/fs-vacuum/test/base-leaf-mismatch.js b/node_modules/fs-vacuum/test/base-leaf-mismatch.js
deleted file mode 100644
index 1a6c53565..000000000
--- a/node_modules/fs-vacuum/test/base-leaf-mismatch.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var test = require('tap').test
-
-var vacuum = require('../vacuum.js')
-
-test('vacuum errors when base is set and path is not under it', function (t) {
- vacuum('/a/made/up/path', {base: '/root/elsewhere'}, function (er) {
- t.ok(er, 'got an error')
- t.equal(
- er.message,
- '/a/made/up/path is not a child of /root/elsewhere',
- 'got the expected error message'
- )
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/no-entries-file-no-purge.js b/node_modules/fs-vacuum/test/no-entries-file-no-purge.js
deleted file mode 100644
index 819adcdcb..000000000
--- a/node_modules/fs-vacuum/test/no-entries-file-no-purge.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var writeFile = require('graceful-fs').writeFile
-var readdirSync = require('graceful-fs').readdirSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'that', 'ends', 'at', 'a')
-var FULL_PATH = path.join(PARTIAL_PATH, 'file')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, partialPath, fullPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- writeFile(fullPath, new Buffer('hi'), function (er) {
- t.ifError(er, 'made file')
-
- t.end()
- })
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(fullPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 6, 'got 5 removal & 1 finish message')
- t.equal(messages[5], 'finished vacuuming up to ' + testBase)
-
- var stat
- var verifyPath = fullPath
-
- function verify () { stat = statSync(verifyPath) }
-
- // handle the file separately
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isFile(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
-
- for (var i = 0; i < 4; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- var files = readdirSync(testBase)
- t.equal(files.length, 0, 'nothing left in base directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/no-entries-link-no-purge.js b/node_modules/fs-vacuum/test/no-entries-link-no-purge.js
deleted file mode 100644
index 833d970d6..000000000
--- a/node_modules/fs-vacuum/test/no-entries-link-no-purge.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var symlinkSync = require('graceful-fs').symlinkSync
-var readdirSync = require('graceful-fs').readdirSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var TARGET_PATH = path.join('target-link', 'in', 'the', 'middle')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'with', 'a')
-var FULL_PATH = path.join(PARTIAL_PATH, 'link')
-var EXPANDO_PATH = path.join(SHORT_PATH, 'with', 'a', 'link', 'in', 'the', 'middle')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, targetPath, partialPath, fullPath, expandoPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- targetPath = path.resolve(tmpdir, TARGET_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
- expandoPath = path.resolve(tmpdir, EXPANDO_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- mkdirp(targetPath, function (er) {
- t.ifError(er, 'made target path')
-
- symlinkSync(path.join(tmpdir, 'target-link'), fullPath)
-
- t.end()
- })
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(expandoPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 7, 'got 6 removal & 1 finish message')
- t.equal(messages[6], 'finished vacuuming up to ' + testBase)
-
- var stat
- var verifyPath = expandoPath
- function verify () { stat = statSync(verifyPath) }
-
- for (var i = 0; i < 6; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- var files = readdirSync(testBase)
- t.equal(files.length, 0, 'nothing left in base directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/no-entries-no-purge.js b/node_modules/fs-vacuum/test/no-entries-no-purge.js
deleted file mode 100644
index 03c17923c..000000000
--- a/node_modules/fs-vacuum/test/no-entries-no-purge.js
+++ /dev/null
@@ -1,61 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var LONG_PATH = path.join(SHORT_PATH, 'of', 'a', 'certain', 'length')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testPath, testBase
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- testPath = path.resolve(tmpdir, LONG_PATH)
-
- mkdirp(testPath, function (er) {
- t.ifError(er, 'made test path')
-
- t.end()
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(testPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 5, 'got 4 removal & 1 finish message')
- t.equal(messages[4], 'finished vacuuming up to ' + testBase)
-
- var stat
- var verifyPath = testPath
- function verify () { stat = statSync(verifyPath) }
-
- for (var i = 0; i < 4; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/no-entries-with-link-purge.js b/node_modules/fs-vacuum/test/no-entries-with-link-purge.js
deleted file mode 100644
index 990b69d8a..000000000
--- a/node_modules/fs-vacuum/test/no-entries-with-link-purge.js
+++ /dev/null
@@ -1,78 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var writeFileSync = require('graceful-fs').writeFileSync
-var symlinkSync = require('graceful-fs').symlinkSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var TARGET_PATH = 'link-target'
-var FIRST_FILE = path.join(TARGET_PATH, 'monsieurs')
-var SECOND_FILE = path.join(TARGET_PATH, 'mesdames')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'with', 'a', 'definite')
-var FULL_PATH = path.join(PARTIAL_PATH, 'target')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, partialPath, fullPath, targetPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- targetPath = path.resolve(tmpdir, TARGET_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- mkdirp(targetPath, function (er) {
- t.ifError(er, 'made target path')
-
- writeFileSync(path.resolve(tmpdir, FIRST_FILE), new Buffer("c'est vraiment joli"))
- writeFileSync(path.resolve(tmpdir, SECOND_FILE), new Buffer('oui oui'))
- symlinkSync(targetPath, fullPath)
-
- t.end()
- })
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(fullPath, {purge: true, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 5, 'got 4 removal & 1 finish message')
- t.equal(messages[0], 'purging ' + fullPath)
- t.equal(messages[4], 'finished vacuuming up to ' + testBase)
-
- var stat
- var verifyPath = fullPath
- function verify () { stat = statSync(verifyPath) }
-
- for (var i = 0; i < 4; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/no-entries-with-purge.js b/node_modules/fs-vacuum/test/no-entries-with-purge.js
deleted file mode 100644
index d3ab0c2b6..000000000
--- a/node_modules/fs-vacuum/test/no-entries-with-purge.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var writeFileSync = require('graceful-fs').writeFileSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var LONG_PATH = path.join(SHORT_PATH, 'of', 'a', 'certain', 'kind')
-var FIRST_FILE = path.join(LONG_PATH, 'monsieurs')
-var SECOND_FILE = path.join(LONG_PATH, 'mesdames')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testPath, testBase
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- testPath = path.resolve(tmpdir, LONG_PATH)
-
- mkdirp(testPath, function (er) {
- t.ifError(er, 'made test path')
-
- writeFileSync(path.resolve(tmpdir, FIRST_FILE), new Buffer("c'est vraiment joli"))
- writeFileSync(path.resolve(tmpdir, SECOND_FILE), new Buffer('oui oui'))
- t.end()
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(testPath, {purge: true, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 5, 'got 4 removal & 1 finish message')
- t.equal(messages[0], 'purging ' + testPath)
- t.equal(messages[4], 'finished vacuuming up to ' + testBase)
-
- var stat
- var verifyPath = testPath
- function verify () { stat = statSync(verifyPath) }
-
- for (var i = 0; i < 4; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/not-remove-home-directory.js b/node_modules/fs-vacuum/test/not-remove-home-directory.js
deleted file mode 100644
index 8cab00945..000000000
--- a/node_modules/fs-vacuum/test/not-remove-home-directory.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-
-var BASE_PATH = path.join('foo')
-var HOME_PATH = path.join(BASE_PATH, 'foo', 'bar')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var homePath, basePath, realHome
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- homePath = path.resolve(tmpdir, HOME_PATH)
- basePath = path.resolve(tmpdir, BASE_PATH)
-
- realHome = process.env.HOME
- process.env.HOME = homePath
-
- mkdirp(homePath, function (er) {
- t.ifError(er, 'made test path')
- t.end()
- })
- })
-})
-
-test('do not remove home directory', function (t) {
- vacuum(homePath, {purge: false, base: basePath, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
- t.equal(messages[0], 'quitting because cannot remove home directory ' + homePath)
- process.env.HOME = realHome
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/other-directories-no-purge.js b/node_modules/fs-vacuum/test/other-directories-no-purge.js
deleted file mode 100644
index b18f7eb27..000000000
--- a/node_modules/fs-vacuum/test/other-directories-no-purge.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-var statSync = require('graceful-fs').statSync
-var mkdtemp = require('tmp').dir
-var mkdirp = require('mkdirp')
-
-var vacuum = require('../vacuum.js')
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var REMOVE_PATH = path.join(SHORT_PATH, 'of', 'a', 'certain', 'length')
-var OTHER_PATH = path.join(SHORT_PATH, 'of', 'no', 'qualities')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, testPath, otherPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- testPath = path.resolve(tmpdir, REMOVE_PATH)
- otherPath = path.resolve(tmpdir, OTHER_PATH)
-
- mkdirp(testPath, function (er) {
- t.ifError(er, 'made test path')
-
- mkdirp(otherPath, function (er) {
- t.ifError(er, 'made other path')
-
- t.end()
- })
- })
- })
-})
-
-test('remove up to a point', function (t) {
- vacuum(testPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 4, 'got 3 removal & 1 finish message')
- t.equal(
- messages[3], 'quitting because other entries in ' + testBase + '/of',
- 'got expected final message'
- )
-
- var stat
- var verifyPath = testPath
- function verify () { stat = statSync(verifyPath) }
-
- for (var i = 0; i < 3; i++) {
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isDirectory(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(otherPath)
- }, otherPath + ' can be statted')
- t.ok(stat && stat.isDirectory(), otherPath + ' is still a directory')
-
- var intersection = path.join(testBase, 'of')
- t.doesNotThrow(function () {
- stat = statSync(intersection)
- }, intersection + ' can be statted')
- t.ok(stat && stat.isDirectory(), intersection + ' is still a directory')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/racy-entries-eexist.js b/node_modules/fs-vacuum/test/racy-entries-eexist.js
deleted file mode 100644
index d467e996d..000000000
--- a/node_modules/fs-vacuum/test/racy-entries-eexist.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-
-var readdir = require('graceful-fs').readdir
-var readdirSync = require('graceful-fs').readdirSync
-var rmdir = require('graceful-fs').rmdir
-var statSync = require('graceful-fs').statSync
-var writeFile = require('graceful-fs').writeFile
-var mkdirp = require('mkdirp')
-var mkdtemp = require('tmp').dir
-var tmpFile = require('tmp').file
-var EEXIST = require('errno').code.EEXIST
-var ENOTEMPTY = require('errno').code.ENOTEMPTY
-
-var requireInject = require('require-inject')
-var vacuum = requireInject('../vacuum.js', {
- 'graceful-fs': {
- 'lstat': require('graceful-fs').lstat,
- 'readdir': function (dir, cb) {
- readdir(dir, function (err, files) {
- // Simulate racy removal by creating a file after vacuum
- // thinks the directory is empty
- if (dir === partialPath && files.length === 0) {
- tmpFile({dir: dir}, function (err, path, fd) {
- if (err) throw err
- cb(err, files)
- })
- } else {
- cb(err, files)
- }
- })
- },
- 'rmdir': function (dir, cb) {
- rmdir(dir, function (err) {
- // Force EEXIST error from rmdir if the directory is non-empty
- var mockErr = EEXIST
- if (err) {
- if (err.code === ENOTEMPTY.code) {
- err.code = err.errno = mockErr.code
- err.message = mockErr.code + ': ' + mockErr.description + ', ' + err.syscall + ' \'' + dir + '\''
- }
- }
- cb(err)
- })
- },
- 'unlink': require('graceful-fs').unlink
- }
-})
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'that', 'ends', 'at', 'a')
-var FULL_PATH = path.join(PARTIAL_PATH, 'file')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, partialPath, fullPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- writeFile(fullPath, new Buffer('hi'), function (er) {
- t.ifError(er, 'made file')
-
- t.end()
- })
- })
- })
-})
-
-test('racy removal should quit gracefully', function (t) {
- vacuum(fullPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 3, 'got 2 removal & 1 quit message')
- t.equal(messages[2], 'quitting because new (racy) entries in ' + partialPath)
-
- var stat
- var verifyPath = fullPath
-
- function verify () { stat = statSync(verifyPath) }
-
- // handle the file separately
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isFile(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
-
- for (var i = 0; i < 4; i++) {
- t.doesNotThrow(function () {
- stat = statSync(verifyPath)
- }, verifyPath + ' can be statted')
- t.ok(stat && stat.isDirectory(), verifyPath + ' is still a directory')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- var files = readdirSync(testBase)
- t.equal(files.length, 1, 'base directory untouched')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/racy-entries-enotempty.js b/node_modules/fs-vacuum/test/racy-entries-enotempty.js
deleted file mode 100644
index decc3807d..000000000
--- a/node_modules/fs-vacuum/test/racy-entries-enotempty.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-
-var readdir = require('graceful-fs').readdir
-var readdirSync = require('graceful-fs').readdirSync
-var rmdir = require('graceful-fs').rmdir
-var statSync = require('graceful-fs').statSync
-var writeFile = require('graceful-fs').writeFile
-var mkdirp = require('mkdirp')
-var mkdtemp = require('tmp').dir
-var tmpFile = require('tmp').file
-var EEXIST = require('errno').code.EEXIST
-var ENOTEMPTY = require('errno').code.ENOTEMPTY
-
-var requireInject = require('require-inject')
-var vacuum = requireInject('../vacuum.js', {
- 'graceful-fs': {
- 'lstat': require('graceful-fs').lstat,
- 'readdir': function (dir, cb) {
- readdir(dir, function (err, files) {
- // Simulate racy removal by creating a file after vacuum
- // thinks the directory is empty
- if (dir === partialPath && files.length === 0) {
- tmpFile({dir: dir}, function (err, path, fd) {
- if (err) throw err
- cb(err, files)
- })
- } else {
- cb(err, files)
- }
- })
- },
- 'rmdir': function (dir, cb) {
- rmdir(dir, function (err) {
- // Force ENOTEMPTY error from rmdir if the directory is non-empty
- var mockErr = ENOTEMPTY
- if (err) {
- if (err.code === EEXIST.code) {
- err.code = err.errno = mockErr.code
- err.message = mockErr.code + ': ' + mockErr.description + ', ' + err.syscall + ' \'' + dir + '\''
- }
- }
- cb(err)
- })
- },
- 'unlink': require('graceful-fs').unlink
- }
-})
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'that', 'ends', 'at', 'a')
-var FULL_PATH = path.join(PARTIAL_PATH, 'file')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, partialPath, fullPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- writeFile(fullPath, new Buffer('hi'), function (er) {
- t.ifError(er, 'made file')
-
- t.end()
- })
- })
- })
-})
-
-test('racy removal should quit gracefully', function (t) {
- vacuum(fullPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 3, 'got 2 removal & 1 quit message')
- t.equal(messages[2], 'quitting because new (racy) entries in ' + partialPath)
-
- var stat
- var verifyPath = fullPath
-
- function verify () { stat = statSync(verifyPath) }
-
- // handle the file separately
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isFile(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
-
- for (var i = 0; i < 4; i++) {
- t.doesNotThrow(function () {
- stat = statSync(verifyPath)
- }, verifyPath + ' can be statted')
- t.ok(stat && stat.isDirectory(), verifyPath + ' is still a directory')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- var files = readdirSync(testBase)
- t.equal(files.length, 1, 'base directory untouched')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/test/racy-entries.js b/node_modules/fs-vacuum/test/racy-entries.js
deleted file mode 100644
index c0ed53243..000000000
--- a/node_modules/fs-vacuum/test/racy-entries.js
+++ /dev/null
@@ -1,104 +0,0 @@
-var path = require('path')
-
-var test = require('tap').test
-
-var readdir = require('graceful-fs').readdir
-var readdirSync = require('graceful-fs').readdirSync
-var statSync = require('graceful-fs').statSync
-var writeFile = require('graceful-fs').writeFile
-var mkdirp = require('mkdirp')
-var mkdtemp = require('tmp').dir
-var tmpFile = require('tmp').file
-
-var requireInject = require('require-inject')
-var vacuum = requireInject('../vacuum.js', {
- 'graceful-fs': {
- 'lstat': require('graceful-fs').lstat,
- 'readdir': function (dir, cb) {
- readdir(dir, function (err, files) {
- // Simulate racy removal by creating a file after vacuum
- // thinks the directory is empty
- if (dir === partialPath && files.length === 0) {
- tmpFile({dir: dir}, function (err, path, fd) {
- if (err) throw err
- cb(err, files)
- })
- } else {
- cb(err, files)
- }
- })
- },
- 'rmdir': require('graceful-fs').rmdir,
- 'unlink': require('graceful-fs').unlink
- }
-})
-
-// CONSTANTS
-var TEMP_OPTIONS = {
- unsafeCleanup: true,
- mode: '0700'
-}
-var SHORT_PATH = path.join('i', 'am', 'a', 'path')
-var PARTIAL_PATH = path.join(SHORT_PATH, 'that', 'ends', 'at', 'a')
-var FULL_PATH = path.join(PARTIAL_PATH, 'file')
-
-var messages = []
-function log () { messages.push(Array.prototype.slice.call(arguments).join(' ')) }
-
-var testBase, partialPath, fullPath
-test('xXx setup xXx', function (t) {
- mkdtemp(TEMP_OPTIONS, function (er, tmpdir) {
- t.ifError(er, 'temp directory exists')
-
- testBase = path.resolve(tmpdir, SHORT_PATH)
- partialPath = path.resolve(tmpdir, PARTIAL_PATH)
- fullPath = path.resolve(tmpdir, FULL_PATH)
-
- mkdirp(partialPath, function (er) {
- t.ifError(er, 'made test path')
-
- writeFile(fullPath, new Buffer('hi'), function (er) {
- t.ifError(er, 'made file')
-
- t.end()
- })
- })
- })
-})
-
-test('racy removal should quit gracefully', function (t) {
- vacuum(fullPath, {purge: false, base: testBase, log: log}, function (er) {
- t.ifError(er, 'cleaned up to base')
-
- t.equal(messages.length, 3, 'got 2 removal & 1 quit message')
- t.equal(messages[2], 'quitting because new (racy) entries in ' + partialPath)
-
- var stat
- var verifyPath = fullPath
-
- function verify () { stat = statSync(verifyPath) }
-
- // handle the file separately
- t.throws(verify, verifyPath + ' cannot be statted')
- t.notOk(stat && stat.isFile(), verifyPath + ' is totally gone')
- verifyPath = path.dirname(verifyPath)
-
- for (var i = 0; i < 4; i++) {
- t.doesNotThrow(function () {
- stat = statSync(verifyPath)
- }, verifyPath + ' can be statted')
- t.ok(stat && stat.isDirectory(), verifyPath + ' is still a directory')
- verifyPath = path.dirname(verifyPath)
- }
-
- t.doesNotThrow(function () {
- stat = statSync(testBase)
- }, testBase + ' can be statted')
- t.ok(stat && stat.isDirectory(), testBase + ' is still a directory')
-
- var files = readdirSync(testBase)
- t.equal(files.length, 1, 'base directory untouched')
-
- t.end()
- })
-})
diff --git a/node_modules/fs-vacuum/vacuum.js b/node_modules/fs-vacuum/vacuum.js
deleted file mode 100644
index 050f87018..000000000
--- a/node_modules/fs-vacuum/vacuum.js
+++ /dev/null
@@ -1,117 +0,0 @@
-var assert = require('assert')
-var dirname = require('path').dirname
-var resolve = require('path').resolve
-var isInside = require('path-is-inside')
-
-var rimraf = require('rimraf')
-var lstat = require('graceful-fs').lstat
-var readdir = require('graceful-fs').readdir
-var rmdir = require('graceful-fs').rmdir
-var unlink = require('graceful-fs').unlink
-
-module.exports = vacuum
-
-function vacuum (leaf, options, cb) {
- assert(typeof leaf === 'string', 'must pass in path to remove')
- assert(typeof cb === 'function', 'must pass in callback')
-
- if (!options) options = {}
- assert(typeof options === 'object', 'options must be an object')
-
- var log = options.log ? options.log : function () {}
-
- leaf = leaf && resolve(leaf)
- var base = options.base && resolve(options.base)
- if (base && !isInside(leaf, base)) {
- return cb(new Error(leaf + ' is not a child of ' + base))
- }
-
- lstat(leaf, function (error, stat) {
- if (error) {
- if (error.code === 'ENOENT') return cb(null)
-
- log(error.stack)
- return cb(error)
- }
-
- if (!(stat && (stat.isDirectory() || stat.isSymbolicLink() || stat.isFile()))) {
- log(leaf, 'is not a directory, file, or link')
- return cb(new Error(leaf + ' is not a directory, file, or link'))
- }
-
- if (options.purge) {
- log('purging', leaf)
- rimraf(leaf, function (error) {
- if (error) return cb(error)
-
- next(dirname(leaf))
- })
- } else if (!stat.isDirectory()) {
- log('removing', leaf)
- unlink(leaf, function (error) {
- if (error) return cb(error)
-
- next(dirname(leaf))
- })
- } else {
- next(leaf)
- }
- })
-
- function next (branch) {
- branch = branch && resolve(branch)
- // either we've reached the base or we've reached the root
- if ((base && branch === base) || branch === dirname(branch)) {
- log('finished vacuuming up to', branch)
- return cb(null)
- }
-
- readdir(branch, function (error, files) {
- if (error) {
- if (error.code === 'ENOENT') return cb(null)
-
- log('unable to check directory', branch, 'due to', error.message)
- return cb(error)
- }
-
- if (files.length > 0) {
- log('quitting because other entries in', branch)
- return cb(null)
- }
-
- if (branch === process.env.HOME) {
- log('quitting because cannot remove home directory', branch)
- return cb(null)
- }
-
- log('removing', branch)
- lstat(branch, function (error, stat) {
- if (error) {
- if (error.code === 'ENOENT') return cb(null)
-
- log('unable to lstat', branch, 'due to', error.message)
- return cb(error)
- }
-
- var remove = stat.isDirectory() ? rmdir : unlink
- remove(branch, function (error) {
- if (error) {
- if (error.code === 'ENOENT') {
- log('quitting because lost the race to remove', branch)
- return cb(null)
- }
- if (error.code === 'ENOTEMPTY' || error.code === 'EEXIST') {
- log('quitting because new (racy) entries in', branch)
- return cb(null)
- }
-
- log('unable to remove', branch, 'due to', error.message)
- return cb(error)
- }
-
- next(dirname(branch))
- })
- })
- })
- }
-}
diff --git a/node_modules/gentle-fs/CHANGELOG.md b/node_modules/gentle-fs/CHANGELOG.md
deleted file mode 100644
index 50dfcd74c..000000000
--- a/node_modules/gentle-fs/CHANGELOG.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="2.3.0"></a>
-# [2.3.0](https://github.com/npm/gentle-fs/compare/v2.2.1...v2.3.0) (2019-12-11)
-
-
-### Features
-
-* add option to gently create bin links/shims ([a929196](https://github.com/npm/gentle-fs/commit/a929196))
-
-
-
-<a name="2.2.1"></a>
-## [2.2.1](https://github.com/npm/gentle-fs/compare/v2.2.0...v2.2.1) (2019-08-15)
-
-
-### Bug Fixes
-
-* **link:** properly detect that we should chown the link ([1c69beb](https://github.com/npm/gentle-fs/commit/1c69beb))
-
-
-
-<a name="2.2.0"></a>
-# [2.2.0](https://github.com/npm/gentle-fs/compare/v2.1.0...v2.2.0) (2019-08-14)
-
-
-### Bug Fixes
-
-* don't chown if we didn't make any dirs ([c4df8a8](https://github.com/npm/gentle-fs/commit/c4df8a8))
-
-
-### Features
-
-* export mkdir method ([4891c09](https://github.com/npm/gentle-fs/commit/4891c09))
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/npm/gentle-fs/compare/v2.0.1...v2.1.0) (2019-08-14)
-
-
-### Features
-
-* infer ownership of created dirs and links ([0dd2879](https://github.com/npm/gentle-fs/commit/0dd2879))
-
-
-
-<a name="2.0.1"></a>
-## [2.0.1](https://github.com/npm/gentle-fs/compare/v2.0.0...v2.0.1) (2017-11-28)
-
-
-### Bug Fixes
-
-* **pkglock:** regenerate lock to fix version issues ([a41cbd0](https://github.com/npm/gentle-fs/commit/a41cbd0))
-* **rm:** make sure logic for vacuuming matches original npm ([673e82c](https://github.com/npm/gentle-fs/commit/673e82c))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/npm/gentle-fs/compare/v1.0.2...v2.0.0) (2017-10-07)
-
-
-### Features
-
-* **api:** switch to callbacks for now. ([236e886](https://github.com/npm/gentle-fs/commit/236e886))
-
-
-### BREAKING CHANGES
-
-* **api:** switches from Promises to callbacks for async control flow.
-
-
-
-<a name="1.0.2"></a>
-## [1.0.2](https://github.com/npm/gentle-fs/compare/v1.0.1...v1.0.2) (2017-10-07)
-
-
-### Bug Fixes
-
-* **link:** properly resolve linkIfExists promise ([f06acf2](https://github.com/npm/gentle-fs/commit/f06acf2))
-
-
-
-<a name="1.0.1"></a>
-## [1.0.1](https://github.com/npm/gentle-fs/compare/v1.0.0...v1.0.1) (2017-09-25)
-
-
-### Bug Fixes
-
-* **files:** include required lib files in tarball ([e0be6a8](https://github.com/npm/gentle-fs/commit/e0be6a8))
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-09-15)
-
-
-### Bug Fixes
-
-* **docs:** Flesh out API descriptions. ([b056a34](https://github.com/npm/gentle-fs/commit/b056a34))
-* **docs:** update usage examples ([5517ff5](https://github.com/npm/gentle-fs/commit/5517ff5))
-
-
-### BREAKING CHANGES
-
-* **docs:** api docs added
diff --git a/node_modules/gentle-fs/LICENSE b/node_modules/gentle-fs/LICENSE
deleted file mode 100644
index 0b6c22874..000000000
--- a/node_modules/gentle-fs/LICENSE
+++ /dev/null
@@ -1,235 +0,0 @@
-The npm application
-Copyright (c) npm, Inc. and Contributors
-Licensed on the terms of The Artistic License 2.0
-
-Node package dependencies of the npm application
-Copyright (c) their respective copyright owners
-Licensed on their respective license terms
-
-The npm public registry at https://registry.npmjs.org
-and the npm website at https://www.npmjs.com
-Operated by npm, Inc.
-Use governed by terms published on https://www.npmjs.com
-
-"Node.js"
-Trademark Joyent, Inc., https://joyent.com
-Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
-
-The Node.js application
-Project of Node Foundation, https://nodejs.org
-
-The npm Logo
-Copyright (c) Mathias Pettersson and Brian Hammond
-
-"Gubblebum Blocky" typeface
-Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
-Used with permission
-
-
---------
-
-
-The Artistic License 2.0
-
-Copyright (c) 2000-2006, The Perl Foundation.
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-
-This license establishes the terms under which a given free software
-Package may be copied, modified, distributed, and/or redistributed.
-The intent is that the Copyright Holder maintains some artistic
-control over the development of that Package while still keeping the
-Package available as open source and free software.
-
-You are always permitted to make arrangements wholly outside of this
-license directly with the Copyright Holder of a given Package. If the
-terms of this license do not permit the full use that you propose to
-make of the Package, you should contact the Copyright Holder and seek
-a different licensing arrangement.
-
-Definitions
-
- "Copyright Holder" means the individual(s) or organization(s)
- named in the copyright notice for the entire Package.
-
- "Contributor" means any party that has contributed code or other
- material to the Package, in accordance with the Copyright Holder's
- procedures.
-
- "You" and "your" means any person who would like to copy,
- distribute, or modify the Package.
-
- "Package" means the collection of files distributed by the
- Copyright Holder, and derivatives of that collection and/or of
- those files. A given Package may consist of either the Standard
- Version, or a Modified Version.
-
- "Distribute" means providing a copy of the Package or making it
- accessible to anyone else, or in the case of a company or
- organization, to others outside of your company or organization.
-
- "Distributor Fee" means any fee that you charge for Distributing
- this Package or providing support for this Package to another
- party. It does not mean licensing fees.
-
- "Standard Version" refers to the Package if it has not been
- modified, or has been modified only in ways explicitly requested
- by the Copyright Holder.
-
- "Modified Version" means the Package, if it has been changed, and
- such changes were not explicitly requested by the Copyright
- Holder.
-
- "Original License" means this Artistic License as Distributed with
- the Standard Version of the Package, in its current version or as
- it may be modified by The Perl Foundation in the future.
-
- "Source" form means the source code, documentation source, and
- configuration files for the Package.
-
- "Compiled" form means the compiled bytecode, object code, binary,
- or any other form resulting from mechanical transformation or
- translation of the Source form.
-
-
-Permission for Use and Modification Without Distribution
-
-(1) You are permitted to use the Standard Version and create and use
-Modified Versions for any purpose without restriction, provided that
-you do not Distribute the Modified Version.
-
-
-Permissions for Redistribution of the Standard Version
-
-(2) You may Distribute verbatim copies of the Source form of the
-Standard Version of this Package in any medium without restriction,
-either gratis or for a Distributor Fee, provided that you duplicate
-all of the original copyright notices and associated disclaimers. At
-your discretion, such verbatim copies may or may not include a
-Compiled form of the Package.
-
-(3) You may apply any bug fixes, portability changes, and other
-modifications made available from the Copyright Holder. The resulting
-Package will still be considered the Standard Version, and as such
-will be subject to the Original License.
-
-
-Distribution of Modified Versions of the Package as Source
-
-(4) You may Distribute your Modified Version as Source (either gratis
-or for a Distributor Fee, and with or without a Compiled form of the
-Modified Version) provided that you clearly document how it differs
-from the Standard Version, including, but not limited to, documenting
-any non-standard features, executables, or modules, and provided that
-you do at least ONE of the following:
-
- (a) make the Modified Version available to the Copyright Holder
- of the Standard Version, under the Original License, so that the
- Copyright Holder may include your modifications in the Standard
- Version.
-
- (b) ensure that installation of your Modified Version does not
- prevent the user installing or running the Standard Version. In
- addition, the Modified Version must bear a name that is different
- from the name of the Standard Version.
-
- (c) allow anyone who receives a copy of the Modified Version to
- make the Source form of the Modified Version available to others
- under
-
- (i) the Original License or
-
- (ii) a license that permits the licensee to freely copy,
- modify and redistribute the Modified Version using the same
- licensing terms that apply to the copy that the licensee
- received, and requires that the Source form of the Modified
- Version, and of any works derived from it, be made freely
- available in that license fees are prohibited but Distributor
- Fees are allowed.
-
-
-Distribution of Compiled Forms of the Standard Version
-or Modified Versions without the Source
-
-(5) You may Distribute Compiled forms of the Standard Version without
-the Source, provided that you include complete instructions on how to
-get the Source of the Standard Version. Such instructions must be
-valid at the time of your distribution. If these instructions, at any
-time while you are carrying out such distribution, become invalid, you
-must provide new instructions on demand or cease further distribution.
-If you provide valid instructions or cease distribution within thirty
-days after you become aware that the instructions are invalid, then
-you do not forfeit any of your rights under this license.
-
-(6) You may Distribute a Modified Version in Compiled form without
-the Source, provided that you comply with Section 4 with respect to
-the Source of the Modified Version.
-
-
-Aggregating or Linking the Package
-
-(7) You may aggregate the Package (either the Standard Version or
-Modified Version) with other packages and Distribute the resulting
-aggregation provided that you do not charge a licensing fee for the
-Package. Distributor Fees are permitted, and licensing fees for other
-components in the aggregation are permitted. The terms of this license
-apply to the use and Distribution of the Standard or Modified Versions
-as included in the aggregation.
-
-(8) You are permitted to link Modified and Standard Versions with
-other works, to embed the Package in a larger work of your own, or to
-build stand-alone binary or bytecode versions of applications that
-include the Package, and Distribute the result without restriction,
-provided the result does not expose a direct interface to the Package.
-
-
-Items That are Not Considered Part of a Modified Version
-
-(9) Works (including, but not limited to, modules and scripts) that
-merely extend or make use of the Package, do not, by themselves, cause
-the Package to be a Modified Version. In addition, such works are not
-considered parts of the Package itself, and are not subject to the
-terms of this license.
-
-
-General Provisions
-
-(10) Any use, modification, and distribution of the Standard or
-Modified Versions is governed by this Artistic License. By using,
-modifying or distributing the Package, you accept this license. Do not
-use, modify, or distribute the Package, if you do not accept this
-license.
-
-(11) If your Modified Version has been derived from a Modified
-Version made by someone other than you, you are nevertheless required
-to ensure that your Modified Version complies with the requirements of
-this license.
-
-(12) This license does not grant you the right to use any trademark,
-service mark, tradename, or logo of the Copyright Holder.
-
-(13) This license includes the non-exclusive, worldwide,
-free-of-charge patent license to make, have made, use, offer to sell,
-sell, import and otherwise transfer the Package with respect to any
-patent claims licensable by the Copyright Holder that are necessarily
-infringed by the Package. If you institute patent litigation
-(including a cross-claim or counterclaim) against any party alleging
-that the Package constitutes direct or contributory patent
-infringement, then this Artistic License to you shall terminate on the
-date that such litigation is filed.
-
-(14) Disclaimer of Warranty:
-THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
-IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
-NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
-LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
---------
diff --git a/node_modules/gentle-fs/README.md b/node_modules/gentle-fs/README.md
deleted file mode 100644
index 54af51cf9..000000000
--- a/node_modules/gentle-fs/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# gentle-fs [![npm version](https://img.shields.io/npm/v/gentle-fs.svg)](https://npm.im/gentle-fs) [![license](https://img.shields.io/npm/l/gentle-fs.svg)](https://npm.im/gentle-fs) [![Travis](https://img.shields.io/travis/npm/gentle-fs.svg)](https://travis-ci.org/npm/gentle-fs) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/gentle-fs?svg=true)](https://ci.appveyor.com/project/npm/gentle-fs) [![Coverage Status](https://coveralls.io/repos/github/npm/gentle-fs/badge.svg?branch=latest)](https://coveralls.io/github/npm/gentle-fs?branch=latest)
-
-[`gentle-fs`](https://github.com/npm/gentle-fs) is a standalone library for
-"gently" remove or link directories.
-
-## Install
-
-`$ npm install gentle-fs`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [`rm`](#rm)
- * [`link`](#link)
- * [`linkIfExists`](#linkIfExists)
-
-### Example
-
-```javascript
-// todo
-```
-
-### Features
-
-* Performs filesystem operations "gently". Please see details in the API specs below
-for a more precise definition of "gently".
-
-### Contributing
-
-The npm team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="rm"></a> `> rm(target, opts, cb)`
-
-Will delete all directories between `target` and `opts.base`, as long as they are empty.
-That is, if `target` is `/a/b/c/d/e` and `base` is `/a/b`, but `/a/b/c` has other files
-besides the `d` directory inside of it, `/a/b/c` will remain.
-
-##### Example
-
-```javascript
-rm(target, opts, cb)
-```
-
-#### <a name="link"></a> `> link(from, to, opts, cb)`
-
-If `from` is a real directory, and `from` is not the same directory as `to`, will
-symlink `from` to `to`, while also gently [`rm`](#rm)ing the `to` directory,
-and then call the callback. Otherwise, will call callback with an `Error`.
-
-##### Example
-
-```javascript
-link(from, to, opts, cb)
-```
-
-#### <a name="linkIfExists"></a> `> linkIfExists(from, to, opts, cb)`
-
-Performs the same operation as [`link`](#link), except does nothing when `from` is the
-same as `to`, and calls the callback.
-
-##### Example
-
-```javascript
-linkIfExists(from, to, opts, cb)
-```
diff --git a/node_modules/gentle-fs/index.js b/node_modules/gentle-fs/index.js
deleted file mode 100644
index 4aeda1c84..000000000
--- a/node_modules/gentle-fs/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-
-const rm = require('./lib/rm.js')
-const link = require('./lib/link.js')
-const mkdir = require('./lib/mkdir.js')
-const binLink = require('./lib/bin-link.js')
-
-exports = module.exports = {
- rm: rm,
- link: link.link,
- linkIfExists: link.linkIfExists,
- mkdir: mkdir,
- binLink: binLink
-}
diff --git a/node_modules/gentle-fs/lib/bin-link.js b/node_modules/gentle-fs/lib/bin-link.js
deleted file mode 100644
index 104c5b6c9..000000000
--- a/node_modules/gentle-fs/lib/bin-link.js
+++ /dev/null
@@ -1,96 +0,0 @@
-'use strict'
-// calls linkIfExists on unix, or cmdShimIfExists on Windows
-// reads the cmd shim to ensure it's where we need it to be in the case of
-// top level global packages
-
-const readCmdShim = require('read-cmd-shim')
-const cmdShim = require('cmd-shim')
-const {linkIfExists} = require('./link.js')
-
-const binLink = (from, to, opts, cb) => {
- // just for testing
- const platform = opts._FAKE_PLATFORM_ || process.platform
- if (platform !== 'win32') {
- return linkIfExists(from, to, opts, cb)
- }
-
- if (!opts.clobberLinkGently ||
- opts.force === true ||
- !opts.gently ||
- typeof opts.gently !== 'string') {
- // easy, just go ahead and delete anything in the way
- return cmdShim.ifExists(from, to, cb)
- }
-
- // read all three shim targets
- // if any exist, and are not a shim to our gently folder, then
- // exit with a simulated EEXIST error.
-
- const shimFiles = [
- to,
- to + '.cmd',
- to + '.ps1'
- ]
-
- // call this once we've checked all three, if we're good
- const done = () => cmdShim.ifExists(from, to, cb)
- const then = times(3, done, cb)
- shimFiles.forEach(to => isClobberable(from, to, opts, then))
-}
-
-const times = (n, ok, cb) => {
- let errState = null
- return er => {
- if (!errState) {
- if (er) {
- cb(errState = er)
- } else if (--n === 0) {
- ok()
- }
- }
- }
-}
-
-const isClobberable = (from, to, opts, cb) => {
- readCmdShim(to, (er, target) => {
- // either going to get an error, or the target of where this
- // cmd shim points.
- // shim, not in opts.gently: simulate EEXIST
- // not a shim: simulate EEXIST
- // ENOENT: fine, move forward
- // shim in opts.gently: fine
- if (er) {
- switch (er.code) {
- case 'ENOENT':
- // totally fine, nothing there to clobber
- return cb()
- case 'ENOTASHIM':
- // something is there, and it's not one of ours
- return cb(simulateEEXIST(from, to))
- default:
- // would probably fail this way later anyway
- // can't read the file, likely can't write it either
- return cb(er)
- }
- }
- // no error, check the target
- if (target.indexOf(opts.gently) !== 0) {
- return cb(simulateEEXIST(from, to))
- }
- // ok! it's one of ours.
- return cb()
- })
-}
-
-const simulateEEXIST = (from, to) => {
- // simulate the EEXIST we'd get from fs.symlink to the file
- const err = new Error('EEXIST: file already exists, cmd shim \'' +
- from + '\' -> \'' + to + '\'')
-
- err.code = 'EEXIST'
- err.path = from
- err.dest = to
- return err
-}
-
-module.exports = binLink
diff --git a/node_modules/gentle-fs/lib/chown.js b/node_modules/gentle-fs/lib/chown.js
deleted file mode 100644
index 5921e5634..000000000
--- a/node_modules/gentle-fs/lib/chown.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict'
-
-// A module for chowning things we just created, to preserve
-// ownership of new links and directories.
-
-const chownr = require('chownr')
-
-const selfOwner = {
- uid: process.getuid && process.getuid(),
- gid: process.getgid && process.getgid()
-}
-
-module.exports = (path, uid, gid, cb) => {
- if (selfOwner.uid !== 0 ||
- uid === undefined || gid === undefined ||
- (selfOwner.uid === uid && selfOwner.gid === gid)) {
- // don't need to, or can't chown anyway, so just leave it.
- // this also handles platforms where process.getuid is undefined
- return cb()
- }
- chownr(path, uid, gid, cb)
-}
-
-module.exports.selfOwner = selfOwner
diff --git a/node_modules/gentle-fs/lib/link.js b/node_modules/gentle-fs/lib/link.js
deleted file mode 100644
index 7cdfef4ca..000000000
--- a/node_modules/gentle-fs/lib/link.js
+++ /dev/null
@@ -1,126 +0,0 @@
-'use strict'
-
-const path = require('path')
-const fs = require('graceful-fs')
-const chain = require('slide').chain
-const mkdir = require('./mkdir.js')
-const rm = require('./rm.js')
-const inferOwner = require('infer-owner')
-const chown = require('./chown.js')
-
-exports = module.exports = {
- link: link,
- linkIfExists: linkIfExists
-}
-
-function linkIfExists (from, to, opts, cb) {
- opts.currentIsLink = false
- opts.currentExists = false
- fs.stat(from, function (er) {
- if (er) return cb()
- fs.readlink(to, function (er, fromOnDisk) {
- if (!er || er.code !== 'ENOENT') {
- opts.currentExists = true
- }
- // if the link already exists and matches what we would do,
- // we don't need to do anything
- if (!er) {
- opts.currentIsLink = true
- var toDir = path.dirname(to)
- var absoluteFrom = path.resolve(toDir, from)
- var absoluteFromOnDisk = path.resolve(toDir, fromOnDisk)
- opts.currentTarget = absoluteFromOnDisk
- if (absoluteFrom === absoluteFromOnDisk) return cb()
- }
- link(from, to, opts, cb)
- })
- })
-}
-
-function resolveIfSymlink (maybeSymlinkPath, cb) {
- fs.lstat(maybeSymlinkPath, function (err, stat) {
- if (err) return cb.apply(this, arguments)
- if (!stat.isSymbolicLink()) return cb(null, maybeSymlinkPath)
- fs.readlink(maybeSymlinkPath, cb)
- })
-}
-
-function ensureFromIsNotSource (from, to, cb) {
- resolveIfSymlink(from, function (err, fromDestination) {
- if (err) return cb.apply(this, arguments)
- if (path.resolve(path.dirname(from), fromDestination) === path.resolve(to)) {
- return cb(new Error('Link target resolves to the same directory as link source: ' + to))
- }
- cb.apply(this, arguments)
- })
-}
-
-function link (from, to, opts, cb) {
- to = path.resolve(to)
- opts.base = path.dirname(to)
- var absTarget = path.resolve(opts.base, from)
- var relativeTarget = path.relative(opts.base, absTarget)
- var target = opts.absolute ? absTarget : relativeTarget
-
- const tasks = [
- [ensureFromIsNotSource, absTarget, to],
- [fs, 'stat', absTarget],
- [clobberLinkGently, from, to, opts],
- [mkdir, path.dirname(to)],
- [fs, 'symlink', target, to, 'junction']
- ]
-
- if (chown.selfOwner.uid !== 0) {
- chain(tasks, cb)
- } else {
- inferOwner(to).then(owner => {
- tasks.push([chown, to, owner.uid, owner.gid])
- chain(tasks, cb)
- })
- }
-}
-
-exports._clobberLinkGently = clobberLinkGently
-function clobberLinkGently (from, to, opts, cb) {
- if (opts.currentExists === false) {
- // nothing to clobber!
- opts.log.silly('gently link', 'link does not already exist', {
- link: to,
- target: from
- })
- return cb()
- }
-
- if (!opts.clobberLinkGently ||
- opts.force === true ||
- !opts.gently ||
- typeof opts.gently !== 'string') {
- opts.log.silly('gently link', 'deleting existing link forcefully', {
- link: to,
- target: from,
- force: opts.force,
- gently: opts.gently,
- clobberLinkGently: opts.clobberLinkGently
- })
- return rm(to, opts, cb)
- }
-
- if (!opts.currentIsLink) {
- opts.log.verbose('gently link', 'cannot remove, not a link', to)
- // don't delete. it'll fail with EEXIST when it tries to symlink.
- return cb()
- }
-
- if (opts.currentTarget.indexOf(opts.gently) === 0) {
- opts.log.silly('gently link', 'delete existing link', to)
- return rm(to, opts, cb)
- } else {
- opts.log.verbose('gently link', 'refusing to delete existing link', {
- link: to,
- currentTarget: opts.currentTarget,
- newTarget: from,
- gently: opts.gently
- })
- return cb()
- }
-}
diff --git a/node_modules/gentle-fs/lib/mkdir.js b/node_modules/gentle-fs/lib/mkdir.js
deleted file mode 100644
index 5b4199597..000000000
--- a/node_modules/gentle-fs/lib/mkdir.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict'
-
-const mkdirp = require('mkdirp')
-const inferOwner = require('infer-owner')
-const chown = require('./chown.js')
-
-module.exports = (path, cb) => {
- // don't bother chowning if we can't anyway
- if (process.platform === 'win32' || chown.selfOwner.uid !== 0) {
- return mkdirp(path, cb)
- }
-
- inferOwner(path).then(owner => {
- mkdirp(path, (er, made) => {
- if (er || !made) {
- cb(er, made)
- } else {
- chown(made || path, owner.uid, owner.gid, cb)
- }
- })
- }, cb)
-}
diff --git a/node_modules/gentle-fs/lib/rm.js b/node_modules/gentle-fs/lib/rm.js
deleted file mode 100644
index 00760c66f..000000000
--- a/node_modules/gentle-fs/lib/rm.js
+++ /dev/null
@@ -1,256 +0,0 @@
-'use strict'
-
-const path = require('path')
-const validate = require('aproba')
-const fs = require('graceful-fs')
-const isInside = require('path-is-inside')
-const vacuum = require('fs-vacuum')
-const chain = require('slide').chain
-const asyncMap = require('slide').asyncMap
-const readCmdShim = require('read-cmd-shim')
-const iferr = require('iferr')
-
-exports = module.exports = rm
-
-function rm (target, opts, cb) {
- var targetPath = path.normalize(path.resolve(opts.prefix, target))
- if (opts.prefixes.indexOf(targetPath) !== -1) {
- return cb(new Error('May not delete: ' + targetPath))
- }
- var options = {}
- if (opts.force) { options.purge = true }
- if (opts.base) options.base = path.normalize(path.resolve(opts.prefix, opts.base))
-
- if (!opts.gently) {
- options.purge = true
- return vacuum(targetPath, options, cb)
- }
-
- var parent = options.base = options.base || path.normalize(opts.prefix)
-
- // Do all the async work we'll need to do in order to tell if this is a
- // safe operation
- chain([
- [isEverInside, parent, opts.prefixes, opts.log],
- [readLinkOrShim, targetPath],
- [isEverInside, targetPath, opts.prefixes, opts.log],
- [isEverInside, targetPath, [parent], opts.log]
- ], function (er, results) {
- if (er) {
- if (er.code === 'ENOENT') return cb()
- return cb(er)
- }
- var parentInfo = {
- path: parent,
- managed: results[0]
- }
- var targetInfo = {
- path: targetPath,
- symlink: results[1],
- managed: results[2],
- inParent: results[3]
- }
-
- isSafeToRm(parentInfo, targetInfo, opts.name, opts.log, iferr(cb, thenRemove))
-
- function thenRemove (toRemove, removeBase) {
- if (!toRemove) return cb()
- if (removeBase) options.base = removeBase
- return vacuum(toRemove, options, cb)
- }
- })
-}
-
-exports._isSafeToRm = isSafeToRm
-function isSafeToRm (parent, target, pkgName, log, cb) {
- log.silly('gentlyRm', 'parent.path =', parent.path)
- log.silly('gentlyRm', 'parent.managed =',
- parent.managed && parent.managed.target + ' is in ' + parent.managed.path)
- log.silly('gentlyRm', 'target.path = ', target.path)
- log.silly('gentlyRm', 'target.symlink =', target.symlink)
- log.silly('gentlyRm', 'target.managed =',
- target.managed && target.managed.target + ' is in ' + target.managed.path)
- log.silly('gentlyRm', 'target.inParent = ', target.inParent)
-
- // The parent directory or something it symlinks to must eventually be in
- // a folder that we maintain.
- if (!parent.managed) {
- log.info('gentlyRm', parent.path,
- 'is not contained in any directory ' + pkgName + ' is known to control or ' +
- 'any place they link to')
- return cb(clobberFail(target.path, 'containing path ' + parent.path +
- " isn't under " + pkgName + "'s control"))
- }
-
- // The target or something it symlinks to must eventually be in the parent
- // or something the parent symlinks to
- if (target.inParent) {
- var actualTarget = target.inParent.target
- var targetsParent = target.inParent.path
- // if the target.path was what we found in some version of parent, remove
- // using that parent as the base
- if (target.path === actualTarget) {
- return cb(null, target.path, targetsParent)
- } else {
- // If something the target.path links to was what was found, just
- // remove target.path in the location it was found.
- return cb(null, target.path, path.dirname(target.path))
- }
- }
-
- // If the target is in a managed directory and is in a symlink, but was
- // not in our parent that usually means someone else installed a bin file
- // with the same name as one of our bin files.
- if (target.managed && target.symlink) {
- log.warn('rm', 'not removing', target.path,
- "as it wasn't installed by", parent.path)
- return cb()
- }
-
- if (target.symlink) {
- return cb(clobberFail(target.path, target.symlink +
- ' symlink target is not controlled by ' + pkgName + ' ' + parent.path))
- } else {
- return cb(clobberFail(target.path, 'is outside ' + parent.path +
- ' and not a link'))
- }
-}
-
-function clobberFail (target, msg) {
- validate('SS', arguments)
- var er = new Error('Refusing to delete ' + target + ': ' + msg)
- er.code = 'EEXIST'
- er.path = target
- return er
-}
-
-function isENOENT (err) {
- return err && err.code === 'ENOENT'
-}
-
-function notENOENT (err) {
- return !isENOENT(err)
-}
-
-function skipENOENT (cb) {
- return function (err, value) {
- if (isENOENT(err)) {
- return cb(null, false)
- } else {
- return cb(err, value)
- }
- }
-}
-
-function errorsToValues (fn) {
- return function () {
- var args = Array.prototype.slice.call(arguments)
- var cb = args.pop()
- args.push(function (err, value) {
- if (err) {
- return cb(null, err)
- } else {
- return cb(null, value)
- }
- })
- fn.apply(null, args)
- }
-}
-
-function isNotError (value) {
- return !(value instanceof Error)
-}
-
-exports._isEverInside = isEverInside
-// return the first of path, where target (or anything it symlinks to)
-// isInside the path (or anything it symlinks to)
-function isEverInside (target, paths, log, cb) {
- validate('SAOF', arguments)
- asyncMap(paths, errorsToValues(readAllLinks), iferr(cb, function (resolvedPaths) {
- var errorFree = resolvedPaths.filter(isNotError)
- if (errorFree.length === 0) {
- var badErrors = resolvedPaths.filter(notENOENT)
- if (badErrors.length === 0) {
- return cb(null, false)
- } else {
- return cb(badErrors[0])
- }
- }
- readAllLinks(target, iferr(skipENOENT(cb), function (targets) {
- cb(null, areAnyInsideAny(targets, errorFree, log))
- }))
- }))
-}
-
-exports._areAnyInsideAny = areAnyInsideAny
-// Return the first path found that any target is inside
-function areAnyInsideAny (targets, paths, log) {
- validate('AAO', arguments)
- var toCheck = []
- paths.forEach(function (path) {
- targets.forEach(function (target) {
- toCheck.push([target, path])
- })
- })
- for (var ii = 0; ii < toCheck.length; ++ii) {
- var target = toCheck[ii][0]
- var path = toCheck[ii][1]
- var inside = isInside(target, path)
- if (!inside) log.silly('isEverInside', target, 'is not inside', path)
- if (inside && path) return inside && path && {target: target, path: path}
- }
- return false
-}
-
-exports._readAllLinks = readAllLinks
-// resolves chains of symlinks of unlimited depth, returning a list of paths
-// it's seen in the process when it hits either a symlink cycle or a
-// non-symlink
-function readAllLinks (path, cb) {
- validate('SF', arguments)
- var seen = {}
- _readAllLinks(path)
-
- function _readAllLinks (path) {
- if (seen[path]) return cb(null, Object.keys(seen))
- seen[path] = true
- resolveSymlink(path, iferr(cb, _readAllLinks))
- }
-}
-
-exports._resolveSymlink = resolveSymlink
-var resolvedPaths = {}
-function resolveSymlink (symlink, cb) {
- validate('SF', arguments)
- var cached = resolvedPaths[symlink]
- if (cached) return cb(null, cached)
-
- readLinkOrShim(symlink, iferr(cb, function (symlinkTarget) {
- if (symlinkTarget) {
- resolvedPaths[symlink] = path.resolve(path.dirname(symlink), symlinkTarget)
- } else {
- resolvedPaths[symlink] = symlink
- }
- return cb(null, resolvedPaths[symlink])
- }))
-}
-
-exports._readLinkOrShim = readLinkOrShim
-function readLinkOrShim (path, cb) {
- validate('SF', arguments)
- fs.lstat(path, iferr(cb, function (stat) {
- if (stat.isSymbolicLink()) {
- fs.readlink(path, cb)
- } else {
- readCmdShim(path, function (er, source) {
- if (!er) return cb(null, source)
- // lstat wouldn't return an error on these, so we don't either.
- if (er.code === 'ENOTASHIM' || er.code === 'EISDIR') {
- return cb(null, null)
- } else {
- return cb(er)
- }
- })
- }
- }))
-}
diff --git a/node_modules/gentle-fs/node_modules/aproba/LICENSE b/node_modules/gentle-fs/node_modules/aproba/LICENSE
deleted file mode 100644
index f4be44d88..000000000
--- a/node_modules/gentle-fs/node_modules/aproba/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/gentle-fs/node_modules/aproba/README.md b/node_modules/gentle-fs/node_modules/aproba/README.md
deleted file mode 100644
index 0bfc594c5..000000000
--- a/node_modules/gentle-fs/node_modules/aproba/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-aproba
-======
-
-A ridiculously light-weight function argument validator
-
-```
-var validate = require("aproba")
-
-function myfunc(a, b, c) {
- // `a` must be a string, `b` a number, `c` a function
- validate('SNF', arguments) // [a,b,c] is also valid
-}
-
-myfunc('test', 23, function () {}) // ok
-myfunc(123, 23, function () {}) // type error
-myfunc('test', 23) // missing arg error
-myfunc('test', 23, function () {}, true) // too many args error
-
-```
-
-Valid types are:
-
-| type | description
-| :--: | :----------
-| * | matches any type
-| A | `Array.isArray` OR an `arguments` object
-| S | typeof == string
-| N | typeof == number
-| F | typeof == function
-| O | typeof == object and not type A and not type E
-| B | typeof == boolean
-| E | `instanceof Error` OR `null` **(special: see below)**
-| Z | == `null`
-
-Validation failures throw one of three exception types, distinguished by a
-`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
-
-If you pass in an invalid type then it will throw with a code of
-`EUNKNOWNTYPE`.
-
-If an **error** argument is found and is not null then the remaining
-arguments are optional. That is, if you say `ESO` then that's like using a
-non-magical `E` in: `E|ESO|ZSO`.
-
-### But I have optional arguments?!
-
-You can provide more than one signature by separating them with pipes `|`.
-If any signature matches the arguments then they'll be considered valid.
-
-So for example, say you wanted to write a signature for
-`fs.createWriteStream`. The docs for it describe it thusly:
-
-```
-fs.createWriteStream(path[, options])
-```
-
-This would be a signature of `SO|S`. That is, a string and and object, or
-just a string.
-
-Now, if you read the full `fs` docs, you'll see that actually path can ALSO
-be a buffer. And options can be a string, that is:
-```
-path <String> | <Buffer>
-options <String> | <Object>
-```
-
-To reproduce this you have to fully enumerate all of the possible
-combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
-awkwardness is a feature: It reminds you of the complexity you're adding to
-your API when you do this sort of thing.
-
-
-### Browser support
-
-This has no dependencies and should work in browsers, though you'll have
-noisier stack traces.
-
-### Why this exists
-
-I wanted a very simple argument validator. It needed to do two things:
-
-1. Be more concise and easier to use than assertions
-
-2. Not encourage an infinite bikeshed of DSLs
-
-This is why types are specified by a single character and there's no such
-thing as an optional argument.
-
-This is not intended to validate user data. This is specifically about
-asserting the interface of your functions.
-
-If you need greater validation, I encourage you to write them by hand or
-look elsewhere.
-
diff --git a/node_modules/gentle-fs/node_modules/aproba/index.js b/node_modules/gentle-fs/node_modules/aproba/index.js
deleted file mode 100644
index 6f3f797c0..000000000
--- a/node_modules/gentle-fs/node_modules/aproba/index.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-function isArguments (thingy) {
- return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
-}
-
-var types = {
- '*': {label: 'any', check: function () { return true }},
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
-}
-
-function addSchema (schema, arity) {
- var group = arity[schema.length] = arity[schema.length] || []
- if (group.indexOf(schema) === -1) group.push(schema)
-}
-
-var validate = module.exports = function (rawSchemas, args) {
- if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
- if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
- if (!args) throw missingRequiredArg(1, 'args')
- if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
- if (!types.A.check(args)) throw invalidType(1, ['array'], args)
- var schemas = rawSchemas.split('|')
- var arity = {}
-
- schemas.forEach(function (schema) {
- for (var ii = 0; ii < schema.length; ++ii) {
- var type = schema[ii]
- if (!types[type]) throw unknownType(ii, type)
- }
- if (/E.*E/.test(schema)) throw moreThanOneError(schema)
- addSchema(schema, arity)
- if (/E/.test(schema)) {
- addSchema(schema.replace(/E.*$/, 'E'), arity)
- addSchema(schema.replace(/E/, 'Z'), arity)
- if (schema.length === 1) addSchema('', arity)
- }
- })
- var matching = arity[args.length]
- if (!matching) {
- throw wrongNumberOfArgs(Object.keys(arity), args.length)
- }
- for (var ii = 0; ii < args.length; ++ii) {
- var newMatching = matching.filter(function (schema) {
- var type = schema[ii]
- var typeCheck = types[type].check
- return typeCheck(args[ii])
- })
- if (!newMatching.length) {
- var labels = matching.map(function (schema) {
- return types[schema[ii]].label
- }).filter(function (schema) { return schema != null })
- throw invalidType(ii, labels, args[ii])
- }
- matching = newMatching
- }
-}
-
-function missingRequiredArg (num) {
- return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
-}
-
-function unknownType (num, type) {
- return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
-}
-
-function invalidType (num, expectedTypes, value) {
- var valueType
- Object.keys(types).forEach(function (typeCode) {
- if (types[typeCode].check(value)) valueType = types[typeCode].label
- })
- return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
- englishList(expectedTypes) + ' but got ' + valueType)
-}
-
-function englishList (list) {
- return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
-}
-
-function wrongNumberOfArgs (expected, got) {
- var english = englishList(expected)
- var args = expected.every(function (ex) { return ex.length === 1 })
- ? 'argument'
- : 'arguments'
- return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
-}
-
-function moreThanOneError (schema) {
- return newException('ETOOMANYERRORTYPES',
- 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
-}
-
-function newException (code, msg) {
- var e = new Error(msg)
- e.code = code
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
- return e
-}
diff --git a/node_modules/gentle-fs/node_modules/aproba/package.json b/node_modules/gentle-fs/node_modules/aproba/package.json
deleted file mode 100644
index 34b51a0df..000000000
--- a/node_modules/gentle-fs/node_modules/aproba/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "aproba@^1.1.2",
- "_id": "aproba@1.2.0",
- "_inBundle": false,
- "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
- "_location": "/gentle-fs/aproba",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "aproba@^1.1.2",
- "name": "aproba",
- "escapedName": "aproba",
- "rawSpec": "^1.1.2",
- "saveSpec": null,
- "fetchSpec": "^1.1.2"
- },
- "_requiredBy": [
- "/gentle-fs"
- ],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
- "_spec": "aproba@^1.1.2",
- "_where": "/Users/aeschright/code/cli/node_modules/gentle-fs",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- },
- "bugs": {
- "url": "https://github.com/iarna/aproba/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A ridiculously light-weight argument validator (now browser friendly)",
- "devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.0.2"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/iarna/aproba",
- "keywords": [
- "argument",
- "validate"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "aproba",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/aproba.git"
- },
- "scripts": {
- "test": "standard && tap -j3 test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/node_modules/gentle-fs/node_modules/iferr/.npmignore b/node_modules/gentle-fs/node_modules/iferr/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/gentle-fs/node_modules/iferr/LICENSE b/node_modules/gentle-fs/node_modules/iferr/LICENSE
deleted file mode 100644
index 19d5f4bce..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Nadav Ivgi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. \ No newline at end of file
diff --git a/node_modules/gentle-fs/node_modules/iferr/README.md b/node_modules/gentle-fs/node_modules/iferr/README.md
deleted file mode 100644
index 0940763fa..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# iferr
-
-Higher-order functions for easier error handling.
-
-`if (err) return cb(err);` be gone!
-
-## Install
-```bash
-npm install iferr
-```
-
-## Use
-
-### JavaScript example
-```js
-var iferr = require('iferr');
-
-function get_friends_count(id, cb) {
- User.load_user(id, iferr(cb, function(user) {
- user.load_friends(iferr(cb, function(friends) {
- cb(null, friends.length);
- }));
- }));
-}
-```
-
-### CoffeeScript example
-```coffee
-iferr = require 'iferr'
-
-get_friends_count = (id, cb) ->
- User.load_user id, iferr cb, (user) ->
- user.load_friends iferr cb, (friends) ->
- cb null, friends.length
-```
-
-(TODO: document tiferr, throwerr and printerr)
-
-## License
-MIT
diff --git a/node_modules/gentle-fs/node_modules/iferr/index.coffee b/node_modules/gentle-fs/node_modules/iferr/index.coffee
deleted file mode 100644
index da6d00719..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/index.coffee
+++ /dev/null
@@ -1,24 +0,0 @@
-# Delegates to `succ` on sucecss or to `fail` on error
-# ex: Thing.load 123, iferr cb, (thing) -> ...
-iferr = (fail, succ) -> (err, a...) ->
- if err? then fail err
- else succ? a...
-
-# Like iferr, but also catches errors thrown from `succ` and passes to `fail`
-tiferr = (fail, succ) -> iferr fail, (a...) ->
- try succ a...
- catch err then fail err
-
-# Delegate to the success function on success, or throw the error otherwise
-# ex: Thing.load 123, throwerr (thing) -> ...
-throwerr = iferr.bind null, (err) -> throw err
-
-# Prints errors when one is passed, or does nothing otherwise
-# ex: thing.save printerr
-printerr = iferr (err) -> console.error err.stack or err
-
-module.exports = exports = iferr
-exports.iferr = iferr
-exports.tiferr = tiferr
-exports.throwerr = throwerr
-exports.printerr = printerr
diff --git a/node_modules/gentle-fs/node_modules/iferr/index.js b/node_modules/gentle-fs/node_modules/iferr/index.js
deleted file mode 100644
index 78fce3d2b..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Generated by CoffeeScript 1.7.1
-(function() {
- var exports, iferr, printerr, throwerr, tiferr,
- __slice = [].slice;
-
- iferr = function(fail, succ) {
- return function() {
- var a, err;
- err = arguments[0], a = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
- if (err != null) {
- return fail(err);
- } else {
- return typeof succ === "function" ? succ.apply(null, a) : void 0;
- }
- };
- };
-
- tiferr = function(fail, succ) {
- return iferr(fail, function() {
- var a, err;
- a = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
- try {
- return succ.apply(null, a);
- } catch (_error) {
- err = _error;
- return fail(err);
- }
- });
- };
-
- throwerr = iferr.bind(null, function(err) {
- throw err;
- });
-
- printerr = iferr(function(err) {
- return console.error(err.stack || err);
- });
-
- module.exports = exports = iferr;
-
- exports.iferr = iferr;
-
- exports.tiferr = tiferr;
-
- exports.throwerr = throwerr;
-
- exports.printerr = printerr;
-
-}).call(this);
diff --git a/node_modules/gentle-fs/node_modules/iferr/package.json b/node_modules/gentle-fs/node_modules/iferr/package.json
deleted file mode 100644
index fcddb2324..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "_from": "iferr@^0.1.5",
- "_id": "iferr@0.1.5",
- "_inBundle": false,
- "_integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
- "_location": "/gentle-fs/iferr",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "iferr@^0.1.5",
- "name": "iferr",
- "escapedName": "iferr",
- "rawSpec": "^0.1.5",
- "saveSpec": null,
- "fetchSpec": "^0.1.5"
- },
- "_requiredBy": [
- "/gentle-fs"
- ],
- "_resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
- "_shasum": "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501",
- "_spec": "iferr@^0.1.5",
- "_where": "/Users/rebecca/code/npm/node_modules/gentle-fs",
- "author": {
- "name": "Nadav Ivgi"
- },
- "bugs": {
- "url": "https://github.com/shesek/iferr/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Higher-order functions for easier error handling",
- "devDependencies": {
- "coffee-script": "^1.7.1",
- "mocha": "^1.18.2"
- },
- "homepage": "https://github.com/shesek/iferr",
- "keywords": [
- "error",
- "errors"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "iferr",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/shesek/iferr.git"
- },
- "scripts": {
- "prepublish": "coffee -c index.coffee",
- "test": "mocha"
- },
- "version": "0.1.5"
-}
diff --git a/node_modules/gentle-fs/node_modules/iferr/test/index.coffee b/node_modules/gentle-fs/node_modules/iferr/test/index.coffee
deleted file mode 100644
index be0bc56fd..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/test/index.coffee
+++ /dev/null
@@ -1,42 +0,0 @@
-{ iferr, tiferr, throwerr } = require '../index.coffee'
-{ equal: eq, throws } = require 'assert'
-
-invoke_fail = (cb) -> cb new Error 'callback error'
-invoke_succ = (cb) -> cb null
-throw_error = -> throw new Error 'thrown'
-
-describe 'iferr', ->
- it 'calls the error callback on errors', (done) ->
- invoke_fail iferr(
- (err) ->
- eq err.message, 'callback error'
- do done
- ->
- done new Error 'shouldn\'t call the success callback'
- )
-
- it 'calls the success callback on success', (done) ->
- invoke_succ iferr(
- -> done new Error 'shouldn\'t call the error callback'
- done
- )
-
-describe 'tiferr', ->
- it 'catches errors in the success callback', (done) ->
- invoke_succ tiferr(
- (err) ->
- eq err.message, 'thrown'
- do done
- throw_error
- )
-
-describe 'throwerr', ->
- it 'throws errors passed to the callback', (done)->
- try invoke_fail throwerr ->
- done 'shouldn\'t call the success callback'
- catch err
- eq err.message, 'callback error'
- do done
-
- it 'delegates to the success callback otherwise', (done) ->
- invoke_succ throwerr done
diff --git a/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts b/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts
deleted file mode 100644
index 019defcf1..000000000
--- a/node_modules/gentle-fs/node_modules/iferr/test/mocha.opts
+++ /dev/null
@@ -1,2 +0,0 @@
---compilers coffee:coffee-script/register
---reporter spec
diff --git a/node_modules/gentle-fs/package.json b/node_modules/gentle-fs/package.json
deleted file mode 100644
index d16289975..000000000
--- a/node_modules/gentle-fs/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_from": "gentle-fs@2.3.0",
- "_id": "gentle-fs@2.3.0",
- "_inBundle": false,
- "_integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==",
- "_location": "/gentle-fs",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "gentle-fs@2.3.0",
- "name": "gentle-fs",
- "escapedName": "gentle-fs",
- "rawSpec": "2.3.0",
- "saveSpec": null,
- "fetchSpec": "2.3.0"
- },
- "_requiredBy": [
- "#USER",
- "/",
- "/bin-links"
- ],
- "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz",
- "_shasum": "13538db5029400f98684be4894e8a7d8f0d1ea7f",
- "_spec": "gentle-fs@2.3.0",
- "_where": "/Users/isaacs/dev/npm/cli",
- "author": {
- "name": "Mike Sherov"
- },
- "bugs": {
- "url": "https://github.com/npm/gentle-fs/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "aproba": "^1.1.2",
- "chownr": "^1.1.2",
- "cmd-shim": "^3.0.3",
- "fs-vacuum": "^1.2.10",
- "graceful-fs": "^4.1.11",
- "iferr": "^0.1.5",
- "infer-owner": "^1.0.4",
- "mkdirp": "^0.5.1",
- "path-is-inside": "^1.0.2",
- "read-cmd-shim": "^1.0.1",
- "slide": "^1.1.6"
- },
- "deprecated": false,
- "description": "Gentle Filesystem operations",
- "devDependencies": {
- "dezalgo": "^1.0.3",
- "nyc": "^11.1.0",
- "require-inject": "^1.4.2",
- "standard": "^10.0.3",
- "standard-version": "^4.2.0",
- "tap": "^10.7.2",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "index.js",
- "lib"
- ],
- "homepage": "https://github.com/npm/gentle-fs#readme",
- "keywords": [
- "npm",
- "gentle",
- "fs"
- ],
- "license": "Artistic-2.0",
- "main": "index.js",
- "name": "gentle-fs",
- "repository": {
- "type": "git",
- "url": "git://github.com/npm/gentle-fs.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "posttest": "standard",
- "prerelease": "npm t",
- "release": "standard-version -s",
- "test": "tap -J --nyc-arg=--all --coverage test",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "2.3.0"
-}
diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md
index 9bc6cae2e..afdd90e13 100644
--- a/node_modules/hosted-git-info/CHANGELOG.md
+++ b/node_modules/hosted-git-info/CHANGELOG.md
@@ -2,6 +2,26 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+<a name="3.0.5"></a>
+## [3.0.5](https://github.com/npm/hosted-git-info/compare/v3.0.4...v3.0.5) (2020-07-11)
+
+
+
+<a name="3.0.4"></a>
+## [3.0.4](https://github.com/npm/hosted-git-info/compare/v3.0.3...v3.0.4) (2020-02-26)
+
+
+### Bug Fixes
+
+* Do not pass scp-style URLs to the WhatWG url.URL ([0835306](https://github.com/npm/hosted-git-info/commit/0835306)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) [#63](https://github.com/npm/hosted-git-info/issues/63)
+
+
+
+<a name="3.0.3"></a>
+## [3.0.3](https://github.com/npm/hosted-git-info/compare/v3.0.2...v3.0.3) (2020-02-25)
+
+
+
<a name="3.0.2"></a>
## [3.0.2](https://github.com/npm/hosted-git-info/compare/v3.0.1...v3.0.2) (2019-10-08)
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
index 2ccb1d69c..0b08be155 100644
--- a/node_modules/hosted-git-info/index.js
+++ b/node_modules/hosted-git-info/index.js
@@ -47,7 +47,7 @@ function fromUrl (giturl, opts) {
var gitHostInfo = gitHosts[gitHostName]
var auth = null
if (parsed.auth && authProtocols[parsed.protocol]) {
- auth = decodeURIComponent(parsed.auth)
+ auth = parsed.auth
}
var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
var user = null
@@ -106,7 +106,28 @@ function fixupUnqualifiedGist (giturl) {
function parseGitUrl (giturl) {
var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
- if (!matched) return url.parse(giturl)
+ if (!matched) {
+ var legacy = url.parse(giturl)
+ if (legacy.auth) {
+ // git urls can be in the form of scp-style/ssh-connect strings, like
+ // git+ssh://user@host.com:some/path, which the legacy url parser
+ // supports, but WhatWG url.URL class does not. However, the legacy
+ // parser de-urlencodes the username and password, so something like
+ // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes
+ // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong.
+ // Pull off just the auth and host, so we dont' get the confusing
+ // scp-style URL, then pass that to the WhatWG parser to get the
+ // auth properly escaped.
+ const authmatch = giturl.match(/[^@]+@[^:/]+/)
+ /* istanbul ignore else - this should be impossible */
+ if (authmatch) {
+ var whatwg = new url.URL(authmatch[0])
+ legacy.auth = whatwg.username || ''
+ if (whatwg.password) legacy.auth += ':' + whatwg.password
+ }
+ }
+ return legacy
+ }
return {
protocol: 'git+ssh:',
slashes: true,
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
index e78e48850..867f1de4c 100644
--- a/node_modules/hosted-git-info/package.json
+++ b/node_modules/hosted-git-info/package.json
@@ -1,8 +1,8 @@
{
"_from": "hosted-git-info@latest",
- "_id": "hosted-git-info@3.0.2",
+ "_id": "hosted-git-info@3.0.5",
"_inBundle": false,
- "_integrity": "sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw==",
+ "_integrity": "sha512-i4dpK6xj9BIpVOTboXIlKG9+8HMKggcrMX7WA24xZtKwX0TPelq/rbaS5rCKeNX8sJXZJGdSxpnEGtta+wismQ==",
"_location": "/hosted-git-info",
"_phantomChildren": {},
"_requested": {
@@ -17,10 +17,11 @@
},
"_requiredBy": [
"#USER",
- "/"
+ "/",
+ "/npm-package-arg"
],
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.2.tgz",
- "_shasum": "8b7e3bd114b59b51786f8bade0f39ddc80275a97",
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.5.tgz",
+ "_shasum": "bea87905ef7317442e8df3087faa3c842397df03",
"_spec": "hosted-git-info@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -33,7 +34,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "lru-cache": "^5.1.1"
+ "lru-cache": "^6.0.0"
},
"deprecated": false,
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
@@ -42,6 +43,9 @@
"standard-version": "^4.4.0",
"tap": "^12.7.0"
},
+ "engines": {
+ "node": ">=10"
+ },
"files": [
"index.js",
"git-host.js",
@@ -63,11 +67,11 @@
},
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
+ "posttest": "standard",
"prerelease": "npm t",
- "pretest": "standard",
"release": "standard-version -s",
"test": "tap -J --100 --no-esm test/*.js",
"test:coverage": "tap --coverage-report=html -J --100 --no-esm test/*.js"
},
- "version": "3.0.2"
+ "version": "3.0.5"
}
diff --git a/node_modules/lru-cache/node_modules/yallist/LICENSE b/node_modules/lru-cache/node_modules/yallist/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/lru-cache/node_modules/yallist/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/lru-cache/node_modules/yallist/README.md b/node_modules/lru-cache/node_modules/yallist/README.md
deleted file mode 100644
index f58610186..000000000
--- a/node_modules/lru-cache/node_modules/yallist/README.md
+++ /dev/null
@@ -1,204 +0,0 @@
-# yallist
-
-Yet Another Linked List
-
-There are many doubly-linked list implementations like it, but this
-one is mine.
-
-For when an array would be too big, and a Map can't be iterated in
-reverse order.
-
-
-[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
-
-## basic usage
-
-```javascript
-var yallist = require('yallist')
-var myList = yallist.create([1, 2, 3])
-myList.push('foo')
-myList.unshift('bar')
-// of course pop() and shift() are there, too
-console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
-myList.forEach(function (k) {
- // walk the list head to tail
-})
-myList.forEachReverse(function (k, index, list) {
- // walk the list tail to head
-})
-var myDoubledList = myList.map(function (k) {
- return k + k
-})
-// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
-// mapReverse is also a thing
-var myDoubledListReverse = myList.mapReverse(function (k) {
- return k + k
-}) // ['foofoo', 6, 4, 2, 'barbar']
-
-var reduced = myList.reduce(function (set, entry) {
- set += entry
- return set
-}, 'start')
-console.log(reduced) // 'startfoo123bar'
-```
-
-## api
-
-The whole API is considered "public".
-
-Functions with the same name as an Array method work more or less the
-same way.
-
-There's reverse versions of most things because that's the point.
-
-### Yallist
-
-Default export, the class that holds and manages a list.
-
-Call it with either a forEach-able (like an array) or a set of
-arguments, to initialize the list.
-
-The Array-ish methods all act like you'd expect. No magic length,
-though, so if you change that it won't automatically prune or add
-empty spots.
-
-### Yallist.create(..)
-
-Alias for Yallist function. Some people like factories.
-
-#### yallist.head
-
-The first node in the list
-
-#### yallist.tail
-
-The last node in the list
-
-#### yallist.length
-
-The number of nodes in the list. (Change this at your peril. It is
-not magic like Array length.)
-
-#### yallist.toArray()
-
-Convert the list to an array.
-
-#### yallist.forEach(fn, [thisp])
-
-Call a function on each item in the list.
-
-#### yallist.forEachReverse(fn, [thisp])
-
-Call a function on each item in the list, in reverse order.
-
-#### yallist.get(n)
-
-Get the data at position `n` in the list. If you use this a lot,
-probably better off just using an Array.
-
-#### yallist.getReverse(n)
-
-Get the data at position `n`, counting from the tail.
-
-#### yallist.map(fn, thisp)
-
-Create a new Yallist with the result of calling the function on each
-item.
-
-#### yallist.mapReverse(fn, thisp)
-
-Same as `map`, but in reverse.
-
-#### yallist.pop()
-
-Get the data from the list tail, and remove the tail from the list.
-
-#### yallist.push(item, ...)
-
-Insert one or more items to the tail of the list.
-
-#### yallist.reduce(fn, initialValue)
-
-Like Array.reduce.
-
-#### yallist.reduceReverse
-
-Like Array.reduce, but in reverse.
-
-#### yallist.reverse
-
-Reverse the list in place.
-
-#### yallist.shift()
-
-Get the data from the list head, and remove the head from the list.
-
-#### yallist.slice([from], [to])
-
-Just like Array.slice, but returns a new Yallist.
-
-#### yallist.sliceReverse([from], [to])
-
-Just like yallist.slice, but the result is returned in reverse.
-
-#### yallist.toArray()
-
-Create an array representation of the list.
-
-#### yallist.toArrayReverse()
-
-Create a reversed array representation of the list.
-
-#### yallist.unshift(item, ...)
-
-Insert one or more items to the head of the list.
-
-#### yallist.unshiftNode(node)
-
-Move a Node object to the front of the list. (That is, pull it out of
-wherever it lives, and make it the new head.)
-
-If the node belongs to a different list, then that list will remove it
-first.
-
-#### yallist.pushNode(node)
-
-Move a Node object to the end of the list. (That is, pull it out of
-wherever it lives, and make it the new tail.)
-
-If the node belongs to a list already, then that list will remove it
-first.
-
-#### yallist.removeNode(node)
-
-Remove a node from the list, preserving referential integrity of head
-and tail and other nodes.
-
-Will throw an error if you try to have a list remove a node that
-doesn't belong to it.
-
-### Yallist.Node
-
-The class that holds the data and is actually the list.
-
-Call with `var n = new Node(value, previousNode, nextNode)`
-
-Note that if you do direct operations on Nodes themselves, it's very
-easy to get into weird states where the list is broken. Be careful :)
-
-#### node.next
-
-The next node in the list.
-
-#### node.prev
-
-The previous node in the list.
-
-#### node.value
-
-The data the node contains.
-
-#### node.list
-
-The list to which this node belongs. (Null if it does not belong to
-any list.)
diff --git a/node_modules/lru-cache/node_modules/yallist/iterator.js b/node_modules/lru-cache/node_modules/yallist/iterator.js
deleted file mode 100644
index d41c97a19..000000000
--- a/node_modules/lru-cache/node_modules/yallist/iterator.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-module.exports = function (Yallist) {
- Yallist.prototype[Symbol.iterator] = function* () {
- for (let walker = this.head; walker; walker = walker.next) {
- yield walker.value
- }
- }
-}
diff --git a/node_modules/lru-cache/node_modules/yallist/package.json b/node_modules/lru-cache/node_modules/yallist/package.json
deleted file mode 100644
index 3a4c2dee7..000000000
--- a/node_modules/lru-cache/node_modules/yallist/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "yallist@^3.0.2",
- "_id": "yallist@3.1.1",
- "_inBundle": false,
- "_integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "_location": "/lru-cache/yallist",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "yallist@^3.0.2",
- "name": "yallist",
- "escapedName": "yallist",
- "rawSpec": "^3.0.2",
- "saveSpec": null,
- "fetchSpec": "^3.0.2"
- },
- "_requiredBy": [
- "/lru-cache"
- ],
- "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "_shasum": "dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd",
- "_spec": "yallist@^3.0.2",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/lru-cache",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/yallist/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Yet Another Linked List",
- "devDependencies": {
- "tap": "^12.1.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "yallist.js",
- "iterator.js"
- ],
- "homepage": "https://github.com/isaacs/yallist#readme",
- "license": "ISC",
- "main": "yallist.js",
- "name": "yallist",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/yallist.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --100"
- },
- "version": "3.1.1"
-}
diff --git a/node_modules/lru-cache/node_modules/yallist/yallist.js b/node_modules/lru-cache/node_modules/yallist/yallist.js
deleted file mode 100644
index ed4e7303a..000000000
--- a/node_modules/lru-cache/node_modules/yallist/yallist.js
+++ /dev/null
@@ -1,426 +0,0 @@
-'use strict'
-module.exports = Yallist
-
-Yallist.Node = Node
-Yallist.create = Yallist
-
-function Yallist (list) {
- var self = this
- if (!(self instanceof Yallist)) {
- self = new Yallist()
- }
-
- self.tail = null
- self.head = null
- self.length = 0
-
- if (list && typeof list.forEach === 'function') {
- list.forEach(function (item) {
- self.push(item)
- })
- } else if (arguments.length > 0) {
- for (var i = 0, l = arguments.length; i < l; i++) {
- self.push(arguments[i])
- }
- }
-
- return self
-}
-
-Yallist.prototype.removeNode = function (node) {
- if (node.list !== this) {
- throw new Error('removing node which does not belong to this list')
- }
-
- var next = node.next
- var prev = node.prev
-
- if (next) {
- next.prev = prev
- }
-
- if (prev) {
- prev.next = next
- }
-
- if (node === this.head) {
- this.head = next
- }
- if (node === this.tail) {
- this.tail = prev
- }
-
- node.list.length--
- node.next = null
- node.prev = null
- node.list = null
-
- return next
-}
-
-Yallist.prototype.unshiftNode = function (node) {
- if (node === this.head) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var head = this.head
- node.list = this
- node.next = head
- if (head) {
- head.prev = node
- }
-
- this.head = node
- if (!this.tail) {
- this.tail = node
- }
- this.length++
-}
-
-Yallist.prototype.pushNode = function (node) {
- if (node === this.tail) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var tail = this.tail
- node.list = this
- node.prev = tail
- if (tail) {
- tail.next = node
- }
-
- this.tail = node
- if (!this.head) {
- this.head = node
- }
- this.length++
-}
-
-Yallist.prototype.push = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- push(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.unshift = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- unshift(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.pop = function () {
- if (!this.tail) {
- return undefined
- }
-
- var res = this.tail.value
- this.tail = this.tail.prev
- if (this.tail) {
- this.tail.next = null
- } else {
- this.head = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.shift = function () {
- if (!this.head) {
- return undefined
- }
-
- var res = this.head.value
- this.head = this.head.next
- if (this.head) {
- this.head.prev = null
- } else {
- this.tail = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.forEach = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.head, i = 0; walker !== null; i++) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.next
- }
-}
-
-Yallist.prototype.forEachReverse = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.prev
- }
-}
-
-Yallist.prototype.get = function (n) {
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.next
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.getReverse = function (n) {
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.prev
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.map = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.head; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.next
- }
- return res
-}
-
-Yallist.prototype.mapReverse = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.tail; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.prev
- }
- return res
-}
-
-Yallist.prototype.reduce = function (fn, initial) {
- var acc
- var walker = this.head
- if (arguments.length > 1) {
- acc = initial
- } else if (this.head) {
- walker = this.head.next
- acc = this.head.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = 0; walker !== null; i++) {
- acc = fn(acc, walker.value, i)
- walker = walker.next
- }
-
- return acc
-}
-
-Yallist.prototype.reduceReverse = function (fn, initial) {
- var acc
- var walker = this.tail
- if (arguments.length > 1) {
- acc = initial
- } else if (this.tail) {
- walker = this.tail.prev
- acc = this.tail.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = this.length - 1; walker !== null; i--) {
- acc = fn(acc, walker.value, i)
- walker = walker.prev
- }
-
- return acc
-}
-
-Yallist.prototype.toArray = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.head; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.next
- }
- return arr
-}
-
-Yallist.prototype.toArrayReverse = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.tail; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.prev
- }
- return arr
-}
-
-Yallist.prototype.slice = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
- walker = walker.next
- }
- for (; walker !== null && i < to; i++, walker = walker.next) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.sliceReverse = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
- walker = walker.prev
- }
- for (; walker !== null && i > from; i--, walker = walker.prev) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
- if (start > this.length) {
- start = this.length - 1
- }
- if (start < 0) {
- start = this.length + start;
- }
-
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
- walker = walker.next
- }
-
- var ret = []
- for (var i = 0; walker && i < deleteCount; i++) {
- ret.push(walker.value)
- walker = this.removeNode(walker)
- }
- if (walker === null) {
- walker = this.tail
- }
-
- if (walker !== this.head && walker !== this.tail) {
- walker = walker.prev
- }
-
- for (var i = 2; i < arguments.length; i++) {
- walker = insert(this, walker, arguments[i])
- }
- return ret;
-}
-
-Yallist.prototype.reverse = function () {
- var head = this.head
- var tail = this.tail
- for (var walker = head; walker !== null; walker = walker.prev) {
- var p = walker.prev
- walker.prev = walker.next
- walker.next = p
- }
- this.head = tail
- this.tail = head
- return this
-}
-
-function insert (self, node, value) {
- var inserted = node === self.head ?
- new Node(value, null, node, self) :
- new Node(value, node, node.next, self)
-
- if (inserted.next === null) {
- self.tail = inserted
- }
- if (inserted.prev === null) {
- self.head = inserted
- }
-
- self.length++
-
- return inserted
-}
-
-function push (self, item) {
- self.tail = new Node(item, self.tail, null, self)
- if (!self.head) {
- self.head = self.tail
- }
- self.length++
-}
-
-function unshift (self, item) {
- self.head = new Node(item, null, self.head, self)
- if (!self.tail) {
- self.tail = self.head
- }
- self.length++
-}
-
-function Node (value, prev, next, list) {
- if (!(this instanceof Node)) {
- return new Node(value, prev, next, list)
- }
-
- this.list = list
- this.value = value
-
- if (prev) {
- prev.next = this
- this.prev = prev
- } else {
- this.prev = null
- }
-
- if (next) {
- next.prev = this
- this.next = next
- } else {
- this.next = null
- }
-}
-
-try {
- // add if support for Symbol.iterator is present
- require('./iterator.js')(Yallist)
-} catch (er) {}
diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json
index 3b5a1f8b3..b0587e11c 100644
--- a/node_modules/lru-cache/package.json
+++ b/node_modules/lru-cache/package.json
@@ -1,28 +1,27 @@
{
- "_from": "lru-cache@5.1.1",
- "_id": "lru-cache@5.1.1",
+ "_from": "lru-cache@^6.0.0",
+ "_id": "lru-cache@6.0.0",
"_inBundle": false,
- "_integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "_integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"_location": "/lru-cache",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "lru-cache@5.1.1",
+ "raw": "lru-cache@^6.0.0",
"name": "lru-cache",
"escapedName": "lru-cache",
- "rawSpec": "5.1.1",
+ "rawSpec": "^6.0.0",
"saveSpec": null,
- "fetchSpec": "5.1.1"
+ "fetchSpec": "^6.0.0"
},
"_requiredBy": [
- "#USER",
- "/"
+ "/@npmcli/git"
],
- "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "_shasum": "1da27e6710271947695daf6848e847f01d84b920",
- "_spec": "lru-cache@5.1.1",
- "_where": "/Users/isaacs/dev/npm/cli",
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "_shasum": "6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94",
+ "_spec": "lru-cache@^6.0.0",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/git",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me"
@@ -32,13 +31,16 @@
},
"bundleDependencies": false,
"dependencies": {
- "yallist": "^3.0.2"
+ "yallist": "^4.0.0"
},
"deprecated": false,
"description": "A cache object that deletes the least-recently-used items.",
"devDependencies": {
"benchmark": "^2.1.4",
- "tap": "^12.1.0"
+ "tap": "^14.10.7"
+ },
+ "engines": {
+ "node": ">=10"
},
"files": [
"index.js"
@@ -57,12 +59,11 @@
"url": "git://github.com/isaacs/node-lru-cache.git"
},
"scripts": {
- "coveragerport": "tap --coverage-report=html",
- "postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
+ "prepublishOnly": "git push origin --follow-tags",
"preversion": "npm test",
- "snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
- "test": "tap test/*.js --100 -J"
+ "snap": "tap",
+ "test": "tap"
},
- "version": "5.1.1"
+ "version": "6.0.0"
}
diff --git a/node_modules/make-fetch-happen/package.json b/node_modules/make-fetch-happen/package.json
index dac0309c4..4c03452bf 100644
--- a/node_modules/make-fetch-happen/package.json
+++ b/node_modules/make-fetch-happen/package.json
@@ -1,10 +1,12 @@
{
"_from": "make-fetch-happen@latest",
- "_id": "make-fetch-happen@8.0.7",
+ "_id": "make-fetch-happen@8.0.8",
"_inBundle": false,
- "_integrity": "sha512-rkDA4c1nMXVqLkfOaM5RK2dxkUndjLOCrPycTDZgbkFDzhmaCO3P1dmCW//yt1I/G1EcedJqMsSjWkV79Hh4hQ==",
+ "_integrity": "sha512-kILd4WtBFqylc65LRq9sTx/GG0r9yMoomjz9ZMGxzZKWXhnidDhROhnjtZEQDHSWbwQJ5ojI4XZk46DdHwslGg==",
"_location": "/make-fetch-happen",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "yallist": "4.0.0"
+ },
"_requested": {
"type": "tag",
"registry": true,
@@ -20,8 +22,8 @@
"/",
"/npm-registry-fetch"
],
- "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.7.tgz",
- "_shasum": "7f98e6e75784c541833d0ffe2f82c31418a87ac2",
+ "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.8.tgz",
+ "_shasum": "12e8281b83db47324380b9967bb7d38756a4454c",
"_spec": "make-fetch-happen@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -39,7 +41,7 @@
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"is-lambda": "^1.0.1",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"minipass": "^3.1.3",
"minipass-collect": "^1.0.2",
"minipass-fetch": "^1.1.2",
@@ -96,5 +98,5 @@
"preversion": "npm t",
"test": "tap test/*.js"
},
- "version": "8.0.7"
+ "version": "8.0.8"
}
diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml
index cc4dba29d..74c57bf15 100644
--- a/node_modules/minimist/.travis.yml
+++ b/node_modules/minimist/.travis.yml
@@ -2,3 +2,7 @@ language: node_js
node_js:
- "0.8"
- "0.10"
+ - "0.12"
+ - "iojs"
+before_install:
+ - npm install -g npm@~1.4.6
diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js
index abff3e8ee..f7c8d4980 100644
--- a/node_modules/minimist/example/parse.js
+++ b/node_modules/minimist/example/parse.js
@@ -1,2 +1,2 @@
var argv = require('../')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js
index 584f551a6..d2afe5e4d 100644
--- a/node_modules/minimist/index.js
+++ b/node_modules/minimist/index.js
@@ -1,15 +1,19 @@
module.exports = function (args, opts) {
if (!opts) opts = {};
- var flags = { bools : {}, strings : {} };
-
- [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
- flags.bools[key] = true;
- });
-
- [].concat(opts.string).filter(Boolean).forEach(function (key) {
- flags.strings[key] = true;
- });
+ var flags = { bools : {}, strings : {}, unknownFn: null };
+
+ if (typeof opts['unknown'] === 'function') {
+ flags.unknownFn = opts['unknown'];
+ }
+
+ if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
+ flags.allBools = true;
+ } else {
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+ }
var aliases = {};
Object.keys(opts.alias || {}).forEach(function (key) {
@@ -20,7 +24,14 @@ module.exports = function (args, opts) {
}));
});
});
-
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ if (aliases[key]) {
+ flags.strings[aliases[key]] = true;
+ }
+ });
+
var defaults = opts['default'] || {};
var argv = { _ : [] };
@@ -35,7 +46,16 @@ module.exports = function (args, opts) {
args = args.slice(0, args.indexOf('--'));
}
- function setArg (key, val) {
+ function argDefined(key, arg) {
+ return (flags.allBools && /^--[^=]+$/.test(arg)) ||
+ flags.strings[key] || flags.bools[key] || aliases[key];
+ }
+
+ function setArg (key, val, arg) {
+ if (arg && flags.unknownFn && !argDefined(key, arg)) {
+ if (flags.unknownFn(arg) === false) return;
+ }
+
var value = !flags.strings[key] && isNumber(val)
? Number(val) : val
;
@@ -45,7 +65,41 @@ module.exports = function (args, opts) {
setKey(argv, x.split('.'), value);
});
}
+
+ function setKey (obj, keys, value) {
+ var o = obj;
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+ if (key === '__proto__') return;
+ if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+ if (o[key] === Array.prototype) o[key] = [];
+ o = o[key];
+ }
+
+ var key = keys[keys.length - 1];
+ if (key === '__proto__') return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
+ if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+ }
+ function aliasIsBoolean(key) {
+ return aliases[key].some(function (x) {
+ return flags.bools[x];
+ });
+ }
+
for (var i = 0; i < args.length; i++) {
var arg = args[i];
@@ -54,27 +108,33 @@ module.exports = function (args, opts) {
// 'dotall' regex modifier. See:
// http://stackoverflow.com/a/1068308/13216
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
- setArg(m[1], m[2]);
+ var key = m[1];
+ var value = m[2];
+ if (flags.bools[key]) {
+ value = value !== 'false';
+ }
+ setArg(key, value, arg);
}
else if (/^--no-.+/.test(arg)) {
var key = arg.match(/^--no-(.+)/)[1];
- setArg(key, false);
+ setArg(key, false, arg);
}
else if (/^--.+/.test(arg)) {
var key = arg.match(/^--(.+)/)[1];
var next = args[i + 1];
if (next !== undefined && !/^-/.test(next)
&& !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, next);
+ && !flags.allBools
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, next, arg);
i++;
}
else if (/^(true|false)$/.test(next)) {
- setArg(key, next === 'true');
+ setArg(key, next === 'true', arg);
i++;
}
else {
- setArg(key, flags.strings[key] ? '' : true);
+ setArg(key, flags.strings[key] ? '' : true, arg);
}
}
else if (/^-[^-]+/.test(arg)) {
@@ -85,24 +145,30 @@ module.exports = function (args, opts) {
var next = arg.slice(j+2);
if (next === '-') {
- setArg(letters[j], next)
+ setArg(letters[j], next, arg)
continue;
}
+ if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
+ setArg(letters[j], next.split('=')[1], arg);
+ broken = true;
+ break;
+ }
+
if (/[A-Za-z]/.test(letters[j])
&& /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
- setArg(letters[j], next);
+ setArg(letters[j], next, arg);
broken = true;
break;
}
if (letters[j+1] && letters[j+1].match(/\W/)) {
- setArg(letters[j], arg.slice(j+2));
+ setArg(letters[j], arg.slice(j+2), arg);
broken = true;
break;
}
else {
- setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
}
}
@@ -110,23 +176,29 @@ module.exports = function (args, opts) {
if (!broken && key !== '-') {
if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
&& !flags.bools[key]
- && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
- setArg(key, args[i+1]);
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, args[i+1], arg);
i++;
}
- else if (args[i+1] && /true|false/.test(args[i+1])) {
- setArg(key, args[i+1] === 'true');
+ else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true', arg);
i++;
}
else {
- setArg(key, flags.strings[key] ? '' : true);
+ setArg(key, flags.strings[key] ? '' : true, arg);
}
}
}
else {
- argv._.push(
- flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
- );
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ if (opts.stopEarly) {
+ argv._.push.apply(argv._, args.slice(i + 1));
+ break;
+ }
}
}
@@ -140,9 +212,17 @@ module.exports = function (args, opts) {
}
});
- notFlags.forEach(function(key) {
- argv._.push(key);
- });
+ if (opts['--']) {
+ argv['--'] = new Array();
+ notFlags.forEach(function(key) {
+ argv['--'].push(key);
+ });
+ }
+ else {
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+ }
return argv;
};
@@ -157,31 +237,9 @@ function hasKey (obj, keys) {
return key in o;
}
-function setKey (obj, keys, value) {
- var o = obj;
- keys.slice(0,-1).forEach(function (key) {
- if (o[key] === undefined) o[key] = {};
- o = o[key];
- });
-
- var key = keys[keys.length - 1];
- if (o[key] === undefined || typeof o[key] === 'boolean') {
- o[key] = value;
- }
- else if (Array.isArray(o[key])) {
- o[key].push(value);
- }
- else {
- o[key] = [ o[key], value ];
- }
-}
-
function isNumber (x) {
if (typeof x === 'number') return true;
if (/^0x[0-9a-f]+$/i.test(x)) return true;
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
}
-function longest (xs) {
- return Math.max.apply(null, xs.map(function (x) { return x.length }));
-}
diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json
index 0a1961342..13164cb9e 100644
--- a/node_modules/minimist/package.json
+++ b/node_modules/minimist/package.json
@@ -1,27 +1,35 @@
{
- "_from": "minimist@0.0.8",
- "_id": "minimist@0.0.8",
+ "_from": "minimist@^1.2.5",
+ "_id": "minimist@1.2.5",
"_inBundle": false,
- "_integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"_location": "/minimist",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "minimist@0.0.8",
+ "raw": "minimist@^1.2.5",
"name": "minimist",
"escapedName": "minimist",
- "rawSpec": "0.0.8",
+ "rawSpec": "^1.2.5",
"saveSpec": null,
- "fetchSpec": "0.0.8"
+ "fetchSpec": "^1.2.5"
},
"_requiredBy": [
- "/mkdirp"
+ "/@npmcli/run-script/node-gyp/mkdirp",
+ "/@npmcli/run-script/tar/mkdirp",
+ "/cmd-shim/mkdirp",
+ "/copy-concurrently/mkdirp",
+ "/eslint/mkdirp",
+ "/move-concurrently/mkdirp",
+ "/node-gyp/mkdirp",
+ "/spawn-wrap/mkdirp",
+ "/write/mkdirp"
],
- "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
- "_spec": "minimist@0.0.8",
- "_where": "/Users/rebecca/code/npm/node_modules/mkdirp",
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602",
+ "_spec": "minimist@^1.2.5",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/run-script/node_modules/node-gyp/node_modules/mkdirp",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
@@ -34,8 +42,9 @@
"deprecated": false,
"description": "parse argument options",
"devDependencies": {
+ "covert": "^1.0.0",
"tap": "~0.4.0",
- "tape": "~1.0.4"
+ "tape": "^3.5.0"
},
"homepage": "https://github.com/substack/minimist",
"keywords": [
@@ -52,6 +61,7 @@
"url": "git://github.com/substack/minimist.git"
},
"scripts": {
+ "coverage": "covert test/*.js",
"test": "tap test/*.js"
},
"testling": {
@@ -67,5 +77,5 @@
"opera/12"
]
},
- "version": "0.0.8"
+ "version": "1.2.5"
}
diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown
index c25635323..5fd97ab11 100644
--- a/node_modules/minimist/readme.markdown
+++ b/node_modules/minimist/readme.markdown
@@ -5,15 +5,11 @@ parse argument options
This module is the guts of optimist's argument parser without all the
fanciful decoration.
-[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
-
-[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
-
# example
``` js
var argv = require('minimist')(process.argv.slice(2));
-console.dir(argv);
+console.log(argv);
```
```
@@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
beep: 'boop' }
```
+# security
+
+Previous versions had a prototype pollution bug that could cause privilege
+escalation in some circumstances when handling untrusted user input.
+
+Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
+
# methods
``` js
@@ -55,10 +58,29 @@ options can be:
* `opts.string` - a string or array of strings argument names to always treat as
strings
-* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.boolean` - a boolean, string or array of strings to always treat as
+booleans. if `true` will treat all double hyphenated arguments without equal signs
+as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
* `opts.alias` - an object mapping string names to strings or arrays of string
argument names to use as aliases
* `opts.default` - an object mapping string argument names to default values
+* `opts.stopEarly` - when true, populate `argv._` with everything after the
+first non-option
+* `opts['--']` - when true, populate `argv._` with everything before the `--`
+and `argv['--']` with everything after the `--`. Here's an example:
+
+ ```
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
+ { _: [ 'one', 'two', 'three' ],
+ '--': [ 'four', 'five', '--six' ] }
+ ```
+
+ Note that with `opts['--']` set, parsing for arguments still stops after the
+ `--`.
+
+* `opts.unknown` - a function which is invoked with a command line parameter not
+defined in the `opts` configuration object. If the function returns `false`, the
+unknown option is not added to `argv`.
# install
diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js
deleted file mode 100644
index 8b034b99a..000000000
--- a/node_modules/minimist/test/dash.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('-', function (t) {
- t.plan(5);
- t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
- t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
- t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
- t.deepEqual(
- parse([ '-b', '-' ], { boolean: 'b' }),
- { b: true, _: [ '-' ] }
- );
- t.deepEqual(
- parse([ '-s', '-' ], { string: 's' }),
- { s: '-', _: [] }
- );
-});
-
-test('-a -- b', function (t) {
- t.plan(3);
- t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
- t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
-});
diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js
deleted file mode 100644
index f0041ee40..000000000
--- a/node_modules/minimist/test/default_bool.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('boolean default true', function (t) {
- var argv = parse([], {
- boolean: 'sometrue',
- default: { sometrue: true }
- });
- t.equal(argv.sometrue, true);
- t.end();
-});
-
-test('boolean default false', function (t) {
- var argv = parse([], {
- boolean: 'somefalse',
- default: { somefalse: false }
- });
- t.equal(argv.somefalse, false);
- t.end();
-});
diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js
deleted file mode 100644
index ef0ae349b..000000000
--- a/node_modules/minimist/test/dotted.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('dotted alias', function (t) {
- var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 22);
- t.equal(argv.aa.bb, 22);
- t.end();
-});
-
-test('dotted default', function (t) {
- var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
- t.equal(argv.a.b, 11);
- t.equal(argv.aa.bb, 11);
- t.end();
-});
diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js
deleted file mode 100644
index 5d3a1e09d..000000000
--- a/node_modules/minimist/test/long.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var test = require('tape');
-var parse = require('../');
-
-test('long opts', function (t) {
- t.deepEqual(
- parse([ '--bool' ]),
- { bool : true, _ : [] },
- 'long boolean'
- );
- t.deepEqual(
- parse([ '--pow', 'xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture sp'
- );
- t.deepEqual(
- parse([ '--pow=xixxle' ]),
- { pow : 'xixxle', _ : [] },
- 'long capture eq'
- );
- t.deepEqual(
- parse([ '--host', 'localhost', '--port', '555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures sp'
- );
- t.deepEqual(
- parse([ '--host=localhost', '--port=555' ]),
- { host : 'localhost', port : 555, _ : [] },
- 'long captures eq'
- );
- t.end();
-});
diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js
deleted file mode 100644
index 8a9064669..000000000
--- a/node_modules/minimist/test/parse.js
+++ /dev/null
@@ -1,318 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse args', function (t) {
- t.deepEqual(
- parse([ '--no-moo' ]),
- { moo : false, _ : [] },
- 'no'
- );
- t.deepEqual(
- parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
- { v : ['a','b','c'], _ : [] },
- 'multi'
- );
- t.end();
-});
-
-test('comprehensive', function (t) {
- t.deepEqual(
- parse([
- '--name=meowmers', 'bare', '-cats', 'woo',
- '-h', 'awesome', '--multi=quux',
- '--key', 'value',
- '-b', '--bool', '--no-meep', '--multi=baz',
- '--', '--not-a-flag', 'eek'
- ]),
- {
- c : true,
- a : true,
- t : true,
- s : 'woo',
- h : 'awesome',
- b : true,
- bool : true,
- key : 'value',
- multi : [ 'quux', 'baz' ],
- meep : false,
- name : 'meowmers',
- _ : [ 'bare', '--not-a-flag', 'eek' ]
- }
- );
- t.end();
-});
-
-test('nums', function (t) {
- var argv = parse([
- '-x', '1234',
- '-y', '5.67',
- '-z', '1e7',
- '-w', '10f',
- '--hex', '0xdeadbeef',
- '789'
- ]);
- t.deepEqual(argv, {
- x : 1234,
- y : 5.67,
- z : 1e7,
- w : '10f',
- hex : 0xdeadbeef,
- _ : [ 789 ]
- });
- t.deepEqual(typeof argv.x, 'number');
- t.deepEqual(typeof argv.y, 'number');
- t.deepEqual(typeof argv.z, 'number');
- t.deepEqual(typeof argv.w, 'string');
- t.deepEqual(typeof argv.hex, 'number');
- t.deepEqual(typeof argv._[0], 'number');
- t.end();
-});
-
-test('flag boolean', function (t) {
- var argv = parse([ '-t', 'moo' ], { boolean: 't' });
- t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean value', function (t) {
- var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
- boolean: [ 't', 'verbose' ],
- default: { verbose: true }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: true,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-});
-
-test('flag boolean default false', function (t) {
- var argv = parse(['moo'], {
- boolean: ['t', 'verbose'],
- default: { verbose: false, t: false }
- });
-
- t.deepEqual(argv, {
- verbose: false,
- t: false,
- _: ['moo']
- });
-
- t.deepEqual(typeof argv.verbose, 'boolean');
- t.deepEqual(typeof argv.t, 'boolean');
- t.end();
-
-});
-
-test('boolean groups', function (t) {
- var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
- boolean: ['x','y','z']
- });
-
- t.deepEqual(argv, {
- x : true,
- y : false,
- z : true,
- _ : [ 'one', 'two', 'three' ]
- });
-
- t.deepEqual(typeof argv.x, 'boolean');
- t.deepEqual(typeof argv.y, 'boolean');
- t.deepEqual(typeof argv.z, 'boolean');
- t.end();
-});
-
-test('newlines in params' , function (t) {
- var args = parse([ '-s', "X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
-
- // reproduce in bash:
- // VALUE="new
- // line"
- // node program.js --s="$VALUE"
- args = parse([ "--s=X\nX" ])
- t.deepEqual(args, { _ : [], s : "X\nX" });
- t.end();
-});
-
-test('strings' , function (t) {
- var s = parse([ '-s', '0001234' ], { string: 's' }).s;
- t.equal(s, '0001234');
- t.equal(typeof s, 'string');
-
- var x = parse([ '-x', '56' ], { string: 'x' }).x;
- t.equal(x, '56');
- t.equal(typeof x, 'string');
- t.end();
-});
-
-test('stringArgs', function (t) {
- var s = parse([ ' ', ' ' ], { string: '_' })._;
- t.same(s.length, 2);
- t.same(typeof s[0], 'string');
- t.same(s[0], ' ');
- t.same(typeof s[1], 'string');
- t.same(s[1], ' ');
- t.end();
-});
-
-test('empty strings', function(t) {
- var s = parse([ '-s' ], { string: 's' }).s;
- t.equal(s, '');
- t.equal(typeof s, 'string');
-
- var str = parse([ '--str' ], { string: 'str' }).str;
- t.equal(str, '');
- t.equal(typeof str, 'string');
-
- var letters = parse([ '-art' ], {
- string: [ 'a', 't' ]
- });
-
- t.equal(letters.a, '');
- t.equal(letters.r, true);
- t.equal(letters.t, '');
-
- t.end();
-});
-
-
-test('slashBreak', function (t) {
- t.same(
- parse([ '-I/foo/bar/baz' ]),
- { I : '/foo/bar/baz', _ : [] }
- );
- t.same(
- parse([ '-xyz/foo/bar/baz' ]),
- { x : true, y : true, z : '/foo/bar/baz', _ : [] }
- );
- t.end();
-});
-
-test('alias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: 'zoom' }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('multiAlias', function (t) {
- var argv = parse([ '-f', '11', '--zoom', '55' ], {
- alias: { z: [ 'zm', 'zoom' ] }
- });
- t.equal(argv.zoom, 55);
- t.equal(argv.z, argv.zoom);
- t.equal(argv.z, argv.zm);
- t.equal(argv.f, 11);
- t.end();
-});
-
-test('nested dotted objects', function (t) {
- var argv = parse([
- '--foo.bar', '3', '--foo.baz', '4',
- '--foo.quux.quibble', '5', '--foo.quux.o_O',
- '--beep.boop'
- ]);
-
- t.same(argv.foo, {
- bar : 3,
- baz : 4,
- quux : {
- quibble : 5,
- o_O : true
- }
- });
- t.same(argv.beep, { boop : true });
- t.end();
-});
-
-test('boolean and alias with chainable api', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- herp: { alias: 'h', boolean: true }
- };
- var aliasedArgv = parse(aliased, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var propertyArgv = parse(regular, {
- boolean: 'herp',
- alias: { h: 'herp' }
- });
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias with options hash', function (t) {
- var aliased = [ '-h', 'derp' ];
- var regular = [ '--herp', 'derp' ];
- var opts = {
- alias: { 'h': 'herp' },
- boolean: 'herp'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ 'derp' ]
- };
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-test('boolean and alias using explicit true', function (t) {
- var aliased = [ '-h', 'true' ];
- var regular = [ '--herp', 'true' ];
- var opts = {
- alias: { h: 'herp' },
- boolean: 'h'
- };
- var aliasedArgv = parse(aliased, opts);
- var propertyArgv = parse(regular, opts);
- var expected = {
- herp: true,
- h: true,
- '_': [ ]
- };
-
- t.same(aliasedArgv, expected);
- t.same(propertyArgv, expected);
- t.end();
-});
-
-// regression, see https://github.com/substack/node-optimist/issues/71
-test('boolean and --x=true', function(t) {
- var parsed = parse(['--boool', '--other=true'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'true');
-
- parsed = parse(['--boool', '--other=false'], {
- boolean: 'boool'
- });
-
- t.same(parsed.boool, true);
- t.same(parsed.other, 'false');
- t.end();
-});
diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js
deleted file mode 100644
index 21851b036..000000000
--- a/node_modules/minimist/test/parse_modified.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('parse with modifier functions' , function (t) {
- t.plan(1);
-
- var argv = parse([ '-b', '123' ], { boolean: 'b' });
- t.deepEqual(argv, { b: true, _: ['123'] });
-});
diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js
deleted file mode 100644
index d513a1c25..000000000
--- a/node_modules/minimist/test/short.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('numeric short args', function (t) {
- t.plan(2);
- t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
- t.deepEqual(
- parse([ '-123', '456' ]),
- { 1: true, 2: true, 3: 456, _: [] }
- );
-});
-
-test('short', function (t) {
- t.deepEqual(
- parse([ '-b' ]),
- { b : true, _ : [] },
- 'short boolean'
- );
- t.deepEqual(
- parse([ 'foo', 'bar', 'baz' ]),
- { _ : [ 'foo', 'bar', 'baz' ] },
- 'bare'
- );
- t.deepEqual(
- parse([ '-cats' ]),
- { c : true, a : true, t : true, s : true, _ : [] },
- 'group'
- );
- t.deepEqual(
- parse([ '-cats', 'meow' ]),
- { c : true, a : true, t : true, s : 'meow', _ : [] },
- 'short group next'
- );
- t.deepEqual(
- parse([ '-h', 'localhost' ]),
- { h : 'localhost', _ : [] },
- 'short capture'
- );
- t.deepEqual(
- parse([ '-h', 'localhost', '-p', '555' ]),
- { h : 'localhost', p : 555, _ : [] },
- 'short captures'
- );
- t.end();
-});
-
-test('mixed short bool and capture', function (t) {
- t.same(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
-
-test('short and long', function (t) {
- t.deepEqual(
- parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
- {
- f : true, p : 555, h : 'localhost',
- _ : [ 'script.js' ]
- }
- );
- t.end();
-});
diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js
deleted file mode 100644
index 8a52a58ce..000000000
--- a/node_modules/minimist/test/whitespace.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var parse = require('../');
-var test = require('tape');
-
-test('whitespace should be whitespace' , function (t) {
- t.plan(1);
- var x = parse([ '-x', '\t' ]).x;
- t.equal(x, '\t');
-});
diff --git a/node_modules/minipass-pipeline/index.js b/node_modules/minipass-pipeline/index.js
index 019362196..c42f99684 100644
--- a/node_modules/minipass-pipeline/index.js
+++ b/node_modules/minipass-pipeline/index.js
@@ -116,7 +116,7 @@ class Pipeline extends Minipass {
this.emit('drain')
}
write (chunk, enc, cb) {
- return this[_head].write(chunk, enc, cb)
+ return this[_head].write(chunk, enc, cb) && this.flowing
}
end (chunk, enc, cb) {
this[_head].end(chunk, enc, cb)
diff --git a/node_modules/minipass-pipeline/package.json b/node_modules/minipass-pipeline/package.json
index 1c4713130..3ab227771 100644
--- a/node_modules/minipass-pipeline/package.json
+++ b/node_modules/minipass-pipeline/package.json
@@ -1,8 +1,8 @@
{
"_from": "minipass-pipeline@^1.2.2",
- "_id": "minipass-pipeline@1.2.2",
+ "_id": "minipass-pipeline@1.2.3",
"_inBundle": false,
- "_integrity": "sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==",
+ "_integrity": "sha512-cFOknTvng5vqnwOpDsZTWhNll6Jf8o2x+/diplafmxpuIymAjzoOolZG0VvQf3V2HgqzJNhnuKHYp2BqDgz8IQ==",
"_location": "/minipass-pipeline",
"_phantomChildren": {},
"_requested": {
@@ -16,14 +16,14 @@
"fetchSpec": "^1.2.2"
},
"_requiredBy": [
- "/minipass-fetch",
- "/npm-registry-fetch/cacache",
- "/npm-registry-fetch/make-fetch-happen"
+ "/cacache",
+ "/make-fetch-happen",
+ "/minipass-fetch"
],
- "_resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz",
- "_shasum": "3dcb6bb4a546e32969c7ad710f2c79a86abba93a",
+ "_resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.3.tgz",
+ "_shasum": "55f7839307d74859d6e8ada9c3ebe72cec216a34",
"_spec": "minipass-pipeline@^1.2.2",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/npm-registry-fetch/node_modules/make-fetch-happen",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -36,7 +36,7 @@
"deprecated": false,
"description": "create a pipeline of streams using Minipass",
"devDependencies": {
- "tap": "^14.6.4"
+ "tap": "^14.6.9"
},
"engines": {
"node": ">=8"
@@ -56,5 +56,5 @@
"tap": {
"check-coverage": true
},
- "version": "1.2.2"
+ "version": "1.2.3"
}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/.bin/mkdirp b/node_modules/mkdirp-infer-owner/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896ceb..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/CHANGELOG.md b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/CHANGELOG.md
deleted file mode 100644
index 81458380b..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changers Lorgs!
-
-## 1.0
-
-Full rewrite. Essentially a brand new module.
-
-- Return a promise instead of taking a callback.
-- Use native `fs.mkdir(path, { recursive: true })` when available.
-- Drop support for outdated Node.js versions. (Technically still works on
- Node.js v8, but only 10 and above are officially supported.)
-
-## 0.x
-
-Original and most widely used recursive directory creation implementation
-in JavaScript, dating back to 2010.
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/LICENSE b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/bin/cmd.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/index.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/find-made.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492c0..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent)
- return Promise.resolve()
-
- return opts.statAsync(parent).then(
- st => st.isDirectory() ? path : undefined, // will fail later
- er => er.code === 'ENOENT'
- ? findMade(opts, dirname(parent), parent)
- : undefined
- )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
- if (path === parent)
- return undefined
-
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined
- } catch (er) {
- return er.code === 'ENOENT'
- ? findMadeSync(opts, dirname(parent), parent)
- : undefined
- }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd64..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
- opts.recursive = false
- const parent = dirname(path)
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- })
- }
-
- return opts.mkdirAsync(path, opts).then(() => made || path, er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(parent, opts)
- .then(made => mkdirpManual(path, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- return opts.statAsync(path).then(st => {
- if (st.isDirectory())
- return made
- else
- throw er
- }, () => { throw er })
- })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
- const parent = dirname(path)
- opts.recursive = false
-
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts)
- } catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- else
- return
- }
- }
-
- try {
- opts.mkdirSync(path, opts)
- return made || path
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- try {
- if (!opts.statSync(path).isDirectory())
- throw er
- } catch (_) {
- throw er
- }
- }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b6980..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirAsync(path, opts)
-
- return findMade(opts, path).then(made =>
- opts.mkdirAsync(path, opts).then(() => made)
- .catch(er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(path, opts)
- else
- throw er
- }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirSync(path, opts)
-
- const made = findMadeSync(opts, path)
- try {
- opts.mkdirSync(path, opts)
- return made
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts)
- else
- throw er
- }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/opts-arg.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 2fa4833fa..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
- if (!opts)
- opts = { mode: 0o777, fs }
- else if (typeof opts === 'object')
- opts = { mode: 0o777, fs, ...opts }
- else if (typeof opts === 'number')
- opts = { mode: opts, fs }
- else if (typeof opts === 'string')
- opts = { mode: parseInt(opts, 8), fs }
- else
- throw new TypeError('invalid options argument')
-
- opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
- opts.mkdirAsync = promisify(opts.mkdir)
- opts.stat = opts.stat || opts.fs.stat || fs.stat
- opts.statAsync = promisify(opts.stat)
- opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
- opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
- return opts
-}
-module.exports = optsArg
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/path-arg.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5a6..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
- if (/\0/.test(path)) {
- // simulate same failure that node raises
- throw Object.assign(
- new TypeError('path must be a string without null bytes'),
- {
- path,
- code: 'ERR_INVALID_ARG_VALUE',
- }
- )
- }
-
- path = resolve(path)
- if (platform === 'win32') {
- const badWinChars = /[*|"<>?:]/
- const {root} = parse(path)
- if (badWinChars.test(path.substr(root.length))) {
- throw Object.assign(new Error('Illegal characters in path.'), {
- path,
- code: 'EINVAL',
- })
- }
- }
-
- return path
-}
-module.exports = pathArg
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/use-native.js b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361de1..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/package.json b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/package.json
deleted file mode 100644
index 4e9f70cc8..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "_from": "mkdirp@^1.0.3",
- "_id": "mkdirp@1.0.4",
- "_inBundle": false,
- "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "_location": "/mkdirp-infer-owner/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.3",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/mkdirp-infer-owner"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
- "_spec": "mkdirp@^1.0.3",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/mkdirp-infer-owner",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.7"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.4"
-}
diff --git a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/readme.markdown b/node_modules/mkdirp-infer-owner/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/mkdirp-infer-owner/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/mkdirp/.travis.yml b/node_modules/mkdirp/.travis.yml
deleted file mode 100644
index 74c57bf15..000000000
--- a/node_modules/mkdirp/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.12"
- - "iojs"
-before_install:
- - npm install -g npm@~1.4.6
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/CHANGELOG.md b/node_modules/mkdirp/CHANGELOG.md
index 81458380b..81458380b 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/CHANGELOG.md
+++ b/node_modules/mkdirp/CHANGELOG.md
diff --git a/node_modules/mkdirp/LICENSE b/node_modules/mkdirp/LICENSE
index 432d1aeb0..13fcd15f0 100644
--- a/node_modules/mkdirp/LICENSE
+++ b/node_modules/mkdirp/LICENSE
@@ -1,6 +1,6 @@
-Copyright 2010 James Halliday (mail@substack.net)
+Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-This project is free software released under the MIT/X11 license:
+This project is free software released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/mkdirp/README.markdown b/node_modules/mkdirp/README.markdown
index 3cc131538..827de5905 100644
--- a/node_modules/mkdirp/README.markdown
+++ b/node_modules/mkdirp/README.markdown
@@ -1,26 +1,37 @@
# mkdirp
-Like `mkdir -p`, but in node.js!
+Like `mkdir -p`, but in Node.js!
-[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
+Now with a modern API and no\* bugs!
+
+<small>\* may contain some bugs</small>
# example
## pow.js
```js
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
+const mkdirp = require('mkdirp')
+
+// return value is a Promise resolving to the first directory created
+mkdirp('/tmp/foo/bar/baz').then(made =>
+ console.log(`made directories, starting with ${made}`))
```
-Output
+Output (where `/tmp/foo` already exists)
```
-pow!
+made directories, starting with /tmp/foo/bar
+```
+
+Or, if you don't have time to wait around for promises:
+
+```js
+const mkdirp = require('mkdirp')
+
+// return value is the first directory created
+const made = mkdirp.sync('/tmp/foo/bar/baz')
+console.log(`made directories, starting with ${made}`)
```
And now /tmp/foo/bar/baz exists, huzzah!
@@ -28,55 +39,198 @@ And now /tmp/foo/bar/baz exists, huzzah!
# methods
```js
-var mkdirp = require('mkdirp');
+const mkdirp = require('mkdirp')
```
-## mkdirp(dir, opts, cb)
+## mkdirp(dir, [opts]) -> Promise<String | undefined>
Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a non-object, it will be treated as
-the `opts.mode`.
+permission string `opts.mode`. If `opts` is a string or number, it will be
+treated as the `opts.mode`.
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+If `opts.mode` isn't specified, it defaults to `0o777 &
+(~process.umask())`.
-`cb(err, made)` fires with the error or the first directory `made`
-that had to be created, if any.
+Promise resolves to first directory `made` that had to be created, or
+`undefined` if everything already exists. Promise rejects if any errors
+are encountered. Note that, in the case of promise rejection, some
+directories _may_ have been created, as recursive directory creation is not
+an atomic operation.
You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
-`opts.fs.stat(path, cb)`.
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
+and `opts.fs.stat(path, cb)`.
-## mkdirp.sync(dir, opts)
+You can also override just one or the other of `mkdir` and `stat` by
+passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
+only overrides one of these.
-Synchronously create a new directory and any necessary subdirectories at `dir`
-with octal permission string `opts.mode`. If `opts` is a non-object, it will be
-treated as the `opts.mode`.
+## mkdirp.sync(dir, opts) -> String|null
-If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+Synchronously create a new directory and any necessary subdirectories at
+`dir` with octal permission string `opts.mode`. If `opts` is a string or
+number, it will be treated as the `opts.mode`.
-Returns the first directory that had to be created, if any.
+If `opts.mode` isn't specified, it defaults to `0o777 &
+(~process.umask())`.
+
+Returns the first directory that had to be created, or undefined if
+everything already exists.
You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
-`opts.fs.statSync(path)`.
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
+and `opts.fs.statSync(path)`.
+
+You can also override just one or the other of `mkdirSync` and `statSync`
+by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
+option that only overrides one of these.
-# usage
+## mkdirp.manual, mkdirp.manualSync
+
+Use the manual implementation (not the native one). This is the default
+when the native implementation is not available or the stat/mkdir
+implementation is overridden.
+
+## mkdirp.native, mkdirp.nativeSync
+
+Use the native implementation (not the manual one). This is the default
+when the native implementation is available and stat/mkdir are not
+overridden.
+
+# implementation
+
+On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
+{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
+overridden by an option.
+
+## native implementation
+
+- If the path is a root directory, then pass it to the underlying
+ implementation and return the result/error. (In this case, it'll either
+ succeed or fail, but we aren't actually creating any dirs.)
+- Walk up the path statting each directory, to find the first path that
+ will be created, `made`.
+- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
+- If error, raise it to the caller.
+- Return `made`.
+
+## manual implementation
+
+- Call underlying `fs.mkdir` implementation, with `recursive: false`
+- If error:
+ - If path is a root directory, raise to the caller and do not handle it
+ - If ENOENT, mkdirp parent dir, store result as `made`
+ - stat(path)
+ - If error, raise original `mkdir` error
+ - If directory, return `made`
+ - Else, raise original `mkdir` error
+- else
+ - return `undefined` if a root dir, or `made` if set, or `path`
+
+## windows vs unix caveat
+
+On Windows file systems, attempts to create a root directory (ie, a drive
+letter or root UNC path) will fail. If the root directory exists, then it
+will fail with `EPERM`. If the root directory does not exist, then it will
+fail with `ENOENT`.
+
+On posix file systems, attempts to create a root directory (in recursive
+mode) will succeed silently, as it is treated like just another directory
+that already exists. (In non-recursive mode, of course, it fails with
+`EEXIST`.)
+
+In order to preserve this system-specific behavior (and because it's not as
+if we can create the parent of a root directory anyway), attempts to create
+a root directory are passed directly to the `fs` implementation, and any
+errors encountered are not handled.
+
+## native error caveat
+
+The native implementation (as of at least Node.js v13.4.0) does not provide
+appropriate errors in some cases (see
+[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
+[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
+
+In order to work around this issue, the native implementation will fall
+back to the manual implementation if an `ENOENT` error is encountered.
+
+# choosing a recursive mkdir implementation
+
+There are a few to choose from! Use the one that suits your needs best :D
+
+## use `fs.mkdir(path, {recursive: true}, cb)` if:
+
+- You wish to optimize performance even at the expense of other factors.
+- You don't need to know the first dir created.
+- You are ok with getting `ENOENT` as the error when some other problem is
+ the actual cause.
+- You can limit your platforms to Node.js v10.12 and above.
+- You're ok with using callbacks instead of promises.
+- You don't need/want a CLI.
+- You don't need to override the `fs` methods in use.
+
+## use this module (mkdirp 1.x) if:
+
+- You need to know the first directory that was created.
+- You wish to use the native implementation if available, but fall back
+ when it's not.
+- You prefer promise-returning APIs to callback-taking APIs.
+- You want more useful error messages than the native recursive mkdir
+ provides (at least as of Node.js v13.4), and are ok with re-trying on
+ `ENOENT` to achieve this.
+- You need (or at least, are ok with) a CLI.
+- You need to override the `fs` methods in use.
+
+## use [`make-dir`](http://npm.im/make-dir) if:
+
+- You do not need to know the first dir created (and wish to save a few
+ `stat` calls when using the native implementation for this reason).
+- You wish to use the native implementation if available, but fall back
+ when it's not.
+- You prefer promise-returning APIs to callback-taking APIs.
+- You are ok with occasionally getting `ENOENT` errors for failures that
+ are actually related to something other than a missing file system entry.
+- You don't need/want a CLI.
+- You need to override the `fs` methods in use.
+
+## use mkdirp 0.x if:
+
+- You need to know the first directory that was created.
+- You need (or at least, are ok with) a CLI.
+- You need to override the `fs` methods in use.
+- You're ok with using callbacks instead of promises.
+- You are not running on Windows, where the root-level ENOENT errors can
+ lead to infinite regress.
+- You think vinyl just sounds warmer and richer for some weird reason.
+- You are supporting truly ancient Node.js versions, before even the advent
+ of a `Promise` language primitive. (Please don't. You deserve better.)
+
+# cli
This package also ships with a `mkdirp` command.
```
+$ mkdirp -h
+
usage: mkdirp [DIR1,DIR2..] {OPTIONS}
- Create each supplied directory including any necessary parent directories that
- don't yet exist.
-
+ Create each supplied directory including any necessary parent directories
+ that don't yet exist.
+
If the directory already exists, do nothing.
OPTIONS are:
- -m, --mode If a directory needs to be created, set the mode as an octal
- permission string.
+ -m<mode> If a directory needs to be created, set the mode as an octal
+ --mode=<mode> permission string.
+
+ -v --version Print the mkdirp version number
+ -h --help Print this helpful banner
+
+ -p --print Print the first directories created for each path provided
+
+ --manual Use manual implementation, even if native is available
```
# install
@@ -87,13 +241,25 @@ With [npm](http://npmjs.org) do:
npm install mkdirp
```
-to get the library, or
+to get the library locally, or
```
npm install -g mkdirp
```
-to get the command.
+to get the command everywhere, or
+
+```
+npx mkdirp ...
+```
+
+to run the command without installing it globally.
+
+# platform support
+
+This module works on node v8, but only v10 and above are officially
+supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
+the past, as of this writing.
# license
diff --git a/node_modules/mkdirp/bin/cmd.js b/node_modules/mkdirp/bin/cmd.js
index d95de15ae..6e0aa8dc4 100755
--- a/node_modules/mkdirp/bin/cmd.js
+++ b/node_modules/mkdirp/bin/cmd.js
@@ -1,33 +1,68 @@
#!/usr/bin/env node
-var mkdirp = require('../');
-var minimist = require('minimist');
-var fs = require('fs');
-
-var argv = minimist(process.argv.slice(2), {
- alias: { m: 'mode', h: 'help' },
- string: [ 'mode' ]
-});
-if (argv.help) {
- fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
- return;
-}
+const usage = () => `
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories
+ that don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m<mode> If a directory needs to be created, set the mode as an octal
+ --mode=<mode> permission string.
+
+ -v --version Print the mkdirp version number
-var paths = argv._.slice();
-var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
-
-(function next () {
- if (paths.length === 0) return;
- var p = paths.shift();
-
- if (mode === undefined) mkdirp(p, cb)
- else mkdirp(p, mode, cb)
-
- function cb (err) {
- if (err) {
- console.error(err.message);
- process.exit(1);
- }
- else next();
+ -h --help Print this helpful banner
+
+ -p --print Print the first directories created for each path provided
+
+ --manual Use manual implementation, even if native is available
+`
+
+const dirs = []
+const opts = {}
+let print = false
+let dashdash = false
+let manual = false
+for (const arg of process.argv.slice(2)) {
+ if (dashdash)
+ dirs.push(arg)
+ else if (arg === '--')
+ dashdash = true
+ else if (arg === '--manual')
+ manual = true
+ else if (/^-h/.test(arg) || /^--help/.test(arg)) {
+ console.log(usage())
+ process.exit(0)
+ } else if (arg === '-v' || arg === '--version') {
+ console.log(require('../package.json').version)
+ process.exit(0)
+ } else if (arg === '-p' || arg === '--print') {
+ print = true
+ } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
+ const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
+ if (isNaN(mode)) {
+ console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
+ process.exit(1)
}
-})();
+ opts.mode = mode
+ } else
+ dirs.push(arg)
+}
+
+const mkdirp = require('../')
+const impl = manual ? mkdirp.manual : mkdirp
+if (dirs.length === 0)
+ console.error(usage())
+
+Promise.all(dirs.map(dir => impl(dir, opts)))
+ .then(made => print ? made.forEach(m => m && console.log(m)) : null)
+ .catch(er => {
+ console.error(er.message)
+ if (er.code)
+ console.error(' code: ' + er.code)
+ process.exit(1)
+ })
diff --git a/node_modules/mkdirp/examples/pow.js b/node_modules/mkdirp/examples/pow.js
deleted file mode 100644
index e6924212e..000000000
--- a/node_modules/mkdirp/examples/pow.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js
index 6ce241b58..ad7a16c9f 100644
--- a/node_modules/mkdirp/index.js
+++ b/node_modules/mkdirp/index.js
@@ -1,98 +1,31 @@
-var path = require('path');
-var fs = require('fs');
-var _0777 = parseInt('0777', 8);
+const optsArg = require('./lib/opts-arg.js')
+const pathArg = require('./lib/path-arg.js')
-module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
+const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
+const {useNative, useNativeSync} = require('./lib/use-native.js')
-function mkdirP (p, opts, f, made) {
- if (typeof opts === 'function') {
- f = opts;
- opts = {};
- }
- else if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- var cb = f || function () {};
- p = path.resolve(p);
-
- xfs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
- switch (er.code) {
- case 'ENOENT':
- mkdirP(path.dirname(p), opts, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, opts, cb, made);
- });
- break;
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- xfs.stat(p, function (er2, stat) {
- // if the stat fails, then that's super weird.
- // let the original error be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
- });
- break;
- }
- });
+const mkdirp = (path, opts) => {
+ path = pathArg(path)
+ opts = optsArg(opts)
+ return useNative(opts)
+ ? mkdirpNative(path, opts)
+ : mkdirpManual(path, opts)
}
-mkdirP.sync = function sync (p, opts, made) {
- if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- p = path.resolve(p);
-
- try {
- xfs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), opts, made);
- sync(p, opts, made);
- break;
+const mkdirpSync = (path, opts) => {
+ path = pathArg(path)
+ opts = optsArg(opts)
+ return useNativeSync(opts)
+ ? mkdirpNativeSync(path, opts)
+ : mkdirpManualSync(path, opts)
+}
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- var stat;
- try {
- stat = xfs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- }
- }
+mkdirp.sync = mkdirpSync
+mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
+mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
+mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
+mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
- return made;
-};
+module.exports = mkdirp
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/find-made.js b/node_modules/mkdirp/lib/find-made.js
index 022e492c0..022e492c0 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/find-made.js
+++ b/node_modules/mkdirp/lib/find-made.js
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/mkdirp/lib/mkdirp-manual.js
index 2eb18cd64..2eb18cd64 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-manual.js
+++ b/node_modules/mkdirp/lib/mkdirp-manual.js
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/mkdirp/lib/mkdirp-native.js
index c7a6b6980..c7a6b6980 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/mkdirp-native.js
+++ b/node_modules/mkdirp/lib/mkdirp-native.js
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/opts-arg.js b/node_modules/mkdirp/lib/opts-arg.js
index 2fa4833fa..2fa4833fa 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/opts-arg.js
+++ b/node_modules/mkdirp/lib/opts-arg.js
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/path-arg.js b/node_modules/mkdirp/lib/path-arg.js
index cc07de5a6..cc07de5a6 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/path-arg.js
+++ b/node_modules/mkdirp/lib/path-arg.js
diff --git a/node_modules/@npmcli/git/node_modules/mkdirp/lib/use-native.js b/node_modules/mkdirp/lib/use-native.js
index 079361de1..079361de1 100644
--- a/node_modules/@npmcli/git/node_modules/mkdirp/lib/use-native.js
+++ b/node_modules/mkdirp/lib/use-native.js
diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json
index aa7b90611..857c89f4b 100644
--- a/node_modules/mkdirp/package.json
+++ b/node_modules/mkdirp/package.json
@@ -1,80 +1,76 @@
{
- "_args": [
- [
- "mkdirp@0.5.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "mkdirp@0.5.1",
- "_id": "mkdirp@0.5.1",
+ "_from": "mkdirp@latest",
+ "_id": "mkdirp@1.0.4",
"_inBundle": false,
- "_integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"_location": "/mkdirp",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "tag",
"registry": true,
- "raw": "mkdirp@0.5.1",
+ "raw": "mkdirp@latest",
"name": "mkdirp",
"escapedName": "mkdirp",
- "rawSpec": "0.5.1",
+ "rawSpec": "latest",
"saveSpec": null,
- "fetchSpec": "0.5.1"
+ "fetchSpec": "latest"
},
"_requiredBy": [
- "/",
- "/cacache",
- "/cmd-shim",
- "/copy-concurrently",
- "/eslint",
- "/fstream",
- "/gentle-fs",
- "/move-concurrently",
- "/node-gyp",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache",
- "/pacote",
- "/tacks",
- "/tap",
- "/tar",
- "/write"
+ "#USER",
+ "/"
],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "_spec": "0.5.1",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
+ "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
+ "_spec": "mkdirp@latest",
+ "_where": "/Users/isaacs/dev/npm/cli",
"bin": {
"mkdirp": "bin/cmd.js"
},
"bugs": {
- "url": "https://github.com/substack/node-mkdirp/issues"
- },
- "dependencies": {
- "minimist": "0.0.8"
+ "url": "https://github.com/isaacs/node-mkdirp/issues"
},
+ "bundleDependencies": false,
+ "deprecated": false,
"description": "Recursively mkdir, like `mkdir -p`",
"devDependencies": {
- "mock-fs": "2 >=2.7.0",
- "tap": "1"
+ "require-inject": "^1.4.4",
+ "tap": "^14.10.7"
},
- "homepage": "https://github.com/substack/node-mkdirp#readme",
+ "engines": {
+ "node": ">=10"
+ },
+ "files": [
+ "bin",
+ "lib",
+ "index.js"
+ ],
+ "homepage": "https://github.com/isaacs/node-mkdirp#readme",
"keywords": [
"mkdir",
- "directory"
+ "directory",
+ "make dir",
+ "make",
+ "dir",
+ "recursive",
+ "native"
],
"license": "MIT",
"main": "index.js",
"name": "mkdirp",
"repository": {
"type": "git",
- "url": "git+https://github.com/substack/node-mkdirp.git"
+ "url": "git+https://github.com/isaacs/node-mkdirp.git"
},
"scripts": {
- "test": "tap test/*.js"
+ "postpublish": "git push origin --follow-tags",
+ "postversion": "npm publish",
+ "preversion": "npm test",
+ "snap": "tap",
+ "test": "tap"
+ },
+ "tap": {
+ "check-coverage": true,
+ "coverage-map": "map.js"
},
- "version": "0.5.1"
+ "version": "1.0.4"
}
diff --git a/node_modules/mkdirp/test/chmod.js b/node_modules/mkdirp/test/chmod.js
deleted file mode 100644
index 6a404b932..000000000
--- a/node_modules/mkdirp/test/chmod.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-var _0744 = parseInt('0744', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-test('chmod-pre', function (t) {
- var mode = _0744
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.equal(stat && stat.mode & _0777, mode, 'should be 0744');
- t.end();
- });
- });
-});
-
-test('chmod', function (t) {
- var mode = _0755
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.end();
- });
- });
-});
diff --git a/node_modules/mkdirp/test/clobber.js b/node_modules/mkdirp/test/clobber.js
deleted file mode 100644
index 2433b9ad5..000000000
--- a/node_modules/mkdirp/test/clobber.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-// a file in the way
-var itw = ps.slice(0, 3).join('/');
-
-
-test('clobber-pre', function (t) {
- console.error("about to write to "+itw)
- fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
-
- fs.stat(itw, function (er, stat) {
- t.ifError(er)
- t.ok(stat && stat.isFile(), 'should be file')
- t.end()
- })
-})
-
-test('clobber', function (t) {
- t.plan(2);
- mkdirp(file, _0755, function (err) {
- t.ok(err);
- t.equal(err.code, 'ENOTDIR');
- t.end();
- });
-});
diff --git a/node_modules/mkdirp/test/mkdirp.js b/node_modules/mkdirp/test/mkdirp.js
deleted file mode 100644
index eaa8921c7..000000000
--- a/node_modules/mkdirp/test/mkdirp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('woo', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/node_modules/mkdirp/test/opts_fs.js b/node_modules/mkdirp/test/opts_fs.js
deleted file mode 100644
index 97186b62e..000000000
--- a/node_modules/mkdirp/test/opts_fs.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs', function (t) {
- t.plan(5);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp(file, { fs: xfs, mode: _0755 }, function (err) {
- t.ifError(err);
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
- });
-});
diff --git a/node_modules/mkdirp/test/opts_fs_sync.js b/node_modules/mkdirp/test/opts_fs_sync.js
deleted file mode 100644
index 6c370aa6e..000000000
--- a/node_modules/mkdirp/test/opts_fs_sync.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var test = require('tap').test;
-var mockfs = require('mock-fs');
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('opts.fs sync', function (t) {
- t.plan(4);
-
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/beep/boop/' + [x,y,z].join('/');
- var xfs = mockfs.fs();
-
- mkdirp.sync(file, { fs: xfs, mode: _0755 });
- xfs.exists(file, function (ex) {
- t.ok(ex, 'created file');
- xfs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/mkdirp/test/perm.js b/node_modules/mkdirp/test/perm.js
deleted file mode 100644
index fbce44b82..000000000
--- a/node_modules/mkdirp/test/perm.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('async perm', function (t) {
- t.plan(5);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
-
-test('async root perm', function (t) {
- mkdirp('/tmp', _0755, function (err) {
- if (err) t.fail(err);
- t.end();
- });
- t.end();
-});
diff --git a/node_modules/mkdirp/test/perm_sync.js b/node_modules/mkdirp/test/perm_sync.js
deleted file mode 100644
index 398229fe5..000000000
--- a/node_modules/mkdirp/test/perm_sync.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync perm', function (t) {
- t.plan(4);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
-
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
-
-test('sync root perm', function (t) {
- t.plan(3);
-
- var file = '/tmp';
- mkdirp.sync(file, _0755);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- });
-});
diff --git a/node_modules/mkdirp/test/race.js b/node_modules/mkdirp/test/race.js
deleted file mode 100644
index b0b9e183c..000000000
--- a/node_modules/mkdirp/test/race.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('race', function (t) {
- t.plan(10);
- var ps = [ '', 'tmp' ];
-
- for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
- }
- var file = ps.join('/');
-
- var res = 2;
- mk(file);
-
- mk(file);
-
- function mk (file, cb) {
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
- }
-});
diff --git a/node_modules/mkdirp/test/rel.js b/node_modules/mkdirp/test/rel.js
deleted file mode 100644
index 4ddb34276..000000000
--- a/node_modules/mkdirp/test/rel.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('rel', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var cwd = process.cwd();
- process.chdir('/tmp');
-
- var file = [x,y,z].join('/');
-
- mkdirp(file, _0755, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- process.chdir(cwd);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- })
- })
- });
-});
diff --git a/node_modules/mkdirp/test/return.js b/node_modules/mkdirp/test/return.js
deleted file mode 100644
index bce68e561..000000000
--- a/node_modules/mkdirp/test/return.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, '/tmp/' + x);
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, null);
- });
- });
-});
diff --git a/node_modules/mkdirp/test/return_sync.js b/node_modules/mkdirp/test/return_sync.js
deleted file mode 100644
index 7c222d355..000000000
--- a/node_modules/mkdirp/test/return_sync.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- // Note that this will throw on failure, which will fail the test.
- var made = mkdirp.sync(file);
- t.equal(made, '/tmp/' + x);
-
- // making the same file again should have no effect.
- made = mkdirp.sync(file);
- t.equal(made, null);
-});
diff --git a/node_modules/mkdirp/test/root.js b/node_modules/mkdirp/test/root.js
deleted file mode 100644
index 9e7d079d9..000000000
--- a/node_modules/mkdirp/test/root.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-var _0755 = parseInt('0755', 8);
-
-test('root', function (t) {
- // '/' on unix, 'c:/' on windows.
- var file = path.resolve('/');
-
- mkdirp(file, _0755, function (err) {
- if (err) throw err
- fs.stat(file, function (er, stat) {
- if (er) throw er
- t.ok(stat.isDirectory(), 'target is a directory');
- t.end();
- })
- });
-});
diff --git a/node_modules/mkdirp/test/sync.js b/node_modules/mkdirp/test/sync.js
deleted file mode 100644
index 8c8dc938c..000000000
--- a/node_modules/mkdirp/test/sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('sync', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file, _0755);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/mkdirp/test/umask.js b/node_modules/mkdirp/test/umask.js
deleted file mode 100644
index 2033c63a4..000000000
--- a/node_modules/mkdirp/test/umask.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('implicit mode from umask', function (t) {
- t.plan(5);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, function (err) {
- t.ifError(err);
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, _0777 & (~process.umask()));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- })
- });
-});
diff --git a/node_modules/mkdirp/test/umask_sync.js b/node_modules/mkdirp/test/umask_sync.js
deleted file mode 100644
index 11a761474..000000000
--- a/node_modules/mkdirp/test/umask_sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var exists = fs.exists || path.exists;
-var test = require('tap').test;
-var _0777 = parseInt('0777', 8);
-var _0755 = parseInt('0755', 8);
-
-test('umask sync modes', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- exists(file, function (ex) {
- t.ok(ex, 'file created');
- fs.stat(file, function (err, stat) {
- t.ifError(err);
- t.equal(stat.mode & _0777, (_0777 & (~process.umask())));
- t.ok(stat.isDirectory(), 'target not a directory');
- });
- });
-});
diff --git a/node_modules/move-concurrently/LICENSE b/node_modules/move-concurrently/LICENSE
deleted file mode 100644
index 83e7c4c62..000000000
--- a/node_modules/move-concurrently/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/move-concurrently/README.md b/node_modules/move-concurrently/README.md
deleted file mode 100644
index 0e6e9b9ea..000000000
--- a/node_modules/move-concurrently/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# move-concurrently
-
-Move files and directories.
-
-```
-const move = require('move-concurrently')
-move('/path/to/thing', '/new/path/thing').then(() => {
- // thing is now moved!
-}).catch(err => {
- // oh no!
-})
-```
-
-Uses `rename` to move things as fast as possible.
-
-If you `move` across devices or on filesystems that don't support renaming
-large directories. That is, situations that result in `rename` returning
-the `EXDEV` error, then `move` will fallback to copy + delete.
-
-When recursively copying directories it will first try to rename the
-contents before falling back to copying. While this will be slightly slower
-in true cross-device scenarios, it is MUCH faster in cases where the
-filesystem can't handle directory renames.
-
-When copying ownership is maintained when running as root. Permissions are
-always maintained. On Windows, if symlinks are unavailable then junctions
-will be used.
-
-## INTERFACE
-
-### move(from, to, options) → Promise
-
-Recursively moves `from` to `to` and resolves its promise when finished.
-If `to` already exists then the promise will be rejected with an `EEXIST`
-error.
-
-Starts by trying to rename `from` to `to`.
-
-Options are:
-
-* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once.
-* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
- an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
- fails then we'll try making a junction instead.
-
-Options can also include dependency injection:
-
-* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
-* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
- to use `graceful-fs` or to inject a mock.
-* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
- implementation of `writeStreamAtomic` to use. Used to inject a mock.
-* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.
diff --git a/node_modules/move-concurrently/move.js b/node_modules/move-concurrently/move.js
deleted file mode 100644
index 6a2a7332c..000000000
--- a/node_modules/move-concurrently/move.js
+++ /dev/null
@@ -1,84 +0,0 @@
-'use strict'
-module.exports = move
-
-var nodeFs = require('fs')
-var rimraf = require('rimraf')
-var validate = require('aproba')
-var copy = require('copy-concurrently')
-var RunQueue = require('run-queue')
-var extend = Object.assign || require('util')._extend
-
-function promisify (Promise, fn) {
- return function () {
- var args = [].slice.call(arguments)
- return new Promise(function (resolve, reject) {
- return fn.apply(null, args.concat(function (err, value) {
- if (err) {
- reject(err)
- } else {
- resolve(value)
- }
- }))
- })
- }
-}
-
-function move (from, to, opts) {
- validate('SSO|SS', arguments)
- opts = extend({}, opts || {})
-
- var Promise = opts.Promise || global.Promise
- var fs = opts.fs || nodeFs
- var rimrafAsync = promisify(Promise, rimraf)
- var renameAsync = promisify(Promise, fs.rename)
-
- opts.top = from
-
- var queue = new RunQueue({
- maxConcurrency: opts.maxConcurrency,
- Promise: Promise
- })
- opts.queue = queue
- opts.recurseWith = rename
-
- queue.add(0, rename, [from, to, opts])
-
- return queue.run().then(function () {
- return remove(from)
- }, function (err) {
- // if the target already exists don't clobber it
- if (err.code === 'EEXIST' || err.code === 'EPERM') {
- return passThroughError()
- } else {
- return remove(to).then(passThroughError, passThroughError)
- }
- function passThroughError () {
- return Promise.reject(err)
- }
- })
-
- function remove (target) {
- var opts = {
- unlink: fs.unlink,
- chmod: fs.chmod,
- stat: fs.stat,
- lstat: fs.lstat,
- rmdir: fs.rmdir,
- readdir: fs.readdir,
- glob: false
- }
- return rimrafAsync(target, opts)
- }
-
- function rename (from, to, opts, done) {
- return renameAsync(from, to).catch(function (err) {
- if (err.code !== 'EXDEV') {
- return Promise.reject(err)
- } else {
- return remove(to).then(function () {
- return copy.item(from, to, opts)
- })
- }
- })
- }
-}
diff --git a/node_modules/move-concurrently/node_modules/aproba/LICENSE b/node_modules/move-concurrently/node_modules/aproba/LICENSE
deleted file mode 100644
index f4be44d88..000000000
--- a/node_modules/move-concurrently/node_modules/aproba/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/move-concurrently/node_modules/aproba/README.md b/node_modules/move-concurrently/node_modules/aproba/README.md
deleted file mode 100644
index 0bfc594c5..000000000
--- a/node_modules/move-concurrently/node_modules/aproba/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-aproba
-======
-
-A ridiculously light-weight function argument validator
-
-```
-var validate = require("aproba")
-
-function myfunc(a, b, c) {
- // `a` must be a string, `b` a number, `c` a function
- validate('SNF', arguments) // [a,b,c] is also valid
-}
-
-myfunc('test', 23, function () {}) // ok
-myfunc(123, 23, function () {}) // type error
-myfunc('test', 23) // missing arg error
-myfunc('test', 23, function () {}, true) // too many args error
-
-```
-
-Valid types are:
-
-| type | description
-| :--: | :----------
-| * | matches any type
-| A | `Array.isArray` OR an `arguments` object
-| S | typeof == string
-| N | typeof == number
-| F | typeof == function
-| O | typeof == object and not type A and not type E
-| B | typeof == boolean
-| E | `instanceof Error` OR `null` **(special: see below)**
-| Z | == `null`
-
-Validation failures throw one of three exception types, distinguished by a
-`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
-
-If you pass in an invalid type then it will throw with a code of
-`EUNKNOWNTYPE`.
-
-If an **error** argument is found and is not null then the remaining
-arguments are optional. That is, if you say `ESO` then that's like using a
-non-magical `E` in: `E|ESO|ZSO`.
-
-### But I have optional arguments?!
-
-You can provide more than one signature by separating them with pipes `|`.
-If any signature matches the arguments then they'll be considered valid.
-
-So for example, say you wanted to write a signature for
-`fs.createWriteStream`. The docs for it describe it thusly:
-
-```
-fs.createWriteStream(path[, options])
-```
-
-This would be a signature of `SO|S`. That is, a string and and object, or
-just a string.
-
-Now, if you read the full `fs` docs, you'll see that actually path can ALSO
-be a buffer. And options can be a string, that is:
-```
-path <String> | <Buffer>
-options <String> | <Object>
-```
-
-To reproduce this you have to fully enumerate all of the possible
-combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
-awkwardness is a feature: It reminds you of the complexity you're adding to
-your API when you do this sort of thing.
-
-
-### Browser support
-
-This has no dependencies and should work in browsers, though you'll have
-noisier stack traces.
-
-### Why this exists
-
-I wanted a very simple argument validator. It needed to do two things:
-
-1. Be more concise and easier to use than assertions
-
-2. Not encourage an infinite bikeshed of DSLs
-
-This is why types are specified by a single character and there's no such
-thing as an optional argument.
-
-This is not intended to validate user data. This is specifically about
-asserting the interface of your functions.
-
-If you need greater validation, I encourage you to write them by hand or
-look elsewhere.
-
diff --git a/node_modules/move-concurrently/node_modules/aproba/index.js b/node_modules/move-concurrently/node_modules/aproba/index.js
deleted file mode 100644
index 6f3f797c0..000000000
--- a/node_modules/move-concurrently/node_modules/aproba/index.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-function isArguments (thingy) {
- return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
-}
-
-var types = {
- '*': {label: 'any', check: function () { return true }},
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
-}
-
-function addSchema (schema, arity) {
- var group = arity[schema.length] = arity[schema.length] || []
- if (group.indexOf(schema) === -1) group.push(schema)
-}
-
-var validate = module.exports = function (rawSchemas, args) {
- if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
- if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
- if (!args) throw missingRequiredArg(1, 'args')
- if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
- if (!types.A.check(args)) throw invalidType(1, ['array'], args)
- var schemas = rawSchemas.split('|')
- var arity = {}
-
- schemas.forEach(function (schema) {
- for (var ii = 0; ii < schema.length; ++ii) {
- var type = schema[ii]
- if (!types[type]) throw unknownType(ii, type)
- }
- if (/E.*E/.test(schema)) throw moreThanOneError(schema)
- addSchema(schema, arity)
- if (/E/.test(schema)) {
- addSchema(schema.replace(/E.*$/, 'E'), arity)
- addSchema(schema.replace(/E/, 'Z'), arity)
- if (schema.length === 1) addSchema('', arity)
- }
- })
- var matching = arity[args.length]
- if (!matching) {
- throw wrongNumberOfArgs(Object.keys(arity), args.length)
- }
- for (var ii = 0; ii < args.length; ++ii) {
- var newMatching = matching.filter(function (schema) {
- var type = schema[ii]
- var typeCheck = types[type].check
- return typeCheck(args[ii])
- })
- if (!newMatching.length) {
- var labels = matching.map(function (schema) {
- return types[schema[ii]].label
- }).filter(function (schema) { return schema != null })
- throw invalidType(ii, labels, args[ii])
- }
- matching = newMatching
- }
-}
-
-function missingRequiredArg (num) {
- return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
-}
-
-function unknownType (num, type) {
- return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
-}
-
-function invalidType (num, expectedTypes, value) {
- var valueType
- Object.keys(types).forEach(function (typeCode) {
- if (types[typeCode].check(value)) valueType = types[typeCode].label
- })
- return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
- englishList(expectedTypes) + ' but got ' + valueType)
-}
-
-function englishList (list) {
- return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
-}
-
-function wrongNumberOfArgs (expected, got) {
- var english = englishList(expected)
- var args = expected.every(function (ex) { return ex.length === 1 })
- ? 'argument'
- : 'arguments'
- return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
-}
-
-function moreThanOneError (schema) {
- return newException('ETOOMANYERRORTYPES',
- 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
-}
-
-function newException (code, msg) {
- var e = new Error(msg)
- e.code = code
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
- return e
-}
diff --git a/node_modules/move-concurrently/node_modules/aproba/package.json b/node_modules/move-concurrently/node_modules/aproba/package.json
deleted file mode 100644
index eba0d3e6e..000000000
--- a/node_modules/move-concurrently/node_modules/aproba/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "aproba@^1.1.1",
- "_id": "aproba@1.2.0",
- "_inBundle": false,
- "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
- "_location": "/move-concurrently/aproba",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "aproba@^1.1.1",
- "name": "aproba",
- "escapedName": "aproba",
- "rawSpec": "^1.1.1",
- "saveSpec": null,
- "fetchSpec": "^1.1.1"
- },
- "_requiredBy": [
- "/move-concurrently"
- ],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
- "_spec": "aproba@^1.1.1",
- "_where": "/Users/aeschright/code/cli/node_modules/move-concurrently",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- },
- "bugs": {
- "url": "https://github.com/iarna/aproba/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A ridiculously light-weight argument validator (now browser friendly)",
- "devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.0.2"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/iarna/aproba",
- "keywords": [
- "argument",
- "validate"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "aproba",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/aproba.git"
- },
- "scripts": {
- "test": "standard && tap -j3 test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/node_modules/move-concurrently/package.json b/node_modules/move-concurrently/package.json
deleted file mode 100644
index 52595211c..000000000
--- a/node_modules/move-concurrently/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_args": [
- [
- "move-concurrently@1.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "move-concurrently@1.0.1",
- "_id": "move-concurrently@1.0.1",
- "_inBundle": false,
- "_integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
- "_location": "/move-concurrently",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "move-concurrently@1.0.1",
- "name": "move-concurrently",
- "escapedName": "move-concurrently",
- "rawSpec": "1.0.1",
- "saveSpec": null,
- "fetchSpec": "1.0.1"
- },
- "_requiredBy": [
- "/",
- "/cacache",
- "/npm-profile/cacache",
- "/npm-registry-fetch/cacache"
- ],
- "_resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
- "_spec": "1.0.1",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org",
- "url": "http://re-becca.org/"
- },
- "bugs": {
- "url": "https://github.com/npm/move-concurrently/issues"
- },
- "dependencies": {
- "aproba": "^1.1.1",
- "copy-concurrently": "^1.0.0",
- "fs-write-stream-atomic": "^1.0.8",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.4",
- "run-queue": "^1.0.3"
- },
- "description": "Promises of moves of files or directories with rename, falling back to recursive rename/copy on EXDEV errors, with configurable concurrency and win32 junction support.",
- "devDependencies": {
- "standard": "^8.6.0",
- "tacks": "^1.2.6",
- "tap": "^10.1.1"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "move.js",
- "is-windows.js"
- ],
- "homepage": "https://www.npmjs.com/package/move-concurrently",
- "keywords": [
- "move"
- ],
- "license": "ISC",
- "main": "move.js",
- "name": "move-concurrently",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/move-concurrently.git"
- },
- "scripts": {
- "test": "standard && tap --coverage test"
- },
- "version": "1.0.1"
-}
diff --git a/node_modules/node-gyp/.travis.yml b/node_modules/node-gyp/.travis.yml
index e43ba548f..c281373ec 100644
--- a/node_modules/node-gyp/.travis.yml
+++ b/node_modules/node-gyp/.travis.yml
@@ -1,33 +1,17 @@
dist: xenial
language: python
cache: pip
-matrix:
+addons:
+ homebrew:
+ update: true
+ packages:
+ - npm
+ - pyenv
+jobs:
include:
- name: "Python 2.7 on Linux"
env: NODE_GYP_FORCE_PYTHON=python2
python: 2.7
- - name: "Python 2.7 on macOS"
- os: osx
- osx_image: xcode11.2
- language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python2
- before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew install npm
- - name: "Node.js 6 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 6 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
- - name: "Node.js 12 & Python 2.7 on Windows"
- os: windows
- language: node_js
- node_js: 12 # node
- env: >-
- PATH=/c/Python27:/c/Python27/Scripts:$PATH
- NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
- before_install: choco install python2
- name: "Node.js 6 & Python 3.8 on Linux"
python: 3.8
@@ -41,6 +25,7 @@ matrix:
python: 3.8
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 10
+
- name: "Node.js 12 & Python 3.5 on Linux"
python: 3.5
env: NODE_GYP_FORCE_PYTHON=python3
@@ -58,12 +43,36 @@ matrix:
env: NODE_GYP_FORCE_PYTHON=python3
before_install: nvm install 12
- - name: "Python 3.7 on macOS"
+ - name: "Python 2.7 on macOS"
os: osx
osx_image: xcode11.2
language: shell # 'language: python' is not yet supported on macOS
- env: NODE_GYP_FORCE_PYTHON=python3
- before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade npm || true
+ env: NODE_GYP_FORCE_PYTHON=python2 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=2.7.17
+ before_install: pyenv install $PYENV_VERSION
+ - name: "Python 3.8 on macOS"
+ os: osx
+ osx_image: xcode11.2
+ language: shell # 'language: python' is not yet supported on macOS
+ env: NODE_GYP_FORCE_PYTHON=python3 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=3.8.0
+ before_install: pyenv install $PYENV_VERSION
+
+ - name: "Node.js 6 & Python 2.7 on Windows"
+ os: windows
+ language: node_js
+ node_js: 6 # node
+ env: >-
+ PATH=/c/Python27:/c/Python27/Scripts:$PATH
+ NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
+ before_install: choco install python2
+ - name: "Node.js 12 & Python 2.7 on Windows"
+ os: windows
+ language: node_js
+ node_js: 12 # node
+ env: >-
+ PATH=/c/Python27:/c/Python27/Scripts:$PATH
+ NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe
+ before_install: choco install python2
+
- name: "Node.js 12 & Python 3.7 on Windows"
os: windows
language: node_js
@@ -82,20 +91,19 @@ matrix:
before_install: choco install python
install:
- #- pip install -r requirements.txt
- - pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
+ - python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
before_script:
- - flake8 --version
+ - python -m flake8 --version
# stop the build if there are Python syntax errors or undefined names
- - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ - python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide
- - flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
+ - python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
- npm install
- npm list
script:
- node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
- npm test
- - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest
+ - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
notifications:
on_success: change
on_failure: change # `always` will be the setting once code changes slow down
diff --git a/node_modules/node-gyp/CHANGELOG.md b/node_modules/node-gyp/CHANGELOG.md
index 28f523779..80da1b1e9 100644
--- a/node_modules/node-gyp/CHANGELOG.md
+++ b/node_modules/node-gyp/CHANGELOG.md
@@ -1,7 +1,51 @@
-v5.0.7 2019-12-16
+v6.1.0 2019-01-08
=================
-Republish of v5.0.6 with unnecessary tarball removed from pack file.
+* [[`9a7dd16b76`](https://github.com/nodejs/node-gyp/commit/9a7dd16b76)] - **doc**: remove backticks from Python version list (Rod Vagg) [#2011](https://github.com/nodejs/node-gyp/pull/2011)
+* [[`26cd6eaea6`](https://github.com/nodejs/node-gyp/commit/26cd6eaea6)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
+* [[`312c12ef4f`](https://github.com/nodejs/node-gyp/commit/312c12ef4f)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
+* [[`f7b6b6b77b`](https://github.com/nodejs/node-gyp/commit/f7b6b6b77b)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
+* [[`6b8f2652dd`](https://github.com/nodejs/node-gyp/commit/6b8f2652dd)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
+* [[`20aa0b44f7`](https://github.com/nodejs/node-gyp/commit/20aa0b44f7)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962)
+* [[`14f2a07a39`](https://github.com/nodejs/node-gyp/commit/14f2a07a39)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
+* [[`f242ce4d2c`](https://github.com/nodejs/node-gyp/commit/f242ce4d2c)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
+* [[`3bcba2a01a`](https://github.com/nodejs/node-gyp/commit/3bcba2a01a)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
+* [[`470cc2178e`](https://github.com/nodejs/node-gyp/commit/470cc2178e)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
+* [[`31ecc8421d`](https://github.com/nodejs/node-gyp/commit/31ecc8421d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
+* [[`5a729e86ee`](https://github.com/nodejs/node-gyp/commit/5a729e86ee)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
+* [[`345c70e56d`](https://github.com/nodejs/node-gyp/commit/345c70e56d)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
+* [[`d6a7e0e1fb`](https://github.com/nodejs/node-gyp/commit/d6a7e0e1fb)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
+* [[`5a64e9bd32`](https://github.com/nodejs/node-gyp/commit/5a64e9bd32)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
+* [[`04da736d38`](https://github.com/nodejs/node-gyp/commit/04da736d38)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961)
+* [[`0670e5189d`](https://github.com/nodejs/node-gyp/commit/0670e5189d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
+* [[`c506a6a150`](https://github.com/nodejs/node-gyp/commit/c506a6a150)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
+
+v6.0.1 2019-11-01
+=================
+
+* [[`8ec2e681d5`](https://github.com/nodejs/node-gyp/commit/8ec2e681d5)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940)
+* [[`1b11be63cc`](https://github.com/nodejs/node-gyp/commit/1b11be63cc)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925)
+* [[`c0282daa48`](https://github.com/nodejs/node-gyp/commit/c0282daa48)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947)
+* [[`d8e09a1b6a`](https://github.com/nodejs/node-gyp/commit/d8e09a1b6a)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944)
+* [[`9c0f3404f0`](https://github.com/nodejs/node-gyp/commit/9c0f3404f0)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939)
+* [[`bb2eb72a3f`](https://github.com/nodejs/node-gyp/commit/bb2eb72a3f)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937)
+* [[`f0693413d9`](https://github.com/nodejs/node-gyp/commit/f0693413d9)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934)
+* [[`c60c22de58`](https://github.com/nodejs/node-gyp/commit/c60c22de58)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920)
+* [[`b91718eefc`](https://github.com/nodejs/node-gyp/commit/b91718eefc)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923)
+* [[`3538a317b6`](https://github.com/nodejs/node-gyp/commit/3538a317b6)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919)
+* [[`4fff8458c0`](https://github.com/nodejs/node-gyp/commit/4fff8458c0)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
+* [[`60e4488f08`](https://github.com/nodejs/node-gyp/commit/60e4488f08)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
+* [[`032db2a2d0`](https://github.com/nodejs/node-gyp/commit/032db2a2d0)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926)
+* [[`5a83630c33`](https://github.com/nodejs/node-gyp/commit/5a83630c33)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921)
+
+v6.0.0 2019-10-04
+=================
+
+* [[`dd0e97ef0b`](https://github.com/nodejs/node-gyp/commit/dd0e97ef0b)] - **(SEMVER-MAJOR)** **lib**: try to find `python` after `python3` (Sam Roberts) [#1907](https://github.com/nodejs/node-gyp/pull/1907)
+* [[`f60ed47d14`](https://github.com/nodejs/node-gyp/commit/f60ed47d14)] - **travis**: add Python 3.5 and 3.6 tests on Linux (Christian Clauss) [#1903](https://github.com/nodejs/node-gyp/pull/1903)
+* [[`c763ca1838`](https://github.com/nodejs/node-gyp/commit/c763ca1838)] - **(SEMVER-MAJOR)** **doc**: Declare that node-gyp is Python 3 compatible (cclauss) [#1811](https://github.com/nodejs/node-gyp/pull/1811)
+* [[`3d1c60ab81`](https://github.com/nodejs/node-gyp/commit/3d1c60ab81)] - **(SEMVER-MAJOR)** **lib**: accept Python 3 by default (João Reis) [#1844](https://github.com/nodejs/node-gyp/pull/1844)
+* [[`c6e3b65a23`](https://github.com/nodejs/node-gyp/commit/c6e3b65a23)] - **(SEMVER-MAJOR)** **lib**: raise the minimum Python version from 2.6 to 2.7 (cclauss) [#1818](https://github.com/nodejs/node-gyp/pull/1818)
v5.0.6 2019-12-16
=================
diff --git a/node_modules/node-gyp/README.md b/node_modules/node-gyp/README.md
index e39c5de8e..79abf4ba7 100644
--- a/node_modules/node-gyp/README.md
+++ b/node_modules/node-gyp/README.md
@@ -1,5 +1,8 @@
# `node-gyp` - Node.js native addon build tool
+[![Travis CI](https://travis-ci.com/nodejs/node-gyp.svg?branch=master)](https://travis-ci.com/nodejs/node-gyp)
+[![Build Status](https://github.com/nodejs/node-gyp/workflows/Python_tests/badge.svg)](https://github.com/nodejs/node-gyp/actions?workflow=Python_tests)
+
`node-gyp` is a cross-platform command-line tool written in Node.js for
compiling native addon modules for Node.js. It contains a fork of the
[gyp](https://gyp.gsrc.io) project that was previously used by the Chromium
@@ -14,7 +17,7 @@ etc.), regardless of what version of Node.js is actually installed on your syste
## Features
* The same build commands work on any of the supported platforms
- * Supports the targetting of different versions of Node.js
+ * Supports the targeting of different versions of Node.js
## Installation
@@ -191,7 +194,8 @@ Some additional resources for Node.js native addons and writing `gyp` configurat
| `--devdir=$path` | SDK download directory (default is OS cache directory)
| `--ensure` | Don't reinstall headers if already present
| `--dist-url=$url` | Download header tarball from custom URL
-| `--proxy=$url` | Set HTTP proxy for downloading header tarball
+| `--proxy=$url` | Set HTTP(S) proxy for downloading header tarball
+| `--noproxy=$urls` | Set urls to ignore proxies when downloading header tarball
| `--cafile=$cafile` | Override default CA chain (to download tarball)
| `--nodedir=$path` | Set the path to the node source code
| `--python=$path` | Set path to the Python binary
diff --git a/node_modules/node-gyp/gyp/pylib/gyp/input.py b/node_modules/node-gyp/gyp/pylib/gyp/input.py
index 2973c078f..d1742800a 100644
--- a/node_modules/node-gyp/gyp/pylib/gyp/input.py
+++ b/node_modules/node-gyp/gyp/pylib/gyp/input.py
@@ -2286,7 +2286,7 @@ def SetUpConfigurations(target, target_dict):
merged_configurations[configuration])
# Now drop all the abstract ones.
- for configuration in target_dict['configurations'].keys():
+ for configuration in list(target_dict['configurations']):
old_configuration_dict = target_dict['configurations'][configuration]
if old_configuration_dict.get('abstract'):
del target_dict['configurations'][configuration]
diff --git a/node_modules/node-gyp/lib/find-python.js b/node_modules/node-gyp/lib/find-python.js
index e79bc50d5..43bf85985 100644
--- a/node_modules/node-gyp/lib/find-python.js
+++ b/node_modules/node-gyp/lib/find-python.js
@@ -18,7 +18,7 @@ PythonFinder.prototype = {
log: logWithPrefix(log, 'find Python'),
argsExecutable: ['-c', 'import sys; print(sys.executable);'],
argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
- semverRange: '^2.6.0 || >=3.5.0',
+ semverRange: '2.7.x || >=3.5.0',
// These can be overridden for testing:
execFile: cp.execFile,
@@ -26,8 +26,8 @@ PythonFinder.prototype = {
win: win,
pyLauncher: 'py.exe',
winDefaultLocations: [
- path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe'),
- path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe')
+ path.join(process.env.SystemDrive || 'C:', 'Python37', 'python.exe'),
+ path.join(process.env.SystemDrive || 'C:', 'Python27', 'python.exe')
],
// Logs a message at verbose level, but also saves it to be displayed later
@@ -88,6 +88,11 @@ PythonFinder.prototype = {
arg: this.env.PYTHON
},
{
+ before: () => { this.addLog('checking if "python3" can be used') },
+ check: this.checkCommand,
+ arg: 'python3'
+ },
+ {
before: () => { this.addLog('checking if "python" can be used') },
check: this.checkCommand,
arg: 'python'
@@ -96,22 +101,10 @@ PythonFinder.prototype = {
before: () => { this.addLog('checking if "python2" can be used') },
check: this.checkCommand,
arg: 'python2'
- },
- {
- before: () => { this.addLog('checking if "python3" can be used') },
- check: this.checkCommand,
- arg: 'python3'
}
]
if (this.win) {
- checks.push({
- before: () => {
- this.addLog(
- 'checking if the py launcher can be used to find Python 2')
- },
- check: this.checkPyLauncher
- })
for (var i = 0; i < this.winDefaultLocations.length; ++i) {
const location = this.winDefaultLocations[i]
checks.push({
@@ -123,6 +116,13 @@ PythonFinder.prototype = {
arg: location
})
}
+ checks.push({
+ before: () => {
+ this.addLog(
+ 'checking if the py launcher can be used to find Python 2')
+ },
+ check: this.checkPyLauncher
+ })
}
return checks
@@ -226,7 +226,7 @@ PythonFinder.prototype = {
}
this.addLog(`- version is "${version}"`)
- const range = semver.Range(this.semverRange)
+ const range = new semver.Range(this.semverRange)
var valid = false
try {
valid = range.test(version)
diff --git a/node_modules/node-gyp/lib/install.js b/node_modules/node-gyp/lib/install.js
index f68cd7fd6..c919c1058 100644
--- a/node_modules/node-gyp/lib/install.js
+++ b/node_modules/node-gyp/lib/install.js
@@ -11,6 +11,7 @@ const request = require('request')
const mkdir = require('mkdirp')
const processRelease = require('./process-release')
const win = process.platform === 'win32'
+const getProxyFromURI = require('./proxy')
function install (fs, gyp, argv, callback) {
var release = processRelease(argv, gyp, process.version, process.release)
@@ -410,10 +411,7 @@ function download (gyp, env, url) {
}
// basic support for a proxy server
- var proxyUrl = gyp.opts.proxy ||
- env.http_proxy ||
- env.HTTP_PROXY ||
- env.npm_config_proxy
+ var proxyUrl = getProxyFromURI(gyp, env, url)
if (proxyUrl) {
if (/^https?:\/\//i.test(proxyUrl)) {
log.verbose('download', 'using proxy url: "%s"', proxyUrl)
diff --git a/node_modules/node-gyp/lib/node-gyp.js b/node_modules/node-gyp/lib/node-gyp.js
index 9d2410390..81fc59091 100644
--- a/node_modules/node-gyp/lib/node-gyp.js
+++ b/node_modules/node-gyp/lib/node-gyp.js
@@ -67,6 +67,7 @@ proto.configDefs = {
ensure: Boolean, // 'install'
solution: String, // 'build' (windows only)
proxy: String, // 'install'
+ noproxy: String, // 'install'
devdir: String, // everywhere
nodedir: String, // 'configure'
loglevel: String, // everywhere
diff --git a/node_modules/node-gyp/macOS_Catalina.md b/node_modules/node-gyp/macOS_Catalina.md
index 5f02face5..530cbf25c 100644
--- a/node_modules/node-gyp/macOS_Catalina.md
+++ b/node_modules/node-gyp/macOS_Catalina.md
@@ -1,39 +1,37 @@
# Installation notes for macOS Catalina (v10.15)
-_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or updated to deal with challenges involved in upgrades to the next version of macOS._
+_This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._
-Lessons learned from:
-* https://github.com/nodejs/node-gyp/issues/1779
-* https://github.com/nodejs/node-gyp/issues/1861
-* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
-
-Installing `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-
-However, upgrading to macOS Catalina changes some settings that may cause normal `node-gyp` installations to fail.
+**Upgrading to macOS Catalina may cause normal `node-gyp` installations to fail.**
### Is my Mac running macOS Catalina?
-Let's make first make sure that your Mac is currently running Catalina:
-% `sw_vers`
+Let's first make sure that your Mac is running Catalina:
+```
+% sw_vers
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A602
+```
+If `ProductVersion` is less then `10.15` then this document is not for you. Normal install docs for `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
-If `ProductVersion` is less then `10.15` then this document is not really for you.
### The acid test
-Next, lets see if `Xcode Command Line Tools` are installed:
+To see if `Xcode Command Line Tools` is installed in a way that will work with `node-gyp`, run:
1. `/usr/sbin/pkgutil --packages | grep CL`
- * If nothing is listed, then [skip to the next section](#Two-roads).
- * If `com.apple.pkg.CLTools_Executables` is listed then try:
+ * `com.apple.pkg.CLTools_Executables` should be listed. If it isn't, this test failed.
2. `/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables`
- * If `version: 11.0.0` or later is listed then _you are done_! Your Mac should be ready to install `node-gyp`. Doing `clang -v` should show `Apple clang version 11.0.0` or later.
+ * `version: 11.0.0` (or later) should be listed. If it isn't, this test failed.
+
+If both tests succeeded, _you are done_! You should be ready to install `node-gyp`.
+
+If either test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
-As you go through the remainder of this document, at anytime you can try these `acid test` commands. If they pass then your Mac should be ready to install `node-gyp`.
+### Solutions
+There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable.
-### Two roads
-There are two main ways to install `node-gyp` on macOS:
1. With the full Xcode (~7.6 GB download) from the `App Store` app.
2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`
+3. With the _much_ smaller Xcode Command Line Tools via manual download. **For people running the latest version of Catalina (10.15.2 at the time of this writing), this has worked when the other two solutions haven't.**
### Installing `node-gyp` using the full Xcode
1. `xcodebuild -version` should show `Xcode 11.1` or later.
@@ -52,7 +50,7 @@ There are two main ways to install `node-gyp` on macOS:
10. `sudo xcode-select --reset` # Enter root password. No output is normal.
11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_.
-### Installing `node-gyp` using the Xcode Command Line Tools
+### Installing `node-gyp` using the Xcode Command Line Tools via `xcode-select --install`
1. If the _acid test_ has not succeeded, then try `xcode-select --install`
2. Wait until the install process is _complete_.
3. `softwareupdate -l` # No listing is a good sign.
@@ -64,6 +62,11 @@ There are two main ways to install `node-gyp` on macOS:
8. `sudo xcode-select --reset` # Enter root password. No output is normal.
9. Repeat step 5 above. Is the path different this time? Repeat the _acid test_.
+### Installing `node-gyp` using the Xcode Command Line Tools via manual download
+1. Download the appropriate version of the "Command Line Tools for Xcode" for your version of Catalina from developer.apple.com/download. As of MacOS 10.15.2, that's Command_Line_Tools_for_Xcode_11.3.dmg
+2. Install the package.
+3. Run the _acid test_.
+
### I did all that and the acid test still does not pass :-(
1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal.
2. `xcode-select --install`
@@ -72,3 +75,9 @@ There are two main ways to install `node-gyp` on macOS:
5. `npm explore npm -g -- npm explore npm-lifecycle -- npm install node-gyp@latest`
6. If the _acid test_ still does _not_ pass then...
7. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve.
+
+Lessons learned from:
+* https://github.com/nodejs/node-gyp/issues/1779
+* https://github.com/nodejs/node-gyp/issues/1861
+* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
+* Thanks to @rrrix for discovering Solution 3
diff --git a/node_modules/@npmcli/git/node_modules/.bin/mkdirp b/node_modules/node-gyp/node_modules/.bin/mkdirp
index 017896ceb..017896ceb 120000
--- a/node_modules/@npmcli/git/node_modules/.bin/mkdirp
+++ b/node_modules/node-gyp/node_modules/.bin/mkdirp
diff --git a/node_modules/@npmcli/run-script/node_modules/semver/LICENSE b/node_modules/node-gyp/node_modules/chownr/LICENSE
index 19129e315..19129e315 100644
--- a/node_modules/@npmcli/run-script/node_modules/semver/LICENSE
+++ b/node_modules/node-gyp/node_modules/chownr/LICENSE
diff --git a/node_modules/cacache/node_modules/chownr/README.md b/node_modules/node-gyp/node_modules/chownr/README.md
index 70e9a54a3..70e9a54a3 100644
--- a/node_modules/cacache/node_modules/chownr/README.md
+++ b/node_modules/node-gyp/node_modules/chownr/README.md
diff --git a/node_modules/cacache/node_modules/chownr/chownr.js b/node_modules/node-gyp/node_modules/chownr/chownr.js
index 0d4093216..0d4093216 100644
--- a/node_modules/cacache/node_modules/chownr/chownr.js
+++ b/node_modules/node-gyp/node_modules/chownr/chownr.js
diff --git a/node_modules/cacache/node_modules/chownr/package.json b/node_modules/node-gyp/node_modules/chownr/package.json
index de3905cc2..746718d9d 100644
--- a/node_modules/cacache/node_modules/chownr/package.json
+++ b/node_modules/node-gyp/node_modules/chownr/package.json
@@ -1,28 +1,27 @@
{
- "_from": "chownr@^2.0.0",
- "_id": "chownr@2.0.0",
+ "_from": "chownr@^1.1.1",
+ "_id": "chownr@1.1.4",
"_inBundle": false,
- "_integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "_location": "/cacache/chownr",
+ "_integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+ "_location": "/node-gyp/chownr",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "chownr@^2.0.0",
+ "raw": "chownr@^1.1.1",
"name": "chownr",
"escapedName": "chownr",
- "rawSpec": "^2.0.0",
+ "rawSpec": "^1.1.1",
"saveSpec": null,
- "fetchSpec": "^2.0.0"
+ "fetchSpec": "^1.1.1"
},
"_requiredBy": [
- "/cacache",
- "/cacache/tar"
+ "/node-gyp/tar"
],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "_shasum": "15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece",
- "_spec": "chownr@^2.0.0",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/cacache",
+ "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "_shasum": "6fc9d7b42d32a583596337666e7d08084da2cc6b",
+ "_spec": "chownr@^1.1.1",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -39,9 +38,6 @@
"rimraf": "^2.7.1",
"tap": "^14.10.6"
},
- "engines": {
- "node": ">=10"
- },
"files": [
"chownr.js"
],
@@ -62,5 +58,5 @@
"tap": {
"check-coverage": true
},
- "version": "2.0.0"
+ "version": "1.1.4"
}
diff --git a/node_modules/node-gyp/node_modules/fs-minipass/package.json b/node_modules/node-gyp/node_modules/fs-minipass/package.json
index 810dfab1c..2843a38ff 100644
--- a/node_modules/node-gyp/node_modules/fs-minipass/package.json
+++ b/node_modules/node-gyp/node_modules/fs-minipass/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
"_shasum": "ccff8570841e7fe4265693da88936c55aed7f7c7",
"_spec": "fs-minipass@^1.2.5",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/node-gyp/node_modules/tar",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/LICENSE b/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/README.md b/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/README.md
deleted file mode 100644
index f58610186..000000000
--- a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/README.md
+++ /dev/null
@@ -1,204 +0,0 @@
-# yallist
-
-Yet Another Linked List
-
-There are many doubly-linked list implementations like it, but this
-one is mine.
-
-For when an array would be too big, and a Map can't be iterated in
-reverse order.
-
-
-[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
-
-## basic usage
-
-```javascript
-var yallist = require('yallist')
-var myList = yallist.create([1, 2, 3])
-myList.push('foo')
-myList.unshift('bar')
-// of course pop() and shift() are there, too
-console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
-myList.forEach(function (k) {
- // walk the list head to tail
-})
-myList.forEachReverse(function (k, index, list) {
- // walk the list tail to head
-})
-var myDoubledList = myList.map(function (k) {
- return k + k
-})
-// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
-// mapReverse is also a thing
-var myDoubledListReverse = myList.mapReverse(function (k) {
- return k + k
-}) // ['foofoo', 6, 4, 2, 'barbar']
-
-var reduced = myList.reduce(function (set, entry) {
- set += entry
- return set
-}, 'start')
-console.log(reduced) // 'startfoo123bar'
-```
-
-## api
-
-The whole API is considered "public".
-
-Functions with the same name as an Array method work more or less the
-same way.
-
-There's reverse versions of most things because that's the point.
-
-### Yallist
-
-Default export, the class that holds and manages a list.
-
-Call it with either a forEach-able (like an array) or a set of
-arguments, to initialize the list.
-
-The Array-ish methods all act like you'd expect. No magic length,
-though, so if you change that it won't automatically prune or add
-empty spots.
-
-### Yallist.create(..)
-
-Alias for Yallist function. Some people like factories.
-
-#### yallist.head
-
-The first node in the list
-
-#### yallist.tail
-
-The last node in the list
-
-#### yallist.length
-
-The number of nodes in the list. (Change this at your peril. It is
-not magic like Array length.)
-
-#### yallist.toArray()
-
-Convert the list to an array.
-
-#### yallist.forEach(fn, [thisp])
-
-Call a function on each item in the list.
-
-#### yallist.forEachReverse(fn, [thisp])
-
-Call a function on each item in the list, in reverse order.
-
-#### yallist.get(n)
-
-Get the data at position `n` in the list. If you use this a lot,
-probably better off just using an Array.
-
-#### yallist.getReverse(n)
-
-Get the data at position `n`, counting from the tail.
-
-#### yallist.map(fn, thisp)
-
-Create a new Yallist with the result of calling the function on each
-item.
-
-#### yallist.mapReverse(fn, thisp)
-
-Same as `map`, but in reverse.
-
-#### yallist.pop()
-
-Get the data from the list tail, and remove the tail from the list.
-
-#### yallist.push(item, ...)
-
-Insert one or more items to the tail of the list.
-
-#### yallist.reduce(fn, initialValue)
-
-Like Array.reduce.
-
-#### yallist.reduceReverse
-
-Like Array.reduce, but in reverse.
-
-#### yallist.reverse
-
-Reverse the list in place.
-
-#### yallist.shift()
-
-Get the data from the list head, and remove the head from the list.
-
-#### yallist.slice([from], [to])
-
-Just like Array.slice, but returns a new Yallist.
-
-#### yallist.sliceReverse([from], [to])
-
-Just like yallist.slice, but the result is returned in reverse.
-
-#### yallist.toArray()
-
-Create an array representation of the list.
-
-#### yallist.toArrayReverse()
-
-Create a reversed array representation of the list.
-
-#### yallist.unshift(item, ...)
-
-Insert one or more items to the head of the list.
-
-#### yallist.unshiftNode(node)
-
-Move a Node object to the front of the list. (That is, pull it out of
-wherever it lives, and make it the new head.)
-
-If the node belongs to a different list, then that list will remove it
-first.
-
-#### yallist.pushNode(node)
-
-Move a Node object to the end of the list. (That is, pull it out of
-wherever it lives, and make it the new tail.)
-
-If the node belongs to a list already, then that list will remove it
-first.
-
-#### yallist.removeNode(node)
-
-Remove a node from the list, preserving referential integrity of head
-and tail and other nodes.
-
-Will throw an error if you try to have a list remove a node that
-doesn't belong to it.
-
-### Yallist.Node
-
-The class that holds the data and is actually the list.
-
-Call with `var n = new Node(value, previousNode, nextNode)`
-
-Note that if you do direct operations on Nodes themselves, it's very
-easy to get into weird states where the list is broken. Be careful :)
-
-#### node.next
-
-The next node in the list.
-
-#### node.prev
-
-The previous node in the list.
-
-#### node.value
-
-The data the node contains.
-
-#### node.list
-
-The list to which this node belongs. (Null if it does not belong to
-any list.)
diff --git a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/iterator.js b/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/iterator.js
deleted file mode 100644
index d41c97a19..000000000
--- a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/iterator.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-module.exports = function (Yallist) {
- Yallist.prototype[Symbol.iterator] = function* () {
- for (let walker = this.head; walker; walker = walker.next) {
- yield walker.value
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/package.json b/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/package.json
deleted file mode 100644
index d55cc3f73..000000000
--- a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "yallist@^3.0.0",
- "_id": "yallist@3.1.1",
- "_inBundle": false,
- "_integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "_location": "/node-gyp/minipass/yallist",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "yallist@^3.0.0",
- "name": "yallist",
- "escapedName": "yallist",
- "rawSpec": "^3.0.0",
- "saveSpec": null,
- "fetchSpec": "^3.0.0"
- },
- "_requiredBy": [
- "/node-gyp/minipass"
- ],
- "_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "_shasum": "dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd",
- "_spec": "yallist@^3.0.0",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp/node_modules/minipass",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/yallist/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Yet Another Linked List",
- "devDependencies": {
- "tap": "^12.1.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "yallist.js",
- "iterator.js"
- ],
- "homepage": "https://github.com/isaacs/yallist#readme",
- "license": "ISC",
- "main": "yallist.js",
- "name": "yallist",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/yallist.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --100"
- },
- "version": "3.1.1"
-}
diff --git a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/yallist.js b/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/yallist.js
deleted file mode 100644
index ed4e7303a..000000000
--- a/node_modules/node-gyp/node_modules/minipass/node_modules/yallist/yallist.js
+++ /dev/null
@@ -1,426 +0,0 @@
-'use strict'
-module.exports = Yallist
-
-Yallist.Node = Node
-Yallist.create = Yallist
-
-function Yallist (list) {
- var self = this
- if (!(self instanceof Yallist)) {
- self = new Yallist()
- }
-
- self.tail = null
- self.head = null
- self.length = 0
-
- if (list && typeof list.forEach === 'function') {
- list.forEach(function (item) {
- self.push(item)
- })
- } else if (arguments.length > 0) {
- for (var i = 0, l = arguments.length; i < l; i++) {
- self.push(arguments[i])
- }
- }
-
- return self
-}
-
-Yallist.prototype.removeNode = function (node) {
- if (node.list !== this) {
- throw new Error('removing node which does not belong to this list')
- }
-
- var next = node.next
- var prev = node.prev
-
- if (next) {
- next.prev = prev
- }
-
- if (prev) {
- prev.next = next
- }
-
- if (node === this.head) {
- this.head = next
- }
- if (node === this.tail) {
- this.tail = prev
- }
-
- node.list.length--
- node.next = null
- node.prev = null
- node.list = null
-
- return next
-}
-
-Yallist.prototype.unshiftNode = function (node) {
- if (node === this.head) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var head = this.head
- node.list = this
- node.next = head
- if (head) {
- head.prev = node
- }
-
- this.head = node
- if (!this.tail) {
- this.tail = node
- }
- this.length++
-}
-
-Yallist.prototype.pushNode = function (node) {
- if (node === this.tail) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var tail = this.tail
- node.list = this
- node.prev = tail
- if (tail) {
- tail.next = node
- }
-
- this.tail = node
- if (!this.head) {
- this.head = node
- }
- this.length++
-}
-
-Yallist.prototype.push = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- push(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.unshift = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- unshift(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.pop = function () {
- if (!this.tail) {
- return undefined
- }
-
- var res = this.tail.value
- this.tail = this.tail.prev
- if (this.tail) {
- this.tail.next = null
- } else {
- this.head = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.shift = function () {
- if (!this.head) {
- return undefined
- }
-
- var res = this.head.value
- this.head = this.head.next
- if (this.head) {
- this.head.prev = null
- } else {
- this.tail = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.forEach = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.head, i = 0; walker !== null; i++) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.next
- }
-}
-
-Yallist.prototype.forEachReverse = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.prev
- }
-}
-
-Yallist.prototype.get = function (n) {
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.next
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.getReverse = function (n) {
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.prev
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.map = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.head; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.next
- }
- return res
-}
-
-Yallist.prototype.mapReverse = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.tail; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.prev
- }
- return res
-}
-
-Yallist.prototype.reduce = function (fn, initial) {
- var acc
- var walker = this.head
- if (arguments.length > 1) {
- acc = initial
- } else if (this.head) {
- walker = this.head.next
- acc = this.head.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = 0; walker !== null; i++) {
- acc = fn(acc, walker.value, i)
- walker = walker.next
- }
-
- return acc
-}
-
-Yallist.prototype.reduceReverse = function (fn, initial) {
- var acc
- var walker = this.tail
- if (arguments.length > 1) {
- acc = initial
- } else if (this.tail) {
- walker = this.tail.prev
- acc = this.tail.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = this.length - 1; walker !== null; i--) {
- acc = fn(acc, walker.value, i)
- walker = walker.prev
- }
-
- return acc
-}
-
-Yallist.prototype.toArray = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.head; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.next
- }
- return arr
-}
-
-Yallist.prototype.toArrayReverse = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.tail; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.prev
- }
- return arr
-}
-
-Yallist.prototype.slice = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
- walker = walker.next
- }
- for (; walker !== null && i < to; i++, walker = walker.next) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.sliceReverse = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
- walker = walker.prev
- }
- for (; walker !== null && i > from; i--, walker = walker.prev) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
- if (start > this.length) {
- start = this.length - 1
- }
- if (start < 0) {
- start = this.length + start;
- }
-
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
- walker = walker.next
- }
-
- var ret = []
- for (var i = 0; walker && i < deleteCount; i++) {
- ret.push(walker.value)
- walker = this.removeNode(walker)
- }
- if (walker === null) {
- walker = this.tail
- }
-
- if (walker !== this.head && walker !== this.tail) {
- walker = walker.prev
- }
-
- for (var i = 2; i < arguments.length; i++) {
- walker = insert(this, walker, arguments[i])
- }
- return ret;
-}
-
-Yallist.prototype.reverse = function () {
- var head = this.head
- var tail = this.tail
- for (var walker = head; walker !== null; walker = walker.prev) {
- var p = walker.prev
- walker.prev = walker.next
- walker.next = p
- }
- this.head = tail
- this.tail = head
- return this
-}
-
-function insert (self, node, value) {
- var inserted = node === self.head ?
- new Node(value, null, node, self) :
- new Node(value, node, node.next, self)
-
- if (inserted.next === null) {
- self.tail = inserted
- }
- if (inserted.prev === null) {
- self.head = inserted
- }
-
- self.length++
-
- return inserted
-}
-
-function push (self, item) {
- self.tail = new Node(item, self.tail, null, self)
- if (!self.head) {
- self.head = self.tail
- }
- self.length++
-}
-
-function unshift (self, item) {
- self.head = new Node(item, null, self.head, self)
- if (!self.tail) {
- self.tail = self.head
- }
- self.length++
-}
-
-function Node (value, prev, next, list) {
- if (!(this instanceof Node)) {
- return new Node(value, prev, next, list)
- }
-
- this.list = list
- this.value = value
-
- if (prev) {
- prev.next = this
- this.prev = prev
- } else {
- this.prev = null
- }
-
- if (next) {
- next.prev = this
- this.next = next
- } else {
- this.next = null
- }
-}
-
-try {
- // add if support for Symbol.iterator is present
- require('./iterator.js')(Yallist)
-} catch (er) {}
diff --git a/node_modules/node-gyp/node_modules/minipass/package.json b/node_modules/node-gyp/node_modules/minipass/package.json
index c0c479817..680de3d39 100644
--- a/node_modules/node-gyp/node_modules/minipass/package.json
+++ b/node_modules/node-gyp/node_modules/minipass/package.json
@@ -23,7 +23,7 @@
"_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
"_shasum": "e713762e7d3e32fed803115cf93e04bca9fcc9a6",
"_spec": "minipass@^2.8.6",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/node-gyp/node_modules/tar",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/node_modules/node-gyp/node_modules/minizlib/package.json b/node_modules/node-gyp/node_modules/minizlib/package.json
index cb750be92..98e7ab945 100644
--- a/node_modules/node-gyp/node_modules/minizlib/package.json
+++ b/node_modules/node-gyp/node_modules/minizlib/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
"_shasum": "2290de96818a34c29551c8a8d301216bd65a861d",
"_spec": "minizlib@^1.2.1",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/node-gyp/node_modules/tar",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp/node_modules/tar",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/node_modules/stream-iterate/LICENSE b/node_modules/node-gyp/node_modules/mkdirp/LICENSE
index 66a4d2a14..432d1aeb0 100644
--- a/node_modules/stream-iterate/LICENSE
+++ b/node_modules/node-gyp/node_modules/mkdirp/LICENSE
@@ -1,6 +1,6 @@
-The MIT License (MIT)
+Copyright 2010 James Halliday (mail@substack.net)
-Copyright (c) 2015 Mathias Buus
+This project is free software released under the MIT/X11 license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/node-gyp/node_modules/mkdirp/bin/cmd.js b/node_modules/node-gyp/node_modules/mkdirp/bin/cmd.js
new file mode 100755
index 000000000..d95de15ae
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/mkdirp/bin/cmd.js
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+var mkdirp = require('../');
+var minimist = require('minimist');
+var fs = require('fs');
+
+var argv = minimist(process.argv.slice(2), {
+ alias: { m: 'mode', h: 'help' },
+ string: [ 'mode' ]
+});
+if (argv.help) {
+ fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
+ return;
+}
+
+var paths = argv._.slice();
+var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
+
+(function next () {
+ if (paths.length === 0) return;
+ var p = paths.shift();
+
+ if (mode === undefined) mkdirp(p, cb)
+ else mkdirp(p, mode, cb)
+
+ function cb (err) {
+ if (err) {
+ console.error(err.message);
+ process.exit(1);
+ }
+ else next();
+ }
+})();
diff --git a/node_modules/mkdirp/bin/usage.txt b/node_modules/node-gyp/node_modules/mkdirp/bin/usage.txt
index f952aa2c7..f952aa2c7 100644
--- a/node_modules/mkdirp/bin/usage.txt
+++ b/node_modules/node-gyp/node_modules/mkdirp/bin/usage.txt
diff --git a/node_modules/node-gyp/node_modules/mkdirp/index.js b/node_modules/node-gyp/node_modules/mkdirp/index.js
new file mode 100644
index 000000000..468d7cd8d
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/mkdirp/index.js
@@ -0,0 +1,99 @@
+var path = require('path');
+var fs = require('fs');
+var _0777 = parseInt('0777', 8);
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, opts, f, made) {
+ if (typeof opts === 'function') {
+ f = opts;
+ opts = {};
+ }
+ else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ p = path.resolve(p);
+
+ xfs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ if (path.dirname(p) === p) return cb(er);
+ mkdirP(path.dirname(p), opts, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, opts, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = _0777
+ }
+ if (!made) made = null;
+
+ p = path.resolve(p);
+
+ try {
+ xfs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), opts, made);
+ sync(p, opts, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = xfs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
diff --git a/node_modules/node-gyp/node_modules/mkdirp/package.json b/node_modules/node-gyp/node_modules/mkdirp/package.json
new file mode 100644
index 000000000..5cf260b87
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/mkdirp/package.json
@@ -0,0 +1,70 @@
+{
+ "_from": "mkdirp@^0.5.1",
+ "_id": "mkdirp@0.5.5",
+ "_inBundle": false,
+ "_integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "_location": "/node-gyp/mkdirp",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "mkdirp@^0.5.1",
+ "name": "mkdirp",
+ "escapedName": "mkdirp",
+ "rawSpec": "^0.5.1",
+ "saveSpec": null,
+ "fetchSpec": "^0.5.1"
+ },
+ "_requiredBy": [
+ "/node-gyp",
+ "/node-gyp/tar"
+ ],
+ "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "_shasum": "d91cefd62d1436ca0f41620e251288d420099def",
+ "_spec": "mkdirp@^0.5.1",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-mkdirp/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "deprecated": false,
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "devDependencies": {
+ "mock-fs": "^3.7.0",
+ "tap": "^5.4.2"
+ },
+ "files": [
+ "bin",
+ "index.js"
+ ],
+ "homepage": "https://github.com/substack/node-mkdirp#readme",
+ "keywords": [
+ "mkdir",
+ "directory"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "mkdirp",
+ "publishConfig": {
+ "tag": "legacy"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/substack/node-mkdirp.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "0.5.5"
+}
diff --git a/node_modules/node-gyp/node_modules/mkdirp/readme.markdown b/node_modules/node-gyp/node_modules/mkdirp/readme.markdown
new file mode 100644
index 000000000..fc314bfbd
--- /dev/null
+++ b/node_modules/node-gyp/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,100 @@
+# mkdirp
+
+Like `mkdir -p`, but in node.js!
+
+[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
+
+# example
+
+## pow.js
+
+```js
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
+```
+
+Output
+
+```
+pow!
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, opts, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `opts.mode`. If `opts` is a non-object, it will be treated as
+the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
+`opts.fs.stat(path, cb)`.
+
+## mkdirp.sync(dir, opts)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a non-object, it will be
+treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777`.
+
+Returns the first directory that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
+`opts.fs.statSync(path)`.
+
+# usage
+
+This package also ships with a `mkdirp` command.
+
+```
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command.
+
+# license
+
+MIT
diff --git a/node_modules/node-gyp/node_modules/semver/package.json b/node_modules/node-gyp/node_modules/semver/package.json
index bb4137daa..106f1df0e 100644
--- a/node_modules/node-gyp/node_modules/semver/package.json
+++ b/node_modules/node-gyp/node_modules/semver/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"_shasum": "a954f931aeba508d307bbf069eff0c01c96116f7",
"_spec": "semver@^5.7.1",
- "_where": "/Users/mperrotte/npminc/cli/node_modules/node-gyp",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp",
"bin": {
"semver": "bin/semver"
},
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/LICENSE b/node_modules/node-gyp/node_modules/tar/node_modules/yallist/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/README.md b/node_modules/node-gyp/node_modules/tar/node_modules/yallist/README.md
deleted file mode 100644
index f58610186..000000000
--- a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/README.md
+++ /dev/null
@@ -1,204 +0,0 @@
-# yallist
-
-Yet Another Linked List
-
-There are many doubly-linked list implementations like it, but this
-one is mine.
-
-For when an array would be too big, and a Map can't be iterated in
-reverse order.
-
-
-[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)
-
-## basic usage
-
-```javascript
-var yallist = require('yallist')
-var myList = yallist.create([1, 2, 3])
-myList.push('foo')
-myList.unshift('bar')
-// of course pop() and shift() are there, too
-console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
-myList.forEach(function (k) {
- // walk the list head to tail
-})
-myList.forEachReverse(function (k, index, list) {
- // walk the list tail to head
-})
-var myDoubledList = myList.map(function (k) {
- return k + k
-})
-// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
-// mapReverse is also a thing
-var myDoubledListReverse = myList.mapReverse(function (k) {
- return k + k
-}) // ['foofoo', 6, 4, 2, 'barbar']
-
-var reduced = myList.reduce(function (set, entry) {
- set += entry
- return set
-}, 'start')
-console.log(reduced) // 'startfoo123bar'
-```
-
-## api
-
-The whole API is considered "public".
-
-Functions with the same name as an Array method work more or less the
-same way.
-
-There's reverse versions of most things because that's the point.
-
-### Yallist
-
-Default export, the class that holds and manages a list.
-
-Call it with either a forEach-able (like an array) or a set of
-arguments, to initialize the list.
-
-The Array-ish methods all act like you'd expect. No magic length,
-though, so if you change that it won't automatically prune or add
-empty spots.
-
-### Yallist.create(..)
-
-Alias for Yallist function. Some people like factories.
-
-#### yallist.head
-
-The first node in the list
-
-#### yallist.tail
-
-The last node in the list
-
-#### yallist.length
-
-The number of nodes in the list. (Change this at your peril. It is
-not magic like Array length.)
-
-#### yallist.toArray()
-
-Convert the list to an array.
-
-#### yallist.forEach(fn, [thisp])
-
-Call a function on each item in the list.
-
-#### yallist.forEachReverse(fn, [thisp])
-
-Call a function on each item in the list, in reverse order.
-
-#### yallist.get(n)
-
-Get the data at position `n` in the list. If you use this a lot,
-probably better off just using an Array.
-
-#### yallist.getReverse(n)
-
-Get the data at position `n`, counting from the tail.
-
-#### yallist.map(fn, thisp)
-
-Create a new Yallist with the result of calling the function on each
-item.
-
-#### yallist.mapReverse(fn, thisp)
-
-Same as `map`, but in reverse.
-
-#### yallist.pop()
-
-Get the data from the list tail, and remove the tail from the list.
-
-#### yallist.push(item, ...)
-
-Insert one or more items to the tail of the list.
-
-#### yallist.reduce(fn, initialValue)
-
-Like Array.reduce.
-
-#### yallist.reduceReverse
-
-Like Array.reduce, but in reverse.
-
-#### yallist.reverse
-
-Reverse the list in place.
-
-#### yallist.shift()
-
-Get the data from the list head, and remove the head from the list.
-
-#### yallist.slice([from], [to])
-
-Just like Array.slice, but returns a new Yallist.
-
-#### yallist.sliceReverse([from], [to])
-
-Just like yallist.slice, but the result is returned in reverse.
-
-#### yallist.toArray()
-
-Create an array representation of the list.
-
-#### yallist.toArrayReverse()
-
-Create a reversed array representation of the list.
-
-#### yallist.unshift(item, ...)
-
-Insert one or more items to the head of the list.
-
-#### yallist.unshiftNode(node)
-
-Move a Node object to the front of the list. (That is, pull it out of
-wherever it lives, and make it the new head.)
-
-If the node belongs to a different list, then that list will remove it
-first.
-
-#### yallist.pushNode(node)
-
-Move a Node object to the end of the list. (That is, pull it out of
-wherever it lives, and make it the new tail.)
-
-If the node belongs to a list already, then that list will remove it
-first.
-
-#### yallist.removeNode(node)
-
-Remove a node from the list, preserving referential integrity of head
-and tail and other nodes.
-
-Will throw an error if you try to have a list remove a node that
-doesn't belong to it.
-
-### Yallist.Node
-
-The class that holds the data and is actually the list.
-
-Call with `var n = new Node(value, previousNode, nextNode)`
-
-Note that if you do direct operations on Nodes themselves, it's very
-easy to get into weird states where the list is broken. Be careful :)
-
-#### node.next
-
-The next node in the list.
-
-#### node.prev
-
-The previous node in the list.
-
-#### node.value
-
-The data the node contains.
-
-#### node.list
-
-The list to which this node belongs. (Null if it does not belong to
-any list.)
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/iterator.js b/node_modules/node-gyp/node_modules/tar/node_modules/yallist/iterator.js
deleted file mode 100644
index d41c97a19..000000000
--- a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/iterator.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-module.exports = function (Yallist) {
- Yallist.prototype[Symbol.iterator] = function* () {
- for (let walker = this.head; walker; walker = walker.next) {
- yield walker.value
- }
- }
-}
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/yallist.js b/node_modules/node-gyp/node_modules/tar/node_modules/yallist/yallist.js
deleted file mode 100644
index ed4e7303a..000000000
--- a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/yallist.js
+++ /dev/null
@@ -1,426 +0,0 @@
-'use strict'
-module.exports = Yallist
-
-Yallist.Node = Node
-Yallist.create = Yallist
-
-function Yallist (list) {
- var self = this
- if (!(self instanceof Yallist)) {
- self = new Yallist()
- }
-
- self.tail = null
- self.head = null
- self.length = 0
-
- if (list && typeof list.forEach === 'function') {
- list.forEach(function (item) {
- self.push(item)
- })
- } else if (arguments.length > 0) {
- for (var i = 0, l = arguments.length; i < l; i++) {
- self.push(arguments[i])
- }
- }
-
- return self
-}
-
-Yallist.prototype.removeNode = function (node) {
- if (node.list !== this) {
- throw new Error('removing node which does not belong to this list')
- }
-
- var next = node.next
- var prev = node.prev
-
- if (next) {
- next.prev = prev
- }
-
- if (prev) {
- prev.next = next
- }
-
- if (node === this.head) {
- this.head = next
- }
- if (node === this.tail) {
- this.tail = prev
- }
-
- node.list.length--
- node.next = null
- node.prev = null
- node.list = null
-
- return next
-}
-
-Yallist.prototype.unshiftNode = function (node) {
- if (node === this.head) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var head = this.head
- node.list = this
- node.next = head
- if (head) {
- head.prev = node
- }
-
- this.head = node
- if (!this.tail) {
- this.tail = node
- }
- this.length++
-}
-
-Yallist.prototype.pushNode = function (node) {
- if (node === this.tail) {
- return
- }
-
- if (node.list) {
- node.list.removeNode(node)
- }
-
- var tail = this.tail
- node.list = this
- node.prev = tail
- if (tail) {
- tail.next = node
- }
-
- this.tail = node
- if (!this.head) {
- this.head = node
- }
- this.length++
-}
-
-Yallist.prototype.push = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- push(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.unshift = function () {
- for (var i = 0, l = arguments.length; i < l; i++) {
- unshift(this, arguments[i])
- }
- return this.length
-}
-
-Yallist.prototype.pop = function () {
- if (!this.tail) {
- return undefined
- }
-
- var res = this.tail.value
- this.tail = this.tail.prev
- if (this.tail) {
- this.tail.next = null
- } else {
- this.head = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.shift = function () {
- if (!this.head) {
- return undefined
- }
-
- var res = this.head.value
- this.head = this.head.next
- if (this.head) {
- this.head.prev = null
- } else {
- this.tail = null
- }
- this.length--
- return res
-}
-
-Yallist.prototype.forEach = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.head, i = 0; walker !== null; i++) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.next
- }
-}
-
-Yallist.prototype.forEachReverse = function (fn, thisp) {
- thisp = thisp || this
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
- fn.call(thisp, walker.value, i, this)
- walker = walker.prev
- }
-}
-
-Yallist.prototype.get = function (n) {
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.next
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.getReverse = function (n) {
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
- // abort out of the list early if we hit a cycle
- walker = walker.prev
- }
- if (i === n && walker !== null) {
- return walker.value
- }
-}
-
-Yallist.prototype.map = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.head; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.next
- }
- return res
-}
-
-Yallist.prototype.mapReverse = function (fn, thisp) {
- thisp = thisp || this
- var res = new Yallist()
- for (var walker = this.tail; walker !== null;) {
- res.push(fn.call(thisp, walker.value, this))
- walker = walker.prev
- }
- return res
-}
-
-Yallist.prototype.reduce = function (fn, initial) {
- var acc
- var walker = this.head
- if (arguments.length > 1) {
- acc = initial
- } else if (this.head) {
- walker = this.head.next
- acc = this.head.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = 0; walker !== null; i++) {
- acc = fn(acc, walker.value, i)
- walker = walker.next
- }
-
- return acc
-}
-
-Yallist.prototype.reduceReverse = function (fn, initial) {
- var acc
- var walker = this.tail
- if (arguments.length > 1) {
- acc = initial
- } else if (this.tail) {
- walker = this.tail.prev
- acc = this.tail.value
- } else {
- throw new TypeError('Reduce of empty list with no initial value')
- }
-
- for (var i = this.length - 1; walker !== null; i--) {
- acc = fn(acc, walker.value, i)
- walker = walker.prev
- }
-
- return acc
-}
-
-Yallist.prototype.toArray = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.head; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.next
- }
- return arr
-}
-
-Yallist.prototype.toArrayReverse = function () {
- var arr = new Array(this.length)
- for (var i = 0, walker = this.tail; walker !== null; i++) {
- arr[i] = walker.value
- walker = walker.prev
- }
- return arr
-}
-
-Yallist.prototype.slice = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
- walker = walker.next
- }
- for (; walker !== null && i < to; i++, walker = walker.next) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.sliceReverse = function (from, to) {
- to = to || this.length
- if (to < 0) {
- to += this.length
- }
- from = from || 0
- if (from < 0) {
- from += this.length
- }
- var ret = new Yallist()
- if (to < from || to < 0) {
- return ret
- }
- if (from < 0) {
- from = 0
- }
- if (to > this.length) {
- to = this.length
- }
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
- walker = walker.prev
- }
- for (; walker !== null && i > from; i--, walker = walker.prev) {
- ret.push(walker.value)
- }
- return ret
-}
-
-Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
- if (start > this.length) {
- start = this.length - 1
- }
- if (start < 0) {
- start = this.length + start;
- }
-
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
- walker = walker.next
- }
-
- var ret = []
- for (var i = 0; walker && i < deleteCount; i++) {
- ret.push(walker.value)
- walker = this.removeNode(walker)
- }
- if (walker === null) {
- walker = this.tail
- }
-
- if (walker !== this.head && walker !== this.tail) {
- walker = walker.prev
- }
-
- for (var i = 2; i < arguments.length; i++) {
- walker = insert(this, walker, arguments[i])
- }
- return ret;
-}
-
-Yallist.prototype.reverse = function () {
- var head = this.head
- var tail = this.tail
- for (var walker = head; walker !== null; walker = walker.prev) {
- var p = walker.prev
- walker.prev = walker.next
- walker.next = p
- }
- this.head = tail
- this.tail = head
- return this
-}
-
-function insert (self, node, value) {
- var inserted = node === self.head ?
- new Node(value, null, node, self) :
- new Node(value, node, node.next, self)
-
- if (inserted.next === null) {
- self.tail = inserted
- }
- if (inserted.prev === null) {
- self.head = inserted
- }
-
- self.length++
-
- return inserted
-}
-
-function push (self, item) {
- self.tail = new Node(item, self.tail, null, self)
- if (!self.head) {
- self.head = self.tail
- }
- self.length++
-}
-
-function unshift (self, item) {
- self.head = new Node(item, null, self.head, self)
- if (!self.tail) {
- self.tail = self.head
- }
- self.length++
-}
-
-function Node (value, prev, next, list) {
- if (!(this instanceof Node)) {
- return new Node(value, prev, next, list)
- }
-
- this.list = list
- this.value = value
-
- if (prev) {
- prev.next = this
- this.prev = prev
- } else {
- this.prev = null
- }
-
- if (next) {
- next.prev = this
- this.next = next
- } else {
- this.next = null
- }
-}
-
-try {
- // add if support for Symbol.iterator is present
- require('./iterator.js')(Yallist)
-} catch (er) {}
diff --git a/node_modules/node-gyp/node_modules/tar/package.json b/node_modules/node-gyp/node_modules/tar/package.json
index 4063f6912..e4a568bbf 100644
--- a/node_modules/node-gyp/node_modules/tar/package.json
+++ b/node_modules/node-gyp/node_modules/tar/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
"_shasum": "43b364bc52888d555298637b10d60790254ab525",
"_spec": "tar@^4.4.12",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/node-gyp",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/node_modules/node-gyp/node_modules/which/package.json b/node_modules/node-gyp/node_modules/which/package.json
index 06b35d7b7..d4192836b 100644
--- a/node_modules/node-gyp/node_modules/which/package.json
+++ b/node_modules/node-gyp/node_modules/which/package.json
@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a",
"_spec": "which@^1.3.1",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/node-gyp",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
diff --git a/node_modules/@npmcli/run-script/node_modules/tar/LICENSE b/node_modules/node-gyp/node_modules/yallist/LICENSE
index 19129e315..19129e315 100644
--- a/node_modules/@npmcli/run-script/node_modules/tar/LICENSE
+++ b/node_modules/node-gyp/node_modules/yallist/LICENSE
diff --git a/node_modules/@npmcli/run-script/node_modules/yallist/README.md b/node_modules/node-gyp/node_modules/yallist/README.md
index f58610186..f58610186 100644
--- a/node_modules/@npmcli/run-script/node_modules/yallist/README.md
+++ b/node_modules/node-gyp/node_modules/yallist/README.md
diff --git a/node_modules/@npmcli/run-script/node_modules/yallist/iterator.js b/node_modules/node-gyp/node_modules/yallist/iterator.js
index d41c97a19..d41c97a19 100644
--- a/node_modules/@npmcli/run-script/node_modules/yallist/iterator.js
+++ b/node_modules/node-gyp/node_modules/yallist/iterator.js
diff --git a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/package.json b/node_modules/node-gyp/node_modules/yallist/package.json
index f85e75780..485ed9c8a 100644
--- a/node_modules/node-gyp/node_modules/tar/node_modules/yallist/package.json
+++ b/node_modules/node-gyp/node_modules/yallist/package.json
@@ -3,7 +3,7 @@
"_id": "yallist@3.1.1",
"_inBundle": false,
"_integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
- "_location": "/node-gyp/tar/yallist",
+ "_location": "/node-gyp/yallist",
"_phantomChildren": {},
"_requested": {
"type": "range",
@@ -16,6 +16,7 @@
"fetchSpec": "^3.0.3"
},
"_requiredBy": [
+ "/node-gyp/minipass",
"/node-gyp/tar"
],
"_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
diff --git a/node_modules/@npmcli/run-script/node_modules/yallist/yallist.js b/node_modules/node-gyp/node_modules/yallist/yallist.js
index ed4e7303a..ed4e7303a 100644
--- a/node_modules/@npmcli/run-script/node_modules/yallist/yallist.js
+++ b/node_modules/node-gyp/node_modules/yallist/yallist.js
diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json
index afa45f396..7b8925735 100644
--- a/node_modules/node-gyp/package.json
+++ b/node_modules/node-gyp/package.json
@@ -1,29 +1,31 @@
{
- "_from": "node-gyp@5.0.7",
- "_id": "node-gyp@5.0.7",
+ "_from": "node-gyp@^6.1.0",
+ "_id": "node-gyp@6.1.0",
"_inBundle": false,
- "_integrity": "sha512-K8aByl8OJD51V0VbUURTKsmdswkQQusIvlvmTyhHlIT1hBvaSxzdxpSle857XuXa7uc02UEZx9OR5aDxSWS5Qw==",
+ "_integrity": "sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw==",
"_location": "/node-gyp",
- "_phantomChildren": {},
+ "_phantomChildren": {
+ "isexe": "2.0.0",
+ "minimist": "1.2.5",
+ "safe-buffer": "5.1.2"
+ },
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "node-gyp@5.0.7",
+ "raw": "node-gyp@^6.1.0",
"name": "node-gyp",
"escapedName": "node-gyp",
- "rawSpec": "5.0.7",
+ "rawSpec": "^6.1.0",
"saveSpec": null,
- "fetchSpec": "5.0.7"
+ "fetchSpec": "^6.1.0"
},
"_requiredBy": [
- "#USER",
- "/",
- "/npm-lifecycle"
+ "/@npmcli/run-script"
],
- "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.0.7.tgz",
- "_shasum": "dd4225e735e840cf2870e4037c2ed9c28a31719e",
- "_spec": "node-gyp@5.0.7",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz",
+ "_shasum": "64e31c61a4695ad304c1d5b82cf6b7c79cc79f3f",
+ "_spec": "node-gyp@^6.1.0",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/@npmcli/run-script",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
@@ -84,5 +86,5 @@
"lint": "standard */*.js test/**/*.js",
"test": "npm run lint && tap --timeout=120 test/test-*"
},
- "version": "5.0.7"
+ "version": "6.1.0"
}
diff --git a/node_modules/node-gyp/test/docker.sh b/node_modules/node-gyp/test/docker.sh
deleted file mode 100755
index 67014209d..000000000
--- a/node_modules/node-gyp/test/docker.sh
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/bash
-
-#set -e
-
-test_node_versions="6.17.0 8.15.1 10.15.3 11.12.0"
-
-myuid=$(id -u)
-mygid=$(id -g)
-__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-dot_node_gyp=${__dirname}/.node-gyp/
-
-# borrows from https://github.com/rvagg/dnt/
-
-# Simple setup function for a container:
-# setup_container(image id, base image, commands to run to set up)
-setup_container() {
- local container_id="$1"
- local base_container="$2"
- local run_cmd="$3"
-
- # Does this image exist? If yes, ignore
- docker inspect "$container_id" &> /dev/null
- if [[ $? -eq 0 ]]; then
- echo "Found existing container [$container_id]"
- else
- # No such image, so make it
- echo "Did not find container [$container_id], creating..."
- docker run -i $base_container /bin/bash -c "$run_cmd"
- sleep 2
- docker commit $(docker ps -l -q) $container_id
- fi
-}
-
-# Run tests inside each of the versioned containers, copy cwd into npm's copy of node-gyp
-# so it'll be invoked by npm when a compile is needed
-# run_tests(version, test-commands)
-run_tests() {
- local version="$1"
- local run_cmd="$2"
-
- run_cmd="rsync -aAXx --delete --exclude .git --exclude build /node-gyp-src/ /usr/lib/node_modules/npm/node_modules/node-gyp/;
- /bin/su -s /bin/bash node-gyp -c 'cd && ${run_cmd}'"
-
- rm -rf $dot_node_gyp
- mkdir $dot_node_gyp
-
- docker run \
- --rm -i \
- -v ~/.npm/:/node-gyp/.npm/ \
- -v ${dot_node_gyp}:/node-gyp/.node-gyp/ \
- -v $(pwd):/node-gyp-src/:ro \
- node-gyp-test/${version} /bin/bash -c "${run_cmd}"
-}
-
-# A base image with build tools and a user account
-setup_container "node-gyp-test/base" "ubuntu:14.04" "
- adduser --gecos node-gyp --home /node-gyp/ --disabled-login node-gyp --uid $myuid &&
- echo "node-gyp:node-gyp" | chpasswd &&
- apt-get update &&
- apt-get install -y build-essential python git rsync curl
-"
-
-# An image on top of the base containing clones of repos we want to use for testing
-setup_container "node-gyp-test/clones" "node-gyp-test/base" "
- cd /node-gyp/ && git clone https://github.com/justmoon/node-bignum.git &&
- cd /node-gyp/ && git clone https://github.com/bnoordhuis/node-buffertools.git &&
- chown -R node-gyp.node-gyp /node-gyp/
-"
-
-# An image for each of the node versions we want to test with that version installed and the latest npm
-for v in $test_node_versions; do
- setup_container "node-gyp-test/${v}" "node-gyp-test/clones" "
- curl -sL https://nodejs.org/dist/v${v}/node-v${v}-linux-x64.tar.gz | tar -zxv --strip-components=1 -C /usr/ &&
- npm install npm@latest -g &&
- node -v && npm -v
- "
-done
-
-# Test use of --target=x.y.z to compile against alternate versions
-test_download_node_version() {
- local run_with_ver="$1"
- local expected_dir="$2"
- local expected_ver="$3"
- run_tests $run_with_ver "cd node-buffertools && npm install --loglevel=info --target=${expected_ver}"
- local node_ver=$(cat "${dot_node_gyp}${expected_dir}/node_version.h" | grep '#define NODE_\w*_VERSION [0-9]*$')
- node_ver=$(echo $node_ver | sed 's/#define NODE_[A-Z]*_VERSION //g' | sed 's/ /./g')
- if [ "X$(echo $node_ver)" != "X${expected_ver}" ]; then
- echo "Did not download v${expected_ver} using --target, instead got: $(echo $node_ver)"
- exit 1
- fi
- echo "Verified correct download of [v${node_ver}]"
-}
-
-test_download_node_version "0.12.7" "0.10.30/src" "0.10.30"
-# should download the headers file
-test_download_node_version "4.3.0" "4.3.0/include/node" "4.3.0"
-test_download_node_version "5.6.0" "5.6.0/include/node" "5.6.0"
-
-# TODO: test --dist-url by starting up a localhost server and serving up tarballs
-
-# testing --dist-url, using simple-proxy.js to make localhost work as a distribution
-# point for tarballs
-# we can test whether it uses the proxy because after 2 connections the proxy will
-# die and therefore should not be running at the end of the test, `nc` can tell us this
-run_tests "0.12.7" "
- (node /node-gyp-src/test/simple-proxy.js 8080 /boombar/ https://nodejs.org/dist/ &) &&
- cd node-buffertools &&
- NODEJS_ORG_MIRROR=http://localhost:8080/boombar/ /node-gyp-src/bin/node-gyp.js --loglevel=info rebuild &&
- nc -z localhost 8080 && echo -e \"\\n\\n\\033[31mFAILED TO USE LOCAL PROXY\\033[39m\\n\\n\"
-"
-
-rm -rf $dot_node_gyp
diff --git a/node_modules/node-gyp/test/test-download.js b/node_modules/node-gyp/test/test-download.js
index 738a43f27..fe373e328 100644
--- a/node_modules/node-gyp/test/test-download.js
+++ b/node_modules/node-gyp/test/test-download.js
@@ -90,6 +90,101 @@ test('download over https with custom ca', function (t) {
})
})
+test('download over http with proxy', function (t) {
+ t.plan(2)
+
+ var server = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('ok')
+ pserver.close(function () {
+ server.close()
+ })
+ })
+
+ var pserver = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('proxy ok')
+ server.close(function () {
+ pserver.close()
+ })
+ })
+
+ var host = 'localhost'
+ server.listen(0, host, function () {
+ var port = this.address().port
+ pserver.listen(port + 1, host, function () {
+ var gyp = {
+ opts: {
+ proxy: 'http://' + host + ':' + (port + 1)
+ },
+ version: '42'
+ }
+ var url = 'http://' + host + ':' + port
+ var req = install.test.download(gyp, {}, url)
+ req.on('response', function (res) {
+ var body = ''
+ res.setEncoding('utf8')
+ res.on('data', function (data) {
+ body += data
+ })
+ res.on('end', function () {
+ t.strictEqual(body, 'proxy ok')
+ })
+ })
+ })
+ })
+})
+
+test('download over http with noproxy', function (t) {
+ t.plan(2)
+
+ var server = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('ok')
+ pserver.close(function () {
+ server.close()
+ })
+ })
+
+ var pserver = http.createServer(function (req, res) {
+ t.strictEqual(req.headers['user-agent'],
+ 'node-gyp v42 (node ' + process.version + ')')
+ res.end('proxy ok')
+ server.close(function () {
+ pserver.close()
+ })
+ })
+
+ var host = 'localhost'
+ server.listen(0, host, function () {
+ var port = this.address().port
+ pserver.listen(port + 1, host, function () {
+ var gyp = {
+ opts: {
+ proxy: 'http://' + host + ':' + (port + 1),
+ noproxy: 'localhost'
+ },
+ version: '42'
+ }
+ var url = 'http://' + host + ':' + port
+ var req = install.test.download(gyp, {}, url)
+ req.on('response', function (res) {
+ var body = ''
+ res.setEncoding('utf8')
+ res.on('data', function (data) {
+ body += data
+ })
+ res.on('end', function () {
+ t.strictEqual(body, 'ok')
+ })
+ })
+ })
+ })
+})
+
test('download with missing cafile', function (t) {
t.plan(1)
var gyp = {
@@ -116,7 +211,7 @@ test('download headers (actual)', function (t) {
process.release.name !== 'node' ||
semver.prerelease(process.version) !== null ||
semver.satisfies(process.version, '<10')) {
- return t.skip('Skipping acutal download of headers due to test environment configuration')
+ return t.skip('Skipping actual download of headers due to test environment configuration')
}
t.plan(17)
diff --git a/node_modules/node-gyp/test/test-find-python.js b/node_modules/node-gyp/test/test-find-python.js
index 1c86f45b7..6ca522a04 100644
--- a/node_modules/node-gyp/test/test-find-python.js
+++ b/node_modules/node-gyp/test/test-find-python.js
@@ -159,6 +159,8 @@ test('find python - no python, use python launcher', function (t) {
}
if (/sys\.executable/.test(args[args.length - 1])) {
cb(new Error('not found'))
+ } else if (f.winDefaultLocations.includes(program)) {
+ cb(new Error('not found'))
} else if (/sys\.version_info/.test(args[args.length - 1])) {
if (program === 'Z:\\snake.exe') {
cb(null, '2.7.14')
@@ -178,24 +180,21 @@ test('find python - no python, use python launcher', function (t) {
})
test('find python - no python, no python launcher, good guess', function (t) {
- t.plan(4)
+ t.plan(2)
- var re = /C:[\\/]Python27[\\/]python[.]exe/
+ var re = /C:[\\/]Python37[\\/]python[.]exe/
var f = new TestPythonFinder(null, done)
f.win = true
f.execFile = function (program, args, opts, cb) {
if (program === 'py.exe') {
- f.execFile = function (program, args, opts, cb) {
- poison(f, 'execFile')
- t.ok(re.test(program))
- t.ok(/sys\.version_info/.test(args[args.length - 1]))
- cb(null, '2.7.14')
- }
return cb(new Error('not found'))
}
if (/sys\.executable/.test(args[args.length - 1])) {
cb(new Error('not found'))
+ } else if (re.test(program) &&
+ /sys\.version_info/.test(args[args.length - 1])) {
+ cb(null, '3.7.3')
} else {
t.fail()
}
diff --git a/node_modules/npm-lifecycle/CHANGELOG.md b/node_modules/npm-lifecycle/CHANGELOG.md
deleted file mode 100644
index ccdd777ee..000000000
--- a/node_modules/npm-lifecycle/CHANGELOG.md
+++ /dev/null
@@ -1,184 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-<a name="3.1.4"></a>
-## [3.1.4](https://github.com/npm/lifecycle/compare/v3.1.3...v3.1.4) (2019-09-18)
-
-
-### Bug Fixes
-
-* filter functions and undefined out of makeEnv ([10c0c08](https://github.com/npm/lifecycle/commit/10c0c08))
-
-
-
-<a name="3.1.3"></a>
-## [3.1.3](https://github.com/npm/lifecycle/compare/v3.1.2...v3.1.3) (2019-08-12)
-
-
-### Bug Fixes
-
-* fail properly if uid-number raises an error ([e0e1b62](https://github.com/npm/lifecycle/commit/e0e1b62))
-
-
-
-<a name="3.1.2"></a>
-## [3.1.2](https://github.com/npm/lifecycle/compare/v3.1.1...v3.1.2) (2019-07-22)
-
-
-### Bug Fixes
-
-* do not exclude /path/ from process.env copying ([53e6318](https://github.com/npm/lifecycle/commit/53e6318))
-
-
-
-<a name="3.1.0"></a>
-# [3.1.0](https://github.com/npm/lifecycle/compare/v3.0.0...v3.1.0) (2019-07-17)
-
-
-### Bug Fixes
-
-* remove procInterrupt listener on SIGINT in procError ([ea18ed2](https://github.com/npm/lifecycle/commit/ea18ed2)), closes [#36](https://github.com/npm/lifecycle/issues/36) [#11](https://github.com/npm/lifecycle/issues/11) [#18](https://github.com/npm/lifecycle/issues/18)
-* set only one PATH env variable for child proc ([3aaf954](https://github.com/npm/lifecycle/commit/3aaf954)), closes [#22](https://github.com/npm/lifecycle/issues/22) [#25](https://github.com/npm/lifecycle/issues/25)
-
-
-### Features
-
-* **process.env.path:** Use platform specific path casing if present ([5523951](https://github.com/npm/lifecycle/commit/5523951)), closes [#29](https://github.com/npm/lifecycle/issues/29) [#30](https://github.com/npm/lifecycle/issues/30)
-
-
-
-<a name="3.0.0"></a>
-# [3.0.0](https://github.com/npm/lifecycle/compare/v2.1.1...v3.0.0) (2019-07-10)
-
-
-* node-gyp@5.0.2 ([3c5aae6](https://github.com/npm/lifecycle/commit/3c5aae6))
-
-
-### BREAKING CHANGES
-
-* requires modifying the version of node-gyp in npm cli.
-
-Required for https://github.com/npm/cli/pull/208
-Fix: https://github.com/npm/npm-lifecycle/issues/37
-Close: https://github.com/npm/npm-lifecycle/issues/38
-PR-URL: https://github.com/npm/npm-lifecycle/pull/38
-Credit: @irega
-Reviewed-by: @isaacs
-
-
-
-<a name="2.1.1"></a>
-## [2.1.1](https://github.com/npm/lifecycle/compare/v2.1.0...v2.1.1) (2019-05-08)
-
-
-### Bug Fixes
-
-* **test:** update postinstall script for fixture ([220cd70](https://github.com/npm/lifecycle/commit/220cd70))
-
-
-
-<a name="2.1.0"></a>
-# [2.1.0](https://github.com/npm/lifecycle/compare/v2.0.3...v2.1.0) (2018-08-13)
-
-
-### Bug Fixes
-
-* **windows:** revert writing all possible cases of PATH variables ([#22](https://github.com/npm/lifecycle/issues/22)) ([8fcaa21](https://github.com/npm/lifecycle/commit/8fcaa21)), closes [#20](https://github.com/npm/lifecycle/issues/20)
-
-
-### Features
-
-* **ci:** add node@10 to CI ([e206aa0](https://github.com/npm/lifecycle/commit/e206aa0))
-
-
-
-<a name="2.0.3"></a>
-## [2.0.3](https://github.com/npm/lifecycle/compare/v2.0.2...v2.0.3) (2018-05-16)
-
-
-
-<a name="2.0.2"></a>
-## [2.0.2](https://github.com/npm/lifecycle/compare/v2.0.1...v2.0.2) (2018-05-16)
-
-
-### Bug Fixes
-
-* **hooks:** run .hooks scripts even if package.json script is not present ([#13](https://github.com/npm/lifecycle/issues/13)) ([67adc2d](https://github.com/npm/lifecycle/commit/67adc2d))
-* **windows:** Write to all possible cases of PATH variables ([#17](https://github.com/npm/lifecycle/issues/17)) ([e4ecc54](https://github.com/npm/lifecycle/commit/e4ecc54))
-
-
-
-<a name="2.0.1"></a>
-## [2.0.1](https://github.com/npm/lifecycle/compare/v2.0.0...v2.0.1) (2018-03-08)
-
-
-### Bug Fixes
-
-* **log:** Fix formatting of invalid wd warning ([#12](https://github.com/npm/lifecycle/issues/12)) ([ced38f3](https://github.com/npm/lifecycle/commit/ced38f3))
-
-
-
-<a name="2.0.0"></a>
-# [2.0.0](https://github.com/npm/lifecycle/compare/v1.0.3...v2.0.0) (2017-11-17)
-
-
-### Features
-
-* **node-gyp:** use own node-gyp ([ae94ed2](https://github.com/npm/lifecycle/commit/ae94ed2))
-* **nodeOptions:** add "nodeOptions" option to set NODE_OPTIONS for child ([#7](https://github.com/npm/lifecycle/issues/7)) ([2eb7a38](https://github.com/npm/lifecycle/commit/2eb7a38))
-* **stdio:** add child process io options and default logging of piped stdout/err ([#3](https://github.com/npm/lifecycle/issues/3)) ([7b8281a](https://github.com/npm/lifecycle/commit/7b8281a))
-
-
-### BREAKING CHANGES
-
-* **node-gyp:** Previously you had to bring your own node-gyp AND you had
-to provide access the way npm does, by having a `bin` dir with a
-`node-gyp-bin` in it.
-
-Fixes: #4
-
-
-
-<a name="1.0.3"></a>
-## [1.0.3](https://github.com/npm/lifecycle/compare/v1.0.2...v1.0.3) (2017-09-01)
-
-
-### Bug Fixes
-
-* **runCmd:** add missing option to runCmd recursive queue call ([1a69ce8](https://github.com/npm/lifecycle/commit/1a69ce8))
-
-
-
-<a name="1.0.2"></a>
-## [1.0.2](https://github.com/npm/lifecycle/compare/v1.0.1...v1.0.2) (2017-08-17)
-
-
-
-<a name="1.0.1"></a>
-## [1.0.1](https://github.com/npm/lifecycle/compare/v1.0.0...v1.0.1) (2017-08-16)
-
-
-### Bug Fixes
-
-* **license:** fix up license documentation ([a784ca0](https://github.com/npm/lifecycle/commit/a784ca0))
-
-
-
-<a name="1.0.0"></a>
-# 1.0.0 (2017-08-16)
-
-
-### Bug Fixes
-
-* **misc:** use strict to fix node[@4](https://github.com/4) ([#2](https://github.com/npm/lifecycle/issues/2)) ([961ceb9](https://github.com/npm/lifecycle/commit/961ceb9))
-
-
-### Features
-
-* **api:** Extract from npm proper ([#1](https://github.com/npm/lifecycle/issues/1)) ([27d9930](https://github.com/npm/lifecycle/commit/27d9930))
-
-
-### BREAKING CHANGES
-
-* **api:** this is the initial implementation
diff --git a/node_modules/npm-lifecycle/LICENSE b/node_modules/npm-lifecycle/LICENSE
deleted file mode 100644
index 0b6c22874..000000000
--- a/node_modules/npm-lifecycle/LICENSE
+++ /dev/null
@@ -1,235 +0,0 @@
-The npm application
-Copyright (c) npm, Inc. and Contributors
-Licensed on the terms of The Artistic License 2.0
-
-Node package dependencies of the npm application
-Copyright (c) their respective copyright owners
-Licensed on their respective license terms
-
-The npm public registry at https://registry.npmjs.org
-and the npm website at https://www.npmjs.com
-Operated by npm, Inc.
-Use governed by terms published on https://www.npmjs.com
-
-"Node.js"
-Trademark Joyent, Inc., https://joyent.com
-Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
-
-The Node.js application
-Project of Node Foundation, https://nodejs.org
-
-The npm Logo
-Copyright (c) Mathias Pettersson and Brian Hammond
-
-"Gubblebum Blocky" typeface
-Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
-Used with permission
-
-
---------
-
-
-The Artistic License 2.0
-
-Copyright (c) 2000-2006, The Perl Foundation.
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-
-This license establishes the terms under which a given free software
-Package may be copied, modified, distributed, and/or redistributed.
-The intent is that the Copyright Holder maintains some artistic
-control over the development of that Package while still keeping the
-Package available as open source and free software.
-
-You are always permitted to make arrangements wholly outside of this
-license directly with the Copyright Holder of a given Package. If the
-terms of this license do not permit the full use that you propose to
-make of the Package, you should contact the Copyright Holder and seek
-a different licensing arrangement.
-
-Definitions
-
- "Copyright Holder" means the individual(s) or organization(s)
- named in the copyright notice for the entire Package.
-
- "Contributor" means any party that has contributed code or other
- material to the Package, in accordance with the Copyright Holder's
- procedures.
-
- "You" and "your" means any person who would like to copy,
- distribute, or modify the Package.
-
- "Package" means the collection of files distributed by the
- Copyright Holder, and derivatives of that collection and/or of
- those files. A given Package may consist of either the Standard
- Version, or a Modified Version.
-
- "Distribute" means providing a copy of the Package or making it
- accessible to anyone else, or in the case of a company or
- organization, to others outside of your company or organization.
-
- "Distributor Fee" means any fee that you charge for Distributing
- this Package or providing support for this Package to another
- party. It does not mean licensing fees.
-
- "Standard Version" refers to the Package if it has not been
- modified, or has been modified only in ways explicitly requested
- by the Copyright Holder.
-
- "Modified Version" means the Package, if it has been changed, and
- such changes were not explicitly requested by the Copyright
- Holder.
-
- "Original License" means this Artistic License as Distributed with
- the Standard Version of the Package, in its current version or as
- it may be modified by The Perl Foundation in the future.
-
- "Source" form means the source code, documentation source, and
- configuration files for the Package.
-
- "Compiled" form means the compiled bytecode, object code, binary,
- or any other form resulting from mechanical transformation or
- translation of the Source form.
-
-
-Permission for Use and Modification Without Distribution
-
-(1) You are permitted to use the Standard Version and create and use
-Modified Versions for any purpose without restriction, provided that
-you do not Distribute the Modified Version.
-
-
-Permissions for Redistribution of the Standard Version
-
-(2) You may Distribute verbatim copies of the Source form of the
-Standard Version of this Package in any medium without restriction,
-either gratis or for a Distributor Fee, provided that you duplicate
-all of the original copyright notices and associated disclaimers. At
-your discretion, such verbatim copies may or may not include a
-Compiled form of the Package.
-
-(3) You may apply any bug fixes, portability changes, and other
-modifications made available from the Copyright Holder. The resulting
-Package will still be considered the Standard Version, and as such
-will be subject to the Original License.
-
-
-Distribution of Modified Versions of the Package as Source
-
-(4) You may Distribute your Modified Version as Source (either gratis
-or for a Distributor Fee, and with or without a Compiled form of the
-Modified Version) provided that you clearly document how it differs
-from the Standard Version, including, but not limited to, documenting
-any non-standard features, executables, or modules, and provided that
-you do at least ONE of the following:
-
- (a) make the Modified Version available to the Copyright Holder
- of the Standard Version, under the Original License, so that the
- Copyright Holder may include your modifications in the Standard
- Version.
-
- (b) ensure that installation of your Modified Version does not
- prevent the user installing or running the Standard Version. In
- addition, the Modified Version must bear a name that is different
- from the name of the Standard Version.
-
- (c) allow anyone who receives a copy of the Modified Version to
- make the Source form of the Modified Version available to others
- under
-
- (i) the Original License or
-
- (ii) a license that permits the licensee to freely copy,
- modify and redistribute the Modified Version using the same
- licensing terms that apply to the copy that the licensee
- received, and requires that the Source form of the Modified
- Version, and of any works derived from it, be made freely
- available in that license fees are prohibited but Distributor
- Fees are allowed.
-
-
-Distribution of Compiled Forms of the Standard Version
-or Modified Versions without the Source
-
-(5) You may Distribute Compiled forms of the Standard Version without
-the Source, provided that you include complete instructions on how to
-get the Source of the Standard Version. Such instructions must be
-valid at the time of your distribution. If these instructions, at any
-time while you are carrying out such distribution, become invalid, you
-must provide new instructions on demand or cease further distribution.
-If you provide valid instructions or cease distribution within thirty
-days after you become aware that the instructions are invalid, then
-you do not forfeit any of your rights under this license.
-
-(6) You may Distribute a Modified Version in Compiled form without
-the Source, provided that you comply with Section 4 with respect to
-the Source of the Modified Version.
-
-
-Aggregating or Linking the Package
-
-(7) You may aggregate the Package (either the Standard Version or
-Modified Version) with other packages and Distribute the resulting
-aggregation provided that you do not charge a licensing fee for the
-Package. Distributor Fees are permitted, and licensing fees for other
-components in the aggregation are permitted. The terms of this license
-apply to the use and Distribution of the Standard or Modified Versions
-as included in the aggregation.
-
-(8) You are permitted to link Modified and Standard Versions with
-other works, to embed the Package in a larger work of your own, or to
-build stand-alone binary or bytecode versions of applications that
-include the Package, and Distribute the result without restriction,
-provided the result does not expose a direct interface to the Package.
-
-
-Items That are Not Considered Part of a Modified Version
-
-(9) Works (including, but not limited to, modules and scripts) that
-merely extend or make use of the Package, do not, by themselves, cause
-the Package to be a Modified Version. In addition, such works are not
-considered parts of the Package itself, and are not subject to the
-terms of this license.
-
-
-General Provisions
-
-(10) Any use, modification, and distribution of the Standard or
-Modified Versions is governed by this Artistic License. By using,
-modifying or distributing the Package, you accept this license. Do not
-use, modify, or distribute the Package, if you do not accept this
-license.
-
-(11) If your Modified Version has been derived from a Modified
-Version made by someone other than you, you are nevertheless required
-to ensure that your Modified Version complies with the requirements of
-this license.
-
-(12) This license does not grant you the right to use any trademark,
-service mark, tradename, or logo of the Copyright Holder.
-
-(13) This license includes the non-exclusive, worldwide,
-free-of-charge patent license to make, have made, use, offer to sell,
-sell, import and otherwise transfer the Package with respect to any
-patent claims licensable by the Copyright Holder that are necessarily
-infringed by the Package. If you institute patent litigation
-(including a cross-claim or counterclaim) against any party alleging
-that the Package constitutes direct or contributory patent
-infringement, then this Artistic License to you shall terminate on the
-date that such litigation is filed.
-
-(14) Disclaimer of Warranty:
-THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
-IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
-NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
-LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
---------
diff --git a/node_modules/npm-lifecycle/README.md b/node_modules/npm-lifecycle/README.md
deleted file mode 100644
index c81d3d7a1..000000000
--- a/node_modules/npm-lifecycle/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# npm-lifecycle [![npm version](https://img.shields.io/npm/v/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![license](https://img.shields.io/npm/l/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![Travis](https://img.shields.io/travis/npm/npm-lifecycle/latest.svg)](https://travis-ci.org/npm/npm-lifecycle) [![AppVeyor](https://img.shields.io/appveyor/ci/npm/npm-lifecycle/latest.svg)](https://ci.appveyor.com/project/npm/npm-lifecycle) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-lifecycle/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-lifecycle?branch=latest)
-
-[`npm-lifecycle`](https://github.com/npm/npm-lifecycle) is a standalone library for
-executing packages' lifecycle scripts. It is extracted from npm itself and
-intended to be fully compatible with the way npm executes individual scripts.
-
-## Install
-
-`$ npm install npm-lifecycle`
-
-## Table of Contents
-
-* [Example](#example)
-* [Features](#features)
-* [Contributing](#contributing)
-* [API](#api)
- * [`lifecycle`](#lifecycle)
-
-### Example
-
-```javascript
-// idk yet
-```
-
-### Features
-
-* something cool
-
-### Contributing
-
-The npm team enthusiastically welcomes contributions and project participation!
-There's a bunch of things you can do if you want to contribute! The [Contributor
-Guide](CONTRIBUTING.md) has all the information you need for everything from
-reporting bugs to contributing entire new features. Please don't hesitate to
-jump in if you'd like to, or even ask us questions if something isn't clear.
-
-### API
-
-#### <a name="lifecycle"></a> `> lifecycle(name, pkg, wd, [opts]) -> Promise`
-
-##### Arguments
-
-* `opts.stdio` - the [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio)
-passed to the child process. `[0, 1, 2]` by default.
-
-##### Example
-
-```javascript
-lifecycle()
-```
diff --git a/node_modules/npm-lifecycle/index.js b/node_modules/npm-lifecycle/index.js
deleted file mode 100644
index 337de7141..000000000
--- a/node_modules/npm-lifecycle/index.js
+++ /dev/null
@@ -1,497 +0,0 @@
-'use strict'
-
-exports = module.exports = lifecycle
-exports.makeEnv = makeEnv
-exports._incorrectWorkingDirectory = _incorrectWorkingDirectory
-
-// for testing
-const platform = process.env.__TESTING_FAKE_PLATFORM__ || process.platform
-const isWindows = platform === 'win32'
-const spawn = require('./lib/spawn')
-const path = require('path')
-const Stream = require('stream').Stream
-const fs = require('graceful-fs')
-const chain = require('slide').chain
-const uidNumber = require('uid-number')
-const umask = require('umask')
-const which = require('which')
-const byline = require('byline')
-const resolveFrom = require('resolve-from')
-
-const DEFAULT_NODE_GYP_PATH = resolveFrom(__dirname, 'node-gyp/bin/node-gyp')
-const hookStatCache = new Map()
-
-let PATH = isWindows ? 'Path' : 'PATH'
-exports._pathEnvName = PATH
-const delimiter = path.delimiter
-
-// windows calls its path 'Path' usually, but this is not guaranteed.
-// merge them all together in the order they appear in the object.
-const mergePath = env =>
- Object.keys(env).filter(p => /^path$/i.test(p) && env[p])
- .map(p => env[p].split(delimiter))
- .reduce((set, p) => set.concat(p.filter(p => !set.includes(p))), [])
- .join(delimiter)
-exports._mergePath = mergePath
-
-const setPathEnv = (env, path) => {
- // first ensure that the canonical value is set.
- env[PATH] = path
- // also set any other case values, because windows.
- Object.keys(env)
- .filter(p => p !== PATH && /^path$/i.test(p))
- .forEach(p => { env[p] = path })
-}
-exports._setPathEnv = setPathEnv
-
-function logid (pkg, stage) {
- return pkg._id + '~' + stage + ':'
-}
-
-function hookStat (dir, stage, cb) {
- const hook = path.join(dir, '.hooks', stage)
- const cachedStatError = hookStatCache.get(hook)
-
- if (cachedStatError === undefined) {
- return fs.stat(hook, function (statError) {
- hookStatCache.set(hook, statError)
- cb(statError)
- })
- }
-
- return setImmediate(() => cb(cachedStatError))
-}
-
-function lifecycle (pkg, stage, wd, opts) {
- return new Promise((resolve, reject) => {
- while (pkg && pkg._data) pkg = pkg._data
- if (!pkg) return reject(new Error('Invalid package data'))
-
- opts.log.info('lifecycle', logid(pkg, stage), pkg._id)
- if (!pkg.scripts) pkg.scripts = {}
-
- if (stage === 'prepublish' && opts.ignorePrepublish) {
- opts.log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-prepublish is set to true', pkg._id)
- delete pkg.scripts.prepublish
- }
-
- hookStat(opts.dir, stage, function (statError) {
- // makeEnv is a slow operation. This guard clause prevents makeEnv being called
- // and avoids a ton of unnecessary work, and results in a major perf boost.
- if (!pkg.scripts[stage] && statError) return resolve()
-
- validWd(wd || path.resolve(opts.dir, pkg.name), function (er, wd) {
- if (er) return reject(er)
-
- if ((wd.indexOf(opts.dir) !== 0 || _incorrectWorkingDirectory(wd, pkg)) &&
- !opts.unsafePerm && pkg.scripts[stage]) {
- opts.log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd', pkg._id, pkg.scripts[stage], `(wd=${wd})`)
- return resolve()
- }
-
- // set the env variables, then run scripts as a child process.
- var env = makeEnv(pkg, opts)
- env.npm_lifecycle_event = stage
- env.npm_node_execpath = env.NODE = env.NODE || process.execPath
- env.npm_execpath = require.main.filename
- env.INIT_CWD = process.cwd()
- env.npm_config_node_gyp = env.npm_config_node_gyp || DEFAULT_NODE_GYP_PATH
-
- // 'nobody' typically doesn't have permission to write to /tmp
- // even if it's never used, sh freaks out.
- if (!opts.unsafePerm) env.TMPDIR = wd
-
- lifecycle_(pkg, stage, wd, opts, env, (er) => {
- if (er) return reject(er)
- return resolve()
- })
- })
- })
- })
-}
-
-function _incorrectWorkingDirectory (wd, pkg) {
- return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length
-}
-
-function lifecycle_ (pkg, stage, wd, opts, env, cb) {
- var pathArr = []
- var p = wd.split(/[\\/]node_modules[\\/]/)
- var acc = path.resolve(p.shift())
-
- p.forEach(function (pp) {
- pathArr.unshift(path.join(acc, 'node_modules', '.bin'))
- acc = path.join(acc, 'node_modules', pp)
- })
- pathArr.unshift(path.join(acc, 'node_modules', '.bin'))
-
- // we also unshift the bundled node-gyp-bin folder so that
- // the bundled one will be used for installing things.
- pathArr.unshift(path.join(__dirname, 'node-gyp-bin'))
-
- if (shouldPrependCurrentNodeDirToPATH(opts)) {
- // prefer current node interpreter in child scripts
- pathArr.push(path.dirname(process.execPath))
- }
-
- const existingPath = mergePath(env)
- if (existingPath) pathArr.push(existingPath)
- const envPath = pathArr.join(isWindows ? ';' : ':')
- setPathEnv(env, envPath)
-
- var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage)
-
- if (opts.ignoreScripts) {
- opts.log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-scripts is set to true', pkg._id)
- packageLifecycle = false
- } else if (packageLifecycle) {
- // define this here so it's available to all scripts.
- env.npm_lifecycle_script = pkg.scripts[stage]
- } else {
- opts.log.silly('lifecycle', logid(pkg, stage), 'no script for ' + stage + ', continuing')
- }
-
- function done (er) {
- if (er) {
- if (opts.force) {
- opts.log.info('lifecycle', logid(pkg, stage), 'forced, continuing', er)
- er = null
- } else if (opts.failOk) {
- opts.log.warn('lifecycle', logid(pkg, stage), 'continuing anyway', er.message)
- er = null
- }
- }
- cb(er)
- }
-
- chain(
- [
- packageLifecycle && [runPackageLifecycle, pkg, stage, env, wd, opts],
- [runHookLifecycle, pkg, stage, env, wd, opts]
- ],
- done
- )
-}
-
-function shouldPrependCurrentNodeDirToPATH (opts) {
- const cfgsetting = opts.scriptsPrependNodePath
- if (cfgsetting === false) return false
- if (cfgsetting === true) return true
-
- var isDifferentNodeInPath
-
- var foundExecPath
- try {
- foundExecPath = which.sync(path.basename(process.execPath), { pathExt: isWindows ? ';' : ':' })
- // Apply `fs.realpath()` here to avoid false positives when `node` is a symlinked executable.
- isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !==
- fs.realpathSync(foundExecPath).toUpperCase()
- } catch (e) {
- isDifferentNodeInPath = true
- }
-
- if (cfgsetting === 'warn-only') {
- if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) {
- if (foundExecPath) {
- opts.log.warn('lifecycle', 'The node binary used for scripts is', foundExecPath, 'but npm is using', process.execPath, 'itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
- } else {
- opts.log.warn('lifecycle', 'npm is using', process.execPath, 'but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.')
- }
- shouldPrependCurrentNodeDirToPATH.hasWarned = true
- }
-
- return false
- }
-
- return isDifferentNodeInPath
-}
-
-function validWd (d, cb) {
- fs.stat(d, function (er, st) {
- if (er || !st.isDirectory()) {
- var p = path.dirname(d)
- if (p === d) {
- return cb(new Error('Could not find suitable wd'))
- }
- return validWd(p, cb)
- }
- return cb(null, d)
- })
-}
-
-function runPackageLifecycle (pkg, stage, env, wd, opts, cb) {
- // run package lifecycle scripts in the package root, or the nearest parent.
- var cmd = env.npm_lifecycle_script
-
- var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd +
- '\n> ' + cmd + '\n'
- runCmd(note, cmd, pkg, env, stage, wd, opts, cb)
-}
-
-var running = false
-var queue = []
-function dequeue () {
- running = false
- if (queue.length) {
- var r = queue.shift()
- runCmd.apply(null, r)
- }
-}
-
-function runCmd (note, cmd, pkg, env, stage, wd, opts, cb) {
- if (running) {
- queue.push([note, cmd, pkg, env, stage, wd, opts, cb])
- return
- }
-
- running = true
- opts.log.pause()
- var unsafe = opts.unsafePerm
- var user = unsafe ? null : opts.user
- var group = unsafe ? null : opts.group
-
- if (opts.log.level !== 'silent') {
- opts.log.clearProgress()
- console.log(note)
- opts.log.showProgress()
- }
- opts.log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe)
-
- if (isWindows) {
- unsafe = true
- }
-
- if (unsafe) {
- runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, 0, 0, cb)
- } else {
- uidNumber(user, group, function (er, uid, gid) {
- if (er) {
- er.code = 'EUIDLOOKUP'
- opts.log.resume()
- process.nextTick(dequeue)
- return cb(er)
- }
- runCmd_(cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb)
- })
- }
-}
-
-const getSpawnArgs = ({ cmd, wd, opts, uid, gid, unsafe, env }) => {
- const conf = {
- cwd: wd,
- env: env,
- stdio: opts.stdio || [ 0, 1, 2 ]
- }
-
- if (!unsafe) {
- conf.uid = uid ^ 0
- conf.gid = gid ^ 0
- }
-
- const customShell = opts.scriptShell
-
- let sh = 'sh'
- let shFlag = '-c'
- if (customShell) {
- sh = customShell
- } else if (isWindows || opts._TESTING_FAKE_WINDOWS_) {
- sh = process.env.comspec || 'cmd'
- // '/d /s /c' is used only for cmd.exe.
- if (/^(?:.*\\)?cmd(?:\.exe)?$/i.test(sh)) {
- shFlag = '/d /s /c'
- conf.windowsVerbatimArguments = true
- }
- }
-
- return [sh, [shFlag, cmd], conf]
-}
-
-exports._getSpawnArgs = getSpawnArgs
-
-function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
- function cb (er) {
- cb_.apply(null, arguments)
- opts.log.resume()
- process.nextTick(dequeue)
- }
-
- const [sh, args, conf] = getSpawnArgs({ cmd, wd, opts, uid, gid, unsafe, env })
-
- opts.log.verbose('lifecycle', logid(pkg, stage), 'PATH:', env[PATH])
- opts.log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd)
- opts.log.silly('lifecycle', logid(pkg, stage), 'Args:', args)
-
- var proc = spawn(sh, args, conf, opts.log)
-
- proc.on('error', procError)
- proc.on('close', function (code, signal) {
- opts.log.silly('lifecycle', logid(pkg, stage), 'Returned: code:', code, ' signal:', signal)
- if (signal) {
- process.kill(process.pid, signal)
- } else if (code) {
- var er = new Error('Exit status ' + code)
- er.errno = code
- }
- procError(er)
- })
- byline(proc.stdout).on('data', function (data) {
- opts.log.verbose('lifecycle', logid(pkg, stage), 'stdout', data.toString())
- })
- byline(proc.stderr).on('data', function (data) {
- opts.log.verbose('lifecycle', logid(pkg, stage), 'stderr', data.toString())
- })
- process.once('SIGTERM', procKill)
- process.once('SIGINT', procInterupt)
-
- function procError (er) {
- if (er) {
- opts.log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script')
- er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' +
- er.message
- if (er.code !== 'EPERM') {
- er.code = 'ELIFECYCLE'
- }
- fs.stat(opts.dir, function (statError, d) {
- if (statError && statError.code === 'ENOENT' && opts.dir.split(path.sep).slice(-1)[0] === 'node_modules') {
- opts.log.warn('', 'Local package.json exists, but node_modules missing, did you mean to install?')
- }
- })
- er.pkgid = pkg._id
- er.stage = stage
- er.script = cmd
- er.pkgname = pkg.name
- }
- process.removeListener('SIGTERM', procKill)
- process.removeListener('SIGTERM', procInterupt)
- process.removeListener('SIGINT', procKill)
- process.removeListener('SIGINT', procInterupt)
- return cb(er)
- }
- function procKill () {
- proc.kill()
- }
- function procInterupt () {
- proc.kill('SIGINT')
- proc.on('exit', function () {
- process.exit()
- })
- process.once('SIGINT', procKill)
- }
-}
-
-function runHookLifecycle (pkg, stage, env, wd, opts, cb) {
- hookStat(opts.dir, stage, function (er) {
- if (er) return cb()
- var cmd = path.join(opts.dir, '.hooks', stage)
- var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd +
- '\n> ' + cmd
- runCmd(note, cmd, pkg, env, stage, wd, opts, cb)
- })
-}
-
-function makeEnv (data, opts, prefix, env) {
- prefix = prefix || 'npm_package_'
- if (!env) {
- env = {}
- for (var i in process.env) {
- if (!i.match(/^npm_/)) {
- env[i] = process.env[i]
- }
- }
-
- // express and others respect the NODE_ENV value.
- if (opts.production) env.NODE_ENV = 'production'
- } else if (!data.hasOwnProperty('_lifecycleEnv')) {
- Object.defineProperty(data, '_lifecycleEnv',
- {
- value: env,
- enumerable: false
- }
- )
- }
-
- if (opts.nodeOptions) env.NODE_OPTIONS = opts.nodeOptions
-
- for (i in data) {
- if (i.charAt(0) !== '_') {
- var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
- if (i === 'readme') {
- continue
- }
- if (data[i] && typeof data[i] === 'object') {
- try {
- // quick and dirty detection for cyclical structures
- JSON.stringify(data[i])
- makeEnv(data[i], opts, envKey + '_', env)
- } catch (ex) {
- // usually these are package objects.
- // just get the path and basic details.
- var d = data[i]
- makeEnv(
- { name: d.name, version: d.version, path: d.path },
- opts,
- envKey + '_',
- env
- )
- }
- } else {
- env[envKey] = String(data[i])
- env[envKey] = env[envKey].indexOf('\n') !== -1
- ? JSON.stringify(env[envKey])
- : env[envKey]
- }
- }
- }
-
- if (prefix !== 'npm_package_') return env
-
- prefix = 'npm_config_'
- var pkgConfig = {}
- var pkgVerConfig = {}
- var namePref = data.name + ':'
- var verPref = data.name + '@' + data.version + ':'
-
- Object.keys(opts.config).forEach(function (i) {
- // in some rare cases (e.g. working with nerf darts), there are segmented
- // "private" (underscore-prefixed) config names -- don't export
- if ((i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0) || i.match(/:_/)) {
- return
- }
- var value = opts.config[i]
- if (value instanceof Stream || Array.isArray(value) || typeof value === 'function') return
- if (i.match(/umask/)) value = umask.toString(value)
-
- if (!value) value = ''
- else if (typeof value === 'number') value = '' + value
- else if (typeof value !== 'string') value = JSON.stringify(value)
-
- if (typeof value !== 'string') {
- return
- }
-
- value = value.indexOf('\n') !== -1
- ? JSON.stringify(value)
- : value
- i = i.replace(/^_+/, '')
- var k
- if (i.indexOf(namePref) === 0) {
- k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, '_')
- pkgConfig[k] = value
- } else if (i.indexOf(verPref) === 0) {
- k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, '_')
- pkgVerConfig[k] = value
- }
- var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
- env[envKey] = value
- })
-
- prefix = 'npm_package_config_'
- ;[pkgConfig, pkgVerConfig].forEach(function (conf) {
- for (var i in conf) {
- var envKey = (prefix + i)
- env[envKey] = conf[i]
- }
- })
-
- return env
-}
diff --git a/node_modules/npm-lifecycle/lib/spawn.js b/node_modules/npm-lifecycle/lib/spawn.js
deleted file mode 100644
index 30e5b8184..000000000
--- a/node_modules/npm-lifecycle/lib/spawn.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict'
-
-module.exports = spawn
-
-const _spawn = require('child_process').spawn
-const EventEmitter = require('events').EventEmitter
-
-let progressEnabled
-let running = 0
-
-function startRunning (log) {
- if (progressEnabled == null) progressEnabled = log.progressEnabled
- if (progressEnabled) log.disableProgress()
- ++running
-}
-
-function stopRunning (log) {
- --running
- if (progressEnabled && running === 0) log.enableProgress()
-}
-
-function willCmdOutput (stdio) {
- if (stdio === 'inherit') return true
- if (!Array.isArray(stdio)) return false
- for (let fh = 1; fh <= 2; ++fh) {
- if (stdio[fh] === 'inherit') return true
- if (stdio[fh] === 1 || stdio[fh] === 2) return true
- }
- return false
-}
-
-function spawn (cmd, args, options, log) {
- const cmdWillOutput = willCmdOutput(options && options.stdio)
-
- if (cmdWillOutput) startRunning(log)
- const raw = _spawn(cmd, args, options)
- const cooked = new EventEmitter()
-
- raw.on('error', function (er) {
- if (cmdWillOutput) stopRunning(log)
- er.file = cmd
- cooked.emit('error', er)
- }).on('close', function (code, signal) {
- if (cmdWillOutput) stopRunning(log)
- // Create ENOENT error because Node.js v8.0 will not emit
- // an `error` event if the command could not be found.
- if (code === 127) {
- const er = new Error('spawn ENOENT')
- er.code = 'ENOENT'
- er.errno = 'ENOENT'
- er.syscall = 'spawn'
- er.file = cmd
- cooked.emit('error', er)
- } else {
- cooked.emit('close', code, signal)
- }
- })
-
- cooked.stdin = raw.stdin
- cooked.stdout = raw.stdout
- cooked.stderr = raw.stderr
- cooked.kill = function (sig) { return raw.kill(sig) }
-
- return cooked
-}
diff --git a/node_modules/npm-lifecycle/node-gyp-bin/node-gyp b/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
deleted file mode 100755
index 70efb6f33..000000000
--- a/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-if [ "x$npm_config_node_gyp" = "x" ]; then
- node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
-else
- "$npm_config_node_gyp" "$@"
-fi
diff --git a/node_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd b/node_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd
deleted file mode 100755
index 1ef2ae0c6..000000000
--- a/node_modules/npm-lifecycle/node-gyp-bin/node-gyp.cmd
+++ /dev/null
@@ -1,5 +0,0 @@
-if not defined npm_config_node_gyp (
- node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
-) else (
- node "%npm_config_node_gyp%" %*
-)
diff --git a/node_modules/npm-lifecycle/node_modules/.bin/which b/node_modules/npm-lifecycle/node_modules/.bin/which
deleted file mode 120000
index f62471c85..000000000
--- a/node_modules/npm-lifecycle/node_modules/.bin/which
+++ /dev/null
@@ -1 +0,0 @@
-../which/bin/which \ No newline at end of file
diff --git a/node_modules/npm-lifecycle/node_modules/which/CHANGELOG.md b/node_modules/npm-lifecycle/node_modules/which/CHANGELOG.md
deleted file mode 100644
index 3d83d2694..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/CHANGELOG.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# Changes
-
-
-## 1.3.1
-
-* update deps
-* update travis
-
-## v1.3.0
-
-* Add nothrow option to which.sync
-* update tap
-
-## v1.2.14
-
-* appveyor: drop node 5 and 0.x
-* travis-ci: add node 6, drop 0.x
-
-## v1.2.13
-
-* test: Pass missing option to pass on windows
-* update tap
-* update isexe to 2.0.0
-* neveragain.tech pledge request
-
-## v1.2.12
-
-* Removed unused require
-
-## v1.2.11
-
-* Prevent changelog script from being included in package
-
-## v1.2.10
-
-* Use env.PATH only, not env.Path
-
-## v1.2.9
-
-* fix for paths starting with ../
-* Remove unused `is-absolute` module
-
-## v1.2.8
-
-* bullet items in changelog that contain (but don't start with) #
-
-## v1.2.7
-
-* strip 'update changelog' changelog entries out of changelog
-
-## v1.2.6
-
-* make the changelog bulleted
-
-## v1.2.5
-
-* make a changelog, and keep it up to date
-* don't include tests in package
-* Properly handle relative-path executables
-* appveyor
-* Attach error code to Not Found error
-* Make tests pass on Windows
-
-## v1.2.4
-
-* Fix typo
-
-## v1.2.3
-
-* update isexe, fix regression in pathExt handling
-
-## v1.2.2
-
-* update deps, use isexe module, test windows
-
-## v1.2.1
-
-* Sometimes windows PATH entries are quoted
-* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
-* doc cli
-
-## v1.2.0
-
-* Add support for opt.all and -as cli flags
-* test the bin
-* update travis
-* Allow checking for multiple programs in bin/which
-* tap 2
-
-## v1.1.2
-
-* travis
-* Refactored and fixed undefined error on Windows
-* Support strict mode
-
-## v1.1.1
-
-* test +g exes against secondary groups, if available
-* Use windows exe semantics on cygwin & msys
-* cwd should be first in path on win32, not last
-* Handle lower-case 'env.Path' on Windows
-* Update docs
-* use single-quotes
-
-## v1.1.0
-
-* Add tests, depend on is-absolute
-
-## v1.0.9
-
-* which.js: root is allowed to execute files owned by anyone
-
-## v1.0.8
-
-* don't use graceful-fs
-
-## v1.0.7
-
-* add license to package.json
-
-## v1.0.6
-
-* isc license
-
-## 1.0.5
-
-* Awful typo
-
-## 1.0.4
-
-* Test for path absoluteness properly
-* win: Allow '' as a pathext if cmd has a . in it
-
-## 1.0.3
-
-* Remove references to execPath
-* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
-* Make `isExe()` always return true on Windows.
-* MIT
-
-## 1.0.2
-
-* Only files can be exes
-
-## 1.0.1
-
-* Respect the PATHEXT env for win32 support
-* should 0755 the bin
-* binary
-* guts
-* package
-* 1st
diff --git a/node_modules/npm-lifecycle/node_modules/which/LICENSE b/node_modules/npm-lifecycle/node_modules/which/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm-lifecycle/node_modules/which/README.md b/node_modules/npm-lifecycle/node_modules/which/README.md
deleted file mode 100644
index 8c0b0cbf7..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# which
-
-Like the unix `which` utility.
-
-Finds the first instance of a specified executable in the PATH
-environment variable. Does not cache the results, so `hash -r` is not
-needed when the PATH changes.
-
-## USAGE
-
-```javascript
-var which = require('which')
-
-// async usage
-which('node', function (er, resolvedPath) {
- // er is returned if no "node" is found on the PATH
- // if it is found, then the absolute path to the exec is returned
-})
-
-// sync usage
-// throws if not found
-var resolved = which.sync('node')
-
-// if nothrow option is used, returns null if not found
-resolved = which.sync('node', {nothrow: true})
-
-// Pass options to override the PATH and PATHEXT environment vars.
-which('node', { path: someOtherPath }, function (er, resolved) {
- if (er)
- throw er
- console.log('found at %j', resolved)
-})
-```
-
-## CLI USAGE
-
-Same as the BSD `which(1)` binary.
-
-```
-usage: which [-as] program ...
-```
-
-## OPTIONS
-
-You may pass an options object as the second argument.
-
-- `path`: Use instead of the `PATH` environment variable.
-- `pathExt`: Use instead of the `PATHEXT` environment variable.
-- `all`: Return all matches, instead of just the first one. Note that
- this means the function returns an array of strings instead of a
- single string.
diff --git a/node_modules/npm-lifecycle/node_modules/which/bin/which b/node_modules/npm-lifecycle/node_modules/which/bin/which
deleted file mode 100755
index 7cee3729e..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/bin/which
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env node
-var which = require("../")
-if (process.argv.length < 3)
- usage()
-
-function usage () {
- console.error('usage: which [-as] program ...')
- process.exit(1)
-}
-
-var all = false
-var silent = false
-var dashdash = false
-var args = process.argv.slice(2).filter(function (arg) {
- if (dashdash || !/^-/.test(arg))
- return true
-
- if (arg === '--') {
- dashdash = true
- return false
- }
-
- var flags = arg.substr(1).split('')
- for (var f = 0; f < flags.length; f++) {
- var flag = flags[f]
- switch (flag) {
- case 's':
- silent = true
- break
- case 'a':
- all = true
- break
- default:
- console.error('which: illegal option -- ' + flag)
- usage()
- }
- }
- return false
-})
-
-process.exit(args.reduce(function (pv, current) {
- try {
- var f = which.sync(current, { all: all })
- if (all)
- f = f.join('\n')
- if (!silent)
- console.log(f)
- return pv;
- } catch (e) {
- return 1;
- }
-}, 0))
diff --git a/node_modules/npm-lifecycle/node_modules/which/package.json b/node_modules/npm-lifecycle/node_modules/which/package.json
deleted file mode 100644
index a08065b2d..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "which@^1.3.1",
- "_id": "which@1.3.1",
- "_inBundle": false,
- "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "_location": "/npm-lifecycle/which",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "which@^1.3.1",
- "name": "which",
- "escapedName": "which",
- "rawSpec": "^1.3.1",
- "saveSpec": null,
- "fetchSpec": "^1.3.1"
- },
- "_requiredBy": [
- "/npm-lifecycle"
- ],
- "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a",
- "_spec": "which@^1.3.1",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/npm-lifecycle",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "bin": {
- "which": "bin/which"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-which/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "deprecated": false,
- "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
- "devDependencies": {
- "mkdirp": "^0.5.0",
- "rimraf": "^2.6.2",
- "tap": "^12.0.1"
- },
- "files": [
- "which.js",
- "bin/which"
- ],
- "homepage": "https://github.com/isaacs/node-which#readme",
- "license": "ISC",
- "main": "which.js",
- "name": "which",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-which.git"
- },
- "scripts": {
- "changelog": "bash gen-changelog.sh",
- "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}",
- "test": "tap test/*.js --cov"
- },
- "version": "1.3.1"
-}
diff --git a/node_modules/npm-lifecycle/node_modules/which/which.js b/node_modules/npm-lifecycle/node_modules/which/which.js
deleted file mode 100644
index 4347f91a1..000000000
--- a/node_modules/npm-lifecycle/node_modules/which/which.js
+++ /dev/null
@@ -1,135 +0,0 @@
-module.exports = which
-which.sync = whichSync
-
-var isWindows = process.platform === 'win32' ||
- process.env.OSTYPE === 'cygwin' ||
- process.env.OSTYPE === 'msys'
-
-var path = require('path')
-var COLON = isWindows ? ';' : ':'
-var isexe = require('isexe')
-
-function getNotFoundError (cmd) {
- var er = new Error('not found: ' + cmd)
- er.code = 'ENOENT'
-
- return er
-}
-
-function getPathInfo (cmd, opt) {
- var colon = opt.colon || COLON
- var pathEnv = opt.path || process.env.PATH || ''
- var pathExt = ['']
-
- pathEnv = pathEnv.split(colon)
-
- var pathExtExe = ''
- if (isWindows) {
- pathEnv.unshift(process.cwd())
- pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
- pathExt = pathExtExe.split(colon)
-
-
- // Always test the cmd itself first. isexe will check to make sure
- // it's found in the pathExt set.
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
- pathExt.unshift('')
- }
-
- // If it has a slash, then we don't bother searching the pathenv.
- // just check the file itself, and that's it.
- if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
- pathEnv = ['']
-
- return {
- env: pathEnv,
- ext: pathExt,
- extExe: pathExtExe
- }
-}
-
-function which (cmd, opt, cb) {
- if (typeof opt === 'function') {
- cb = opt
- opt = {}
- }
-
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
-
- ;(function F (i, l) {
- if (i === l) {
- if (opt.all && found.length)
- return cb(null, found)
- else
- return cb(getNotFoundError(cmd))
- }
-
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
-
- var p = path.join(pathPart, cmd)
- if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- ;(function E (ii, ll) {
- if (ii === ll) return F(i + 1, l)
- var ext = pathExt[ii]
- isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
- if (!er && is) {
- if (opt.all)
- found.push(p + ext)
- else
- return cb(null, p + ext)
- }
- return E(ii + 1, ll)
- })
- })(0, pathExt.length)
- })(0, pathEnv.length)
-}
-
-function whichSync (cmd, opt) {
- opt = opt || {}
-
- var info = getPathInfo(cmd, opt)
- var pathEnv = info.env
- var pathExt = info.ext
- var pathExtExe = info.extExe
- var found = []
-
- for (var i = 0, l = pathEnv.length; i < l; i ++) {
- var pathPart = pathEnv[i]
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
- pathPart = pathPart.slice(1, -1)
-
- var p = path.join(pathPart, cmd)
- if (!pathPart && /^\.[\\\/]/.test(cmd)) {
- p = cmd.slice(0, 2) + p
- }
- for (var j = 0, ll = pathExt.length; j < ll; j ++) {
- var cur = p + pathExt[j]
- var is
- try {
- is = isexe.sync(cur, { pathExt: pathExtExe })
- if (is) {
- if (opt.all)
- found.push(cur)
- else
- return cur
- }
- } catch (ex) {}
- }
- }
-
- if (opt.all && found.length)
- return found
-
- if (opt.nothrow)
- return null
-
- throw getNotFoundError(cmd)
-}
diff --git a/node_modules/npm-lifecycle/package.json b/node_modules/npm-lifecycle/package.json
deleted file mode 100644
index beeb59895..000000000
--- a/node_modules/npm-lifecycle/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_from": "npm-lifecycle@3.1.4",
- "_id": "npm-lifecycle@3.1.4",
- "_inBundle": false,
- "_integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==",
- "_location": "/npm-lifecycle",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "npm-lifecycle@3.1.4",
- "name": "npm-lifecycle",
- "escapedName": "npm-lifecycle",
- "rawSpec": "3.1.4",
- "saveSpec": null,
- "fetchSpec": "3.1.4"
- },
- "_requiredBy": [
- "#USER",
- "/",
- "/libcipm",
- "/libnpm"
- ],
- "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz",
- "_shasum": "de6975c7d8df65f5150db110b57cce498b0b604c",
- "_spec": "npm-lifecycle@3.1.4",
- "_where": "/Users/mperrotte/npminc/cli",
- "author": {
- "name": "Mike Sherov"
- },
- "bugs": {
- "url": "https://github.com/npm/lifecycle/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "byline": "^5.0.0",
- "graceful-fs": "^4.1.15",
- "node-gyp": "^5.0.2",
- "resolve-from": "^4.0.0",
- "slide": "^1.1.6",
- "uid-number": "0.0.6",
- "umask": "^1.1.0",
- "which": "^1.3.1"
- },
- "deprecated": false,
- "description": "JavaScript package lifecycle hook runner",
- "devDependencies": {
- "nyc": "^14.1.0",
- "sinon": "^7.2.3",
- "standard": "^12.0.1",
- "standard-version": "^4.4.0",
- "tap": "^12.7.0",
- "weallbehave": "^1.2.0",
- "weallcontribute": "^1.0.8"
- },
- "files": [
- "index.js",
- "lib/spawn.js",
- "node-gyp-bin"
- ],
- "homepage": "https://github.com/npm/lifecycle#readme",
- "keywords": [
- "npm",
- "lifecycle",
- "hook",
- "runner"
- ],
- "license": "Artistic-2.0",
- "main": "index.js",
- "name": "npm-lifecycle",
- "repository": {
- "type": "git",
- "url": "git://github.com/npm/lifecycle.git"
- },
- "scripts": {
- "postrelease": "npm publish && git push --follow-tags",
- "prerelease": "npm t",
- "pretest": "standard",
- "release": "standard-version -s",
- "snap": "TAP_SNAPSHOT=1 npm test",
- "test": "tap -J --cov test/*.js",
- "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
- "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
- },
- "version": "3.1.4"
-}
diff --git a/node_modules/npm-registry-fetch/CHANGELOG.md b/node_modules/npm-registry-fetch/CHANGELOG.md
index 003dc8b6d..1768633b9 100644
--- a/node_modules/npm-registry-fetch/CHANGELOG.md
+++ b/node_modules/npm-registry-fetch/CHANGELOG.md
@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+### [8.1.2](https://github.com/npm/registry-fetch/compare/v8.1.1...v8.1.2) (2020-07-11)
+
+### [8.1.1](https://github.com/npm/registry-fetch/compare/v8.1.0...v8.1.1) (2020-06-30)
+
## [8.1.0](https://github.com/npm/registry-fetch/compare/v8.0.3...v8.1.0) (2020-05-20)
diff --git a/node_modules/npm-registry-fetch/check-response.js b/node_modules/npm-registry-fetch/check-response.js
index 933c8f7cd..3291d4e70 100644
--- a/node_modules/npm-registry-fetch/check-response.js
+++ b/node_modules/npm-registry-fetch/check-response.js
@@ -30,9 +30,18 @@ function logRequest (method, res, startTime, opts) {
const attempt = res.headers.get('x-fetch-attempts')
const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : ''
+
+ let urlStr
+ try {
+ const url = new URL(res.url)
+ urlStr = res.url.replace(url.password, '***')
+ } catch {
+ urlStr = res.url
+ }
+
opts.log.http(
'fetch',
- `${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}`
+ `${method.toUpperCase()} ${res.status} ${urlStr} ${elapsedTime}ms${attemptStr}${cacheStr}`
)
}
diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json
index 251bfd280..0e44b9d59 100644
--- a/node_modules/npm-registry-fetch/package.json
+++ b/node_modules/npm-registry-fetch/package.json
@@ -1,8 +1,8 @@
{
"_from": "npm-registry-fetch@latest",
- "_id": "npm-registry-fetch@8.1.0",
+ "_id": "npm-registry-fetch@8.1.2",
"_inBundle": false,
- "_integrity": "sha512-RkcugRDye2j6yEiHGMyAdKQoipgp8VToSIjm+TFLhVraXOkC/WU2kjE2URcYBpcJ4hs++VFBKo6+Zg4wmrS+Qw==",
+ "_integrity": "sha512-/m5W4t5xSAO0vwI+nDMh/msTimROztmrQcMxWRoWqWQsNYUavE4zSQCvpfDZb+V6CVs4J2tHvCP0g3me2nNU7w==",
"_location": "/npm-registry-fetch",
"_phantomChildren": {},
"_requested": {
@@ -24,10 +24,11 @@
"/libnpmpublish",
"/libnpmsearch",
"/libnpmteam",
- "/npm-profile"
+ "/npm-profile",
+ "/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-8.1.0.tgz",
- "_shasum": "1d5c229b82412414b9c63cde040b51981db76904",
+ "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-8.1.2.tgz",
+ "_shasum": "8afa37f52e613bfe2464a1ff63c68a3f6ca94af0",
"_spec": "npm-registry-fetch@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -40,8 +41,8 @@
"bundleDependencies": false,
"dependencies": {
"@npmcli/ci-detect": "^1.0.0",
- "lru-cache": "^5.1.1",
- "make-fetch-happen": "^8.0.7",
+ "lru-cache": "^6.0.0",
+ "make-fetch-happen": "^8.0.8",
"minipass": "^3.1.3",
"minipass-fetch": "^1.1.2",
"minipass-json-stream": "^1.0.1",
@@ -94,5 +95,5 @@
"check-coverage": true,
"test-ignore": "test[\\\\/](util|cache)[\\\\/]"
},
- "version": "8.1.0"
+ "version": "8.1.2"
}
diff --git a/node_modules/pacote/node_modules/.bin/mkdirp b/node_modules/pacote/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896ceb..000000000
--- a/node_modules/pacote/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/pacote/node_modules/chownr/LICENSE b/node_modules/pacote/node_modules/chownr/LICENSE
deleted file mode 100644
index 19129e315..000000000
--- a/node_modules/pacote/node_modules/chownr/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/pacote/node_modules/chownr/README.md b/node_modules/pacote/node_modules/chownr/README.md
deleted file mode 100644
index 70e9a54a3..000000000
--- a/node_modules/pacote/node_modules/chownr/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Like `chown -R`.
-
-Takes the same arguments as `fs.chown()`
diff --git a/node_modules/pacote/node_modules/chownr/chownr.js b/node_modules/pacote/node_modules/chownr/chownr.js
deleted file mode 100644
index 0d4093216..000000000
--- a/node_modules/pacote/node_modules/chownr/chownr.js
+++ /dev/null
@@ -1,167 +0,0 @@
-'use strict'
-const fs = require('fs')
-const path = require('path')
-
-/* istanbul ignore next */
-const LCHOWN = fs.lchown ? 'lchown' : 'chown'
-/* istanbul ignore next */
-const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
-
-/* istanbul ignore next */
-const needEISDIRHandled = fs.lchown &&
- !process.version.match(/v1[1-9]+\./) &&
- !process.version.match(/v10\.[6-9]/)
-
-const lchownSync = (path, uid, gid) => {
- try {
- return fs[LCHOWNSYNC](path, uid, gid)
- } catch (er) {
- if (er.code !== 'ENOENT')
- throw er
- }
-}
-
-/* istanbul ignore next */
-const chownSync = (path, uid, gid) => {
- try {
- return fs.chownSync(path, uid, gid)
- } catch (er) {
- if (er.code !== 'ENOENT')
- throw er
- }
-}
-
-/* istanbul ignore next */
-const handleEISDIR =
- needEISDIRHandled ? (path, uid, gid, cb) => er => {
- // Node prior to v10 had a very questionable implementation of
- // fs.lchown, which would always try to call fs.open on a directory
- // Fall back to fs.chown in those cases.
- if (!er || er.code !== 'EISDIR')
- cb(er)
- else
- fs.chown(path, uid, gid, cb)
- }
- : (_, __, ___, cb) => cb
-
-/* istanbul ignore next */
-const handleEISDirSync =
- needEISDIRHandled ? (path, uid, gid) => {
- try {
- return lchownSync(path, uid, gid)
- } catch (er) {
- if (er.code !== 'EISDIR')
- throw er
- chownSync(path, uid, gid)
- }
- }
- : (path, uid, gid) => lchownSync(path, uid, gid)
-
-// fs.readdir could only accept an options object as of node v6
-const nodeVersion = process.version
-let readdir = (path, options, cb) => fs.readdir(path, options, cb)
-let readdirSync = (path, options) => fs.readdirSync(path, options)
-/* istanbul ignore next */
-if (/^v4\./.test(nodeVersion))
- readdir = (path, options, cb) => fs.readdir(path, cb)
-
-const chown = (cpath, uid, gid, cb) => {
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
- // Skip ENOENT error
- cb(er && er.code !== 'ENOENT' ? er : null)
- }))
-}
-
-const chownrKid = (p, child, uid, gid, cb) => {
- if (typeof child === 'string')
- return fs.lstat(path.resolve(p, child), (er, stats) => {
- // Skip ENOENT error
- if (er)
- return cb(er.code !== 'ENOENT' ? er : null)
- stats.name = child
- chownrKid(p, stats, uid, gid, cb)
- })
-
- if (child.isDirectory()) {
- chownr(path.resolve(p, child.name), uid, gid, er => {
- if (er)
- return cb(er)
- const cpath = path.resolve(p, child.name)
- chown(cpath, uid, gid, cb)
- })
- } else {
- const cpath = path.resolve(p, child.name)
- chown(cpath, uid, gid, cb)
- }
-}
-
-
-const chownr = (p, uid, gid, cb) => {
- readdir(p, { withFileTypes: true }, (er, children) => {
- // any error other than ENOTDIR or ENOTSUP means it's not readable,
- // or doesn't exist. give up.
- if (er) {
- if (er.code === 'ENOENT')
- return cb()
- else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er)
- }
- if (er || !children.length)
- return chown(p, uid, gid, cb)
-
- let len = children.length
- let errState = null
- const then = er => {
- if (errState)
- return
- if (er)
- return cb(errState = er)
- if (-- len === 0)
- return chown(p, uid, gid, cb)
- }
-
- children.forEach(child => chownrKid(p, child, uid, gid, then))
- })
-}
-
-const chownrKidSync = (p, child, uid, gid) => {
- if (typeof child === 'string') {
- try {
- const stats = fs.lstatSync(path.resolve(p, child))
- stats.name = child
- child = stats
- } catch (er) {
- if (er.code === 'ENOENT')
- return
- else
- throw er
- }
- }
-
- if (child.isDirectory())
- chownrSync(path.resolve(p, child.name), uid, gid)
-
- handleEISDirSync(path.resolve(p, child.name), uid, gid)
-}
-
-const chownrSync = (p, uid, gid) => {
- let children
- try {
- children = readdirSync(p, { withFileTypes: true })
- } catch (er) {
- if (er.code === 'ENOENT')
- return
- else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP')
- return handleEISDirSync(p, uid, gid)
- else
- throw er
- }
-
- if (children && children.length)
- children.forEach(child => chownrKidSync(p, child, uid, gid))
-
- return handleEISDirSync(p, uid, gid)
-}
-
-module.exports = chownr
-chownr.sync = chownrSync
diff --git a/node_modules/pacote/node_modules/chownr/package.json b/node_modules/pacote/node_modules/chownr/package.json
deleted file mode 100644
index 1dd70b753..000000000
--- a/node_modules/pacote/node_modules/chownr/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "_from": "chownr@^2.0.0",
- "_id": "chownr@2.0.0",
- "_inBundle": false,
- "_integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "_location": "/pacote/chownr",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "chownr@^2.0.0",
- "name": "chownr",
- "escapedName": "chownr",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/pacote",
- "/pacote/cacache",
- "/pacote/cacache/tar"
- ],
- "_resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "_shasum": "15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece",
- "_spec": "chownr@^2.0.0",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/pacote",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/chownr/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "like `chown -R`",
- "devDependencies": {
- "mkdirp": "0.3",
- "rimraf": "^2.7.1",
- "tap": "^14.10.6"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "chownr.js"
- ],
- "homepage": "https://github.com/isaacs/chownr#readme",
- "license": "ISC",
- "main": "chownr.js",
- "name": "chownr",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/chownr.git"
- },
- "scripts": {
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "preversion": "npm test",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true
- },
- "version": "2.0.0"
-}
diff --git a/node_modules/pacote/node_modules/mkdirp/CHANGELOG.md b/node_modules/pacote/node_modules/mkdirp/CHANGELOG.md
deleted file mode 100644
index 81458380b..000000000
--- a/node_modules/pacote/node_modules/mkdirp/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changers Lorgs!
-
-## 1.0
-
-Full rewrite. Essentially a brand new module.
-
-- Return a promise instead of taking a callback.
-- Use native `fs.mkdir(path, { recursive: true })` when available.
-- Drop support for outdated Node.js versions. (Technically still works on
- Node.js v8, but only 10 and above are officially supported.)
-
-## 0.x
-
-Original and most widely used recursive directory creation implementation
-in JavaScript, dating back to 2010.
diff --git a/node_modules/pacote/node_modules/mkdirp/LICENSE b/node_modules/pacote/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/pacote/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/pacote/node_modules/mkdirp/bin/cmd.js b/node_modules/pacote/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/pacote/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/pacote/node_modules/mkdirp/index.js b/node_modules/pacote/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/pacote/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/find-made.js b/node_modules/pacote/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492c0..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent)
- return Promise.resolve()
-
- return opts.statAsync(parent).then(
- st => st.isDirectory() ? path : undefined, // will fail later
- er => er.code === 'ENOENT'
- ? findMade(opts, dirname(parent), parent)
- : undefined
- )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
- if (path === parent)
- return undefined
-
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined
- } catch (er) {
- return er.code === 'ENOENT'
- ? findMadeSync(opts, dirname(parent), parent)
- : undefined
- }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd64..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
- opts.recursive = false
- const parent = dirname(path)
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- })
- }
-
- return opts.mkdirAsync(path, opts).then(() => made || path, er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(parent, opts)
- .then(made => mkdirpManual(path, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- return opts.statAsync(path).then(st => {
- if (st.isDirectory())
- return made
- else
- throw er
- }, () => { throw er })
- })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
- const parent = dirname(path)
- opts.recursive = false
-
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts)
- } catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- else
- return
- }
- }
-
- try {
- opts.mkdirSync(path, opts)
- return made || path
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- try {
- if (!opts.statSync(path).isDirectory())
- throw er
- } catch (_) {
- throw er
- }
- }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b6980..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirAsync(path, opts)
-
- return findMade(opts, path).then(made =>
- opts.mkdirAsync(path, opts).then(() => made)
- .catch(er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(path, opts)
- else
- throw er
- }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirSync(path, opts)
-
- const made = findMadeSync(opts, path)
- try {
- opts.mkdirSync(path, opts)
- return made
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts)
- else
- throw er
- }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/opts-arg.js b/node_modules/pacote/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 2fa4833fa..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
- if (!opts)
- opts = { mode: 0o777, fs }
- else if (typeof opts === 'object')
- opts = { mode: 0o777, fs, ...opts }
- else if (typeof opts === 'number')
- opts = { mode: opts, fs }
- else if (typeof opts === 'string')
- opts = { mode: parseInt(opts, 8), fs }
- else
- throw new TypeError('invalid options argument')
-
- opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
- opts.mkdirAsync = promisify(opts.mkdir)
- opts.stat = opts.stat || opts.fs.stat || fs.stat
- opts.statAsync = promisify(opts.stat)
- opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
- opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
- return opts
-}
-module.exports = optsArg
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/path-arg.js b/node_modules/pacote/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5a6..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
- if (/\0/.test(path)) {
- // simulate same failure that node raises
- throw Object.assign(
- new TypeError('path must be a string without null bytes'),
- {
- path,
- code: 'ERR_INVALID_ARG_VALUE',
- }
- )
- }
-
- path = resolve(path)
- if (platform === 'win32') {
- const badWinChars = /[*|"<>?:]/
- const {root} = parse(path)
- if (badWinChars.test(path.substr(root.length))) {
- throw Object.assign(new Error('Illegal characters in path.'), {
- path,
- code: 'EINVAL',
- })
- }
- }
-
- return path
-}
-module.exports = pathArg
diff --git a/node_modules/pacote/node_modules/mkdirp/lib/use-native.js b/node_modules/pacote/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361de1..000000000
--- a/node_modules/pacote/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/pacote/node_modules/mkdirp/package.json b/node_modules/pacote/node_modules/mkdirp/package.json
deleted file mode 100644
index be836545e..000000000
--- a/node_modules/pacote/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "_from": "mkdirp@^1.0.3",
- "_id": "mkdirp@1.0.4",
- "_inBundle": false,
- "_integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "_location": "/pacote/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.3",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/pacote",
- "/pacote/cacache",
- "/pacote/cacache/tar"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "_shasum": "3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
- "_spec": "mkdirp@^1.0.3",
- "_where": "/Users/isaacs/dev/npm/cli/node_modules/pacote",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.7"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.4"
-}
diff --git a/node_modules/pacote/node_modules/mkdirp/readme.markdown b/node_modules/pacote/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/pacote/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/read-cmd-shim/README.md b/node_modules/read-cmd-shim/README.md
index b139ea7ff..457e36e35 100644
--- a/node_modules/read-cmd-shim/README.md
+++ b/node_modules/read-cmd-shim/README.md
@@ -7,18 +7,18 @@ is pointing at. This acts as the equivalent of
### Usage
```
-var readCmdShim = require('read-cmd-shim')
+const readCmdShim = require('read-cmd-shim')
-readCmdShim('/path/to/shim.cmd', function (er, destination) {
+readCmdShim('/path/to/shim.cmd').then(destination => {
})
-var destination = readCmdShim.sync('/path/to/shim.cmd')
+const destination = readCmdShim.sync('/path/to/shim.cmd')
```
-### readCmdShim(path, callback)
+### readCmdShim(path) -> Promise
-Reads the `cmd-shim` located at `path` and calls back with the _relative_
+Reads the `cmd-shim` located at `path` and resolves with the _relative_
path that the shim points at. Consider this as roughly the equivalent of
`fs.readlink`.
@@ -31,7 +31,6 @@ return a special `ENOTASHIM` exception, when it can't find a cmd-shim in the
file referenced by `path`. This should only happen if you pass in a
non-command shim.
-
### readCmdShim.sync(path)
Same as above but synchronous. Errors are thrown.
diff --git a/node_modules/read-cmd-shim/index.js b/node_modules/read-cmd-shim/index.js
index 3af2512f6..4ac050fc3 100644
--- a/node_modules/read-cmd-shim/index.js
+++ b/node_modules/read-cmd-shim/index.js
@@ -1,7 +1,9 @@
-'use strict'
-var fs = require('graceful-fs')
+const fs = require('fs')
+const {promisify} = require('util')
+const {readFileSync} = fs
+const readFile = promisify(fs.readFile)
-function extractPath (path, cmdshimContents) {
+const extractPath = (path, cmdshimContents) => {
if (/[.]cmd$/.test(path)) {
return extractPathFromCmd(cmdshimContents)
} else if (/[.]ps1$/.test(path)) {
@@ -11,51 +13,57 @@ function extractPath (path, cmdshimContents) {
}
}
-function extractPathFromPowershell (cmdshimContents) {
- var matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+[$]args/)
+const extractPathFromPowershell = cmdshimContents => {
+ const matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+[$]args/)
return matches && matches[1]
}
-function extractPathFromCmd (cmdshimContents) {
- var matches = cmdshimContents.match(/"%(?:~dp0|dp0%)\\([^"]+?)"\s+%[*]/)
+const extractPathFromCmd = cmdshimContents => {
+ const matches = cmdshimContents.match(/"%(?:~dp0|dp0%)\\([^"]+?)"\s+%[*]/)
return matches && matches[1]
}
-function extractPathFromCygwin (cmdshimContents) {
- var matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+"[$]@"/)
+const extractPathFromCygwin = cmdshimContents => {
+ const matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+"[$]@"/)
return matches && matches[1]
}
-function wrapError (thrown, newError) {
+const wrapError = (thrown, newError) => {
newError.message = thrown.message
newError.code = thrown.code
+ newError.path = thrown.path
return newError
}
-function notaShim (path, er) {
+const notaShim = (path, er) => {
if (!er) {
er = new Error()
Error.captureStackTrace(er, notaShim)
}
er.code = 'ENOTASHIM'
- er.message = "Can't read shim path from '" + path + "', it doesn't appear to be a cmd-shim"
+ er.message = `Can't read shim path from '${path}', ` +
+ `it doesn't appear to be a cmd-shim`
return er
}
-var readCmdShim = module.exports = function (path, cb) {
- var er = new Error()
+const readCmdShim = path => {
+ // create a new error to capture the stack trace from this point,
+ // instead of getting some opaque stack into node's internals
+ const er = new Error()
Error.captureStackTrace(er, readCmdShim)
- fs.readFile(path, function (readFileEr, contents) {
- if (readFileEr) return cb(wrapError(readFileEr, er))
- var destination = extractPath(path, contents.toString())
- if (destination) return cb(null, destination)
- return cb(notaShim(path, er))
- })
+ return readFile(path).then(contents => {
+ const destination = extractPath(path, contents.toString())
+ if (destination) return destination
+ return Promise.reject(notaShim(path, er))
+ }, readFileEr => Promise.reject(wrapError(readFileEr, er)))
}
-module.exports.sync = function (path) {
- var contents = fs.readFileSync(path)
- var destination = extractPath(path, contents.toString())
+const readCmdShimSync = path => {
+ const contents = readFileSync(path)
+ const destination = extractPath(path, contents.toString())
if (!destination) throw notaShim(path)
return destination
}
+
+readCmdShim.sync = readCmdShimSync
+module.exports = readCmdShim
diff --git a/node_modules/read-cmd-shim/package.json b/node_modules/read-cmd-shim/package.json
index 101651109..60e75647e 100644
--- a/node_modules/read-cmd-shim/package.json
+++ b/node_modules/read-cmd-shim/package.json
@@ -1,48 +1,37 @@
{
- "_from": "read-cmd-shim@1.0.5",
- "_id": "read-cmd-shim@1.0.5",
+ "_from": "read-cmd-shim@*",
+ "_id": "read-cmd-shim@2.0.0",
"_inBundle": false,
- "_integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==",
+ "_integrity": "sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw==",
"_location": "/read-cmd-shim",
"_phantomChildren": {},
"_requested": {
- "type": "version",
+ "type": "range",
"registry": true,
- "raw": "read-cmd-shim@1.0.5",
+ "raw": "read-cmd-shim@*",
"name": "read-cmd-shim",
"escapedName": "read-cmd-shim",
- "rawSpec": "1.0.5",
+ "rawSpec": "*",
"saveSpec": null,
- "fetchSpec": "1.0.5"
+ "fetchSpec": "*"
},
"_requiredBy": [
- "#USER",
- "/",
- "/gentle-fs"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz",
- "_shasum": "87e43eba50098ba5a32d0ceb583ab8e43b961c16",
- "_spec": "read-cmd-shim@1.0.5",
- "_where": "/Users/ruyadorno/Documents/workspace/cli",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org",
- "url": "http://re-becca.org/"
- },
+ "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz",
+ "_shasum": "4a50a71d6f0965364938e9038476f7eede3928d9",
+ "_spec": "read-cmd-shim@*",
+ "_where": "/Users/isaacs/dev/npm/cli",
"bugs": {
"url": "https://github.com/npm/read-cmd-shim/issues"
},
"bundleDependencies": false,
- "dependencies": {
- "graceful-fs": "^4.1.2"
- },
"deprecated": false,
"description": "Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.",
"devDependencies": {
- "cmd-shim": "^3.0.0",
- "rimraf": "^2.4.3",
- "standard": "^5.2.2",
- "tap": "^12.7.0"
+ "cmd-shim": "^4.0.0",
+ "rimraf": "^3.0.0",
+ "tap": "^14.10.6"
},
"files": [
"index.js"
@@ -56,8 +45,13 @@
"url": "git+https://github.com/npm/read-cmd-shim.git"
},
"scripts": {
- "pretest": "standard",
- "test": "tap test/*.js --100"
+ "postversion": "npm publish",
+ "prepublishOnly": "git push --follow-tags",
+ "preversion": "npm t",
+ "test": "tap"
+ },
+ "tap": {
+ "check-coverage": true
},
- "version": "1.0.5"
+ "version": "2.0.0"
}
diff --git a/node_modules/run-queue/README.md b/node_modules/run-queue/README.md
deleted file mode 100644
index e84214d1f..000000000
--- a/node_modules/run-queue/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# run-queue
-
-A promise based, dynamic priority queue runner, with concurrency limiting.
-
-```js
-const RunQueue = require('run-queue')
-
-const queue = new RunQueue({
- maxConcurrency: 1
-})
-
-queue.add(1, example, [-1])
-for (let ii = 0; ii < 5; ++ii) {
- queue.add(0, example, [ii])
-}
-const finished = []
-queue.run().then(
- console.log(finished)
-})
-
-function example (num, next) {
- setTimeout(() => {
- finished.push(num)
- next()
- }, 5 - Math.abs(num))
-}
-```
-
-would output
-
-```
-[ 0, 1, 2, 3, 4, -1 ]
-```
-
-If you bump concurrency to `2`, then you get:
-
-```
-[ 1, 0, 3, 2, 4, -1 ]
-```
-
-The concurrency means that they don't finish in order, because some take
-longer than others. Each priority level must finish entirely before the
-next priority level is run. See
-[PRIORITIES](https://github.com/iarna/run-queue#priorities) below. This is
-even true if concurrency is set high enough that all of the regular queue
-can execute at once, for instance, with `maxConcurrency: 10`:
-
-```
-[ 4, 3, 2, 1, 0, -1 ]
-```
-
-## API
-
-### const queue = new RunQueue(options)
-
-Create a new queue. Options may contain:
-
-* maxConcurrency - (Default: `1`) The maximum number of jobs to execute at once.
-* Promise - (Default: global.Promise) The promise implementation to use.
-
-### queue.add (prio, fn, args)
-
-Add a new job to the end of the queue at priority `prio` that will run `fn`
-with `args`. If `fn` is async then it should return a Promise.
-
-### queue.run ()
-
-Start running the job queue. Returns a Promise that resolves when either
-all the jobs are complete or a job ends in error (throws or returns a
-rejected promise). If a job ended in error then this Promise will be rejected
-with that error and no further queue running will be done.
-
-## PRIORITIES
-
-Priorities are any integer value >= 0.
-
-Lowest is executed first.
-
-Priorities essentially represent distinct job queues. All jobs in a queue
-must complete before the next highest priority job queue is executed.
-
-This means that if you have two queues, `0` and `1` then ALL jobs in `0`
-must complete before ANY execute in `1`. If you add new `0` level jobs
-while `1` level jobs are running then it will switch back processing the `0`
-queue and won't execute any more `1` jobs till all of the new `0` jobs
-complete.
diff --git a/node_modules/run-queue/node_modules/aproba/LICENSE b/node_modules/run-queue/node_modules/aproba/LICENSE
deleted file mode 100644
index f4be44d88..000000000
--- a/node_modules/run-queue/node_modules/aproba/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/run-queue/node_modules/aproba/README.md b/node_modules/run-queue/node_modules/aproba/README.md
deleted file mode 100644
index 0bfc594c5..000000000
--- a/node_modules/run-queue/node_modules/aproba/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-aproba
-======
-
-A ridiculously light-weight function argument validator
-
-```
-var validate = require("aproba")
-
-function myfunc(a, b, c) {
- // `a` must be a string, `b` a number, `c` a function
- validate('SNF', arguments) // [a,b,c] is also valid
-}
-
-myfunc('test', 23, function () {}) // ok
-myfunc(123, 23, function () {}) // type error
-myfunc('test', 23) // missing arg error
-myfunc('test', 23, function () {}, true) // too many args error
-
-```
-
-Valid types are:
-
-| type | description
-| :--: | :----------
-| * | matches any type
-| A | `Array.isArray` OR an `arguments` object
-| S | typeof == string
-| N | typeof == number
-| F | typeof == function
-| O | typeof == object and not type A and not type E
-| B | typeof == boolean
-| E | `instanceof Error` OR `null` **(special: see below)**
-| Z | == `null`
-
-Validation failures throw one of three exception types, distinguished by a
-`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
-
-If you pass in an invalid type then it will throw with a code of
-`EUNKNOWNTYPE`.
-
-If an **error** argument is found and is not null then the remaining
-arguments are optional. That is, if you say `ESO` then that's like using a
-non-magical `E` in: `E|ESO|ZSO`.
-
-### But I have optional arguments?!
-
-You can provide more than one signature by separating them with pipes `|`.
-If any signature matches the arguments then they'll be considered valid.
-
-So for example, say you wanted to write a signature for
-`fs.createWriteStream`. The docs for it describe it thusly:
-
-```
-fs.createWriteStream(path[, options])
-```
-
-This would be a signature of `SO|S`. That is, a string and and object, or
-just a string.
-
-Now, if you read the full `fs` docs, you'll see that actually path can ALSO
-be a buffer. And options can be a string, that is:
-```
-path <String> | <Buffer>
-options <String> | <Object>
-```
-
-To reproduce this you have to fully enumerate all of the possible
-combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
-awkwardness is a feature: It reminds you of the complexity you're adding to
-your API when you do this sort of thing.
-
-
-### Browser support
-
-This has no dependencies and should work in browsers, though you'll have
-noisier stack traces.
-
-### Why this exists
-
-I wanted a very simple argument validator. It needed to do two things:
-
-1. Be more concise and easier to use than assertions
-
-2. Not encourage an infinite bikeshed of DSLs
-
-This is why types are specified by a single character and there's no such
-thing as an optional argument.
-
-This is not intended to validate user data. This is specifically about
-asserting the interface of your functions.
-
-If you need greater validation, I encourage you to write them by hand or
-look elsewhere.
-
diff --git a/node_modules/run-queue/node_modules/aproba/index.js b/node_modules/run-queue/node_modules/aproba/index.js
deleted file mode 100644
index 6f3f797c0..000000000
--- a/node_modules/run-queue/node_modules/aproba/index.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict'
-
-function isArguments (thingy) {
- return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
-}
-
-var types = {
- '*': {label: 'any', check: function () { return true }},
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
-}
-
-function addSchema (schema, arity) {
- var group = arity[schema.length] = arity[schema.length] || []
- if (group.indexOf(schema) === -1) group.push(schema)
-}
-
-var validate = module.exports = function (rawSchemas, args) {
- if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
- if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
- if (!args) throw missingRequiredArg(1, 'args')
- if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
- if (!types.A.check(args)) throw invalidType(1, ['array'], args)
- var schemas = rawSchemas.split('|')
- var arity = {}
-
- schemas.forEach(function (schema) {
- for (var ii = 0; ii < schema.length; ++ii) {
- var type = schema[ii]
- if (!types[type]) throw unknownType(ii, type)
- }
- if (/E.*E/.test(schema)) throw moreThanOneError(schema)
- addSchema(schema, arity)
- if (/E/.test(schema)) {
- addSchema(schema.replace(/E.*$/, 'E'), arity)
- addSchema(schema.replace(/E/, 'Z'), arity)
- if (schema.length === 1) addSchema('', arity)
- }
- })
- var matching = arity[args.length]
- if (!matching) {
- throw wrongNumberOfArgs(Object.keys(arity), args.length)
- }
- for (var ii = 0; ii < args.length; ++ii) {
- var newMatching = matching.filter(function (schema) {
- var type = schema[ii]
- var typeCheck = types[type].check
- return typeCheck(args[ii])
- })
- if (!newMatching.length) {
- var labels = matching.map(function (schema) {
- return types[schema[ii]].label
- }).filter(function (schema) { return schema != null })
- throw invalidType(ii, labels, args[ii])
- }
- matching = newMatching
- }
-}
-
-function missingRequiredArg (num) {
- return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
-}
-
-function unknownType (num, type) {
- return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
-}
-
-function invalidType (num, expectedTypes, value) {
- var valueType
- Object.keys(types).forEach(function (typeCode) {
- if (types[typeCode].check(value)) valueType = types[typeCode].label
- })
- return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
- englishList(expectedTypes) + ' but got ' + valueType)
-}
-
-function englishList (list) {
- return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
-}
-
-function wrongNumberOfArgs (expected, got) {
- var english = englishList(expected)
- var args = expected.every(function (ex) { return ex.length === 1 })
- ? 'argument'
- : 'arguments'
- return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
-}
-
-function moreThanOneError (schema) {
- return newException('ETOOMANYERRORTYPES',
- 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
-}
-
-function newException (code, msg) {
- var e = new Error(msg)
- e.code = code
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
- return e
-}
diff --git a/node_modules/run-queue/node_modules/aproba/package.json b/node_modules/run-queue/node_modules/aproba/package.json
deleted file mode 100644
index 04fb91f55..000000000
--- a/node_modules/run-queue/node_modules/aproba/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "aproba@^1.1.1",
- "_id": "aproba@1.2.0",
- "_inBundle": false,
- "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
- "_location": "/run-queue/aproba",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "aproba@^1.1.1",
- "name": "aproba",
- "escapedName": "aproba",
- "rawSpec": "^1.1.1",
- "saveSpec": null,
- "fetchSpec": "^1.1.1"
- },
- "_requiredBy": [
- "/run-queue"
- ],
- "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
- "_spec": "aproba@^1.1.1",
- "_where": "/Users/aeschright/code/cli/node_modules/run-queue",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org"
- },
- "bugs": {
- "url": "https://github.com/iarna/aproba/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "A ridiculously light-weight argument validator (now browser friendly)",
- "devDependencies": {
- "standard": "^10.0.3",
- "tap": "^10.0.2"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/iarna/aproba",
- "keywords": [
- "argument",
- "validate"
- ],
- "license": "ISC",
- "main": "index.js",
- "name": "aproba",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/aproba.git"
- },
- "scripts": {
- "test": "standard && tap -j3 test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/node_modules/run-queue/package.json b/node_modules/run-queue/package.json
deleted file mode 100644
index f786a7d43..000000000
--- a/node_modules/run-queue/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "_from": "run-queue@^1.0.3",
- "_id": "run-queue@1.0.3",
- "_inBundle": false,
- "_integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
- "_location": "/run-queue",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "run-queue@^1.0.3",
- "name": "run-queue",
- "escapedName": "run-queue",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/copy-concurrently",
- "/move-concurrently"
- ],
- "_resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
- "_shasum": "e848396f057d223f24386924618e25694161ec47",
- "_spec": "run-queue@^1.0.3",
- "_where": "/Users/rebecca/code/npm/node_modules/move-concurrently",
- "author": {
- "name": "Rebecca Turner",
- "email": "me@re-becca.org",
- "url": "http://re-becca.org/"
- },
- "bugs": {
- "url": "https://github.com/iarna/run-queue/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "aproba": "^1.1.1"
- },
- "deprecated": false,
- "description": "A promise based, dynamic priority queue runner, with concurrency limiting.",
- "devDependencies": {
- "standard": "^8.6.0",
- "tap": "^10.2.0"
- },
- "directories": {
- "test": "test"
- },
- "files": [
- "queue.js"
- ],
- "homepage": "https://npmjs.com/package/run-queue",
- "keywords": [],
- "license": "ISC",
- "main": "queue.js",
- "name": "run-queue",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/iarna/run-queue.git"
- },
- "scripts": {
- "test": "standard && tap -J test"
- },
- "version": "1.0.3"
-}
diff --git a/node_modules/run-queue/queue.js b/node_modules/run-queue/queue.js
deleted file mode 100644
index 500bf293d..000000000
--- a/node_modules/run-queue/queue.js
+++ /dev/null
@@ -1,95 +0,0 @@
-'use strict'
-module.exports = RunQueue
-
-var validate = require('aproba')
-
-function RunQueue (opts) {
- validate('Z|O', [opts])
- if (!opts) opts = {}
- this.finished = false
- this.inflight = 0
- this.maxConcurrency = opts.maxConcurrency || 1
- this.queued = 0
- this.queue = []
- this.currentPrio = null
- this.currentQueue = null
- this.Promise = opts.Promise || global.Promise
- this.deferred = {}
-}
-
-RunQueue.prototype = {}
-
-RunQueue.prototype.run = function () {
- if (arguments.length !== 0) throw new Error('RunQueue.run takes no arguments')
- var self = this
- var deferred = this.deferred
- if (!deferred.promise) {
- deferred.promise = new this.Promise(function (resolve, reject) {
- deferred.resolve = resolve
- deferred.reject = reject
- self._runQueue()
- })
- }
- return deferred.promise
-}
-
-RunQueue.prototype._runQueue = function () {
- var self = this
-
- while ((this.inflight < this.maxConcurrency) && this.queued) {
- if (!this.currentQueue || this.currentQueue.length === 0) {
- // wait till the current priority is entirely processed before
- // starting a new one
- if (this.inflight) return
- var prios = Object.keys(this.queue)
- for (var ii = 0; ii < prios.length; ++ii) {
- var prioQueue = this.queue[prios[ii]]
- if (prioQueue.length) {
- this.currentQueue = prioQueue
- this.currentPrio = prios[ii]
- break
- }
- }
- }
-
- --this.queued
- ++this.inflight
- var next = this.currentQueue.shift()
- var args = next.args || []
-
- // we explicitly construct a promise here so that queue items can throw
- // or immediately return to resolve
- var queueEntry = new this.Promise(function (resolve) {
- resolve(next.cmd.apply(null, args))
- })
-
- queueEntry.then(function () {
- --self.inflight
- if (self.finished) return
- if (self.queued <= 0 && self.inflight <= 0) {
- self.finished = true
- self.deferred.resolve()
- }
- self._runQueue()
- }, function (err) {
- self.finished = true
- self.deferred.reject(err)
- })
- }
-}
-
-RunQueue.prototype.add = function (prio, cmd, args) {
- if (this.finished) throw new Error("Can't add to a finished queue. Create a new queue.")
- if (Math.abs(Math.floor(prio)) !== prio) throw new Error('Priorities must be a positive integer value.')
- validate('NFA|NFZ', [prio, cmd, args])
- prio = Number(prio)
- if (!this.queue[prio]) this.queue[prio] = []
- ++this.queued
- this.queue[prio].push({cmd: cmd, args: args})
- // if this priority is higher than the one we're currently processing,
- // switch back to processing its queue.
- if (this.currentPrio > prio) {
- this.currentQueue = this.queue[prio]
- this.currentPrio = prio
- }
-}
diff --git a/node_modules/socks/.prettierrc.yaml b/node_modules/socks/.prettierrc.yaml
index a977335a8..d7b733504 100644
--- a/node_modules/socks/.prettierrc.yaml
+++ b/node_modules/socks/.prettierrc.yaml
@@ -2,4 +2,6 @@ parser: typescript
printWidth: 80
tabWidth: 2
singleQuote: true
-trailingComma: none
+trailingComma: all
+arrowParens: always
+bracketSpacing: false \ No newline at end of file
diff --git a/node_modules/socks/.travis.yml b/node_modules/socks/.travis.yml
index f3f062805..6ba787784 100644
--- a/node_modules/socks/.travis.yml
+++ b/node_modules/socks/.travis.yml
@@ -1,9 +1,8 @@
language: node_js
node_js:
- - 6
- - 8
- 10
- 12
+ - 14
- stable
before_install:
diff --git a/node_modules/socks/README.md b/node_modules/socks/README.md
index 1aca04ac1..f7fba4574 100644
--- a/node_modules/socks/README.md
+++ b/node_modules/socks/README.md
@@ -14,7 +14,7 @@ Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Inc
### Requirements
-* Node.js v6.0+ (Please use [v1](https://github.com/JoshGlazebrook/socks/tree/82d83923ad960693d8b774cafe17443ded7ed584) for older versions of Node.js)
+* Node.js v10.0+ (Please use [v1](https://github.com/JoshGlazebrook/socks/tree/82d83923ad960693d8b774cafe17443ded7ed584) for older versions of Node.js)
### Looking for v1?
* Docs for v1 are available [here](https://github.com/JoshGlazebrook/socks/tree/82d83923ad960693d8b774cafe17443ded7ed584)
diff --git a/node_modules/socks/build/client/socksclient.js b/node_modules/socks/build/client/socksclient.js
index 5eb80ce91..38553c172 100644
--- a/node_modules/socks/build/client/socksclient.js
+++ b/node_modules/socks/build/client/socksclient.js
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
+exports.SocksClientError = exports.SocksClient = void 0;
const events_1 = require("events");
const net = require("net");
const ip = require("ip");
@@ -17,14 +18,15 @@ const constants_1 = require("../common/constants");
const helpers_1 = require("../common/helpers");
const receivebuffer_1 = require("../common/receivebuffer");
const util_1 = require("../common/util");
+Object.defineProperty(exports, "SocksClientError", { enumerable: true, get: function () { return util_1.SocksClientError; } });
class SocksClient extends events_1.EventEmitter {
constructor(options) {
super();
- this._options = Object.assign({}, options);
+ this.options = Object.assign({}, options);
// Validate SocksClientOptions
helpers_1.validateSocksClientOptions(options);
// Default state
- this.state = constants_1.SocksClientState.Created;
+ this.setState(constants_1.SocksClientState.Created);
}
/**
* Creates a new SOCKS connection.
@@ -82,6 +84,7 @@ class SocksClient extends events_1.EventEmitter {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
let sock;
try {
+ // tslint:disable-next-line:no-increment-decrement
for (let i = 0; i < options.proxies.length; i++) {
const nextProxy = options.proxies[i];
// If we've reached the last proxy in the chain, the destination is the actual destination, otherwise it's the next proxy.
@@ -89,14 +92,13 @@ class SocksClient extends events_1.EventEmitter {
? options.destination
: {
host: options.proxies[i + 1].ipaddress,
- port: options.proxies[i + 1].port
+ port: options.proxies[i + 1].port,
};
// Creates the next connection in the chain.
const result = yield SocksClient.createConnection({
command: 'connect',
proxy: nextProxy,
- destination: nextDestination
- // Initial connection ignores this as sock is undefined. Subsequent connections re-use the first proxy socket to form a chain.
+ destination: nextDestination,
});
// If sock is undefined, assign it here.
if (!sock) {
@@ -174,69 +176,63 @@ class SocksClient extends events_1.EventEmitter {
frameNumber,
remoteHost: {
host: remoteHost,
- port: remotePort
+ port: remotePort,
},
- data: buff.readBuffer()
+ data: buff.readBuffer(),
};
}
/**
- * Gets the SocksClient internal state.
- */
- get state() {
- return this._state;
- }
- /**
* Internal state setter. If the SocksClient is in an error state, it cannot be changed to a non error state.
*/
- set state(newState) {
- if (this._state !== constants_1.SocksClientState.Error) {
- this._state = newState;
+ setState(newState) {
+ if (this.state !== constants_1.SocksClientState.Error) {
+ this.state = newState;
}
}
/**
* Starts the connection establishment to the proxy and destination.
- * @param existing_socket Connected socket to use instead of creating a new one (internal use).
+ * @param existingSocket Connected socket to use instead of creating a new one (internal use).
*/
- connect(existing_socket) {
- this._onDataReceived = (data) => this.onDataReceived(data);
- this._onClose = () => this.onClose();
- this._onError = (err) => this.onError(err);
- this._onConnect = () => this.onConnect();
+ connect(existingSocket) {
+ this.onDataReceived = (data) => this.onDataReceivedHandler(data);
+ this.onClose = () => this.onCloseHandler();
+ this.onError = (err) => this.onErrorHandler(err);
+ this.onConnect = () => this.onConnectHandler();
// Start timeout timer (defaults to 30 seconds)
- const timer = setTimeout(() => this.onEstablishedTimeout(), this._options.timeout || constants_1.DEFAULT_TIMEOUT);
+ const timer = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT);
// check whether unref is available as it differs from browser to NodeJS (#33)
if (timer.unref && typeof timer.unref === 'function') {
timer.unref();
}
// If an existing socket is provided, use it to negotiate SOCKS handshake. Otherwise create a new Socket.
- if (existing_socket) {
- this._socket = existing_socket;
+ if (existingSocket) {
+ this.socket = existingSocket;
}
else {
- this._socket = new net.Socket();
+ this.socket = new net.Socket();
}
// Attach Socket error handlers.
- this._socket.once('close', this._onClose);
- this._socket.once('error', this._onError);
- this._socket.once('connect', this._onConnect);
- this._socket.on('data', this._onDataReceived);
- this.state = constants_1.SocksClientState.Connecting;
- this._receiveBuffer = new receivebuffer_1.ReceiveBuffer();
- if (existing_socket) {
- this._socket.emit('connect');
+ this.socket.once('close', this.onClose);
+ this.socket.once('error', this.onError);
+ this.socket.once('connect', this.onConnect);
+ this.socket.on('data', this.onDataReceived);
+ this.setState(constants_1.SocksClientState.Connecting);
+ this.receiveBuffer = new receivebuffer_1.ReceiveBuffer();
+ if (existingSocket) {
+ this.socket.emit('connect');
}
else {
- this._socket.connect(this.getSocketOptions());
- if (this._options.set_tcp_nodelay !== undefined &&
- this._options.set_tcp_nodelay !== null) {
- this._socket.setNoDelay(!!this._options.set_tcp_nodelay);
+ this.socket.connect(this.getSocketOptions());
+ if (this.options.set_tcp_nodelay !== undefined &&
+ this.options.set_tcp_nodelay !== null) {
+ this.socket.setNoDelay(!!this.options.set_tcp_nodelay);
}
}
// Listen for established event so we can re-emit any excess data received during handshakes.
- this.prependOnceListener('established', info => {
+ this.prependOnceListener('established', (info) => {
setImmediate(() => {
- if (this._receiveBuffer.length > 0) {
- const excessData = this._receiveBuffer.get(this._receiveBuffer.length);
+ if (this.receiveBuffer.length > 0) {
+ const excessData = this.receiveBuffer.get(this.receiveBuffer.length);
info.socket.emit('data', excessData);
}
info.socket.resume();
@@ -245,7 +241,7 @@ class SocksClient extends events_1.EventEmitter {
}
// Socket options (defaults host/port to options.proxy.host/options.proxy.port)
getSocketOptions() {
- return Object.assign(Object.assign({}, this._options.socket_options), { host: this._options.proxy.host || this._options.proxy.ipaddress, port: this._options.proxy.port });
+ return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port });
}
/**
* Handles internal Socks timeout callback.
@@ -254,33 +250,33 @@ class SocksClient extends events_1.EventEmitter {
onEstablishedTimeout() {
if (this.state !== constants_1.SocksClientState.Established &&
this.state !== constants_1.SocksClientState.BoundWaitingForConnection) {
- this._closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut);
+ this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut);
}
}
/**
* Handles Socket connect event.
*/
- onConnect() {
- this.state = constants_1.SocksClientState.Connected;
+ onConnectHandler() {
+ this.setState(constants_1.SocksClientState.Connected);
// Send initial handshake.
- if (this._options.proxy.type === 4) {
+ if (this.options.proxy.type === 4) {
this.sendSocks4InitialHandshake();
}
else {
this.sendSocks5InitialHandshake();
}
- this.state = constants_1.SocksClientState.SentInitialHandshake;
+ this.setState(constants_1.SocksClientState.SentInitialHandshake);
}
/**
* Handles Socket data event.
* @param data
*/
- onDataReceived(data) {
+ onDataReceivedHandler(data) {
/*
All received data is appended to a ReceiveBuffer.
This makes sure that all the data we need is received before we attempt to process it.
*/
- this._receiveBuffer.append(data);
+ this.receiveBuffer.append(data);
// Process data that we have.
this.processData();
}
@@ -289,10 +285,10 @@ class SocksClient extends events_1.EventEmitter {
*/
processData() {
// If we have enough data to process the next step in the SOCKS handshake, proceed.
- if (this._receiveBuffer.length >= this._nextRequiredPacketBufferSize) {
+ if (this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) {
// Sent initial handshake, waiting for response.
if (this.state === constants_1.SocksClientState.SentInitialHandshake) {
- if (this._options.proxy.type === 4) {
+ if (this.options.proxy.type === 4) {
// Socks v4 only has one handshake response.
this.handleSocks4FinalHandshakeResponse();
}
@@ -311,7 +307,7 @@ class SocksClient extends events_1.EventEmitter {
// Socks BIND established. Waiting for remote connection via proxy.
}
else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) {
- if (this._options.proxy.type === 4) {
+ if (this.options.proxy.type === 4) {
this.handleSocks4IncomingConnectionResponse();
}
else {
@@ -322,7 +318,7 @@ class SocksClient extends events_1.EventEmitter {
// do nothing (prevents closing of the socket)
}
else {
- this._closeSocket(constants_1.ERRORS.InternalError);
+ this.closeSocket(constants_1.ERRORS.InternalError);
}
}
}
@@ -330,56 +326,56 @@ class SocksClient extends events_1.EventEmitter {
* Handles Socket close event.
* @param had_error
*/
- onClose() {
- this._closeSocket(constants_1.ERRORS.SocketClosed);
+ onCloseHandler() {
+ this.closeSocket(constants_1.ERRORS.SocketClosed);
}
/**
* Handles Socket error event.
* @param err
*/
- onError(err) {
- this._closeSocket(err.message);
+ onErrorHandler(err) {
+ this.closeSocket(err.message);
}
/**
* Removes internal event listeners on the underlying Socket.
*/
removeInternalSocketHandlers() {
// Pauses data flow of the socket (this is internally resumed after 'established' is emitted)
- this._socket.pause();
- this._socket.removeListener('data', this._onDataReceived);
- this._socket.removeListener('close', this._onClose);
- this._socket.removeListener('error', this._onError);
- this._socket.removeListener('connect', this.onConnect);
+ this.socket.pause();
+ this.socket.removeListener('data', this.onDataReceived);
+ this.socket.removeListener('close', this.onClose);
+ this.socket.removeListener('error', this.onError);
+ this.socket.removeListener('connect', this.onConnect);
}
/**
* Closes and destroys the underlying Socket. Emits an error event.
* @param err { String } An error string to include in error event.
*/
- _closeSocket(err) {
+ closeSocket(err) {
// Make sure only one 'error' event is fired for the lifetime of this SocksClient instance.
if (this.state !== constants_1.SocksClientState.Error) {
// Set internal state to Error.
- this.state = constants_1.SocksClientState.Error;
+ this.setState(constants_1.SocksClientState.Error);
// Destroy Socket
- this._socket.destroy();
+ this.socket.destroy();
// Remove internal listeners
this.removeInternalSocketHandlers();
// Fire 'error' event.
- this.emit('error', new util_1.SocksClientError(err, this._options));
+ this.emit('error', new util_1.SocksClientError(err, this.options));
}
}
/**
* Sends initial Socks v4 handshake request.
*/
sendSocks4InitialHandshake() {
- const userId = this._options.proxy.userId || '';
+ const userId = this.options.proxy.userId || '';
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x04);
- buff.writeUInt8(constants_1.SocksCommand[this._options.command]);
- buff.writeUInt16BE(this._options.destination.port);
+ buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
+ buff.writeUInt16BE(this.options.destination.port);
// Socks 4 (IPv4)
- if (net.isIPv4(this._options.destination.host)) {
- buff.writeBuffer(ip.toBuffer(this._options.destination.host));
+ if (net.isIPv4(this.options.destination.host)) {
+ buff.writeBuffer(ip.toBuffer(this.options.destination.host));
buff.writeStringNT(userId);
// Socks 4a (hostname)
}
@@ -389,42 +385,42 @@ class SocksClient extends events_1.EventEmitter {
buff.writeUInt8(0x00);
buff.writeUInt8(0x01);
buff.writeStringNT(userId);
- buff.writeStringNT(this._options.destination.host);
+ buff.writeStringNT(this.options.destination.host);
}
- this._nextRequiredPacketBufferSize =
+ this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;
- this._socket.write(buff.toBuffer());
+ this.socket.write(buff.toBuffer());
}
/**
* Handles Socks v4 handshake response.
* @param data
*/
handleSocks4FinalHandshakeResponse() {
- const data = this._receiveBuffer.get(8);
+ const data = this.receiveBuffer.get(8);
if (data[1] !== constants_1.Socks4Response.Granted) {
- this._closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`);
+ this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`);
}
else {
// Bind response
- if (constants_1.SocksCommand[this._options.command] === constants_1.SocksCommand.bind) {
+ if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
const buff = smart_buffer_1.SmartBuffer.fromBuffer(data);
buff.readOffset = 2;
const remoteHost = {
port: buff.readUInt16BE(),
- host: ip.fromLong(buff.readUInt32BE())
+ host: ip.fromLong(buff.readUInt32BE()),
};
// If host is 0.0.0.0, set to proxy host.
if (remoteHost.host === '0.0.0.0') {
- remoteHost.host = this._options.proxy.ipaddress;
+ remoteHost.host = this.options.proxy.ipaddress;
}
- this.state = constants_1.SocksClientState.BoundWaitingForConnection;
- this.emit('bound', { socket: this._socket, remoteHost });
+ this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
+ this.emit('bound', { remoteHost, socket: this.socket });
// Connect response
}
else {
- this.state = constants_1.SocksClientState.Established;
+ this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
- this.emit('established', { socket: this._socket });
+ this.emit('established', { socket: this.socket });
}
}
}
@@ -433,20 +429,20 @@ class SocksClient extends events_1.EventEmitter {
* @param data
*/
handleSocks4IncomingConnectionResponse() {
- const data = this._receiveBuffer.get(8);
+ const data = this.receiveBuffer.get(8);
if (data[1] !== constants_1.Socks4Response.Granted) {
- this._closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`);
+ this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`);
}
else {
const buff = smart_buffer_1.SmartBuffer.fromBuffer(data);
buff.readOffset = 2;
const remoteHost = {
port: buff.readUInt16BE(),
- host: ip.fromLong(buff.readUInt32BE())
+ host: ip.fromLong(buff.readUInt32BE()),
};
- this.state = constants_1.SocksClientState.Established;
+ this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
- this.emit('established', { socket: this._socket, remoteHost });
+ this.emit('established', { remoteHost, socket: this.socket });
}
}
/**
@@ -457,7 +453,7 @@ class SocksClient extends events_1.EventEmitter {
buff.writeUInt8(0x05);
// We should only tell the proxy we support user/pass auth if auth info is actually provided.
// Note: As of Tor v0.3.5.7+, if user/pass auth is an option from the client, by default it will always take priority.
- if (this._options.proxy.userId || this._options.proxy.password) {
+ if (this.options.proxy.userId || this.options.proxy.password) {
buff.writeUInt8(2);
buff.writeUInt8(constants_1.Socks5Auth.NoAuth);
buff.writeUInt8(constants_1.Socks5Auth.UserPass);
@@ -466,22 +462,22 @@ class SocksClient extends events_1.EventEmitter {
buff.writeUInt8(1);
buff.writeUInt8(constants_1.Socks5Auth.NoAuth);
}
- this._nextRequiredPacketBufferSize =
+ this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;
- this._socket.write(buff.toBuffer());
- this.state = constants_1.SocksClientState.SentInitialHandshake;
+ this.socket.write(buff.toBuffer());
+ this.setState(constants_1.SocksClientState.SentInitialHandshake);
}
/**
* Handles initial Socks v5 handshake response.
* @param data
*/
handleInitialSocks5HandshakeResponse() {
- const data = this._receiveBuffer.get(2);
+ const data = this.receiveBuffer.get(2);
if (data[0] !== 0x05) {
- this._closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);
+ this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);
}
else if (data[1] === 0xff) {
- this._closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);
+ this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);
}
else {
// If selected Socks v5 auth method is no auth, send final handshake request.
@@ -493,7 +489,7 @@ class SocksClient extends events_1.EventEmitter {
this.sendSocks5UserPassAuthentication();
}
else {
- this._closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType);
+ this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType);
}
}
}
@@ -503,28 +499,28 @@ class SocksClient extends events_1.EventEmitter {
* Note: No auth and user/pass are currently supported.
*/
sendSocks5UserPassAuthentication() {
- const userId = this._options.proxy.userId || '';
- const password = this._options.proxy.password || '';
+ const userId = this.options.proxy.userId || '';
+ const password = this.options.proxy.password || '';
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x01);
buff.writeUInt8(Buffer.byteLength(userId));
buff.writeString(userId);
buff.writeUInt8(Buffer.byteLength(password));
buff.writeString(password);
- this._nextRequiredPacketBufferSize =
+ this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;
- this._socket.write(buff.toBuffer());
- this.state = constants_1.SocksClientState.SentAuthentication;
+ this.socket.write(buff.toBuffer());
+ this.setState(constants_1.SocksClientState.SentAuthentication);
}
/**
* Handles Socks v5 auth handshake response.
* @param data
*/
handleInitialSocks5AuthenticationHandshakeResponse() {
- this.state = constants_1.SocksClientState.ReceivedAuthenticationResponse;
- const data = this._receiveBuffer.get(2);
+ this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse);
+ const data = this.receiveBuffer.get(2);
if (data[1] !== 0x00) {
- this._closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed);
+ this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed);
}
else {
this.sendSocks5CommandRequest();
@@ -536,27 +532,27 @@ class SocksClient extends events_1.EventEmitter {
sendSocks5CommandRequest() {
const buff = new smart_buffer_1.SmartBuffer();
buff.writeUInt8(0x05);
- buff.writeUInt8(constants_1.SocksCommand[this._options.command]);
+ buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
buff.writeUInt8(0x00);
// ipv4, ipv6, domain?
- if (net.isIPv4(this._options.destination.host)) {
+ if (net.isIPv4(this.options.destination.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv4);
- buff.writeBuffer(ip.toBuffer(this._options.destination.host));
+ buff.writeBuffer(ip.toBuffer(this.options.destination.host));
}
- else if (net.isIPv6(this._options.destination.host)) {
+ else if (net.isIPv6(this.options.destination.host)) {
buff.writeUInt8(constants_1.Socks5HostType.IPv6);
- buff.writeBuffer(ip.toBuffer(this._options.destination.host));
+ buff.writeBuffer(ip.toBuffer(this.options.destination.host));
}
else {
buff.writeUInt8(constants_1.Socks5HostType.Hostname);
- buff.writeUInt8(this._options.destination.host.length);
- buff.writeString(this._options.destination.host);
+ buff.writeUInt8(this.options.destination.host.length);
+ buff.writeString(this.options.destination.host);
}
- buff.writeUInt16BE(this._options.destination.port);
- this._nextRequiredPacketBufferSize =
+ buff.writeUInt16BE(this.options.destination.port);
+ this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
- this._socket.write(buff.toBuffer());
- this.state = constants_1.SocksClientState.SentFinalHandshake;
+ this.socket.write(buff.toBuffer());
+ this.setState(constants_1.SocksClientState.SentFinalHandshake);
}
/**
* Handles Socks v5 final handshake response.
@@ -564,9 +560,9 @@ class SocksClient extends events_1.EventEmitter {
*/
handleSocks5FinalHandshakeResponse() {
// Peek at available data (we need at least 5 bytes to get the hostname length)
- const header = this._receiveBuffer.peek(5);
+ const header = this.receiveBuffer.peek(5);
if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) {
- this._closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`);
+ this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`);
}
else {
// Read address type
@@ -577,18 +573,18 @@ class SocksClient extends events_1.EventEmitter {
if (addressType === constants_1.Socks5HostType.IPv4) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(4));
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.fromLong(buff.readUInt32BE()),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
// If given host is 0.0.0.0, assume remote proxy ip instead.
if (remoteHost.host === '0.0.0.0') {
- remoteHost.host = this._options.proxy.ipaddress;
+ remoteHost.host = this.options.proxy.ipaddress;
}
// Hostname
}
@@ -596,55 +592,57 @@ class SocksClient extends events_1.EventEmitter {
const hostLength = header[4];
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); // header + host length + host + port
// Check if data is available.
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(5) // Slice at 5 to skip host length
- );
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
remoteHost = {
host: buff.readString(hostLength),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
// IPv6
}
else if (addressType === constants_1.Socks5HostType.IPv6) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(4));
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.toString(buff.readBuffer(16)),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
}
// We have everything we need
- this.state = constants_1.SocksClientState.ReceivedFinalResponse;
+ this.setState(constants_1.SocksClientState.ReceivedFinalResponse);
// If using CONNECT, the client is now in the established state.
- if (constants_1.SocksCommand[this._options.command] === constants_1.SocksCommand.connect) {
- this.state = constants_1.SocksClientState.Established;
+ if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) {
+ this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
- this.emit('established', { socket: this._socket });
+ this.emit('established', { socket: this.socket });
}
- else if (constants_1.SocksCommand[this._options.command] === constants_1.SocksCommand.bind) {
+ else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
/* If using BIND, the Socks client is now in BoundWaitingForConnection state.
This means that the remote proxy server is waiting for a remote connection to the bound port. */
- this.state = constants_1.SocksClientState.BoundWaitingForConnection;
- this._nextRequiredPacketBufferSize =
+ this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
+ this.nextRequiredPacketBufferSize =
constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
- this.emit('bound', { socket: this._socket, remoteHost });
+ this.emit('bound', { remoteHost, socket: this.socket });
/*
If using Associate, the Socks client is now Established. And the proxy server is now accepting UDP packets at the
given bound port. This initial Socks TCP connection must remain open for the UDP relay to continue to work.
*/
}
- else if (constants_1.SocksCommand[this._options.command] === constants_1.SocksCommand.associate) {
- this.state = constants_1.SocksClientState.Established;
+ else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) {
+ this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
- this.emit('established', { socket: this._socket, remoteHost });
+ this.emit('established', {
+ remoteHost,
+ socket: this.socket,
+ });
}
}
}
@@ -653,9 +651,9 @@ class SocksClient extends events_1.EventEmitter {
*/
handleSocks5IncomingConnectionResponse() {
// Peek at available data (we need at least 5 bytes to get the hostname length)
- const header = this._receiveBuffer.peek(5);
+ const header = this.receiveBuffer.peek(5);
if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) {
- this._closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`);
+ this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`);
}
else {
// Read address type
@@ -666,18 +664,18 @@ class SocksClient extends events_1.EventEmitter {
if (addressType === constants_1.Socks5HostType.IPv4) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(4));
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.fromLong(buff.readUInt32BE()),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
// If given host is 0.0.0.0, assume remote proxy ip instead.
if (remoteHost.host === '0.0.0.0') {
- remoteHost.host = this._options.proxy.ipaddress;
+ remoteHost.host = this.options.proxy.ipaddress;
}
// Hostname
}
@@ -685,38 +683,37 @@ class SocksClient extends events_1.EventEmitter {
const hostLength = header[4];
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); // header + host length + port
// Check if data is available.
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(5) // Slice at 5 to skip host length
- );
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
remoteHost = {
host: buff.readString(hostLength),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
// IPv6
}
else if (addressType === constants_1.Socks5HostType.IPv6) {
// Check if data is available.
const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
- if (this._receiveBuffer.length < dataNeeded) {
- this._nextRequiredPacketBufferSize = dataNeeded;
+ if (this.receiveBuffer.length < dataNeeded) {
+ this.nextRequiredPacketBufferSize = dataNeeded;
return;
}
- buff = smart_buffer_1.SmartBuffer.fromBuffer(this._receiveBuffer.get(dataNeeded).slice(4));
+ buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
remoteHost = {
host: ip.toString(buff.readBuffer(16)),
- port: buff.readUInt16BE()
+ port: buff.readUInt16BE(),
};
}
- this.state = constants_1.SocksClientState.Established;
+ this.setState(constants_1.SocksClientState.Established);
this.removeInternalSocketHandlers();
- this.emit('established', { socket: this._socket, remoteHost });
+ this.emit('established', { remoteHost, socket: this.socket });
}
}
get socksClientOptions() {
- return Object.assign({}, this._options);
+ return Object.assign({}, this.options);
}
}
exports.SocksClient = SocksClient;
diff --git a/node_modules/socks/build/client/socksclient.js.map b/node_modules/socks/build/client/socksclient.js.map
index eb73a2585..ff8cd89c1 100644
--- a/node_modules/socks/build/client/socksclient.js.map
+++ b/node_modules/socks/build/client/socksclient.js.map
@@ -1 +1 @@
-{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AACtC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAA2C;AAC3C,mDAiB6B;AAC7B,+CAG2B;AAC3B,2DAAwD;AACxD,yCAAgE;AA0BhE,MAAM,WAAY,SAAQ,qBAAY;IAepC,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,qBACR,OAAO,CACX,CAAC;QAEF,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,CAAC,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,OAAO,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,OAA2B,EAC3B,QAAmB;QAEnB,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,OAAO,CAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAiC,EAAE,EAAE;gBAC/D,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;oBACrB,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,OAAO,CAAC,IAAI,CAAC,CAAC;iBACf;YACH,CAAC,CAAC,CAAC;YAEH,kDAAkD;YAClD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;gBAClC,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACd,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAC1B,OAAgC,EAChC,QAAmB;QAEnB,mCAAmC;QACnC,yCAA+B,CAAC,OAAO,CAAC,CAAC;QAEzC,kBAAkB;QAClB,IAAI,OAAO,CAAC,cAAc,EAAE;YAC1B,mBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC/B;QAED,OAAO,IAAI,OAAO,CAA8B,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACxE,IAAI,IAAgB,CAAC;YAErB,IAAI;gBACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAErC,0HAA0H;oBAC1H,MAAM,eAAe,GACnB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;wBAC9B,CAAC,CAAC,OAAO,CAAC,WAAW;wBACrB,CAAC,CAAC;4BACE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;4BACtC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;yBAClC,CAAC;oBAER,4CAA4C;oBAC5C,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,gBAAgB,CAAC;wBAChD,OAAO,EAAE,SAAS;wBAClB,KAAK,EAAE,SAAS;wBAChB,WAAW,EAAE,eAAe;wBAC5B,8HAA8H;qBAC/H,CAAC,CAAC;oBAEH,wCAAwC;oBACxC,IAAI,CAAC,IAAI,EAAE;wBACT,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;qBACtB;iBACF;gBAED,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;oBACjC,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC3B;aACF;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACd,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;aACF;QACH,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,OAA6B;QACjD,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC;QAE1C,qBAAqB;QACrB,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACxD;aAAM,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAC9C,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,OAAO;QACP,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO;QACP,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,IAAY;QAC/B,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAEpB,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAmB,IAAI,CAAC,SAAS,EAAE,CAAC;QAClD,IAAI,UAAU,CAAC;QAEf,IAAI,QAAQ,KAAK,0BAAc,CAAC,IAAI,EAAE;YACpC,UAAU,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;SAC/C;aAAM,IAAI,QAAQ,KAAK,0BAAc,CAAC,IAAI,EAAE;YAC3C,UAAU,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;SAC/C;aAAM;YACL,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;SAChD;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAEvC,OAAO;YACL,WAAW;YACX,UAAU,EAAE;gBACV,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,UAAU;aACjB;YACD,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;SACxB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,IAAY,KAAK,CAAC,QAA0B;QAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,4BAAgB,CAAC,KAAK,EAAE;YAC1C,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;SACxB;IACH,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,eAAwB;QACrC,IAAI,CAAC,eAAe,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,CAAC,GAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QAEzC,+CAA+C;QAC/C,MAAM,KAAK,GAAG,UAAU,CACtB,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EACjC,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,2BAAe,CACzC,CAAC;QAEF,8EAA8E;QAC9E,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;YACpD,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QAED,yGAAyG;QACzG,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;SAChC;aAAM;YACL,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;SACjC;QAED,gCAAgC;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAE9C,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,UAAU,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAa,EAAE,CAAC;QAE1C,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC9B;aAAM;YACJ,IAAI,CAAC,OAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;YAE9D,IACE,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,SAAS;gBAC3C,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,IAAI,EACtC;gBACC,IAAI,CAAC,OAAsB,CAAC,UAAU,CACrC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAChC,CAAC;aACH;SACF;QAED,6FAA6F;QAC7F,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE;YAC7C,YAAY,CAAC,GAAG,EAAE;gBAChB,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;oBAClC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CACxC,IAAI,CAAC,cAAc,CAAC,MAAM,CAC3B,CAAC;oBAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;iBACtC;gBACD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+EAA+E;IACvE,gBAAgB;QACtB,uCACK,IAAI,CAAC,QAAQ,CAAC,cAAc,KAC/B,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAC/D,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAC9B;IACJ,CAAC;IAED;;;OAGG;IACK,oBAAoB;QAC1B,IACE,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,WAAW;YAC3C,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,yBAAyB,EACzD;YACA,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,uBAAuB,CAAC,CAAC;SACnD;IACH,CAAC;IAED;;OAEG;IACK,SAAS;QACf,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,SAAS,CAAC;QAExC,0BAA0B;QAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;YAClC,IAAI,CAAC,0BAA0B,EAAE,CAAC;SACnC;aAAM;YACL,IAAI,CAAC,0BAA0B,EAAE,CAAC;SACnC;QAED,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,oBAAoB,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,cAAc,CAAC,IAAY;QACjC;;;UAGE;QACF,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEjC,6BAA6B;QAC7B,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,WAAW;QACjB,mFAAmF;QACnF,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,IAAI,IAAI,CAAC,6BAA6B,EAAE;YACpE,gDAAgD;YAChD,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,oBAAoB,EAAE;gBACxD,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBAClC,4CAA4C;oBAC5C,IAAI,CAAC,kCAAkC,EAAE,CAAC;iBAC3C;qBAAM;oBACL,wDAAwD;oBACxD,IAAI,CAAC,oCAAoC,EAAE,CAAC;iBAC7C;gBACD,wDAAwD;aACzD;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,kBAAkB,EAAE;gBAC7D,IAAI,CAAC,kDAAkD,EAAE,CAAC;gBAC1D,6DAA6D;aAC9D;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,kBAAkB,EAAE;gBAC7D,IAAI,CAAC,kCAAkC,EAAE,CAAC;gBAC1C,mEAAmE;aACpE;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,yBAAyB,EAAE;gBACpE,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBAClC,IAAI,CAAC,sCAAsC,EAAE,CAAC;iBAC/C;qBAAM;oBACL,IAAI,CAAC,sCAAsC,EAAE,CAAC;iBAC/C;aACF;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,WAAW,EAAE;gBACtD,8CAA8C;aAC/C;iBAAM;gBACL,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,aAAa,CAAC,CAAC;aACzC;SACF;IACH,CAAC;IAED;;;OAGG;IACK,OAAO;QACb,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;IAED;;;OAGG;IACK,OAAO,CAAC,GAAU;QACxB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACK,4BAA4B;QAClC,6FAA6F;QAC7F,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACK,YAAY,CAAC,GAAW;QAC9B,2FAA2F;QAC3F,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,KAAK,EAAE;YACzC,+BAA+B;YAC/B,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,KAAK,CAAC;YAEpC,iBAAiB;YACjB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YAEvB,4BAA4B;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YAEpC,sBAAsB;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,uBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC9D;IACH,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAEhD,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEnD,iBAAiB;QACjB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YAC9C,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC3B,sBAAsB;SACvB;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACpD;QAED,IAAI,CAAC,6BAA6B;YAChC,uCAA2B,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACtC,CAAC;IAED;;;OAGG;IACK,kCAAkC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAExC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YACtC,IAAI,CAAC,YAAY,CACf,GAAG,kBAAM,CAAC,6BAA6B,OAAO,0BAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CACzE,CAAC;SACH;aAAM;YACL,gBAAgB;YAChB,IAAI,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,IAAI,EAAE;gBAC7D,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;gBAEpB,MAAM,UAAU,GAAoB;oBAClC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;oBACzB,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;iBACvC,CAAC;gBAEF,yCAAyC;gBACzC,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;iBACjD;gBACD,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,yBAAyB,CAAC;gBACxD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;gBAEzD,mBAAmB;aACpB;iBAAM;gBACL,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;gBAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;aACpD;SACF;IACH,CAAC;IAED;;;OAGG;IACK,sCAAsC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAExC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YACtC,IAAI,CAAC,YAAY,CACf,GAAG,kBAAM,CAAC,0CAA0C,OAClD,0BAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,GAAG,CACJ,CAAC;SACH;aAAM;YACL,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;YAEpB,MAAM,UAAU,GAAoB;gBAClC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;gBACzB,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;aACvC,CAAC;YAEF,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEtB,6FAA6F;QAC7F,sHAAsH;QACtH,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC9D,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,MAAM,CAAC,CAAC;YACnC,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,QAAQ,CAAC,CAAC;SACtC;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,MAAM,CAAC,CAAC;SACpC;QAED,IAAI,CAAC,6BAA6B;YAChC,uCAA2B,CAAC,8BAA8B,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,oBAAoB,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,oCAAoC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAExC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YACpB,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,yCAAyC,CAAC,CAAC;SACrE;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YAC3B,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,+CAA+C,CAAC,CAAC;SAC3E;aAAM;YACL,6EAA6E;YAC7E,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,sBAAU,CAAC,MAAM,EAAE;gBACjC,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,0EAA0E;aAC3E;iBAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,sBAAU,CAAC,QAAQ,EAAE;gBAC1C,IAAI,CAAC,gCAAgC,EAAE,CAAC;aACzC;iBAAM;gBACL,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,4CAA4C,CAAC,CAAC;aACxE;SACF;IACH,CAAC;IAED;;;;OAIG;IACK,gCAAgC;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QAEpD,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE3B,IAAI,CAAC,6BAA6B;YAChC,uCAA2B,CAAC,oCAAoC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,kBAAkB,CAAC;IACnD,CAAC;IAED;;;OAGG;IACK,kDAAkD;QACxD,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,8BAA8B,CAAC;QAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAExC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YACpB,IAAI,CAAC,YAAY,CAAC,kBAAM,CAAC,0BAA0B,CAAC,CAAC;SACtD;aAAM;YACL,IAAI,CAAC,wBAAwB,EAAE,CAAC;SACjC;IACH,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAE/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEtB,sBAAsB;QACtB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YAC9C,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;SAC/D;aAAM,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YACrD,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;SAC/D;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAClD;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEnD,IAAI,CAAC,6BAA6B;YAChC,uCAA2B,CAAC,oBAAoB,CAAC;QACnD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,kBAAkB,CAAC;IACnD,CAAC;IAED;;;OAGG;IACK,kCAAkC;QACxC,+EAA+E;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3C,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YAC9D,IAAI,CAAC,YAAY,CACf,GAAG,kBAAM,CAAC,mCAAmC,MAC3C,0BAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,EAAE,CACH,CAAC;SACH;aAAM;YACL,oBAAoB;YACpB,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,UAA2B,CAAC;YAChC,IAAI,IAAiB,CAAC;YAEtB,OAAO;YACP,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBACvC,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBAEF,4DAA4D;gBAC5D,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;iBACjD;gBAED,WAAW;aACZ;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,QAAQ,EAAE;gBAClD,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,UAAU,GAAG,uCAA2B,CAAC,sBAAsB,CACnE,UAAU,CACX,CAAC,CAAC,qCAAqC;gBAExC,8BAA8B;gBAC9B,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iCAAiC;iBAC/E,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBACjC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBACF,OAAO;aACR;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBAC9C,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,6BAA6B;YAC7B,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,qBAAqB,CAAC;YAEpD,gEAAgE;YAChE,IAAI,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,OAAO,EAAE;gBAChE,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;gBAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;aACpD;iBAAM,IAAI,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,IAAI,EAAE;gBACpE;mHACmG;gBACnG,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,yBAAyB,CAAC;gBACxD,IAAI,CAAC,6BAA6B;oBAChC,uCAA2B,CAAC,oBAAoB,CAAC;gBACnD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;gBACzD;;;kBAGE;aACH;iBAAM,IACL,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,SAAS,EAC9D;gBACA,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;gBAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;aAChE;SACF;IACH,CAAC;IAED;;OAEG;IACK,sCAAsC;QAC5C,+EAA+E;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE3C,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YAC9D,IAAI,CAAC,YAAY,CACf,GAAG,kBAAM,CAAC,0CAA0C,MAClD,0BAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,EAAE,CACH,CAAC;SACH;aAAM;YACL,oBAAoB;YACpB,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,UAA2B,CAAC;YAChC,IAAI,IAAiB,CAAC;YAEtB,OAAO;YACP,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBACvC,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBAEF,4DAA4D;gBAC5D,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;iBACjD;gBAED,WAAW;aACZ;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,QAAQ,EAAE;gBAClD,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,UAAU,GAAG,uCAA2B,CAAC,sBAAsB,CACnE,UAAU,CACX,CAAC,CAAC,8BAA8B;gBAEjC,8BAA8B;gBAC9B,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,iCAAiC;iBAC/E,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBACjC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBACF,OAAO;aACR;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBAC9C,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC3C,IAAI,CAAC,6BAA6B,GAAG,UAAU,CAAC;oBAChD,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,IAAI,CAAC,KAAK,GAAG,4BAAgB,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,QAAQ,EAChB;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file
+{"version":3,"file":"socksclient.js","sourceRoot":"","sources":["../../src/client/socksclient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAoC;AACpC,2BAA2B;AAC3B,yBAAyB;AACzB,+CAAyC;AACzC,mDAiB6B;AAC7B,+CAG2B;AAC3B,2DAAsD;AACtD,yCAA8D;AAm2B5D,iGAn2BM,uBAAgB,OAm2BN;AAz0BlB,MAAM,WAAY,SAAQ,qBAAY;IAepC,YAAY,OAA2B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,qBACP,OAAO,CACX,CAAC;QAEF,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,CAAC,CAAC;QAEpC,gBAAgB;QAChB,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,OAA2B,EAC3B,QAAmB;QAEnB,8BAA8B;QAC9B,oCAA0B,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,OAAO,IAAI,OAAO,CAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAiC,EAAE,EAAE;gBAC/D,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;oBACrB,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,OAAO,CAAC,IAAI,CAAC,CAAC;iBACf;YACH,CAAC,CAAC,CAAC;YAEH,kDAAkD;YAClD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;gBAClC,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACd,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAC1B,OAAgC,EAChC,QAAmB;QAEnB,mCAAmC;QACnC,yCAA+B,CAAC,OAAO,CAAC,CAAC;QAEzC,kBAAkB;QAClB,IAAI,OAAO,CAAC,cAAc,EAAE;YAC1B,mBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SAC/B;QAED,OAAO,IAAI,OAAO,CAA8B,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACxE,IAAI,IAAgB,CAAC;YAErB,IAAI;gBACF,kDAAkD;gBAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC/C,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAErC,0HAA0H;oBAC1H,MAAM,eAAe,GACnB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;wBAC9B,CAAC,CAAC,OAAO,CAAC,WAAW;wBACrB,CAAC,CAAC;4BACE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;4BACtC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;yBAClC,CAAC;oBAER,4CAA4C;oBAC5C,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,gBAAgB,CAAC;wBAChD,OAAO,EAAE,SAAS;wBAClB,KAAK,EAAE,SAAS;wBAChB,WAAW,EAAE,eAAe;qBAE7B,CAAC,CAAC;oBAEH,wCAAwC;oBACxC,IAAI,CAAC,IAAI,EAAE;wBACT,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;qBACtB;iBACF;gBAED,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,IAAI,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;oBAC/B,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,OAAO,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;iBACzB;aACF;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;oBAClC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBACd,OAAO,EAAE,CAAC,CAAC,oDAAoD;iBAChE;qBAAM;oBACL,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;aACF;QACH,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,OAA6B;QACjD,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC;QAE1C,qBAAqB;QACrB,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACxD;aAAM,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAC9C,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,OAAO;QACP,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO;QACP,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE/B,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,IAAY;QAC/B,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAEpB,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAmB,IAAI,CAAC,SAAS,EAAE,CAAC;QAClD,IAAI,UAAU,CAAC;QAEf,IAAI,QAAQ,KAAK,0BAAc,CAAC,IAAI,EAAE;YACpC,UAAU,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;SAC/C;aAAM,IAAI,QAAQ,KAAK,0BAAc,CAAC,IAAI,EAAE;YAC3C,UAAU,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;SAC/C;aAAM;YACL,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;SAChD;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAEvC,OAAO;YACL,WAAW;YACX,UAAU,EAAE;gBACV,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,UAAU;aACjB;YACD,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;SACxB,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,QAAQ,CAAC,QAA0B;QACzC,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,KAAK,EAAE;YACzC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;SACvB;IACH,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,cAAuB;QACpC,IAAI,CAAC,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,CAAC,GAAU,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE/C,+CAA+C;QAC/C,MAAM,KAAK,GAAG,UAAU,CACtB,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EACjC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,2BAAe,CACxC,CAAC;QAEF,8EAA8E;QAC9E,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;YACpD,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QAED,yGAAyG;QACzG,IAAI,cAAc,EAAE;YAClB,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC;SAC9B;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;SAChC;QAED,gCAAgC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAE5C,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,EAAE,CAAC;QAEzC,IAAI,cAAc,EAAE;YAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC7B;aAAM;YACJ,IAAI,CAAC,MAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;YAE7D,IACE,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS;gBAC1C,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,EACrC;gBACC,IAAI,CAAC,MAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;aACxE;SACF;QAED,6FAA6F;QAC7F,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/C,YAAY,CAAC,GAAG,EAAE;gBAChB,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;oBACjC,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;oBAErE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;iBACtC;gBACD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+EAA+E;IACvE,gBAAgB;QACtB,uCACK,IAAI,CAAC,OAAO,CAAC,cAAc,KAC9B,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAC7D,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAC7B;IACJ,CAAC;IAED;;;OAGG;IACK,oBAAoB;QAC1B,IACE,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,WAAW;YAC3C,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,yBAAyB,EACzD;YACA,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,uBAAuB,CAAC,CAAC;SAClD;IACH,CAAC;IAED;;OAEG;IACK,gBAAgB;QACtB,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,SAAS,CAAC,CAAC;QAE1C,0BAA0B;QAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;YACjC,IAAI,CAAC,0BAA0B,EAAE,CAAC;SACnC;aAAM;YACL,IAAI,CAAC,0BAA0B,EAAE,CAAC;SACnC;QAED,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACK,qBAAqB,CAAC,IAAY;QACxC;;;UAGE;QACF,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEhC,6BAA6B;QAC7B,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,WAAW;QACjB,mFAAmF;QACnF,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,IAAI,IAAI,CAAC,4BAA4B,EAAE;YAClE,gDAAgD;YAChD,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,oBAAoB,EAAE;gBACxD,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBACjC,4CAA4C;oBAC5C,IAAI,CAAC,kCAAkC,EAAE,CAAC;iBAC3C;qBAAM;oBACL,wDAAwD;oBACxD,IAAI,CAAC,oCAAoC,EAAE,CAAC;iBAC7C;gBACD,wDAAwD;aACzD;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,kBAAkB,EAAE;gBAC7D,IAAI,CAAC,kDAAkD,EAAE,CAAC;gBAC1D,6DAA6D;aAC9D;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,kBAAkB,EAAE;gBAC7D,IAAI,CAAC,kCAAkC,EAAE,CAAC;gBAC1C,mEAAmE;aACpE;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,yBAAyB,EAAE;gBACpE,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBACjC,IAAI,CAAC,sCAAsC,EAAE,CAAC;iBAC/C;qBAAM;oBACL,IAAI,CAAC,sCAAsC,EAAE,CAAC;iBAC/C;aACF;iBAAM,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,WAAW,EAAE;gBACtD,8CAA8C;aAC/C;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,aAAa,CAAC,CAAC;aACxC;SACF;IACH,CAAC;IAED;;;OAGG;IACK,cAAc;QACpB,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,YAAY,CAAC,CAAC;IACxC,CAAC;IAED;;;OAGG;IACK,cAAc,CAAC,GAAU;QAC/B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACK,4BAA4B;QAClC,6FAA6F;QAC7F,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;IAED;;;OAGG;IACK,WAAW,CAAC,GAAW;QAC7B,2FAA2F;QAC3F,IAAI,IAAI,CAAC,KAAK,KAAK,4BAAgB,CAAC,KAAK,EAAE;YACzC,+BAA+B;YAC/B,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,KAAK,CAAC,CAAC;YAEtC,iBAAiB;YACjB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAEtB,4BAA4B;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YAEpC,sBAAsB;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,uBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAE/C,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAElD,iBAAiB;QACjB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YAC7C,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7D,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC3B,sBAAsB;SACvB;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,4BAA4B;YAC/B,uCAA2B,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACK,kCAAkC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YACtC,IAAI,CAAC,WAAW,CACd,GAAG,kBAAM,CAAC,6BAA6B,OACrC,0BAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,GAAG,CACJ,CAAC;SACH;aAAM;YACL,gBAAgB;YAChB,IAAI,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,IAAI,EAAE;gBAC5D,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;gBAEpB,MAAM,UAAU,GAAoB;oBAClC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;oBACzB,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;iBACvC,CAAC;gBAEF,yCAAyC;gBACzC,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;iBAChD;gBACD,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,yBAAyB,CAAC,CAAC;gBAC1D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;gBAEtD,mBAAmB;aACpB;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;gBAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;aACjD;SACF;IACH,CAAC;IAED;;;OAGG;IACK,sCAAsC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YACtC,IAAI,CAAC,WAAW,CACd,GAAG,kBAAM,CAAC,0CAA0C,OAClD,0BAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,GAAG,CACJ,CAAC;SACH;aAAM;YACL,MAAM,IAAI,GAAG,0BAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;YAEpB,MAAM,UAAU,GAAoB;gBAClC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;gBACzB,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;aACvC,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;YAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEtB,6FAA6F;QAC7F,sHAAsH;QACtH,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC5D,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,MAAM,CAAC,CAAC;YACnC,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,QAAQ,CAAC,CAAC;SACtC;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,sBAAU,CAAC,MAAM,CAAC,CAAC;SACpC;QAED,IAAI,CAAC,4BAA4B;YAC/B,uCAA2B,CAAC,8BAA8B,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACK,oCAAoC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,yCAAyC,CAAC,CAAC;SACpE;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YAC3B,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,+CAA+C,CAAC,CAAC;SAC1E;aAAM;YACL,6EAA6E;YAC7E,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,sBAAU,CAAC,MAAM,EAAE;gBACjC,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAChC,0EAA0E;aAC3E;iBAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,sBAAU,CAAC,QAAQ,EAAE;gBAC1C,IAAI,CAAC,gCAAgC,EAAE,CAAC;aACzC;iBAAM;gBACL,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,4CAA4C,CAAC,CAAC;aACvE;SACF;IACH,CAAC;IAED;;;;OAIG;IACK,gCAAgC;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;QAEnD,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE3B,IAAI,CAAC,4BAA4B;YAC/B,uCAA2B,CAAC,oCAAoC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,kDAAkD;QACxD,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,8BAA8B,CAAC,CAAC;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,kBAAM,CAAC,0BAA0B,CAAC,CAAC;SACrD;aAAM;YACL,IAAI,CAAC,wBAAwB,EAAE,CAAC;SACjC;IACH,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,MAAM,IAAI,GAAG,IAAI,0BAAW,EAAE,CAAC;QAE/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,CAAC,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEtB,sBAAsB;QACtB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YAC7C,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9D;aAAM,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YACpD,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9D;aAAM;YACL,IAAI,CAAC,UAAU,CAAC,0BAAc,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACtD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACjD;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAElD,IAAI,CAAC,4BAA4B;YAC/B,uCAA2B,CAAC,oBAAoB,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,kBAAkB,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,kCAAkC;QACxC,+EAA+E;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE1C,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YAC9D,IAAI,CAAC,WAAW,CACd,GAAG,kBAAM,CAAC,mCAAmC,MAC3C,0BAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,EAAE,CACH,CAAC;SACH;aAAM;YACL,oBAAoB;YACpB,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,UAA2B,CAAC;YAChC,IAAI,IAAiB,CAAC;YAEtB,OAAO;YACP,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBACvC,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBAEF,4DAA4D;gBAC5D,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;iBAChD;gBAED,WAAW;aACZ;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,QAAQ,EAAE;gBAClD,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,UAAU,GAAG,uCAA2B,CAAC,sBAAsB,CACnE,UAAU,CACX,CAAC,CAAC,qCAAqC;gBAExC,8BAA8B;gBAC9B,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBACjC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBACF,OAAO;aACR;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBAC9C,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,6BAA6B;YAC7B,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,qBAAqB,CAAC,CAAC;YAEtD,gEAAgE;YAChE,IAAI,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,OAAO,EAAE;gBAC/D,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;gBAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;aACjD;iBAAM,IAAI,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,IAAI,EAAE;gBACnE;mHACmG;gBACnG,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,yBAAyB,CAAC,CAAC;gBAC1D,IAAI,CAAC,4BAA4B;oBAC/B,uCAA2B,CAAC,oBAAoB,CAAC;gBACnD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;gBACtD;;;kBAGE;aACH;iBAAM,IACL,wBAAY,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,wBAAY,CAAC,SAAS,EAC7D;gBACA,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;gBAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;oBACvB,UAAU;oBACV,MAAM,EAAE,IAAI,CAAC,MAAM;iBACpB,CAAC,CAAC;aACJ;SACF;IACH,CAAC;IAED;;OAEG;IACK,sCAAsC;QAC5C,+EAA+E;QAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE1C,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,0BAAc,CAAC,OAAO,EAAE;YAC9D,IAAI,CAAC,WAAW,CACd,GAAG,kBAAM,CAAC,0CAA0C,MAClD,0BAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1B,EAAE,CACH,CAAC;SACH;aAAM;YACL,oBAAoB;YACpB,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,UAA2B,CAAC;YAChC,IAAI,IAAiB,CAAC;YAEtB,OAAO;YACP,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBACvC,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBAEF,4DAA4D;gBAC5D,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBACjC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;iBAChD;gBAED,WAAW;aACZ;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,QAAQ,EAAE;gBAClD,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,UAAU,GAAG,uCAA2B,CAAC,sBAAsB,CACnE,UAAU,CACX,CAAC,CAAC,8BAA8B;gBAEjC,8BAA8B;gBAC9B,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBACjC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;gBACF,OAAO;aACR;iBAAM,IAAI,WAAW,KAAK,0BAAc,CAAC,IAAI,EAAE;gBAC9C,8BAA8B;gBAC9B,MAAM,UAAU,GAAG,uCAA2B,CAAC,kBAAkB,CAAC;gBAClE,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE;oBAC1C,IAAI,CAAC,4BAA4B,GAAG,UAAU,CAAC;oBAC/C,OAAO;iBACR;gBAED,IAAI,GAAG,0BAAW,CAAC,UAAU,CAC3B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC;gBAEF,UAAU,GAAG;oBACX,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBACtC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE;iBAC1B,CAAC;aACH;YAED,IAAI,CAAC,QAAQ,CAAC,4BAAgB,CAAC,WAAW,CAAC,CAAC;YAC5C,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAED,IAAI,kBAAkB;QACpB,yBACK,IAAI,CAAC,OAAO,EACf;IACJ,CAAC;CACF;AAGC,kCAAW"} \ No newline at end of file
diff --git a/node_modules/socks/build/common/constants.js b/node_modules/socks/build/common/constants.js
index d76b21011..8f8f5436c 100644
--- a/node_modules/socks/build/common/constants.js
+++ b/node_modules/socks/build/common/constants.js
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.SOCKS_INCOMING_PACKET_SIZES = exports.SocksClientState = exports.Socks5Response = exports.Socks5HostType = exports.Socks5Auth = exports.Socks4Response = exports.SocksCommand = exports.ERRORS = exports.DEFAULT_TIMEOUT = void 0;
const DEFAULT_TIMEOUT = 30000;
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
// prettier-ignore
@@ -40,7 +41,7 @@ const SOCKS_INCOMING_PACKET_SIZES = {
Socks5ResponseIPv6: 22,
Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7,
// Command response + incoming connection (bind)
- Socks4Response: 8 // 2 header + 2 port + 4 ip
+ Socks4Response: 8,
};
exports.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES;
var SocksCommand;
diff --git a/node_modules/socks/build/common/constants.js.map b/node_modules/socks/build/common/constants.js.map
index a8677f72d..70d31db29 100644
--- a/node_modules/socks/build/common/constants.js.map
+++ b/node_modules/socks/build/common/constants.js.map
@@ -1 +1 @@
-{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;AAIA,MAAM,eAAe,GAAG,KAAK,CAAC;AA6L5B,0CAAe;AAzLjB,kBAAkB;AAClB,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE,wFAAwF;IAC7G,+BAA+B,EAAE,oGAAoG;IACrI,wBAAwB,EAAE,8FAA8F;IACxH,oCAAoC,EAAE,2CAA2C;IACjF,uCAAuC,EAAE,uFAAuF;IAChI,8BAA8B,EAAE,4CAA4C;IAC5E,gCAAgC,EAAE,8EAA8E;IAChH,sCAAsC,EAAE,2DAA2D;IACnG,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,4BAA4B;IACrD,aAAa,EAAE,qDAAqD;IACpE,8BAA8B,EAAE,4CAA4C;IAC5E,6BAA6B,EAAE,kCAAkC;IACjE,uCAAuC,EAAE,6CAA6C;IACtF,0CAA0C,EAAE,iDAAiD;IAC7F,qCAAqC,EAAE,oDAAoD;IAC3F,yCAAyC,EAAE,mEAAmE;IAC9G,+CAA+C,EAAE,6EAA6E;IAC9H,4CAA4C,EAAE,yEAAyE;IACvH,0BAA0B,EAAE,8BAA8B;IAC1D,2BAA2B,EAAE,kDAAkD;IAC/E,mCAAmC,EAAE,kCAAkC;IACvE,uCAAuC,EAAE,sDAAsD;IAC/F,0CAA0C,EAAE,iDAAiD;CAC9F,CAAC;AA+JA,wBAAM;AA7JR,MAAM,2BAA2B,GAAG;IAClC,8BAA8B,EAAE,CAAC;IACjC,oCAAoC,EAAE,CAAC;IACvC,gDAAgD;IAChD,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,EAAE;IACtB,kBAAkB,EAAE,EAAE;IACtB,sBAAsB,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,cAAc,GAAG,CAAC;IACtE,gDAAgD;IAChD,cAAc,EAAE,CAAC,CAAC,2BAA2B;CAC9C,CAAC;AAmKA,kEAA2B;AA/J7B,IAAK,YAIJ;AAJD,WAAK,YAAY;IACf,qDAAc,CAAA;IACd,+CAAW,CAAA;IACX,yDAAgB,CAAA;AAClB,CAAC,EAJI,YAAY,KAAZ,YAAY,QAIhB;AA6IC,oCAAY;AA3Id,IAAK,cAKJ;AALD,WAAK,cAAc;IACjB,0DAAc,CAAA;IACd,wDAAa,CAAA;IACb,4DAAe,CAAA;IACf,sEAAoB,CAAA;AACtB,CAAC,EALI,cAAc,KAAd,cAAc,QAKlB;AAuIC,wCAAc;AArIhB,IAAK,UAIJ;AAJD,WAAK,UAAU;IACb,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,mDAAe,CAAA;AACjB,CAAC,EAJI,UAAU,KAAV,UAAU,QAId;AAkIC,gCAAU;AAhIZ,IAAK,cAUJ;AAVD,WAAK,cAAc;IACjB,yDAAc,CAAA;IACd,yDAAc,CAAA;IACd,+DAAiB,CAAA;IACjB,+EAAyB,CAAA;IACzB,yEAAsB,CAAA;IACtB,6EAAwB,CAAA;IACxB,+DAAiB,CAAA;IACjB,iFAA0B,CAAA;IAC1B,iFAA0B,CAAA;AAC5B,CAAC,EAVI,cAAc,KAAd,cAAc,QAUlB;AAwHC,wCAAc;AAtHhB,IAAK,cAIJ;AAJD,WAAK,cAAc;IACjB,mDAAW,CAAA;IACX,2DAAe,CAAA;IACf,mDAAW,CAAA;AACb,CAAC,EAJI,cAAc,KAAd,cAAc,QAIlB;AAiHC,wCAAc;AA/GhB,IAAK,gBAcJ;AAdD,WAAK,gBAAgB;IACnB,6DAAW,CAAA;IACX,mEAAc,CAAA;IACd,iEAAa,CAAA;IACb,uFAAwB,CAAA;IACxB,+GAAoC,CAAA;IACpC,mFAAsB,CAAA;IACtB,2GAAkC,CAAA;IAClC,mFAAsB,CAAA;IACtB,yFAAyB,CAAA;IACzB,iGAA6B,CAAA;IAC7B,sEAAgB,CAAA;IAChB,wEAAiB,CAAA;IACjB,0DAAU,CAAA;AACZ,CAAC,EAdI,gBAAgB,KAAhB,gBAAgB,QAcpB;AAmGC,4CAAgB"} \ No newline at end of file
+{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAIA,MAAM,eAAe,GAAG,KAAK,CAAC;AA6L5B,0CAAe;AAzLjB,kBAAkB;AAClB,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE,wFAAwF;IAC7G,+BAA+B,EAAE,oGAAoG;IACrI,wBAAwB,EAAE,8FAA8F;IACxH,oCAAoC,EAAE,2CAA2C;IACjF,uCAAuC,EAAE,uFAAuF;IAChI,8BAA8B,EAAE,4CAA4C;IAC5E,gCAAgC,EAAE,8EAA8E;IAChH,sCAAsC,EAAE,2DAA2D;IACnG,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,4BAA4B;IACrD,aAAa,EAAE,qDAAqD;IACpE,8BAA8B,EAAE,4CAA4C;IAC5E,6BAA6B,EAAE,kCAAkC;IACjE,uCAAuC,EAAE,6CAA6C;IACtF,0CAA0C,EAAE,iDAAiD;IAC7F,qCAAqC,EAAE,oDAAoD;IAC3F,yCAAyC,EAAE,mEAAmE;IAC9G,+CAA+C,EAAE,6EAA6E;IAC9H,4CAA4C,EAAE,yEAAyE;IACvH,0BAA0B,EAAE,8BAA8B;IAC1D,2BAA2B,EAAE,kDAAkD;IAC/E,mCAAmC,EAAE,kCAAkC;IACvE,uCAAuC,EAAE,sDAAsD;IAC/F,0CAA0C,EAAE,iDAAiD;CAC9F,CAAC;AA+JA,wBAAM;AA7JR,MAAM,2BAA2B,GAAG;IAClC,8BAA8B,EAAE,CAAC;IACjC,oCAAoC,EAAE,CAAC;IACvC,gDAAgD;IAChD,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,EAAE;IACtB,kBAAkB,EAAE,EAAE;IACtB,sBAAsB,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,cAAc,GAAG,CAAC;IACtE,gDAAgD;IAChD,cAAc,EAAE,CAAC;CAClB,CAAC;AAmKA,kEAA2B;AA/J7B,IAAK,YAIJ;AAJD,WAAK,YAAY;IACf,qDAAc,CAAA;IACd,+CAAW,CAAA;IACX,yDAAgB,CAAA;AAClB,CAAC,EAJI,YAAY,KAAZ,YAAY,QAIhB;AA6IC,oCAAY;AA3Id,IAAK,cAKJ;AALD,WAAK,cAAc;IACjB,0DAAc,CAAA;IACd,wDAAa,CAAA;IACb,4DAAe,CAAA;IACf,sEAAoB,CAAA;AACtB,CAAC,EALI,cAAc,KAAd,cAAc,QAKlB;AAuIC,wCAAc;AArIhB,IAAK,UAIJ;AAJD,WAAK,UAAU;IACb,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,mDAAe,CAAA;AACjB,CAAC,EAJI,UAAU,KAAV,UAAU,QAId;AAkIC,gCAAU;AAhIZ,IAAK,cAUJ;AAVD,WAAK,cAAc;IACjB,yDAAc,CAAA;IACd,yDAAc,CAAA;IACd,+DAAiB,CAAA;IACjB,+EAAyB,CAAA;IACzB,yEAAsB,CAAA;IACtB,6EAAwB,CAAA;IACxB,+DAAiB,CAAA;IACjB,iFAA0B,CAAA;IAC1B,iFAA0B,CAAA;AAC5B,CAAC,EAVI,cAAc,KAAd,cAAc,QAUlB;AAwHC,wCAAc;AAtHhB,IAAK,cAIJ;AAJD,WAAK,cAAc;IACjB,mDAAW,CAAA;IACX,2DAAe,CAAA;IACf,mDAAW,CAAA;AACb,CAAC,EAJI,cAAc,KAAd,cAAc,QAIlB;AAiHC,wCAAc;AA/GhB,IAAK,gBAcJ;AAdD,WAAK,gBAAgB;IACnB,6DAAW,CAAA;IACX,mEAAc,CAAA;IACd,iEAAa,CAAA;IACb,uFAAwB,CAAA;IACxB,+GAAoC,CAAA;IACpC,mFAAsB,CAAA;IACtB,2GAAkC,CAAA;IAClC,mFAAsB,CAAA;IACtB,yFAAyB,CAAA;IACzB,iGAA6B,CAAA;IAC7B,sEAAgB,CAAA;IAChB,wEAAiB,CAAA;IACjB,0DAAU,CAAA;AACZ,CAAC,EAdI,gBAAgB,KAAhB,gBAAgB,QAcpB;AAmGC,4CAAgB"} \ No newline at end of file
diff --git a/node_modules/socks/build/common/helpers.js b/node_modules/socks/build/common/helpers.js
index 88153aabd..5bf4cc477 100644
--- a/node_modules/socks/build/common/helpers.js
+++ b/node_modules/socks/build/common/helpers.js
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.validateSocksClientChainOptions = exports.validateSocksClientOptions = void 0;
const util_1 = require("./util");
const constants_1 = require("./constants");
const stream = require("stream");
diff --git a/node_modules/socks/build/common/helpers.js.map b/node_modules/socks/build/common/helpers.js.map
index f02465f13..3313a3c03 100644
--- a/node_modules/socks/build/common/helpers.js.map
+++ b/node_modules/socks/build/common/helpers.js.map
@@ -1 +1 @@
-{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":";;AAKA,iCAA0C;AAC1C,2CAA+D;AAC/D,iCAAiC;AAEjC;;;;GAIG;AACH,SAAS,0BAA0B,CACjC,OAA2B,EAC3B,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAEnD,8BAA8B;IAC9B,IAAI,CAAC,wBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAClC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KACjE;IAED,6CAA6C;IAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;KAC7E;IAED,oBAAoB;IACpB,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAChD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,oCAAoC,EAC3C,OAAO,CACR,CAAC;KACH;IAED,2BAA2B;IAC3B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;KAC5E;IAED,gBAAgB;IAChB,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,gCAAgC,EACvC,OAAO,CACR,CAAC;KACH;IAED,sCAAsC;IACtC,IACE,OAAO,CAAC,eAAe;QACvB,CAAC,CAAC,OAAO,CAAC,eAAe,YAAY,MAAM,CAAC,MAAM,CAAC,EACnD;QACA,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,uCAAuC,EAC9C,OAAO,CACR,CAAC;KACH;AACH,CAAC;AA0FQ,gEAA0B;AAxFnC;;;GAGG;AACH,SAAS,+BAA+B,CAAC,OAAgC;IACvE,2CAA2C;IAC3C,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QACjC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;KACtE;IAED,oBAAoB;IACpB,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAChD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,oCAAoC,EAC3C,OAAO,CACR,CAAC;KACH;IAED,4BAA4B;IAC5B,IACE,CAAC,CACC,OAAO,CAAC,OAAO;QACf,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QAC9B,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAC5B,EACD;QACA,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,sCAAsC,EAC7C,OAAO,CACR,CAAC;KACH;IAED,mBAAmB;IACnB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAiB,EAAE,EAAE;QAC5C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE;YAC7B,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,8BAA8B,EACrC,OAAO,CACR,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IAEH,gBAAgB;IAChB,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,gCAAgC,EACvC,OAAO,CACR,CAAC;KACH;AACH,CAAC;AAuCoC,0EAA+B;AArCpE;;;GAGG;AACH,SAAS,sBAAsB,CAAC,UAA2B;IACzD,OAAO,CACL,UAAU;QACV,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,UAAU,CAAC,IAAI,IAAI,CAAC;QACpB,UAAU,CAAC,IAAI,IAAI,KAAK,CACzB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAAiB;IAC1C,OAAO,CACL,KAAK;QACL,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC;QACvE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,KAAK,CAAC,IAAI,IAAI,CAAC;QACf,KAAK,CAAC,IAAI,IAAI,KAAK;QACnB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file
+{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":";;;AAKA,iCAAwC;AACxC,2CAA6D;AAC7D,iCAAiC;AAEjC;;;;GAIG;AACH,SAAS,0BAA0B,CACjC,OAA2B,EAC3B,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAEnD,8BAA8B;IAC9B,IAAI,CAAC,wBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAClC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KACjE;IAED,6CAA6C;IAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;KAC7E;IAED,oBAAoB;IACpB,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAChD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,oCAAoC,EAC3C,OAAO,CACR,CAAC;KACH;IAED,2BAA2B;IAC3B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACrC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;KAC5E;IAED,gBAAgB;IAChB,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,gCAAgC,EACvC,OAAO,CACR,CAAC;KACH;IAED,sCAAsC;IACtC,IACE,OAAO,CAAC,eAAe;QACvB,CAAC,CAAC,OAAO,CAAC,eAAe,YAAY,MAAM,CAAC,MAAM,CAAC,EACnD;QACA,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,uCAAuC,EAC9C,OAAO,CACR,CAAC;KACH;AACH,CAAC;AA0FO,gEAA0B;AAxFlC;;;GAGG;AACH,SAAS,+BAA+B,CAAC,OAAgC;IACvE,2CAA2C;IAC3C,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QACjC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;KACtE;IAED,oBAAoB;IACpB,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAChD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,oCAAoC,EAC3C,OAAO,CACR,CAAC;KACH;IAED,4BAA4B;IAC5B,IACE,CAAC,CACC,OAAO,CAAC,OAAO;QACf,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;QAC9B,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAC5B,EACD;QACA,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,sCAAsC,EAC7C,OAAO,CACR,CAAC;KACH;IAED,mBAAmB;IACnB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAiB,EAAE,EAAE;QAC5C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE;YAC7B,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,8BAA8B,EACrC,OAAO,CACR,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IAEH,gBAAgB;IAChB,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5D,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,gCAAgC,EACvC,OAAO,CACR,CAAC;KACH;AACH,CAAC;AAuCmC,0EAA+B;AArCnE;;;GAGG;AACH,SAAS,sBAAsB,CAAC,UAA2B;IACzD,OAAO,CACL,UAAU;QACV,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,UAAU,CAAC,IAAI,IAAI,CAAC;QACpB,UAAU,CAAC,IAAI,IAAI,KAAK,CACzB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAAiB;IAC1C,OAAO,CACL,KAAK;QACL,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC;QACvE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,KAAK,CAAC,IAAI,IAAI,CAAC;QACf,KAAK,CAAC,IAAI,IAAI,KAAK;QACnB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file
diff --git a/node_modules/socks/build/common/receivebuffer.js b/node_modules/socks/build/common/receivebuffer.js
index 180fa749d..3dacbf9b9 100644
--- a/node_modules/socks/build/common/receivebuffer.js
+++ b/node_modules/socks/build/common/receivebuffer.js
@@ -1,40 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.ReceiveBuffer = void 0;
class ReceiveBuffer {
constructor(size = 4096) {
- this._buffer = Buffer.allocUnsafe(size);
- this._offset = 0;
- this._originalSize = size;
+ this.buffer = Buffer.allocUnsafe(size);
+ this.offset = 0;
+ this.originalSize = size;
}
get length() {
- return this._offset;
+ return this.offset;
}
append(data) {
if (!Buffer.isBuffer(data)) {
throw new Error('Attempted to append a non-buffer instance to ReceiveBuffer.');
}
- if (this._offset + data.length >= this._buffer.length) {
- const tmp = this._buffer;
- this._buffer = Buffer.allocUnsafe(Math.max(this._buffer.length + this._originalSize, this._buffer.length + data.length));
- tmp.copy(this._buffer);
+ if (this.offset + data.length >= this.buffer.length) {
+ const tmp = this.buffer;
+ this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length));
+ tmp.copy(this.buffer);
}
- data.copy(this._buffer, this._offset);
- return (this._offset += data.length);
+ data.copy(this.buffer, this.offset);
+ return (this.offset += data.length);
}
peek(length) {
- if (length > this._offset) {
+ if (length > this.offset) {
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
}
- return this._buffer.slice(0, length);
+ return this.buffer.slice(0, length);
}
get(length) {
- if (length > this._offset) {
+ if (length > this.offset) {
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
}
const value = Buffer.allocUnsafe(length);
- this._buffer.slice(0, length).copy(value);
- this._buffer.copyWithin(0, length, length + this._offset - length);
- this._offset -= length;
+ this.buffer.slice(0, length).copy(value);
+ this.buffer.copyWithin(0, length, length + this.offset - length);
+ this.offset -= length;
return value;
}
}
diff --git a/node_modules/socks/build/common/receivebuffer.js.map b/node_modules/socks/build/common/receivebuffer.js.map
index ed6ab3ac9..144edb0b9 100644
--- a/node_modules/socks/build/common/receivebuffer.js.map
+++ b/node_modules/socks/build/common/receivebuffer.js.map
@@ -1 +1 @@
-{"version":3,"file":"receivebuffer.js","sourceRoot":"","sources":["../../src/common/receivebuffer.ts"],"names":[],"mappings":";;AAAA,MAAM,aAAa;IAKjB,YAAY,OAAe,IAAI;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;SACH;QAED,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACrD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAC/B,IAAI,CAAC,GAAG,CACN,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,EACxC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAClC,CACF,CAAC;YACF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACxB;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,CAAC,MAAc;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE;YACzB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE;YACzB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC;QAEvB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAEQ,sCAAa"} \ No newline at end of file
+{"version":3,"file":"receivebuffer.js","sourceRoot":"","sources":["../../src/common/receivebuffer.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa;IAKjB,YAAY,OAAe,IAAI;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;SACH;QAED,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACnD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;YACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAC9B,IAAI,CAAC,GAAG,CACN,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,EACtC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CACjC,CACF,CAAC;YACF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACvB;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,MAAc;QACjB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;SACH;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QAEtB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAEO,sCAAa"} \ No newline at end of file
diff --git a/node_modules/socks/build/common/util.js b/node_modules/socks/build/common/util.js
index 347d9292f..283314a0d 100644
--- a/node_modules/socks/build/common/util.js
+++ b/node_modules/socks/build/common/util.js
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.shuffleArray = exports.SocksClientError = void 0;
/**
* Error wrapper for SocksClient
*/
@@ -15,8 +16,9 @@ exports.SocksClientError = SocksClientError;
* @param array The array to shuffle.
*/
function shuffleArray(array) {
+ // tslint:disable-next-line:no-increment-decrement
for (let i = array.length - 1; i > 0; i--) {
- let j = Math.floor(Math.random() * (i + 1));
+ const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
}
diff --git a/node_modules/socks/build/common/util.js.map b/node_modules/socks/build/common/util.js.map
index 40f971c60..8d94a2ace 100644
--- a/node_modules/socks/build/common/util.js.map
+++ b/node_modules/socks/build/common/util.js.map
@@ -1 +1 @@
-{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;AAEA;;GAEG;AACH,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAuBwB,4CAAgB;AArBzC;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAY;IAChC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAY0C,oCAAY"} \ No newline at end of file
+{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAwBuB,4CAAgB;AAtBxC;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAY;IAChC,kDAAkD;IAClD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAYyC,oCAAY"} \ No newline at end of file
diff --git a/node_modules/socks/build/index.js b/node_modules/socks/build/index.js
index e017b095d..a237caf0f 100644
--- a/node_modules/socks/build/index.js
+++ b/node_modules/socks/build/index.js
@@ -1,7 +1,14 @@
"use strict";
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
+};
Object.defineProperty(exports, "__esModule", { value: true });
-__export(require("./client/socksclient"));
+__exportStar(require("./client/socksclient"), exports);
//# sourceMappingURL=index.js.map \ No newline at end of file
diff --git a/node_modules/socks/build/index.js.map b/node_modules/socks/build/index.js.map
index 435a74647..ff654a08e 100644
--- a/node_modules/socks/build/index.js.map
+++ b/node_modules/socks/build/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,0CAAqC"} \ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC"} \ No newline at end of file
diff --git a/node_modules/socks/package.json b/node_modules/socks/package.json
index 1dc662566..f63293eb0 100644
--- a/node_modules/socks/package.json
+++ b/node_modules/socks/package.json
@@ -1,27 +1,27 @@
{
- "_from": "socks@~2.3.2",
- "_id": "socks@2.3.3",
+ "_from": "socks@^2.3.3",
+ "_id": "socks@2.4.1",
"_inBundle": false,
- "_integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==",
+ "_integrity": "sha512-8mWHeYC1OA0500qzb+sqwm0Hzi8oBpeuI1JugoBVMEJtJvxSgco8xFSK+NRnZcHeeWjTbF82KUDo5sXH22TY5A==",
"_location": "/socks",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "socks@~2.3.2",
+ "raw": "socks@^2.3.3",
"name": "socks",
"escapedName": "socks",
- "rawSpec": "~2.3.2",
+ "rawSpec": "^2.3.3",
"saveSpec": null,
- "fetchSpec": "~2.3.2"
+ "fetchSpec": "^2.3.3"
},
"_requiredBy": [
"/socks-proxy-agent"
],
- "_resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz",
- "_shasum": "01129f0a5d534d2b897712ed8aceab7ee65d78e3",
- "_spec": "socks@~2.3.2",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/socks-proxy-agent",
+ "_resolved": "https://registry.npmjs.org/socks/-/socks-2.4.1.tgz",
+ "_shasum": "cea68a280a3bf7cb6333dbb40cfb243d10725e9d",
+ "_spec": "socks@^2.3.3",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/socks-proxy-agent",
"author": {
"name": "Josh Glazebrook"
},
@@ -41,22 +41,23 @@
"deprecated": false,
"description": "Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.",
"devDependencies": {
- "@types/chai": "4.2.4",
+ "@types/chai": "4.2.11",
"@types/ip": "1.1.0",
- "@types/mocha": "5.2.7",
- "@types/node": "12.12.6",
+ "@types/mocha": "7.0.2",
+ "@types/node": "^14.0.13",
"chai": "^4.1.2",
- "coveralls": "^3.0.0",
- "mocha": "6.2.2",
- "nyc": "14.1.1",
- "prettier": "^1.9.2",
+ "coveralls": "3.1.0",
+ "mocha": "8.0.1",
+ "nyc": "15.1.0",
+ "prettier": "^2.0.5",
"socks5-server": "^0.1.1",
- "ts-node": "8.4.1",
- "tslint": "^5.8.0",
- "typescript": "3.7.2"
+ "ts-node": "8.10.2",
+ "tslint": "6.1.2",
+ "tslint-config-airbnb": "^5.11.2",
+ "typescript": "3.9.5"
},
"engines": {
- "node": ">= 6.0.0",
+ "node": ">= 10.13.0",
"npm": ">= 3.0.0"
},
"homepage": "https://github.com/JoshGlazebrook/socks/",
@@ -106,8 +107,9 @@
"coveralls": "NODE_ENV=test nyc npm test && nyc report --reporter=text-lcov | coveralls",
"lint": "tslint --project tsconfig.json 'src/**/*.ts'",
"prepublish": "npm install -g typescript && npm run build",
+ "prettier": "prettier --write ./src/**/*.ts --config .prettierrc.yaml",
"test": "NODE_ENV=test mocha --recursive --require ts-node/register test/**/*.ts"
},
"typings": "typings",
- "version": "2.3.3"
+ "version": "2.4.1"
}
diff --git a/node_modules/socks/typings/client/socksclient.d.ts b/node_modules/socks/typings/client/socksclient.d.ts
index bd0b6ff4d..ff762a8a6 100644
--- a/node_modules/socks/typings/client/socksclient.d.ts
+++ b/node_modules/socks/typings/client/socksclient.d.ts
@@ -17,15 +17,15 @@ declare interface SocksClient {
emit(event: 'established', info: SocksClientEstablishedEvent): boolean;
}
declare class SocksClient extends EventEmitter implements SocksClient {
- private _options;
- private _socket;
- private _state;
- private _receiveBuffer;
- private _nextRequiredPacketBufferSize;
- private _onDataReceived;
- private _onClose;
- private _onError;
- private _onConnect;
+ private options;
+ private socket;
+ private state;
+ private receiveBuffer;
+ private nextRequiredPacketBufferSize;
+ private onDataReceived;
+ private onClose;
+ private onError;
+ private onConnect;
constructor(options: SocksClientOptions);
/**
* Creates a new SOCKS connection.
@@ -57,18 +57,14 @@ declare class SocksClient extends EventEmitter implements SocksClient {
*/
static parseUDPFrame(data: Buffer): SocksUDPFrameDetails;
/**
- * Gets the SocksClient internal state.
- */
- private get state();
- /**
* Internal state setter. If the SocksClient is in an error state, it cannot be changed to a non error state.
*/
- private set state(value);
+ private setState;
/**
* Starts the connection establishment to the proxy and destination.
- * @param existing_socket Connected socket to use instead of creating a new one (internal use).
+ * @param existingSocket Connected socket to use instead of creating a new one (internal use).
*/
- connect(existing_socket?: Duplex): void;
+ connect(existingSocket?: Duplex): void;
private getSocketOptions;
/**
* Handles internal Socks timeout callback.
@@ -78,12 +74,12 @@ declare class SocksClient extends EventEmitter implements SocksClient {
/**
* Handles Socket connect event.
*/
- private onConnect;
+ private onConnectHandler;
/**
* Handles Socket data event.
* @param data
*/
- private onDataReceived;
+ private onDataReceivedHandler;
/**
* Handles processing of the data we have received.
*/
@@ -92,12 +88,12 @@ declare class SocksClient extends EventEmitter implements SocksClient {
* Handles Socket close event.
* @param had_error
*/
- private onClose;
+ private onCloseHandler;
/**
* Handles Socket error event.
* @param err
*/
- private onError;
+ private onErrorHandler;
/**
* Removes internal event listeners on the underlying Socket.
*/
@@ -106,7 +102,7 @@ declare class SocksClient extends EventEmitter implements SocksClient {
* Closes and destroys the underlying Socket. Emits an error event.
* @param err { String } An error string to include in error event.
*/
- private _closeSocket;
+ private closeSocket;
/**
* Sends initial Socks v4 handshake request.
*/
@@ -156,4 +152,4 @@ declare class SocksClient extends EventEmitter implements SocksClient {
private handleSocks5IncomingConnectionResponse;
get socksClientOptions(): SocksClientOptions;
}
-export { SocksClient, SocksClientOptions, SocksClientChainOptions, SocksRemoteHost, SocksProxy, SocksUDPFrameDetails };
+export { SocksClient, SocksClientOptions, SocksClientChainOptions, SocksClientError, SocksRemoteHost, SocksProxy, SocksUDPFrameDetails, };
diff --git a/node_modules/socks/typings/common/constants.d.ts b/node_modules/socks/typings/common/constants.d.ts
index 546fe3cfd..b801c1e06 100644
--- a/node_modules/socks/typings/common/constants.d.ts
+++ b/node_modules/socks/typings/common/constants.d.ts
@@ -138,4 +138,4 @@ interface SocksUDPFrameDetails {
remoteHost: SocksRemoteHost;
data: Buffer;
}
-export { DEFAULT_TIMEOUT, ERRORS, SocksProxyType, SocksCommand, Socks4Response, Socks5Auth, Socks5HostType, Socks5Response, SocksClientState, SocksProxy, SocksRemoteHost, SocksCommandOption, SocksClientOptions, SocksClientChainOptions, SocksClientEstablishedEvent, SocksClientBoundEvent, SocksUDPFrameDetails, SOCKS_INCOMING_PACKET_SIZES };
+export { DEFAULT_TIMEOUT, ERRORS, SocksProxyType, SocksCommand, Socks4Response, Socks5Auth, Socks5HostType, Socks5Response, SocksClientState, SocksProxy, SocksRemoteHost, SocksCommandOption, SocksClientOptions, SocksClientChainOptions, SocksClientEstablishedEvent, SocksClientBoundEvent, SocksUDPFrameDetails, SOCKS_INCOMING_PACKET_SIZES, };
diff --git a/node_modules/socks/typings/common/receiveBuffer.d.ts b/node_modules/socks/typings/common/receiveBuffer.d.ts
index 7af56db12..756e98b58 100644
--- a/node_modules/socks/typings/common/receiveBuffer.d.ts
+++ b/node_modules/socks/typings/common/receiveBuffer.d.ts
@@ -1,8 +1,8 @@
/// <reference types="node" />
declare class ReceiveBuffer {
- private _buffer;
- private _offset;
- private _originalSize;
+ private buffer;
+ private offset;
+ private originalSize;
constructor(size?: number);
get length(): number;
append(data: Buffer): number;
diff --git a/node_modules/sorted-union-stream/.npmignore b/node_modules/sorted-union-stream/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/sorted-union-stream/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/sorted-union-stream/.travis.yml b/node_modules/sorted-union-stream/.travis.yml
deleted file mode 100644
index 17f94330e..000000000
--- a/node_modules/sorted-union-stream/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
-
-script: "npm test"
diff --git a/node_modules/sorted-union-stream/LICENSE b/node_modules/sorted-union-stream/LICENSE
deleted file mode 100644
index 757562ec5..000000000
--- a/node_modules/sorted-union-stream/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/sorted-union-stream/README.md b/node_modules/sorted-union-stream/README.md
deleted file mode 100644
index bb2959b0d..000000000
--- a/node_modules/sorted-union-stream/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# sorted-union-stream
-
-Get the union of two sorted streams
-
-```
-npm install sorted-union-stream
-```
-
-[![build status](https://secure.travis-ci.org/mafintosh/sorted-union-stream.png)](http://travis-ci.org/mafintosh/sorted-union-stream)
-
-## Usage
-
-``` js
-var union = require('sorted-union-stream')
-var from = require('from2-array')
-
-// es.readArray converts an array into a stream
-var sorted1 = from.obj([1,10,24,42,43,50,55])
-var sorted2 = from.obj([10,42,53,55,60])
-
-// combine the two streams into a single sorted stream
-var u = union(sorted1, sorted2)
-
-u.on('data', function(data) {
- console.log(data)
-})
-u.on('end', function() {
- console.log('no more data')
-})
-```
-
-Running the above example will print
-
-```
-1
-10
-24
-42
-43
-50
-53
-55
-60
-no more data
-```
-
-## Streaming objects
-
-If you are streaming objects sorting is based on `.key`.
-
-If this property is not present you should add a `toKey` function as the third parameter.
-`toKey` should return an key representation of the data that can be used to compare objects.
-
-_The keys MUST be sorted_
-
-``` js
-var sorted1 = from.obj([{foo:'a'}, {foo:'b'}, {foo:'c'}])
-var sorted2 = from.obj([{foo:'b'}, {foo:'d'}])
-
-var u = union(sorted1, sorted2, function(data) {
- return data.foo // the foo property is sorted
-})
-
-union.on('data', function(data) {
- console.log(data)
-});
-```
-
-Running the above will print
-
-```
-{foo:'a'}
-{foo:'b'}
-{foo:'c'}
-{foo:'d'}
-```
-
-## License
-
-MIT
diff --git a/node_modules/sorted-union-stream/example.js b/node_modules/sorted-union-stream/example.js
deleted file mode 100644
index 846d2b110..000000000
--- a/node_modules/sorted-union-stream/example.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var union = require('./')
-var from = require('from2')
-
-var sorted1 = from.obj([{key: 'a'}, {key: 'b'}, {key: 'c'}])
-var sorted2 = from.obj([{key: 'b'}, {key: 'd'}])
-
-var u = union(sorted1, sorted2)
-
-u.on('data', function (data) {
- console.log(data)
-})
-
-u.on('end', function () {
- console.log('no more data')
-})
diff --git a/node_modules/sorted-union-stream/index.js b/node_modules/sorted-union-stream/index.js
deleted file mode 100644
index 8c73c57d6..000000000
--- a/node_modules/sorted-union-stream/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var iterate = require('stream-iterate')
-var from = require('from2')
-
-var defaultKey = function (val) {
- return val.key || val
-}
-
-var union = function (streamA, streamB, toKey) {
- var readA = iterate(streamA)
- var readB = iterate(streamB)
-
- if (!toKey) toKey = defaultKey
-
- var stream = from.obj(function loop (size, cb) {
- readA(function (err, dataA, nextA) {
- if (err) return cb(err)
- readB(function (err, dataB, nextB) {
- if (err) return cb(err)
-
- if (!dataA && !dataB) return cb(null, null)
-
- if (!dataA) {
- nextB()
- return cb(null, dataB)
- }
-
- if (!dataB) {
- nextA()
- return cb(null, dataA)
- }
-
- var keyA = toKey(dataA)
- var keyB = toKey(dataB)
-
- if (keyA === keyB) {
- nextB()
- return loop(size, cb)
- }
-
- if (keyA < keyB) {
- nextA()
- return cb(null, dataA)
- }
-
- nextB()
- cb(null, dataB)
- })
- })
- })
-
- stream.on('close', function () {
- if (streamA.destroy) streamA.destroy()
- if (streamB.destroy) streamB.destroy()
- })
-
- return stream
-}
-
-module.exports = union
diff --git a/node_modules/sorted-union-stream/node_modules/from2/LICENSE.md b/node_modules/sorted-union-stream/node_modules/from2/LICENSE.md
deleted file mode 100644
index 146cb32a7..000000000
--- a/node_modules/sorted-union-stream/node_modules/from2/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## The MIT License (MIT) ##
-
-Copyright (c) 2014 Hugh Kennedy
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/sorted-union-stream/node_modules/from2/README.md b/node_modules/sorted-union-stream/node_modules/from2/README.md
deleted file mode 100644
index a890140bb..000000000
--- a/node_modules/sorted-union-stream/node_modules/from2/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-# from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #
-
-`from2` is a high-level module for creating readable streams that properly handle backpressure.
-
-Convience wrapper for
-[readable-stream](http://github.com/isaacs/readable-stream)'s `ReadableStream`
-base class, with an API lifted from
-[from](http://github.com/dominictarr/from) and
-[through2](http://github.com/rvagg/through2).
-
-## Usage ##
-
-[![from2](https://nodei.co/npm/from2.png?mini=true)](https://nodei.co/npm/from2)
-
-### `stream = from2([opts], read)` ###
-
-Where `opts` are the options to pass on to the `ReadableStream` constructor,
-and `read(size, next)` is called when data is requested from the stream.
-
-* `size` is the recommended amount of data (in bytes) to retrieve.
-* `next(err)` should be called when you're ready to emit more data.
-
-For example, here's a readable stream that emits the contents of a given
-string:
-
-``` javascript
-var from = require('from2')
-
-module.exports = fromString
-
-function fromString(string) {
- return from(function(size, next) {
- // if there's no more content
- // left in the string, close the stream.
- if (string.length <= 0) return this.push(null)
-
- // Pull in a new chunk of text,
- // removing it from the string.
- var chunk = string.slice(0, size)
- string = string.slice(size)
-
- // Emit "chunk" from the stream.
- next(null, chunk)
- })
-}
-
-// pipe "hello world" out
-// to stdout.
-fromString('hello world').pipe(process.stdout)
-```
-
-### `stream = from2.obj([opts], read)` ###
-
-Shorthand for `from2({ objectMode: true }, read)`.
-
-### `createStream = from2.ctor([opts], read)` ###
-
-If you're creating similar streams in quick succession you can improve
-performance by generating a stream **constructor** that you can reuse instead
-of creating one-off streams on each call.
-
-Takes the same options as `from2`, instead returning a constructor which you
-can use to create new streams.
-
-## License ##
-
-MIT. See [LICENSE.md](http://github.com/hughsk/from2/blob/master/LICENSE.md) for details.
diff --git a/node_modules/sorted-union-stream/node_modules/from2/index.js b/node_modules/sorted-union-stream/node_modules/from2/index.js
deleted file mode 100644
index 1e58cdee1..000000000
--- a/node_modules/sorted-union-stream/node_modules/from2/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-var Readable = require('readable-stream').Readable
-var inherits = require('inherits')
-
-module.exports = from2
-
-from2.ctor = ctor
-from2.obj = obj
-
-var Proto = ctor()
-
-function toFunction(list) {
- list = list.slice()
- return function (_, cb) {
- cb(null, list.length ? list.shift() : null)
- }
-}
-
-function from2(opts, read) {
- if (typeof opts !== 'object' || Array.isArray(opts)) {
- read = opts
- opts = {}
- }
-
- if (Array.isArray(read)) read = toFunction(read)
-
- var rs = new Proto(opts)
- rs._from = read
- return rs
-}
-
-function ctor(opts, read) {
- if (typeof opts === 'function') {
- read = opts
- opts = {}
- }
-
- opts = defaults(opts)
-
- inherits(Class, Readable)
- function Class(override) {
- if (!(this instanceof Class)) return new Class(override)
- this._reading = false
- this.destroyed = false
- Readable.call(this, override || opts)
- }
-
- Class.prototype._from = read
- Class.prototype._read = function(size) {
- var self = this
-
- if (this._reading || this.destroyed) return
- this._reading = true
- this._from(size, check)
- function check(err, data) {
- if (self.destroyed) return
- if (err) return self.destroy(err)
- if (data === null) return self.push(null)
- self._reading = false
- if (self.push(data)) self._read()
- }
- }
-
- Class.prototype.destroy = function(err) {
- if (this.destroyed) return
- this.destroyed = true
-
- var self = this
- process.nextTick(function() {
- if (err) self.emit('error', err)
- self.emit('close')
- })
- }
-
- return Class
-}
-
-function obj(opts, read) {
- if (typeof opts === 'function' || Array.isArray(opts)) {
- read = opts
- opts = {}
- }
-
- opts = defaults(opts)
- opts.objectMode = true
- opts.highWaterMark = 16
-
- return from2(opts, read)
-}
-
-function defaults(opts) {
- opts = opts || {}
- return opts
-}
diff --git a/node_modules/sorted-union-stream/node_modules/from2/package.json b/node_modules/sorted-union-stream/node_modules/from2/package.json
deleted file mode 100644
index f59324955..000000000
--- a/node_modules/sorted-union-stream/node_modules/from2/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "_from": "from2@^1.3.0",
- "_id": "from2@1.3.0",
- "_inBundle": false,
- "_integrity": "sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0=",
- "_location": "/sorted-union-stream/from2",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "from2@^1.3.0",
- "name": "from2",
- "escapedName": "from2",
- "rawSpec": "^1.3.0",
- "saveSpec": null,
- "fetchSpec": "^1.3.0"
- },
- "_requiredBy": [
- "/sorted-union-stream"
- ],
- "_resolved": "https://registry.npmjs.org/from2/-/from2-1.3.0.tgz",
- "_shasum": "88413baaa5f9a597cfde9221d86986cd3c061dfd",
- "_spec": "from2@^1.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/sorted-union-stream",
- "author": {
- "name": "Hugh Kennedy",
- "email": "hughskennedy@gmail.com",
- "url": "http://hughsk.io/"
- },
- "bugs": {
- "url": "https://github.com/hughsk/from2/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Mathias Buus",
- "email": "mathiasbuus@gmail.com"
- }
- ],
- "dependencies": {
- "inherits": "~2.0.1",
- "readable-stream": "~1.1.10"
- },
- "deprecated": false,
- "description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"",
- "devDependencies": {
- "tape": "~2.4.2"
- },
- "homepage": "https://github.com/hughsk/from2",
- "keywords": [
- "from",
- "stream",
- "readable",
- "pull",
- "convenience",
- "wrapper"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "from2",
- "repository": {
- "type": "git",
- "url": "git://github.com/hughsk/from2.git"
- },
- "scripts": {
- "test": "node test"
- },
- "version": "1.3.0"
-}
diff --git a/node_modules/sorted-union-stream/node_modules/from2/test.js b/node_modules/sorted-union-stream/node_modules/from2/test.js
deleted file mode 100644
index aee046352..000000000
--- a/node_modules/sorted-union-stream/node_modules/from2/test.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var test = require('tape')
-var path = require('path')
-var from = require('./')
-var fs = require('fs')
-
-var tmp = path.resolve(
- __dirname, 'tmp.txt'
-)
-
-function fromString(string) {
- return from(function(size, next) {
- if (string.length <= 0) return next()
- var chunk = string.slice(0, size)
- string = string.slice(size)
- next(null, chunk)
- })
-}
-
-test('from2', function(t) {
- var contents = fs.readFileSync(__filename, 'utf8')
- var stream = fromString(contents)
-
- stream
- .pipe(fs.createWriteStream(tmp))
- .on('close', function() {
- t.equal(fs.readFileSync(tmp, 'utf8'), contents)
- fs.unlinkSync(tmp)
- t.end()
- })
-})
-
-test('old mode', function(t) {
- var contents = fs.readFileSync(__filename, 'utf8')
- var stream = fromString(contents)
- var buffer = ''
-
- stream.on('data', function(data) {
- buffer += data
- }).on('end', function() {
- t.equal(buffer, contents)
- t.end()
- })
-})
-
-test('destroy', function(t) {
- var stream = from(function(size, next) {
- process.nextTick(function() {
- next(null, 'no')
- })
- })
-
- stream.on('data', function(data) {
- t.ok(false)
- }).on('close', function() {
- t.ok(true)
- t.end()
- })
-
- stream.destroy()
-})
-
-test('arrays', function (t) {
- var input = ['a', 'b', 'c']
- var stream = from(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter.toString())
- })
- stream.on('end', function () {
- t.deepEqual(input, output)
- t.end()
- })
-})
-
-test('obj arrays', function (t) {
- var input = [{foo:'a'}, {foo:'b'}, {foo:'c'}]
- var stream = from.obj(input)
- var output = []
- stream.on('data', function (letter) {
- output.push(letter)
- })
- stream.on('end', function () {
- t.deepEqual(input, output)
- t.end()
- })
-})
diff --git a/node_modules/sorted-union-stream/node_modules/isarray/README.md b/node_modules/sorted-union-stream/node_modules/isarray/README.md
deleted file mode 100644
index 052a62b8d..000000000
--- a/node_modules/sorted-union-stream/node_modules/isarray/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/sorted-union-stream/node_modules/isarray/build/build.js b/node_modules/sorted-union-stream/node_modules/isarray/build/build.js
deleted file mode 100644
index ec58596ae..000000000
--- a/node_modules/sorted-union-stream/node_modules/isarray/build/build.js
+++ /dev/null
@@ -1,209 +0,0 @@
-
-/**
- * Require the given path.
- *
- * @param {String} path
- * @return {Object} exports
- * @api public
- */
-
-function require(path, parent, orig) {
- var resolved = require.resolve(path);
-
- // lookup failed
- if (null == resolved) {
- orig = orig || path;
- parent = parent || 'root';
- var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
- err.path = orig;
- err.parent = parent;
- err.require = true;
- throw err;
- }
-
- var module = require.modules[resolved];
-
- // perform real require()
- // by invoking the module's
- // registered function
- if (!module.exports) {
- module.exports = {};
- module.client = module.component = true;
- module.call(this, module.exports, require.relative(resolved), module);
- }
-
- return module.exports;
-}
-
-/**
- * Registered modules.
- */
-
-require.modules = {};
-
-/**
- * Registered aliases.
- */
-
-require.aliases = {};
-
-/**
- * Resolve `path`.
- *
- * Lookup:
- *
- * - PATH/index.js
- * - PATH.js
- * - PATH
- *
- * @param {String} path
- * @return {String} path or null
- * @api private
- */
-
-require.resolve = function(path) {
- if (path.charAt(0) === '/') path = path.slice(1);
- var index = path + '/index.js';
-
- var paths = [
- path,
- path + '.js',
- path + '.json',
- path + '/index.js',
- path + '/index.json'
- ];
-
- for (var i = 0; i < paths.length; i++) {
- var path = paths[i];
- if (require.modules.hasOwnProperty(path)) return path;
- }
-
- if (require.aliases.hasOwnProperty(index)) {
- return require.aliases[index];
- }
-};
-
-/**
- * Normalize `path` relative to the current path.
- *
- * @param {String} curr
- * @param {String} path
- * @return {String}
- * @api private
- */
-
-require.normalize = function(curr, path) {
- var segs = [];
-
- if ('.' != path.charAt(0)) return path;
-
- curr = curr.split('/');
- path = path.split('/');
-
- for (var i = 0; i < path.length; ++i) {
- if ('..' == path[i]) {
- curr.pop();
- } else if ('.' != path[i] && '' != path[i]) {
- segs.push(path[i]);
- }
- }
-
- return curr.concat(segs).join('/');
-};
-
-/**
- * Register module at `path` with callback `definition`.
- *
- * @param {String} path
- * @param {Function} definition
- * @api private
- */
-
-require.register = function(path, definition) {
- require.modules[path] = definition;
-};
-
-/**
- * Alias a module definition.
- *
- * @param {String} from
- * @param {String} to
- * @api private
- */
-
-require.alias = function(from, to) {
- if (!require.modules.hasOwnProperty(from)) {
- throw new Error('Failed to alias "' + from + '", it does not exist');
- }
- require.aliases[to] = from;
-};
-
-/**
- * Return a require function relative to the `parent` path.
- *
- * @param {String} parent
- * @return {Function}
- * @api private
- */
-
-require.relative = function(parent) {
- var p = require.normalize(parent, '..');
-
- /**
- * lastIndexOf helper.
- */
-
- function lastIndexOf(arr, obj) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === obj) return i;
- }
- return -1;
- }
-
- /**
- * The relative require() itself.
- */
-
- function localRequire(path) {
- var resolved = localRequire.resolve(path);
- return require(resolved, parent, path);
- }
-
- /**
- * Resolve relative to the parent.
- */
-
- localRequire.resolve = function(path) {
- var c = path.charAt(0);
- if ('/' == c) return path.slice(1);
- if ('.' == c) return require.normalize(p, path);
-
- // resolve deps by returning
- // the dep in the nearest "deps"
- // directory
- var segs = parent.split('/');
- var i = lastIndexOf(segs, 'deps') + 1;
- if (!i) i = 0;
- path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
- return path;
- };
-
- /**
- * Check if module is defined at `path`.
- */
-
- localRequire.exists = function(path) {
- return require.modules.hasOwnProperty(localRequire.resolve(path));
- };
-
- return localRequire;
-};
-require.register("isarray/index.js", function(exports, require, module){
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
-
-});
-require.alias("isarray/index.js", "isarray/index.js");
-
diff --git a/node_modules/sorted-union-stream/node_modules/isarray/component.json b/node_modules/sorted-union-stream/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b6838..000000000
--- a/node_modules/sorted-union-stream/node_modules/isarray/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/node_modules/sorted-union-stream/node_modules/isarray/index.js b/node_modules/sorted-union-stream/node_modules/isarray/index.js
deleted file mode 100644
index 5f5ad45d4..000000000
--- a/node_modules/sorted-union-stream/node_modules/isarray/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
diff --git a/node_modules/sorted-union-stream/node_modules/isarray/package.json b/node_modules/sorted-union-stream/node_modules/isarray/package.json
deleted file mode 100644
index 7ffb74081..000000000
--- a/node_modules/sorted-union-stream/node_modules/isarray/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "_from": "isarray@0.0.1",
- "_id": "isarray@0.0.1",
- "_inBundle": false,
- "_integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
- "_location": "/sorted-union-stream/isarray",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "isarray@0.0.1",
- "name": "isarray",
- "escapedName": "isarray",
- "rawSpec": "0.0.1",
- "saveSpec": null,
- "fetchSpec": "0.0.1"
- },
- "_requiredBy": [
- "/sorted-union-stream/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "_spec": "isarray@0.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/sorted-union-stream/node_modules/readable-stream",
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/isarray/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Array#isArray for older browsers",
- "devDependencies": {
- "tap": "*"
- },
- "homepage": "https://github.com/juliangruber/isarray",
- "keywords": [
- "browser",
- "isarray",
- "array"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "isarray",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/isarray.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.0.1"
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/.npmignore b/node_modules/sorted-union-stream/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js \ No newline at end of file
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/LICENSE b/node_modules/sorted-union-stream/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/README.md b/node_modules/sorted-union-stream/node_modules/readable-stream/README.md
deleted file mode 100644
index e46b82390..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# readable-stream
-
-***Node-core streams for userland***
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
-
-If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
-
-**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
-
-**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
-
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/duplex.js b/node_modules/sorted-union-stream/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af87..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_duplex.js")
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/float.patch b/node_modules/sorted-union-stream/node_modules/readable-stream/float.patch
deleted file mode 100644
index b984607a4..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/float.patch
+++ /dev/null
@@ -1,923 +0,0 @@
-diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js
-index c5a741c..a2e0d8e 100644
---- a/lib/_stream_duplex.js
-+++ b/lib/_stream_duplex.js
-@@ -26,8 +26,8 @@
-
- module.exports = Duplex;
- var util = require('util');
--var Readable = require('_stream_readable');
--var Writable = require('_stream_writable');
-+var Readable = require('./_stream_readable');
-+var Writable = require('./_stream_writable');
-
- util.inherits(Duplex, Readable);
-
-diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
-index a5e9864..330c247 100644
---- a/lib/_stream_passthrough.js
-+++ b/lib/_stream_passthrough.js
-@@ -25,7 +25,7 @@
-
- module.exports = PassThrough;
-
--var Transform = require('_stream_transform');
-+var Transform = require('./_stream_transform');
- var util = require('util');
- util.inherits(PassThrough, Transform);
-
-diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
-index 0c3fe3e..90a8298 100644
---- a/lib/_stream_readable.js
-+++ b/lib/_stream_readable.js
-@@ -23,10 +23,34 @@ module.exports = Readable;
- Readable.ReadableState = ReadableState;
-
- var EE = require('events').EventEmitter;
-+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
-+ return emitter.listeners(type).length;
-+};
-+
-+if (!global.setImmediate) global.setImmediate = function setImmediate(fn) {
-+ return setTimeout(fn, 0);
-+};
-+if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) {
-+ return clearTimeout(i);
-+};
-+
- var Stream = require('stream');
- var util = require('util');
-+if (!util.isUndefined) {
-+ var utilIs = require('core-util-is');
-+ for (var f in utilIs) {
-+ util[f] = utilIs[f];
-+ }
-+}
- var StringDecoder;
--var debug = util.debuglog('stream');
-+var debug;
-+if (util.debuglog)
-+ debug = util.debuglog('stream');
-+else try {
-+ debug = require('debuglog')('stream');
-+} catch (er) {
-+ debug = function() {};
-+}
-
- util.inherits(Readable, Stream);
-
-@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) {
-
-
- function onEofChunk(stream, state) {
-- if (state.decoder && !state.ended) {
-+ if (state.decoder && !state.ended && state.decoder.end) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
-diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
-index b1f9fcc..b0caf57 100644
---- a/lib/_stream_transform.js
-+++ b/lib/_stream_transform.js
-@@ -64,8 +64,14 @@
-
- module.exports = Transform;
-
--var Duplex = require('_stream_duplex');
-+var Duplex = require('./_stream_duplex');
- var util = require('util');
-+if (!util.isUndefined) {
-+ var utilIs = require('core-util-is');
-+ for (var f in utilIs) {
-+ util[f] = utilIs[f];
-+ }
-+}
- util.inherits(Transform, Duplex);
-
-
-diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js
-index ba2e920..f49288b 100644
---- a/lib/_stream_writable.js
-+++ b/lib/_stream_writable.js
-@@ -27,6 +27,12 @@ module.exports = Writable;
- Writable.WritableState = WritableState;
-
- var util = require('util');
-+if (!util.isUndefined) {
-+ var utilIs = require('core-util-is');
-+ for (var f in utilIs) {
-+ util[f] = utilIs[f];
-+ }
-+}
- var Stream = require('stream');
-
- util.inherits(Writable, Stream);
-@@ -119,7 +125,7 @@ function WritableState(options, stream) {
- function Writable(options) {
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
-- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex))
-+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex')))
- return new Writable(options);
-
- this._writableState = new WritableState(options, this);
-diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js
-index e3787e4..8cd2127 100644
---- a/test/simple/test-stream-big-push.js
-+++ b/test/simple/test-stream-big-push.js
-@@ -21,7 +21,7 @@
-
- var common = require('../common');
- var assert = require('assert');
--var stream = require('stream');
-+var stream = require('../../');
- var str = 'asdfasdfasdfasdfasdf';
-
- var r = new stream.Readable({
-diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js
-index bb73777..d40efc7 100644
---- a/test/simple/test-stream-end-paused.js
-+++ b/test/simple/test-stream-end-paused.js
-@@ -25,7 +25,7 @@ var gotEnd = false;
-
- // Make sure we don't miss the end event for paused 0-length streams
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
- var stream = new Readable();
- var calledRead = false;
- stream._read = function() {
-diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js
-index b46ee90..0be8366 100644
---- a/test/simple/test-stream-pipe-after-end.js
-+++ b/test/simple/test-stream-pipe-after-end.js
-@@ -22,8 +22,8 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('_stream_readable');
--var Writable = require('_stream_writable');
-+var Readable = require('../../lib/_stream_readable');
-+var Writable = require('../../lib/_stream_writable');
- var util = require('util');
-
- util.inherits(TestReadable, Readable);
-diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js
-deleted file mode 100644
-index f689358..0000000
---- a/test/simple/test-stream-pipe-cleanup.js
-+++ /dev/null
-@@ -1,122 +0,0 @@
--// Copyright Joyent, Inc. and other Node contributors.
--//
--// Permission is hereby granted, free of charge, to any person obtaining a
--// copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to permit
--// persons to whom the Software is furnished to do so, subject to the
--// following conditions:
--//
--// The above copyright notice and this permission notice shall be included
--// in all copies or substantial portions of the Software.
--//
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
--// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
--// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
--// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
--// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
--// USE OR OTHER DEALINGS IN THE SOFTWARE.
--
--// This test asserts that Stream.prototype.pipe does not leave listeners
--// hanging on the source or dest.
--
--var common = require('../common');
--var stream = require('stream');
--var assert = require('assert');
--var util = require('util');
--
--function Writable() {
-- this.writable = true;
-- this.endCalls = 0;
-- stream.Stream.call(this);
--}
--util.inherits(Writable, stream.Stream);
--Writable.prototype.end = function() {
-- this.endCalls++;
--};
--
--Writable.prototype.destroy = function() {
-- this.endCalls++;
--};
--
--function Readable() {
-- this.readable = true;
-- stream.Stream.call(this);
--}
--util.inherits(Readable, stream.Stream);
--
--function Duplex() {
-- this.readable = true;
-- Writable.call(this);
--}
--util.inherits(Duplex, Writable);
--
--var i = 0;
--var limit = 100;
--
--var w = new Writable();
--
--var r;
--
--for (i = 0; i < limit; i++) {
-- r = new Readable();
-- r.pipe(w);
-- r.emit('end');
--}
--assert.equal(0, r.listeners('end').length);
--assert.equal(limit, w.endCalls);
--
--w.endCalls = 0;
--
--for (i = 0; i < limit; i++) {
-- r = new Readable();
-- r.pipe(w);
-- r.emit('close');
--}
--assert.equal(0, r.listeners('close').length);
--assert.equal(limit, w.endCalls);
--
--w.endCalls = 0;
--
--r = new Readable();
--
--for (i = 0; i < limit; i++) {
-- w = new Writable();
-- r.pipe(w);
-- w.emit('close');
--}
--assert.equal(0, w.listeners('close').length);
--
--r = new Readable();
--w = new Writable();
--var d = new Duplex();
--r.pipe(d); // pipeline A
--d.pipe(w); // pipeline B
--assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup
--assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup
--assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
--assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup
--assert.equal(w.listeners('end').length, 0);
--assert.equal(w.listeners('close').length, 1); // B.cleanup
--
--r.emit('end');
--assert.equal(d.endCalls, 1);
--assert.equal(w.endCalls, 0);
--assert.equal(r.listeners('end').length, 0);
--assert.equal(r.listeners('close').length, 0);
--assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup
--assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup
--assert.equal(w.listeners('end').length, 0);
--assert.equal(w.listeners('close').length, 1); // B.cleanup
--
--d.emit('end');
--assert.equal(d.endCalls, 1);
--assert.equal(w.endCalls, 1);
--assert.equal(r.listeners('end').length, 0);
--assert.equal(r.listeners('close').length, 0);
--assert.equal(d.listeners('end').length, 0);
--assert.equal(d.listeners('close').length, 0);
--assert.equal(w.listeners('end').length, 0);
--assert.equal(w.listeners('close').length, 0);
-diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js
-index c5d724b..c7d6b7d 100644
---- a/test/simple/test-stream-pipe-error-handling.js
-+++ b/test/simple/test-stream-pipe-error-handling.js
-@@ -21,7 +21,7 @@
-
- var common = require('../common');
- var assert = require('assert');
--var Stream = require('stream').Stream;
-+var Stream = require('../../').Stream;
-
- (function testErrorListenerCatches() {
- var source = new Stream();
-diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js
-index cb9d5fe..56f8d61 100644
---- a/test/simple/test-stream-pipe-event.js
-+++ b/test/simple/test-stream-pipe-event.js
-@@ -20,7 +20,7 @@
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- var common = require('../common');
--var stream = require('stream');
-+var stream = require('../../');
- var assert = require('assert');
- var util = require('util');
-
-diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js
-index f2e6ec2..a5c9bf9 100644
---- a/test/simple/test-stream-push-order.js
-+++ b/test/simple/test-stream-push-order.js
-@@ -20,7 +20,7 @@
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- var common = require('../common.js');
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
- var assert = require('assert');
-
- var s = new Readable({
-diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js
-index 06f43dc..1701a9a 100644
---- a/test/simple/test-stream-push-strings.js
-+++ b/test/simple/test-stream-push-strings.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
- var util = require('util');
-
- util.inherits(MyStream, Readable);
-diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js
-index ba6a577..a8e6f7b 100644
---- a/test/simple/test-stream-readable-event.js
-+++ b/test/simple/test-stream-readable-event.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
-
- (function first() {
- // First test, not reading when the readable is added.
-diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js
-index 2891ad6..11689ba 100644
---- a/test/simple/test-stream-readable-flow-recursion.js
-+++ b/test/simple/test-stream-readable-flow-recursion.js
-@@ -27,7 +27,7 @@ var assert = require('assert');
- // more data continuously, but without triggering a nextTick
- // warning or RangeError.
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
-
- // throw an error if we trigger a nextTick warning.
- process.throwDeprecation = true;
-diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js
-index 0c96476..7827538 100644
---- a/test/simple/test-stream-unshift-empty-chunk.js
-+++ b/test/simple/test-stream-unshift-empty-chunk.js
-@@ -24,7 +24,7 @@ var assert = require('assert');
-
- // This test verifies that stream.unshift(Buffer(0)) or
- // stream.unshift('') does not set state.reading=false.
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
-
- var r = new Readable();
- var nChunks = 10;
-diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js
-index 83fd9fa..17c18aa 100644
---- a/test/simple/test-stream-unshift-read-race.js
-+++ b/test/simple/test-stream-unshift-read-race.js
-@@ -29,7 +29,7 @@ var assert = require('assert');
- // 3. push() after the EOF signaling null is an error.
- // 4. _read() is not called after pushing the EOF null chunk.
-
--var stream = require('stream');
-+var stream = require('../../');
- var hwm = 10;
- var r = stream.Readable({ highWaterMark: hwm });
- var chunks = 10;
-@@ -51,7 +51,14 @@ r._read = function(n) {
-
- function push(fast) {
- assert(!pushedNull, 'push() after null push');
-- var c = pos >= data.length ? null : data.slice(pos, pos + n);
-+ var c;
-+ if (pos >= data.length)
-+ c = null;
-+ else {
-+ if (n + pos > data.length)
-+ n = data.length - pos;
-+ c = data.slice(pos, pos + n);
-+ }
- pushedNull = c === null;
- if (fast) {
- pos += n;
-diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js
-index 5b49e6e..b5321f3 100644
---- a/test/simple/test-stream-writev.js
-+++ b/test/simple/test-stream-writev.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var stream = require('stream');
-+var stream = require('../../');
-
- var queue = [];
- for (var decode = 0; decode < 2; decode++) {
-diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js
-index 3814bf0..248c1be 100644
---- a/test/simple/test-stream2-basic.js
-+++ b/test/simple/test-stream2-basic.js
-@@ -21,7 +21,7 @@
-
-
- var common = require('../common.js');
--var R = require('_stream_readable');
-+var R = require('../../lib/_stream_readable');
- var assert = require('assert');
-
- var util = require('util');
-diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js
-index 6cdd4e9..f0fa84b 100644
---- a/test/simple/test-stream2-compatibility.js
-+++ b/test/simple/test-stream2-compatibility.js
-@@ -21,7 +21,7 @@
-
-
- var common = require('../common.js');
--var R = require('_stream_readable');
-+var R = require('../../lib/_stream_readable');
- var assert = require('assert');
-
- var util = require('util');
-diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js
-index 39b274f..006a19b 100644
---- a/test/simple/test-stream2-finish-pipe.js
-+++ b/test/simple/test-stream2-finish-pipe.js
-@@ -20,7 +20,7 @@
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- var common = require('../common.js');
--var stream = require('stream');
-+var stream = require('../../');
- var Buffer = require('buffer').Buffer;
-
- var r = new stream.Readable();
-diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js
-deleted file mode 100644
-index e162406..0000000
---- a/test/simple/test-stream2-fs.js
-+++ /dev/null
-@@ -1,72 +0,0 @@
--// Copyright Joyent, Inc. and other Node contributors.
--//
--// Permission is hereby granted, free of charge, to any person obtaining a
--// copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to permit
--// persons to whom the Software is furnished to do so, subject to the
--// following conditions:
--//
--// The above copyright notice and this permission notice shall be included
--// in all copies or substantial portions of the Software.
--//
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
--// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
--// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
--// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
--// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
--// USE OR OTHER DEALINGS IN THE SOFTWARE.
--
--
--var common = require('../common.js');
--var R = require('_stream_readable');
--var assert = require('assert');
--
--var fs = require('fs');
--var FSReadable = fs.ReadStream;
--
--var path = require('path');
--var file = path.resolve(common.fixturesDir, 'x1024.txt');
--
--var size = fs.statSync(file).size;
--
--var expectLengths = [1024];
--
--var util = require('util');
--var Stream = require('stream');
--
--util.inherits(TestWriter, Stream);
--
--function TestWriter() {
-- Stream.apply(this);
-- this.buffer = [];
-- this.length = 0;
--}
--
--TestWriter.prototype.write = function(c) {
-- this.buffer.push(c.toString());
-- this.length += c.length;
-- return true;
--};
--
--TestWriter.prototype.end = function(c) {
-- if (c) this.buffer.push(c.toString());
-- this.emit('results', this.buffer);
--}
--
--var r = new FSReadable(file);
--var w = new TestWriter();
--
--w.on('results', function(res) {
-- console.error(res, w.length);
-- assert.equal(w.length, size);
-- var l = 0;
-- assert.deepEqual(res.map(function (c) {
-- return c.length;
-- }), expectLengths);
-- console.log('ok');
--});
--
--r.pipe(w);
-diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js
-deleted file mode 100644
-index 15cffc2..0000000
---- a/test/simple/test-stream2-httpclient-response-end.js
-+++ /dev/null
-@@ -1,52 +0,0 @@
--// Copyright Joyent, Inc. and other Node contributors.
--//
--// Permission is hereby granted, free of charge, to any person obtaining a
--// copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to permit
--// persons to whom the Software is furnished to do so, subject to the
--// following conditions:
--//
--// The above copyright notice and this permission notice shall be included
--// in all copies or substantial portions of the Software.
--//
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
--// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
--// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
--// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
--// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
--// USE OR OTHER DEALINGS IN THE SOFTWARE.
--
--var common = require('../common.js');
--var assert = require('assert');
--var http = require('http');
--var msg = 'Hello';
--var readable_event = false;
--var end_event = false;
--var server = http.createServer(function(req, res) {
-- res.writeHead(200, {'Content-Type': 'text/plain'});
-- res.end(msg);
--}).listen(common.PORT, function() {
-- http.get({port: common.PORT}, function(res) {
-- var data = '';
-- res.on('readable', function() {
-- console.log('readable event');
-- readable_event = true;
-- data += res.read();
-- });
-- res.on('end', function() {
-- console.log('end event');
-- end_event = true;
-- assert.strictEqual(msg, data);
-- server.close();
-- });
-- });
--});
--
--process.on('exit', function() {
-- assert(readable_event);
-- assert(end_event);
--});
--
-diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js
-index 2fbfbca..667985b 100644
---- a/test/simple/test-stream2-large-read-stall.js
-+++ b/test/simple/test-stream2-large-read-stall.js
-@@ -30,7 +30,7 @@ var PUSHSIZE = 20;
- var PUSHCOUNT = 1000;
- var HWM = 50;
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
- var r = new Readable({
- highWaterMark: HWM
- });
-@@ -39,23 +39,23 @@ var rs = r._readableState;
- r._read = push;
-
- r.on('readable', function() {
-- console.error('>> readable');
-+ //console.error('>> readable');
- do {
-- console.error(' > read(%d)', READSIZE);
-+ //console.error(' > read(%d)', READSIZE);
- var ret = r.read(READSIZE);
-- console.error(' < %j (%d remain)', ret && ret.length, rs.length);
-+ //console.error(' < %j (%d remain)', ret && ret.length, rs.length);
- } while (ret && ret.length === READSIZE);
-
-- console.error('<< after read()',
-- ret && ret.length,
-- rs.needReadable,
-- rs.length);
-+ //console.error('<< after read()',
-+ // ret && ret.length,
-+ // rs.needReadable,
-+ // rs.length);
- });
-
- var endEmitted = false;
- r.on('end', function() {
- endEmitted = true;
-- console.error('end');
-+ //console.error('end');
- });
-
- var pushes = 0;
-@@ -64,11 +64,11 @@ function push() {
- return;
-
- if (pushes++ === PUSHCOUNT) {
-- console.error(' push(EOF)');
-+ //console.error(' push(EOF)');
- return r.push(null);
- }
-
-- console.error(' push #%d', pushes);
-+ //console.error(' push #%d', pushes);
- if (r.push(new Buffer(PUSHSIZE)))
- setTimeout(push);
- }
-diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js
-index 3e6931d..ff47d89 100644
---- a/test/simple/test-stream2-objects.js
-+++ b/test/simple/test-stream2-objects.js
-@@ -21,8 +21,8 @@
-
-
- var common = require('../common.js');
--var Readable = require('_stream_readable');
--var Writable = require('_stream_writable');
-+var Readable = require('../../lib/_stream_readable');
-+var Writable = require('../../lib/_stream_writable');
- var assert = require('assert');
-
- // tiny node-tap lookalike.
-diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js
-index cf7531c..e3f3e4e 100644
---- a/test/simple/test-stream2-pipe-error-handling.js
-+++ b/test/simple/test-stream2-pipe-error-handling.js
-@@ -21,7 +21,7 @@
-
- var common = require('../common');
- var assert = require('assert');
--var stream = require('stream');
-+var stream = require('../../');
-
- (function testErrorListenerCatches() {
- var count = 1000;
-diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js
-index 5e8e3cb..53b2616 100755
---- a/test/simple/test-stream2-pipe-error-once-listener.js
-+++ b/test/simple/test-stream2-pipe-error-once-listener.js
-@@ -24,7 +24,7 @@ var common = require('../common.js');
- var assert = require('assert');
-
- var util = require('util');
--var stream = require('stream');
-+var stream = require('../../');
-
-
- var Read = function() {
-diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js
-index b63edc3..eb2b0e9 100644
---- a/test/simple/test-stream2-push.js
-+++ b/test/simple/test-stream2-push.js
-@@ -20,7 +20,7 @@
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- var common = require('../common.js');
--var stream = require('stream');
-+var stream = require('../../');
- var Readable = stream.Readable;
- var Writable = stream.Writable;
- var assert = require('assert');
-diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js
-index e8a7305..9740a47 100644
---- a/test/simple/test-stream2-read-sync-stack.js
-+++ b/test/simple/test-stream2-read-sync-stack.js
-@@ -21,7 +21,7 @@
-
- var common = require('../common');
- var assert = require('assert');
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
- var r = new Readable();
- var N = 256 * 1024;
-
-diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
-index cd30178..4b1659d 100644
---- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js
-+++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js
-@@ -22,10 +22,9 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('stream').Readable;
-+var Readable = require('../../').Readable;
-
- test1();
--test2();
-
- function test1() {
- var r = new Readable();
-@@ -88,31 +87,3 @@ function test1() {
- console.log('ok');
- });
- }
--
--function test2() {
-- var r = new Readable({ encoding: 'base64' });
-- var reads = 5;
-- r._read = function(n) {
-- if (!reads--)
-- return r.push(null); // EOF
-- else
-- return r.push(new Buffer('x'));
-- };
--
-- var results = [];
-- function flow() {
-- var chunk;
-- while (null !== (chunk = r.read()))
-- results.push(chunk + '');
-- }
-- r.on('readable', flow);
-- r.on('end', function() {
-- results.push('EOF');
-- });
-- flow();
--
-- process.on('exit', function() {
-- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]);
-- console.log('ok');
-- });
--}
-diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js
-index 7c96ffe..04a96f5 100644
---- a/test/simple/test-stream2-readable-from-list.js
-+++ b/test/simple/test-stream2-readable-from-list.js
-@@ -21,7 +21,7 @@
-
- var assert = require('assert');
- var common = require('../common.js');
--var fromList = require('_stream_readable')._fromList;
-+var fromList = require('../../lib/_stream_readable')._fromList;
-
- // tiny node-tap lookalike.
- var tests = [];
-diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js
-index 675da8e..51fd3d5 100644
---- a/test/simple/test-stream2-readable-legacy-drain.js
-+++ b/test/simple/test-stream2-readable-legacy-drain.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Stream = require('stream');
-+var Stream = require('../../');
- var Readable = Stream.Readable;
-
- var r = new Readable();
-diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js
-index 7314ae7..c971898 100644
---- a/test/simple/test-stream2-readable-non-empty-end.js
-+++ b/test/simple/test-stream2-readable-non-empty-end.js
-@@ -21,7 +21,7 @@
-
- var assert = require('assert');
- var common = require('../common.js');
--var Readable = require('_stream_readable');
-+var Readable = require('../../lib/_stream_readable');
-
- var len = 0;
- var chunks = new Array(10);
-diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js
-index 2e5cf25..fd8a3dc 100644
---- a/test/simple/test-stream2-readable-wrap-empty.js
-+++ b/test/simple/test-stream2-readable-wrap-empty.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('_stream_readable');
-+var Readable = require('../../lib/_stream_readable');
- var EE = require('events').EventEmitter;
-
- var oldStream = new EE();
-diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js
-index 90eea01..6b177f7 100644
---- a/test/simple/test-stream2-readable-wrap.js
-+++ b/test/simple/test-stream2-readable-wrap.js
-@@ -22,8 +22,8 @@
- var common = require('../common');
- var assert = require('assert');
-
--var Readable = require('_stream_readable');
--var Writable = require('_stream_writable');
-+var Readable = require('../../lib/_stream_readable');
-+var Writable = require('../../lib/_stream_writable');
- var EE = require('events').EventEmitter;
-
- var testRuns = 0, completedRuns = 0;
-diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js
-index 5d2c32a..685531b 100644
---- a/test/simple/test-stream2-set-encoding.js
-+++ b/test/simple/test-stream2-set-encoding.js
-@@ -22,7 +22,7 @@
-
- var common = require('../common.js');
- var assert = require('assert');
--var R = require('_stream_readable');
-+var R = require('../../lib/_stream_readable');
- var util = require('util');
-
- // tiny node-tap lookalike.
-diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js
-index 9c9ddd8..a0cacc6 100644
---- a/test/simple/test-stream2-transform.js
-+++ b/test/simple/test-stream2-transform.js
-@@ -21,8 +21,8 @@
-
- var assert = require('assert');
- var common = require('../common.js');
--var PassThrough = require('_stream_passthrough');
--var Transform = require('_stream_transform');
-+var PassThrough = require('../../').PassThrough;
-+var Transform = require('../../').Transform;
-
- // tiny node-tap lookalike.
- var tests = [];
-diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js
-index d66dc3c..365b327 100644
---- a/test/simple/test-stream2-unpipe-drain.js
-+++ b/test/simple/test-stream2-unpipe-drain.js
-@@ -22,7 +22,7 @@
-
- var common = require('../common.js');
- var assert = require('assert');
--var stream = require('stream');
-+var stream = require('../../');
- var crypto = require('crypto');
-
- var util = require('util');
-diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js
-index 99f8746..17c92ae 100644
---- a/test/simple/test-stream2-unpipe-leak.js
-+++ b/test/simple/test-stream2-unpipe-leak.js
-@@ -22,7 +22,7 @@
-
- var common = require('../common.js');
- var assert = require('assert');
--var stream = require('stream');
-+var stream = require('../../');
-
- var chunk = new Buffer('hallo');
-
-diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js
-index 704100c..209c3a6 100644
---- a/test/simple/test-stream2-writable.js
-+++ b/test/simple/test-stream2-writable.js
-@@ -20,8 +20,8 @@
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- var common = require('../common.js');
--var W = require('_stream_writable');
--var D = require('_stream_duplex');
-+var W = require('../../').Writable;
-+var D = require('../../').Duplex;
- var assert = require('assert');
-
- var util = require('util');
-diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js
-index b91bde3..2f72c15 100644
---- a/test/simple/test-stream3-pause-then-read.js
-+++ b/test/simple/test-stream3-pause-then-read.js
-@@ -22,7 +22,7 @@
- var common = require('../common');
- var assert = require('assert');
-
--var stream = require('stream');
-+var stream = require('../../');
- var Readable = stream.Readable;
- var Writable = stream.Writable;
-
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index b513d61a9..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) keys.push(key);
- return keys;
-}
-/*</replacement>*/
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-forEach(objectKeys(Writable.prototype), function(method) {
- if (!Duplex.prototype[method])
- Duplex.prototype[method] = Writable.prototype[method];
-});
-
-function Duplex(options) {
- if (!(this instanceof Duplex))
- return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false)
- this.readable = false;
-
- if (options && options.writable === false)
- this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false)
- this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended)
- return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- process.nextTick(this.end.bind(this));
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index 895ca50a1..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough))
- return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function(chunk, encoding, cb) {
- cb(null, chunk);
-};
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 19ab35889..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,951 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-module.exports = Readable;
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-var EE = require('events').EventEmitter;
-
-/*<replacement>*/
-if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-var Stream = require('stream');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var StringDecoder;
-
-
-/*<replacement>*/
-var debug = require('util');
-if (debug && debug.debuglog) {
- debug = debug.debuglog('stream');
-} else {
- debug = function () {};
-}
-/*</replacement>*/
-
-
-util.inherits(Readable, Stream);
-
-function ReadableState(options, stream) {
- var Duplex = require('./_stream_duplex');
-
- options = options || {};
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var defaultHwm = options.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.buffer = [];
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
-
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (stream instanceof Duplex)
- this.objectMode = this.objectMode || !!options.readableObjectMode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // when piping, we only care about 'readable' events that happen
- // after read()ing all the bytes and not getting any pushback.
- this.ranOut = false;
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- var Duplex = require('./_stream_duplex');
-
- if (!(this instanceof Readable))
- return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- Stream.call(this);
-}
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function(chunk, encoding) {
- var state = this._readableState;
-
- if (util.isString(chunk) && !state.objectMode) {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
- encoding = '';
- }
- }
-
- return readableAddChunk(this, state, chunk, encoding, false);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function(chunk) {
- var state = this._readableState;
- return readableAddChunk(this, state, chunk, '', true);
-};
-
-function readableAddChunk(stream, state, chunk, encoding, addToFront) {
- var er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (util.isNullOrUndefined(chunk)) {
- state.reading = false;
- if (!state.ended)
- onEofChunk(stream, state);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.ended && !addToFront) {
- var e = new Error('stream.push() after EOF');
- stream.emit('error', e);
- } else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
- } else {
- if (state.decoder && !addToFront && !encoding)
- chunk = state.decoder.write(chunk);
-
- if (!addToFront)
- state.reading = false;
-
- // if we want the data now, just emit it.
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront)
- state.buffer.unshift(chunk);
- else
- state.buffer.push(chunk);
-
- if (state.needReadable)
- emitReadable(stream);
- }
-
- maybeReadMore(stream, state);
- }
- } else if (!addToFront) {
- state.reading = false;
- }
-
- return needMoreData(state);
-}
-
-
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended &&
- (state.needReadable ||
- state.length < state.highWaterMark ||
- state.length === 0);
-}
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function(enc) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
-};
-
-// Don't raise the hwm > 128MB
-var MAX_HWM = 0x800000;
-function roundUpToNextPowerOf2(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2
- n--;
- for (var p = 1; p < 32; p <<= 1) n |= n >> p;
- n++;
- }
- return n;
-}
-
-function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended)
- return 0;
-
- if (state.objectMode)
- return n === 0 ? 0 : 1;
-
- if (isNaN(n) || util.isNull(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length)
- return state.buffer[0].length;
- else
- return state.length;
- }
-
- if (n <= 0)
- return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
- if (n > state.highWaterMark)
- state.highWaterMark = roundUpToNextPowerOf2(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else
- return state.length;
- }
-
- return n;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function(n) {
- debug('read', n);
- var state = this._readableState;
- var nOrig = n;
-
- if (!util.isNumber(n) || n > 0)
- state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 &&
- state.needReadable &&
- (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended)
- endReadable(this);
- else
- emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0)
- endReadable(this);
- return null;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- }
-
- if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0)
- state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- }
-
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (doRead && !state.reading)
- n = howMuchToRead(nOrig, state);
-
- var ret;
- if (n > 0)
- ret = fromList(n, state);
- else
- ret = null;
-
- if (util.isNull(ret)) {
- state.needReadable = true;
- n = 0;
- }
-
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended)
- state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended && state.length === 0)
- endReadable(this);
-
- if (!util.isNull(ret))
- this.emit('data', ret);
-
- return ret;
-};
-
-function chunkInvalid(state, chunk) {
- var er = null;
- if (!util.isBuffer(chunk) &&
- !util.isString(chunk) &&
- !util.isNullOrUndefined(chunk) &&
- !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-
-function onEofChunk(stream, state) {
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync)
- process.nextTick(function() {
- emitReadable_(stream);
- });
- else
- emitReadable_(stream);
- }
-}
-
-function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
-
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- process.nextTick(function() {
- maybeReadMore_(stream, state);
- });
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended &&
- state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;
- else
- len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function(n) {
- this.emit('error', new Error('not implemented'));
-};
-
-Readable.prototype.pipe = function(dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
- dest !== process.stdout &&
- dest !== process.stderr;
-
- var endFn = doEnd ? onend : cleanup;
- if (state.endEmitted)
- process.nextTick(endFn);
- else
- src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable) {
- debug('onunpipe');
- if (readable === src) {
- cleanup();
- }
- }
-
- function onend() {
- debug('onend');
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', cleanup);
- src.removeListener('data', ondata);
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain &&
- (!dest._writableState || dest._writableState.needDrain))
- ondrain();
- }
-
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- var ret = dest.write(chunk);
- if (false === ret) {
- debug('false write response, pause',
- src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- src.pause();
- }
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EE.listenerCount(dest, 'error') === 0)
- dest.emit('error', er);
- }
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error)
- dest.on('error', onerror);
- else if (isArray(dest._events.error))
- dest._events.error.unshift(onerror);
- else
- dest._events.error = [onerror, dest._events.error];
-
-
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function() {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain)
- state.awaitDrain--;
- if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
-}
-
-
-Readable.prototype.unpipe = function(dest) {
- var state = this._readableState;
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0)
- return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes)
- return this;
-
- if (!dest)
- dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest)
- dest.emit('unpipe', this);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
-
- for (var i = 0; i < len; i++)
- dests[i].emit('unpipe', this);
- return this;
- }
-
- // try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1)
- return this;
-
- state.pipes.splice(i, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1)
- state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function(ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- // If listening to data, and it has not explicitly been paused,
- // then call resume to start the flow of data on the next tick.
- if (ev === 'data' && false !== this._readableState.flowing) {
- this.resume();
- }
-
- if (ev === 'readable' && this.readable) {
- var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
- state.emittedReadable = false;
- state.needReadable = true;
- if (!state.reading) {
- var self = this;
- process.nextTick(function() {
- debug('readable nexttick read 0');
- self.read(0);
- });
- } else if (state.length) {
- emitReadable(this, state);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function() {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- if (!state.reading) {
- debug('resume read 0');
- this.read(0);
- }
- resume(this, state);
- }
- return this;
-};
-
-function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- process.nextTick(function() {
- resume_(stream, state);
- });
- }
-}
-
-function resume_(stream, state) {
- state.resumeScheduled = false;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading)
- stream.read(0);
-}
-
-Readable.prototype.pause = function() {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
-};
-
-function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- if (state.flowing) {
- do {
- var chunk = stream.read();
- } while (null !== chunk && state.flowing);
- }
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function(stream) {
- var state = this._readableState;
- var paused = false;
-
- var self = this;
- stream.on('end', function() {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length)
- self.push(chunk);
- }
-
- self.push(null);
- });
-
- stream.on('data', function(chunk) {
- debug('wrapped data');
- if (state.decoder)
- chunk = state.decoder.write(chunk);
- if (!chunk || !state.objectMode && !chunk.length)
- return;
-
- var ret = self.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
- this[i] = function(method) { return function() {
- return stream[method].apply(stream, arguments);
- }}(i);
- }
- }
-
- // proxy certain important events.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function(ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- self._read = function(n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return self;
-};
-
-
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0)
- return null;
-
- if (length === 0)
- ret = null;
- else if (objectMode)
- ret = list.shift();
- else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode)
- ret = list.join('');
- else
- ret = Buffer.concat(list, length);
- list.length = 0;
- } else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode)
- ret = '';
- else
- ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
-
- if (stringMode)
- ret += buf.slice(0, cpy);
- else
- buf.copy(ret, c, 0, cpy);
-
- if (cpy < buf.length)
- list[0] = buf.slice(cpy);
- else
- list.shift();
-
- c += cpy;
- }
- }
- }
-
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0)
- throw new Error('endReadable called on non-empty stream');
-
- if (!state.endEmitted) {
- state.ended = true;
- process.nextTick(function() {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
- });
- }
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
-
-function indexOf (xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index 905c5e450..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-
-function TransformState(options, stream) {
- this.afterTransform = function(er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb)
- return stream.emit('error', new Error('no writecb in Transform class'));
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (!util.isNullOrUndefined(data))
- stream.push(data);
-
- if (cb)
- cb(er);
-
- var rs = stream._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
- }
-}
-
-
-function Transform(options) {
- if (!(this instanceof Transform))
- return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = new TransformState(options, this);
-
- // when the writable side finishes, then flush out anything remaining.
- var stream = this;
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- this.once('prefinish', function() {
- if (util.isFunction(this._flush))
- this._flush(function(er) {
- done(stream, er);
- });
- else
- done(stream);
- });
-}
-
-Transform.prototype.push = function(chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function(chunk, encoding, cb) {
- throw new Error('not implemented');
-};
-
-Transform.prototype._write = function(chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform ||
- rs.needReadable ||
- rs.length < rs.highWaterMark)
- this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function(n) {
- var ts = this._transformState;
-
- if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-
-function done(stream, er) {
- if (er)
- return stream.emit('error', er);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- var ws = stream._writableState;
- var ts = stream._transformState;
-
- if (ws.length)
- throw new Error('calling transform done when ws.length != 0');
-
- if (ts.transforming)
- throw new Error('calling transform done when still transforming');
-
- return stream.push(null);
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index db8539cd5..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,477 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, cb), and it'll handle all
-// the drain event emission and buffering.
-
-module.exports = Writable;
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Stream = require('stream');
-
-util.inherits(Writable, Stream);
-
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
-}
-
-function WritableState(options, stream) {
- var Duplex = require('./_stream_duplex');
-
- options = options || {};
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var defaultHwm = options.objectMode ? 16 : 16 * 1024;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- if (stream instanceof Duplex)
- this.objectMode = this.objectMode || !!options.writableObjectMode;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function(er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.buffer = [];
-
- // number of pending user-supplied write callbacks
- // this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
-
- // emit prefinish if the only thing we're waiting for is _write cbs
- // This is relevant for synchronous Transform streams
- this.prefinished = false;
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-}
-
-function Writable(options) {
- var Duplex = require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(this instanceof Duplex))
- return new Writable(options);
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function() {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
-};
-
-
-function writeAfterEnd(stream, state, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
-}
-
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
- if (!util.isBuffer(chunk) &&
- !util.isString(chunk) &&
- !util.isNullOrUndefined(chunk) &&
- !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function(chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
-
- if (util.isFunction(encoding)) {
- cb = encoding;
- encoding = null;
- }
-
- if (util.isBuffer(chunk))
- encoding = 'buffer';
- else if (!encoding)
- encoding = state.defaultEncoding;
-
- if (!util.isFunction(cb))
- cb = function() {};
-
- if (state.ended)
- writeAfterEnd(this, state, cb);
- else if (validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
- }
-
- return ret;
-};
-
-Writable.prototype.cork = function() {
- var state = this._writableState;
-
- state.corked++;
-};
-
-Writable.prototype.uncork = function() {
- var state = this._writableState;
-
- if (state.corked) {
- state.corked--;
-
- if (!state.writing &&
- !state.corked &&
- !state.finished &&
- !state.bufferProcessing &&
- state.buffer.length)
- clearBuffer(this, state);
- }
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode &&
- state.decodeStrings !== false &&
- util.isString(chunk)) {
- chunk = new Buffer(chunk, encoding);
- }
- return chunk;
-}
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
- if (util.isBuffer(chunk))
- encoding = 'buffer';
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret)
- state.needDrain = true;
-
- if (state.writing || state.corked)
- state.buffer.push(new WriteReq(chunk, encoding, cb));
- else
- doWrite(stream, state, false, len, chunk, encoding, cb);
-
- return ret;
-}
-
-function doWrite(stream, state, writev, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- if (writev)
- stream._writev(chunk, state.onwrite);
- else
- stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- if (sync)
- process.nextTick(function() {
- state.pendingcb--;
- cb(er);
- });
- else {
- state.pendingcb--;
- cb(er);
- }
-
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er)
- onwriteError(stream, state, sync, er, cb);
- else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(stream, state);
-
- if (!finished &&
- !state.corked &&
- !state.bufferProcessing &&
- state.buffer.length) {
- clearBuffer(stream, state);
- }
-
- if (sync) {
- process.nextTick(function() {
- afterWrite(stream, state, finished, cb);
- });
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished)
- onwriteDrain(stream, state);
- state.pendingcb--;
- cb();
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
-
- if (stream._writev && state.buffer.length > 1) {
- // Fast case, write everything using _writev()
- var cbs = [];
- for (var c = 0; c < state.buffer.length; c++)
- cbs.push(state.buffer[c].callback);
-
- // count the one we are adding, as well.
- // TODO(isaacs) clean this up
- state.pendingcb++;
- doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
- for (var i = 0; i < cbs.length; i++) {
- state.pendingcb--;
- cbs[i](err);
- }
- });
-
- // Clear buffer
- state.buffer = [];
- } else {
- // Slow case, write chunks one-by-one
- for (var c = 0; c < state.buffer.length; c++) {
- var entry = state.buffer[c];
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, false, len, chunk, encoding, cb);
-
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- c++;
- break;
- }
- }
-
- if (c < state.buffer.length)
- state.buffer = state.buffer.slice(c);
- else
- state.buffer.length = 0;
- }
-
- state.bufferProcessing = false;
-}
-
-Writable.prototype._write = function(chunk, encoding, cb) {
- cb(new Error('not implemented'));
-
-};
-
-Writable.prototype._writev = null;
-
-Writable.prototype.end = function(chunk, encoding, cb) {
- var state = this._writableState;
-
- if (util.isFunction(chunk)) {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (util.isFunction(encoding)) {
- cb = encoding;
- encoding = null;
- }
-
- if (!util.isNullOrUndefined(chunk))
- this.write(chunk, encoding);
-
- // .end() fully uncorks
- if (state.corked) {
- state.corked = 1;
- this.uncork();
- }
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished)
- endWritable(this, state, cb);
-};
-
-
-function needFinish(stream, state) {
- return (state.ending &&
- state.length === 0 &&
- !state.finished &&
- !state.writing);
-}
-
-function prefinish(stream, state) {
- if (!state.prefinished) {
- state.prefinished = true;
- stream.emit('prefinish');
- }
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(stream, state);
- if (need) {
- if (state.pendingcb === 0) {
- prefinish(stream, state);
- state.finished = true;
- stream.emit('finish');
- } else
- prefinish(stream, state);
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished)
- process.nextTick(cb);
- else
- stream.once('finish', cb);
- }
- state.ended = true;
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/package.json b/node_modules/sorted-union-stream/node_modules/readable-stream/package.json
deleted file mode 100644
index c09cce6e0..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_from": "readable-stream@~1.1.10",
- "_id": "readable-stream@1.1.14",
- "_inBundle": false,
- "_integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
- "_location": "/sorted-union-stream/readable-stream",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "readable-stream@~1.1.10",
- "name": "readable-stream",
- "escapedName": "readable-stream",
- "rawSpec": "~1.1.10",
- "saveSpec": null,
- "fetchSpec": "~1.1.10"
- },
- "_requiredBy": [
- "/sorted-union-stream/from2"
- ],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9",
- "_spec": "readable-stream@~1.1.10",
- "_where": "/Users/rebecca/code/npm/node_modules/sorted-union-stream/node_modules/from2",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "browser": {
- "util": false
- },
- "bugs": {
- "url": "https://github.com/isaacs/readable-stream/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- },
- "deprecated": false,
- "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x",
- "devDependencies": {
- "tap": "~0.2.6"
- },
- "homepage": "https://github.com/isaacs/readable-stream#readme",
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "license": "MIT",
- "main": "readable.js",
- "name": "readable-stream",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/readable-stream.git"
- },
- "scripts": {
- "test": "tap test/simple/*.js"
- },
- "version": "1.1.14"
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/passthrough.js b/node_modules/sorted-union-stream/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a55..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_passthrough.js")
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/readable.js b/node_modules/sorted-union-stream/node_modules/readable-stream/readable.js
deleted file mode 100644
index 2a8b5c6b5..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,10 +0,0 @@
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = require('stream');
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
-if (!process.browser && process.env.READABLE_STREAM === 'disable') {
- module.exports = require('stream');
-}
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/transform.js b/node_modules/sorted-union-stream/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f078..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_transform.js")
diff --git a/node_modules/sorted-union-stream/node_modules/readable-stream/writable.js b/node_modules/sorted-union-stream/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3..000000000
--- a/node_modules/sorted-union-stream/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_writable.js")
diff --git a/node_modules/sorted-union-stream/node_modules/string_decoder/.npmignore b/node_modules/sorted-union-stream/node_modules/string_decoder/.npmignore
deleted file mode 100644
index 206320cc1..000000000
--- a/node_modules/sorted-union-stream/node_modules/string_decoder/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build
-test
diff --git a/node_modules/sorted-union-stream/node_modules/string_decoder/LICENSE b/node_modules/sorted-union-stream/node_modules/string_decoder/LICENSE
deleted file mode 100644
index 6de584a48..000000000
--- a/node_modules/sorted-union-stream/node_modules/string_decoder/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright Joyent, Inc. and other Node contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to permit
-persons to whom the Software is furnished to do so, subject to the
-following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/sorted-union-stream/node_modules/string_decoder/README.md b/node_modules/sorted-union-stream/node_modules/string_decoder/README.md
deleted file mode 100644
index 4d2aa0015..000000000
--- a/node_modules/sorted-union-stream/node_modules/string_decoder/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-**string_decoder.js** (`require('string_decoder')`) from Node.js core
-
-Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details.
-
-Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**
-
-The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file
diff --git a/node_modules/sorted-union-stream/node_modules/string_decoder/index.js b/node_modules/sorted-union-stream/node_modules/string_decoder/index.js
deleted file mode 100644
index b00e54fb7..000000000
--- a/node_modules/sorted-union-stream/node_modules/string_decoder/index.js
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var Buffer = require('buffer').Buffer;
-
-var isBufferEncoding = Buffer.isEncoding
- || function(encoding) {
- switch (encoding && encoding.toLowerCase()) {
- case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
- default: return false;
- }
- }
-
-
-function assertEncoding(encoding) {
- if (encoding && !isBufferEncoding(encoding)) {
- throw new Error('Unknown encoding: ' + encoding);
- }
-}
-
-// StringDecoder provides an interface for efficiently splitting a series of
-// buffers into a series of JS strings without breaking apart multi-byte
-// characters. CESU-8 is handled as part of the UTF-8 encoding.
-//
-// @TODO Handling all encodings inside a single object makes it very difficult
-// to reason about this code, so it should be split up in the future.
-// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
-// points as used by CESU-8.
-var StringDecoder = exports.StringDecoder = function(encoding) {
- this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
- assertEncoding(encoding);
- switch (this.encoding) {
- case 'utf8':
- // CESU-8 represents each of Surrogate Pair by 3-bytes
- this.surrogateSize = 3;
- break;
- case 'ucs2':
- case 'utf16le':
- // UTF-16 represents each of Surrogate Pair by 2-bytes
- this.surrogateSize = 2;
- this.detectIncompleteChar = utf16DetectIncompleteChar;
- break;
- case 'base64':
- // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
- this.surrogateSize = 3;
- this.detectIncompleteChar = base64DetectIncompleteChar;
- break;
- default:
- this.write = passThroughWrite;
- return;
- }
-
- // Enough space to store all bytes of a single character. UTF-8 needs 4
- // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
- this.charBuffer = new Buffer(6);
- // Number of bytes received for the current incomplete multi-byte character.
- this.charReceived = 0;
- // Number of bytes expected for the current incomplete multi-byte character.
- this.charLength = 0;
-};
-
-
-// write decodes the given buffer and returns it as JS string that is
-// guaranteed to not contain any partial multi-byte characters. Any partial
-// character found at the end of the buffer is buffered up, and will be
-// returned when calling write again with the remaining bytes.
-//
-// Note: Converting a Buffer containing an orphan surrogate to a String
-// currently works, but converting a String to a Buffer (via `new Buffer`, or
-// Buffer#write) will replace incomplete surrogates with the unicode
-// replacement character. See https://codereview.chromium.org/121173009/ .
-StringDecoder.prototype.write = function(buffer) {
- var charStr = '';
- // if our last write ended with an incomplete multibyte character
- while (this.charLength) {
- // determine how many remaining bytes this buffer has to offer for this char
- var available = (buffer.length >= this.charLength - this.charReceived) ?
- this.charLength - this.charReceived :
- buffer.length;
-
- // add the new bytes to the char buffer
- buffer.copy(this.charBuffer, this.charReceived, 0, available);
- this.charReceived += available;
-
- if (this.charReceived < this.charLength) {
- // still not enough chars in this buffer? wait for more ...
- return '';
- }
-
- // remove bytes belonging to the current character from the buffer
- buffer = buffer.slice(available, buffer.length);
-
- // get the character that was split
- charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
-
- // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
- var charCode = charStr.charCodeAt(charStr.length - 1);
- if (charCode >= 0xD800 && charCode <= 0xDBFF) {
- this.charLength += this.surrogateSize;
- charStr = '';
- continue;
- }
- this.charReceived = this.charLength = 0;
-
- // if there are no more bytes in this buffer, just emit our char
- if (buffer.length === 0) {
- return charStr;
- }
- break;
- }
-
- // determine and set charLength / charReceived
- this.detectIncompleteChar(buffer);
-
- var end = buffer.length;
- if (this.charLength) {
- // buffer the incomplete character bytes we got
- buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
- end -= this.charReceived;
- }
-
- charStr += buffer.toString(this.encoding, 0, end);
-
- var end = charStr.length - 1;
- var charCode = charStr.charCodeAt(end);
- // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
- if (charCode >= 0xD800 && charCode <= 0xDBFF) {
- var size = this.surrogateSize;
- this.charLength += size;
- this.charReceived += size;
- this.charBuffer.copy(this.charBuffer, size, 0, size);
- buffer.copy(this.charBuffer, 0, 0, size);
- return charStr.substring(0, end);
- }
-
- // or just emit the charStr
- return charStr;
-};
-
-// detectIncompleteChar determines if there is an incomplete UTF-8 character at
-// the end of the given buffer. If so, it sets this.charLength to the byte
-// length that character, and sets this.charReceived to the number of bytes
-// that are available for this character.
-StringDecoder.prototype.detectIncompleteChar = function(buffer) {
- // determine how many bytes we have to check at the end of this buffer
- var i = (buffer.length >= 3) ? 3 : buffer.length;
-
- // Figure out if one of the last i bytes of our buffer announces an
- // incomplete char.
- for (; i > 0; i--) {
- var c = buffer[buffer.length - i];
-
- // See http://en.wikipedia.org/wiki/UTF-8#Description
-
- // 110XXXXX
- if (i == 1 && c >> 5 == 0x06) {
- this.charLength = 2;
- break;
- }
-
- // 1110XXXX
- if (i <= 2 && c >> 4 == 0x0E) {
- this.charLength = 3;
- break;
- }
-
- // 11110XXX
- if (i <= 3 && c >> 3 == 0x1E) {
- this.charLength = 4;
- break;
- }
- }
- this.charReceived = i;
-};
-
-StringDecoder.prototype.end = function(buffer) {
- var res = '';
- if (buffer && buffer.length)
- res = this.write(buffer);
-
- if (this.charReceived) {
- var cr = this.charReceived;
- var buf = this.charBuffer;
- var enc = this.encoding;
- res += buf.slice(0, cr).toString(enc);
- }
-
- return res;
-};
-
-function passThroughWrite(buffer) {
- return buffer.toString(this.encoding);
-}
-
-function utf16DetectIncompleteChar(buffer) {
- this.charReceived = buffer.length % 2;
- this.charLength = this.charReceived ? 2 : 0;
-}
-
-function base64DetectIncompleteChar(buffer) {
- this.charReceived = buffer.length % 3;
- this.charLength = this.charReceived ? 3 : 0;
-}
diff --git a/node_modules/sorted-union-stream/node_modules/string_decoder/package.json b/node_modules/sorted-union-stream/node_modules/string_decoder/package.json
deleted file mode 100644
index 3c7014f03..000000000
--- a/node_modules/sorted-union-stream/node_modules/string_decoder/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "_from": "string_decoder@~0.10.x",
- "_id": "string_decoder@0.10.31",
- "_inBundle": false,
- "_integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
- "_location": "/sorted-union-stream/string_decoder",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "string_decoder@~0.10.x",
- "name": "string_decoder",
- "escapedName": "string_decoder",
- "rawSpec": "~0.10.x",
- "saveSpec": null,
- "fetchSpec": "~0.10.x"
- },
- "_requiredBy": [
- "/sorted-union-stream/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
- "_spec": "string_decoder@~0.10.x",
- "_where": "/Users/rebecca/code/npm/node_modules/sorted-union-stream/node_modules/readable-stream",
- "bugs": {
- "url": "https://github.com/rvagg/string_decoder/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "The string_decoder module from Node core",
- "devDependencies": {
- "tap": "~0.4.8"
- },
- "homepage": "https://github.com/rvagg/string_decoder",
- "keywords": [
- "string",
- "decoder",
- "browser",
- "browserify"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "string_decoder",
- "repository": {
- "type": "git",
- "url": "git://github.com/rvagg/string_decoder.git"
- },
- "scripts": {
- "test": "tap test/simple/*.js"
- },
- "version": "0.10.31"
-}
diff --git a/node_modules/sorted-union-stream/package.json b/node_modules/sorted-union-stream/package.json
deleted file mode 100644
index dd56c35d7..000000000
--- a/node_modules/sorted-union-stream/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "_args": [
- [
- "sorted-union-stream@2.1.3",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "sorted-union-stream@2.1.3",
- "_id": "sorted-union-stream@2.1.3",
- "_inBundle": false,
- "_integrity": "sha1-x3lMfgd4gAUv9xqNSi27Sppjisc=",
- "_location": "/sorted-union-stream",
- "_phantomChildren": {
- "core-util-is": "1.0.2",
- "inherits": "2.0.3"
- },
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "sorted-union-stream@2.1.3",
- "name": "sorted-union-stream",
- "escapedName": "sorted-union-stream",
- "rawSpec": "2.1.3",
- "saveSpec": null,
- "fetchSpec": "2.1.3"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz",
- "_spec": "2.1.3",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Mathias Buus Madsen",
- "email": "mathiasbuus@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/mafintosh/sorted-union-stream/issues"
- },
- "dependencies": {
- "from2": "^1.3.0",
- "stream-iterate": "^1.1.0"
- },
- "description": "Get the union of two sorted streams",
- "devDependencies": {
- "standard": "^3.3.0",
- "tape": "^3.0.0"
- },
- "homepage": "https://github.com/mafintosh/sorted-union-stream",
- "keywords": [
- "union",
- "sorted",
- "stream"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "sorted-union-stream",
- "repository": {
- "type": "git",
- "url": "git://github.com/mafintosh/sorted-union-stream.git"
- },
- "scripts": {
- "test": "tape test.js"
- },
- "version": "2.1.3"
-}
diff --git a/node_modules/sorted-union-stream/test.js b/node_modules/sorted-union-stream/test.js
deleted file mode 100644
index 488e10f3a..000000000
--- a/node_modules/sorted-union-stream/test.js
+++ /dev/null
@@ -1,154 +0,0 @@
-var Readable = require('stream').Readable
-var tape = require('tape')
-var union = require('./')
-
-tape('numbers', function (t) {
- var a = new Readable({objectMode: true})
- var b = new Readable({objectMode: true})
- a._read = b._read = function () {}
-
- a.push(4)
- a.push(6)
- a.push(10)
- a.push(14)
- a.push(15)
- a.push(20)
- a.push(22)
- a.push(null)
-
- b.push(6)
- b.push(11)
- b.push(20)
- b.push(null)
-
- var u = union(a, b)
- var expected = [4, 6, 10, 11, 14, 15, 20, 22]
-
- u.on('data', function (data) {
- t.same(data, expected.shift())
- })
-
- u.on('end', function () {
- t.same(expected.length, 0, 'no more data')
- t.end()
- })
-})
-
-tape('string', function (t) {
- var a = new Readable({objectMode: true})
- var b = new Readable({objectMode: true})
- a._read = b._read = function () {}
-
- a.push('04')
- a.push('06')
- a.push('10')
- a.push('14')
- a.push('15')
- a.push('20')
- a.push('22')
- a.push(null)
-
- b.push('06')
- b.push('11')
- b.push('20')
- b.push(null)
-
- var u = union(a, b)
- var expected = ['04', '06', '10', '11', '14', '15', '20', '22']
-
- u.on('data', function (data) {
- t.same(data, expected.shift())
- })
-
- u.on('end', function () {
- t.same(expected.length, 0, 'no more data')
- t.end()
- })
-})
-
-tape('objects', function (t) {
- var a = new Readable({objectMode: true})
- var b = new Readable({objectMode: true})
- a._read = b._read = function () {}
-
- a.push({key: '04'})
- a.push({key: '06'})
- a.push({key: '10'})
- a.push({key: '14'})
- a.push({key: '15'})
- a.push({key: '20'})
- a.push({key: '22'})
- a.push(null)
-
- b.push({key: '06'})
- b.push({key: '11'})
- b.push({key: '20'})
- b.push(null)
-
- var u = union(a, b)
- var expected = [{key: '04'}, {key: '06'}, {key: '10'}, {key: '11'}, {key: '14'}, {key: '15'}, {key: '20'}, {key: '22'}]
-
- u.on('data', function (data) {
- t.same(data, expected.shift())
- })
-
- u.on('end', function () {
- t.same(expected.length, 0, 'no more data')
- t.end()
- })
-})
-
-tape('custom objects', function (t) {
- var a = new Readable({objectMode: true})
- var b = new Readable({objectMode: true})
- a._read = b._read = function () {}
-
- a.push({bar: '04'})
- a.push({bar: '06'})
- a.push({bar: '10'})
- a.push({bar: '14'})
- a.push({bar: '15'})
- a.push({bar: '20'})
- a.push({bar: '22'})
- a.push(null)
-
- b.push({bar: '06'})
- b.push({bar: '11'})
- b.push({bar: '20'})
- b.push(null)
-
- var u = union(a, b, function (data) {
- return data.bar
- })
-
- var expected = [{bar: '04'}, {bar: '06'}, {bar: '10'}, {bar: '11'}, {bar: '14'}, {bar: '15'}, {bar: '20'}, {bar: '22'}]
-
- u.on('data', function (data) {
- t.same(data, expected.shift())
- })
-
- u.on('end', function () {
- t.same(expected.length, 0, 'no more data')
- t.end()
- })
-})
-
-tape('destroy stream', function (t) {
- var a = new Readable({objectMode: true})
- var b = new Readable({objectMode: true})
-
- a._read = function () {}
- b._read = function () {}
-
- t.plan(2)
-
- a.destroy = function () {
- t.ok(true)
- }
-
- b.destroy = function () {
- t.ok(true)
- }
-
- union(a, b).destroy()
-})
diff --git a/node_modules/stream-iterate/.npmignore b/node_modules/stream-iterate/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/stream-iterate/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/stream-iterate/.travis.yml b/node_modules/stream-iterate/.travis.yml
deleted file mode 100644
index 89d754895..000000000
--- a/node_modules/stream-iterate/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - '0.12'
- - 'iojs'
diff --git a/node_modules/stream-iterate/README.md b/node_modules/stream-iterate/README.md
deleted file mode 100644
index 001112045..000000000
--- a/node_modules/stream-iterate/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# stream-iterate
-
-Iterate through the values in a stream.
-
-```
-npm install stream-iterate
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/stream-iterate.svg?style=flat)](http://travis-ci.org/mafintosh/stream-iterate)
-
-## Usage
-
-``` js
-var iterate = require('stream-iterate')
-var from = require('from2')
-
-var stream = from.obj(['a', 'b', 'c'])
-
-var read = iterate(stream)
-
-loop()
-
-// recursively iterates through each item in the stream
-function loop () {
- read(function (err, data, next) {
- console.log(err, data)
- next()
- loop()
- })
-}
-```
-
-If you don't call `next` and call `read` again the same `(err, value)` pair will be returned.
-
-You can use this module to implement stuff like [a streaming merge sort](https://github.com/mafintosh/stream-iterate/blob/master/test.js#L5-L47).
-
-## License
-
-[MIT](LICENSE)
diff --git a/node_modules/stream-iterate/index.js b/node_modules/stream-iterate/index.js
deleted file mode 100644
index c60d6ab55..000000000
--- a/node_modules/stream-iterate/index.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var Readable = require('readable-stream').Readable
-var shift = require('stream-shift')
-
-var stream2 = function (stream) {
- if (stream._readableState) return stream
- return new Readable({objectMode: true, highWaterMark: 16}).wrap(stream)
-}
-
-module.exports = function (stream) {
- stream = stream2(stream)
-
- var ended = false
- var data = null
- var err = null
- var destroyed = false
- var fn = null
-
- var consume = function (e) {
- if (e) {
- destroyed = true
- if (stream.destroy) stream.destroy(e)
- return
- }
-
- data = null
- err = null
- }
-
- var onresult = function () {
- if (!fn) return
- var tmp = fn
- fn = undefined
- tmp(err, data, consume)
- }
-
- var update = function () {
- if (!fn) return
- data = shift(stream)
- if (data === null && !ended) return
- onresult()
- }
-
- var onend = function () {
- ended = true
- onresult()
- }
-
- stream.on('readable', update)
-
- stream.on('error', function (e) {
- err = e
- onresult()
- })
-
- stream.on('close', function () {
- if (stream._readableState.ended) return
- onend()
- })
-
- stream.on('end', onend)
-
- return function (callback) {
- if (destroyed) return
- if (err) return callback(err, null, consume)
- if (data) return callback(null, data, consume)
- if (ended) return callback(null, null, consume)
- fn = callback
- update()
- }
-}
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml b/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml
deleted file mode 100644
index 40992555b..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
-notifications:
- email: false
-matrix:
- fast_finish: true
- include:
- - node_js: '0.8'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.10'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.11'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.12'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 1
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 2
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 3
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 6
- env: TASK=test
- - node_js: 7
- env: TASK=test
- - node_js: 8
- env: TASK=test
- - node_js: 9
- env: TASK=test
-script: "npm run $TASK"
-env:
- global:
- - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc=
- - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI=
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
deleted file mode 100644
index f478d58dc..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/CONTRIBUTING.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
-* (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified
- it.
-
-* (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
-## Moderation Policy
-
-The [Node.js Moderation Policy] applies to this WG.
-
-## Code of Conduct
-
-The [Node.js Code of Conduct][] applies to this WG.
-
-[Node.js Code of Conduct]:
-https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
-[Node.js Moderation Policy]:
-https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md b/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md
deleted file mode 100644
index 16ffb93f2..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/GOVERNANCE.md
+++ /dev/null
@@ -1,136 +0,0 @@
-### Streams Working Group
-
-The Node.js Streams is jointly governed by a Working Group
-(WG)
-that is responsible for high-level guidance of the project.
-
-The WG has final authority over this project including:
-
-* Technical direction
-* Project governance and process (including this policy)
-* Contribution policy
-* GitHub repository hosting
-* Conduct guidelines
-* Maintaining the list of additional Collaborators
-
-For the current list of WG members, see the project
-[README.md](./README.md#current-project-team-members).
-
-### Collaborators
-
-The readable-stream GitHub repository is
-maintained by the WG and additional Collaborators who are added by the
-WG on an ongoing basis.
-
-Individuals making significant and valuable contributions are made
-Collaborators and given commit-access to the project. These
-individuals are identified by the WG and their addition as
-Collaborators is discussed during the WG meeting.
-
-_Note:_ If you make a significant contribution and are not considered
-for commit-access log an issue or contact a WG member directly and it
-will be brought up in the next WG meeting.
-
-Modifications of the contents of the readable-stream repository are
-made on
-a collaborative basis. Anybody with a GitHub account may propose a
-modification via pull request and it will be considered by the project
-Collaborators. All pull requests must be reviewed and accepted by a
-Collaborator with sufficient expertise who is able to take full
-responsibility for the change. In the case of pull requests proposed
-by an existing Collaborator, an additional Collaborator is required
-for sign-off. Consensus should be sought if additional Collaborators
-participate and there is disagreement around a particular
-modification. See _Consensus Seeking Process_ below for further detail
-on the consensus model used for governance.
-
-Collaborators may opt to elevate significant or controversial
-modifications, or modifications that have not found consensus to the
-WG for discussion by assigning the ***WG-agenda*** tag to a pull
-request or issue. The WG should serve as the final arbiter where
-required.
-
-For the current list of Collaborators, see the project
-[README.md](./README.md#members).
-
-### WG Membership
-
-WG seats are not time-limited. There is no fixed size of the WG.
-However, the expected target is between 6 and 12, to ensure adequate
-coverage of important areas of expertise, balanced with the ability to
-make decisions efficiently.
-
-There is no specific set of requirements or qualifications for WG
-membership beyond these rules.
-
-The WG may add additional members to the WG by unanimous consensus.
-
-A WG member may be removed from the WG by voluntary resignation, or by
-unanimous consensus of all other WG members.
-
-Changes to WG membership should be posted in the agenda, and may be
-suggested as any other agenda item (see "WG Meetings" below).
-
-If an addition or removal is proposed during a meeting, and the full
-WG is not in attendance to participate, then the addition or removal
-is added to the agenda for the subsequent meeting. This is to ensure
-that all members are given the opportunity to participate in all
-membership decisions. If a WG member is unable to attend a meeting
-where a planned membership decision is being made, then their consent
-is assumed.
-
-No more than 1/3 of the WG members may be affiliated with the same
-employer. If removal or resignation of a WG member, or a change of
-employment by a WG member, creates a situation where more than 1/3 of
-the WG membership shares an employer, then the situation must be
-immediately remedied by the resignation or removal of one or more WG
-members affiliated with the over-represented employer(s).
-
-### WG Meetings
-
-The WG meets occasionally on a Google Hangout On Air. A designated moderator
-approved by the WG runs the meeting. Each meeting should be
-published to YouTube.
-
-Items are added to the WG agenda that are considered contentious or
-are modifications of governance, contribution policy, WG membership,
-or release process.
-
-The intention of the agenda is not to approve or review all patches;
-that should happen continuously on GitHub and be handled by the larger
-group of Collaborators.
-
-Any community member or contributor can ask that something be added to
-the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
-WG member or the moderator can add the item to the agenda by adding
-the ***WG-agenda*** tag to the issue.
-
-Prior to each WG meeting the moderator will share the Agenda with
-members of the WG. WG members can add any items they like to the
-agenda at the beginning of each meeting. The moderator and the WG
-cannot veto or remove items.
-
-The WG may invite persons or representatives from certain projects to
-participate in a non-voting capacity.
-
-The moderator is responsible for summarizing the discussion of each
-agenda item and sends it as a pull request after the meeting.
-
-### Consensus Seeking Process
-
-The WG follows a
-[Consensus
-Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
-decision-making model.
-
-When an agenda item has appeared to reach a consensus the moderator
-will ask "Does anyone object?" as a final call for dissent from the
-consensus.
-
-If an agenda item cannot reach a consensus a WG member can call for
-either a closing vote or a vote to table the issue to the next
-meeting. The call for a vote must be seconded by a majority of the WG
-or else the discussion will continue. Simple majority wins.
-
-Note that changes to WG membership require a majority consensus. See
-"WG Membership" above.
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/LICENSE b/node_modules/stream-iterate/node_modules/readable-stream/LICENSE
deleted file mode 100644
index 2873b3b2e..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,47 +0,0 @@
-Node.js is licensed for use as follows:
-
-"""
-Copyright Node.js contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-"""
-
-This license applies to parts of Node.js originating from the
-https://github.com/joyent/node repository:
-
-"""
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-"""
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/README.md b/node_modules/stream-iterate/node_modules/readable-stream/README.md
deleted file mode 100644
index 23fe3f3e3..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# readable-stream
-
-***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
-
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-
-[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)
-
-```bash
-npm install --save readable-stream
-```
-
-***Node-core streams for userland***
-
-This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core.
-
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html).
-
-If you want to guarantee a stable streams base, regardless of what version of
-Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
-
-As of version 2.0.0 **readable-stream** uses semantic versioning.
-
-# Streams Working Group
-
-`readable-stream` is maintained by the Streams Working Group, which
-oversees the development and maintenance of the Streams API within
-Node.js. The responsibilities of the Streams Working Group include:
-
-* Addressing stream issues on the Node.js issue tracker.
-* Authoring and editing stream documentation within the Node.js project.
-* Reviewing changes to stream subclasses within the Node.js project.
-* Redirecting changes to streams from the Node.js project to this
- project.
-* Assisting in the implementation of stream providers within Node.js.
-* Recommending versions of `readable-stream` to be included in Node.js.
-* Messaging about the future of streams to give the community advance
- notice of changes.
-
-<a name="members"></a>
-## Team Members
-
-* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;
- - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B
-* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
- - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
-* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;
- - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D
-* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;
-* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
-* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;
-* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
- - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
-* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
deleted file mode 100644
index 83275f192..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# streams WG Meeting 2015-01-30
-
-## Links
-
-* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg
-* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106
-* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/
-
-## Agenda
-
-Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting.
-
-* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105)
-* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101)
-* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102)
-* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99)
-
-## Minutes
-
-### adopt a charter
-
-* group: +1's all around
-
-### What versioning scheme should be adopted?
-* group: +1’s 3.0.0
-* domenic+group: pulling in patches from other sources where appropriate
-* mikeal: version independently, suggesting versions for io.js
-* mikeal+domenic: work with TC to notify in advance of changes
-simpler stream creation
-
-### streamline creation of streams
-* sam: streamline creation of streams
-* domenic: nice simple solution posted
- but, we lose the opportunity to change the model
- may not be backwards incompatible (double check keys)
-
- **action item:** domenic will check
-
-### remove implicit flowing of streams on(‘data’)
-* add isFlowing / isPaused
-* mikeal: worrying that we’re documenting polyfill methods – confuses users
-* domenic: more reflective API is probably good, with warning labels for users
-* new section for mad scientists (reflective stream access)
-* calvin: name the “third state”
-* mikeal: maybe borrow the name from whatwg?
-* domenic: we’re missing the “third state”
-* consensus: kind of difficult to name the third state
-* mikeal: figure out differences in states / compat
-* mathias: always flow on data – eliminates third state
- * explore what it breaks
-
-**action items:**
-* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream)
-* ask rod/build for infrastructure
-* **chris**: explore the “flow on data” approach
-* add isPaused/isFlowing
-* add new docs section
-* move isPaused to that section
-
-
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js b/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js
deleted file mode 100644
index f8b2db83d..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/duplex-browser.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/_stream_duplex.js');
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/duplex.js b/node_modules/stream-iterate/node_modules/readable-stream/duplex.js
deleted file mode 100644
index 46924cbfd..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./readable').Duplex
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index a1ca813e5..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-/*<replacement>*/
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) {
- keys.push(key);
- }return keys;
-};
-/*</replacement>*/
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-{
- // avoid scope creep, the keys array can then be collected
- var keys = objectKeys(Writable.prototype);
- for (var v = 0; v < keys.length; v++) {
- var method = keys[v];
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
- }
-}
-
-function Duplex(options) {
- if (!(this instanceof Duplex)) return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false) this.readable = false;
-
- if (options && options.writable === false) this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
-});
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended) return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- pna.nextTick(onEndNT, this);
-}
-
-function onEndNT(self) {
- self.end();
-}
-
-Object.defineProperty(Duplex.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined || this._writableState === undefined) {
- return false;
- }
- return this._readableState.destroyed && this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (this._readableState === undefined || this._writableState === undefined) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- this._writableState.destroyed = value;
- }
-});
-
-Duplex.prototype._destroy = function (err, cb) {
- this.push(null);
- this.end();
-
- pna.nextTick(cb, err);
-}; \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index a9c835884..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-'use strict';
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough)) return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function (chunk, encoding, cb) {
- cb(null, chunk);
-}; \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index bf34ac65e..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,1019 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-module.exports = Readable;
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-/*<replacement>*/
-var Duplex;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-/*<replacement>*/
-var EE = require('events').EventEmitter;
-
-var EElistenerCount = function (emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream = require('./internal/streams/stream');
-/*</replacement>*/
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
-function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
-}
-function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
-}
-
-/*</replacement>*/
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var debugUtil = require('util');
-var debug = void 0;
-if (debugUtil && debugUtil.debuglog) {
- debug = debugUtil.debuglog('stream');
-} else {
- debug = function () {};
-}
-/*</replacement>*/
-
-var BufferList = require('./internal/streams/BufferList');
-var destroyImpl = require('./internal/streams/destroy');
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
-
-function prependListener(emitter, event, fn) {
- // Sadly this is not cacheable as some libraries bundle their own
- // event emitter implementation with them.
- if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
-
- // This is a hack to make sure that our error handler is attached before any
- // userland ones. NEVER DO THIS. This is here only because this code needs
- // to continue to work with older versions of Node.js that do not include
- // the prependListener() method. The goal is to eventually remove this hack.
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
-}
-
-function ReadableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- var readableHwm = options.readableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
-
- // A linked list is used to store data chunks instead of an array because the
- // linked list can remove elements from the beginning faster than
- // array.shift()
- this.buffer = new BufferList();
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = null;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // a flag to be able to tell if the event 'readable'/'data' is emitted
- // immediately, or on a later tick. We set this to true at first, because
- // any actions that shouldn't happen until "later" should generally also
- // not happen before the first read call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
- this.resumeScheduled = false;
-
- // has it been destroyed
- this.destroyed = false;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- if (!(this instanceof Readable)) return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- if (options) {
- if (typeof options.read === 'function') this._read = options.read;
-
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
- }
-
- Stream.call(this);
-}
-
-Object.defineProperty(Readable.prototype, 'destroyed', {
- get: function () {
- if (this._readableState === undefined) {
- return false;
- }
- return this._readableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._readableState) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._readableState.destroyed = value;
- }
-});
-
-Readable.prototype.destroy = destroyImpl.destroy;
-Readable.prototype._undestroy = destroyImpl.undestroy;
-Readable.prototype._destroy = function (err, cb) {
- this.push(null);
- cb(err);
-};
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function (chunk, encoding) {
- var state = this._readableState;
- var skipChunkCheck;
-
- if (!state.objectMode) {
- if (typeof chunk === 'string') {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = Buffer.from(chunk, encoding);
- encoding = '';
- }
- skipChunkCheck = true;
- }
- } else {
- skipChunkCheck = true;
- }
-
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function (chunk) {
- return readableAddChunk(this, chunk, null, true, false);
-};
-
-function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
- var state = stream._readableState;
- if (chunk === null) {
- state.reading = false;
- onEofChunk(stream, state);
- } else {
- var er;
- if (!skipChunkCheck) er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
-
- if (addToFront) {
- if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
- } else if (state.ended) {
- stream.emit('error', new Error('stream.push() after EOF'));
- } else {
- state.reading = false;
- if (state.decoder && !encoding) {
- chunk = state.decoder.write(chunk);
- if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
- } else {
- addChunk(stream, state, chunk, false);
- }
- }
- } else if (!addToFront) {
- state.reading = false;
- }
- }
-
- return needMoreData(state);
-}
-
-function addChunk(stream, state, chunk, addToFront) {
- if (state.flowing && state.length === 0 && !state.sync) {
- stream.emit('data', chunk);
- stream.read(0);
- } else {
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
-
- if (state.needReadable) emitReadable(stream);
- }
- maybeReadMore(stream, state);
-}
-
-function chunkInvalid(state, chunk) {
- var er;
- if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
-}
-
-Readable.prototype.isPaused = function () {
- return this._readableState.flowing === false;
-};
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function (enc) {
- if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
- return this;
-};
-
-// Don't raise the hwm > 8MB
-var MAX_HWM = 0x800000;
-function computeNewHighWaterMark(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2 to prevent increasing hwm excessively in
- // tiny amounts
- n--;
- n |= n >>> 1;
- n |= n >>> 2;
- n |= n >>> 4;
- n |= n >>> 8;
- n |= n >>> 16;
- n++;
- }
- return n;
-}
-
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function howMuchToRead(n, state) {
- if (n <= 0 || state.length === 0 && state.ended) return 0;
- if (state.objectMode) return 1;
- if (n !== n) {
- // Only flow one buffer at a time
- if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
- }
- // If we're asking for more than the current hwm, then raise the hwm.
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
- if (n <= state.length) return n;
- // Don't have enough
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- }
- return state.length;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function (n) {
- debug('read', n);
- n = parseInt(n, 10);
- var state = this._readableState;
- var nOrig = n;
-
- if (n !== 0) state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
- debug('read: emitReadable', state.length, state.ended);
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- if (state.length === 0) endReadable(this);
- return null;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
- debug('need readable', doRead);
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length === 0 || state.length - n < state.highWaterMark) {
- doRead = true;
- debug('length less than watermark', doRead);
- }
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading) {
- doRead = false;
- debug('reading or ended', doRead);
- } else if (doRead) {
- debug('do read');
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0) state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- // If _read pushed data synchronously, then `reading` will be false,
- // and we need to re-evaluate how much data we can return to the user.
- if (!state.reading) n = howMuchToRead(nOrig, state);
- }
-
- var ret;
- if (n > 0) ret = fromList(n, state);else ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- } else {
- state.length -= n;
- }
-
- if (state.length === 0) {
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (!state.ended) state.needReadable = true;
-
- // If we tried to read() past the EOF, then emit end on the next tick.
- if (nOrig !== n && state.ended) endReadable(this);
- }
-
- if (ret !== null) this.emit('data', ret);
-
- return ret;
-};
-
-function onEofChunk(stream, state) {
- if (state.ended) return;
- if (state.decoder) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // emit 'readable' now to make sure it gets picked up.
- emitReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (!state.emittedReadable) {
- debug('emitReadable', state.flowing);
- state.emittedReadable = true;
- if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
- }
-}
-
-function emitReadable_(stream) {
- debug('emit readable');
- stream.emit('readable');
- flow(stream);
-}
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- pna.nextTick(maybeReadMore_, stream, state);
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
- debug('maybeReadMore read 0');
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;else len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function (n) {
- this.emit('error', new Error('_read() is not implemented'));
-};
-
-Readable.prototype.pipe = function (dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
-
- var endFn = doEnd ? onend : unpipe;
- if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable, unpipeInfo) {
- debug('onunpipe');
- if (readable === src) {
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
- unpipeInfo.hasUnpiped = true;
- cleanup();
- }
- }
- }
-
- function onend() {
- debug('onend');
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- var cleanedUp = false;
- function cleanup() {
- debug('cleanup');
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', unpipe);
- src.removeListener('data', ondata);
-
- cleanedUp = true;
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
- }
-
- // If the user pushes more data while we're writing to dest then we'll end up
- // in ondata again. However, we only want to increase awaitDrain once because
- // dest will only emit one 'drain' event for the multiple writes.
- // => Introduce a guard on increasing awaitDrain.
- var increasedAwaitDrain = false;
- src.on('data', ondata);
- function ondata(chunk) {
- debug('ondata');
- increasedAwaitDrain = false;
- var ret = dest.write(chunk);
- if (false === ret && !increasedAwaitDrain) {
- // If the user unpiped during `dest.write()`, it is possible
- // to get stuck in a permanently paused state if that write
- // also returned false.
- // => Check whether `dest` is still a piping destination.
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
- debug('false write response, pause', src._readableState.awaitDrain);
- src._readableState.awaitDrain++;
- increasedAwaitDrain = true;
- }
- src.pause();
- }
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- debug('onerror', er);
- unpipe();
- dest.removeListener('error', onerror);
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
- }
-
- // Make sure our error handler is attached before userland ones.
- prependListener(dest, 'error', onerror);
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- debug('onfinish');
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- debug('unpipe');
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- debug('pipe resume');
- src.resume();
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function () {
- var state = src._readableState;
- debug('pipeOnDrain', state.awaitDrain);
- if (state.awaitDrain) state.awaitDrain--;
- if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
- state.flowing = true;
- flow(src);
- }
- };
-}
-
-Readable.prototype.unpipe = function (dest) {
- var state = this._readableState;
- var unpipeInfo = { hasUnpiped: false };
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0) return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes) return this;
-
- if (!dest) dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
- if (dest) dest.emit('unpipe', this, unpipeInfo);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- state.flowing = false;
-
- for (var i = 0; i < len; i++) {
- dests[i].emit('unpipe', this, unpipeInfo);
- }return this;
- }
-
- // try to find the right one.
- var index = indexOf(state.pipes, dest);
- if (index === -1) return this;
-
- state.pipes.splice(index, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this, unpipeInfo);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function (ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- if (ev === 'data') {
- // Start flowing on next tick if stream isn't explicitly paused
- if (this._readableState.flowing !== false) this.resume();
- } else if (ev === 'readable') {
- var state = this._readableState;
- if (!state.endEmitted && !state.readableListening) {
- state.readableListening = state.needReadable = true;
- state.emittedReadable = false;
- if (!state.reading) {
- pna.nextTick(nReadingNextTick, this);
- } else if (state.length) {
- emitReadable(this);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-function nReadingNextTick(self) {
- debug('readable nexttick read 0');
- self.read(0);
-}
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function () {
- var state = this._readableState;
- if (!state.flowing) {
- debug('resume');
- state.flowing = true;
- resume(this, state);
- }
- return this;
-};
-
-function resume(stream, state) {
- if (!state.resumeScheduled) {
- state.resumeScheduled = true;
- pna.nextTick(resume_, stream, state);
- }
-}
-
-function resume_(stream, state) {
- if (!state.reading) {
- debug('resume read 0');
- stream.read(0);
- }
-
- state.resumeScheduled = false;
- state.awaitDrain = 0;
- stream.emit('resume');
- flow(stream);
- if (state.flowing && !state.reading) stream.read(0);
-}
-
-Readable.prototype.pause = function () {
- debug('call pause flowing=%j', this._readableState.flowing);
- if (false !== this._readableState.flowing) {
- debug('pause');
- this._readableState.flowing = false;
- this.emit('pause');
- }
- return this;
-};
-
-function flow(stream) {
- var state = stream._readableState;
- debug('flow', state.flowing);
- while (state.flowing && stream.read() !== null) {}
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function (stream) {
- var _this = this;
-
- var state = this._readableState;
- var paused = false;
-
- stream.on('end', function () {
- debug('wrapped end');
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) _this.push(chunk);
- }
-
- _this.push(null);
- });
-
- stream.on('data', function (chunk) {
- debug('wrapped data');
- if (state.decoder) chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
-
- var ret = _this.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (this[i] === undefined && typeof stream[i] === 'function') {
- this[i] = function (method) {
- return function () {
- return stream[method].apply(stream, arguments);
- };
- }(i);
- }
- }
-
- // proxy certain important events.
- for (var n = 0; n < kProxyEvents.length; n++) {
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
- }
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- this._read = function (n) {
- debug('wrapped _read', n);
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return this;
-};
-
-Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._readableState.highWaterMark;
- }
-});
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromList(n, state) {
- // nothing buffered
- if (state.length === 0) return null;
-
- var ret;
- if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
- // read it all, truncate the list
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
- state.buffer.clear();
- } else {
- // read part of list
- ret = fromListPartial(n, state.buffer, state.decoder);
- }
-
- return ret;
-}
-
-// Extracts only enough buffered data to satisfy the amount requested.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function fromListPartial(n, list, hasStrings) {
- var ret;
- if (n < list.head.data.length) {
- // slice is the same for buffers and strings
- ret = list.head.data.slice(0, n);
- list.head.data = list.head.data.slice(n);
- } else if (n === list.head.data.length) {
- // first chunk is a perfect match
- ret = list.shift();
- } else {
- // result spans more than one buffer
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
- }
- return ret;
-}
-
-// Copies a specified amount of characters from the list of buffered data
-// chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBufferString(n, list) {
- var p = list.head;
- var c = 1;
- var ret = p.data;
- n -= ret.length;
- while (p = p.next) {
- var str = p.data;
- var nb = n > str.length ? str.length : n;
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
- n -= nb;
- if (n === 0) {
- if (nb === str.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = str.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-// Copies a specified amount of bytes from the list of buffered data chunks.
-// This function is designed to be inlinable, so please take care when making
-// changes to the function body.
-function copyFromBuffer(n, list) {
- var ret = Buffer.allocUnsafe(n);
- var p = list.head;
- var c = 1;
- p.data.copy(ret);
- n -= p.data.length;
- while (p = p.next) {
- var buf = p.data;
- var nb = n > buf.length ? buf.length : n;
- buf.copy(ret, ret.length - n, 0, nb);
- n -= nb;
- if (n === 0) {
- if (nb === buf.length) {
- ++c;
- if (p.next) list.head = p.next;else list.head = list.tail = null;
- } else {
- list.head = p;
- p.data = buf.slice(nb);
- }
- break;
- }
- ++c;
- }
- list.length -= c;
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
-
- if (!state.endEmitted) {
- state.ended = true;
- pna.nextTick(endReadableNT, state, stream);
- }
-}
-
-function endReadableNT(state, stream) {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
-}
-
-function indexOf(xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-} \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index 5d1f8b876..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-'use strict';
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-function afterTransform(er, data) {
- var ts = this._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb) {
- return this.emit('error', new Error('write callback called multiple times'));
- }
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data != null) // single equals check for both `null` and `undefined`
- this.push(data);
-
- cb(er);
-
- var rs = this._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- this._read(rs.highWaterMark);
- }
-}
-
-function Transform(options) {
- if (!(this instanceof Transform)) return new Transform(options);
-
- Duplex.call(this, options);
-
- this._transformState = {
- afterTransform: afterTransform.bind(this),
- needTransform: false,
- transforming: false,
- writecb: null,
- writechunk: null,
- writeencoding: null
- };
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- if (options) {
- if (typeof options.transform === 'function') this._transform = options.transform;
-
- if (typeof options.flush === 'function') this._flush = options.flush;
- }
-
- // When the writable side finishes, then flush out anything remaining.
- this.on('prefinish', prefinish);
-}
-
-function prefinish() {
- var _this = this;
-
- if (typeof this._flush === 'function') {
- this._flush(function (er, data) {
- done(_this, er, data);
- });
- } else {
- done(this, null, null);
- }
-}
-
-Transform.prototype.push = function (chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('_transform() is not implemented');
-};
-
-Transform.prototype._write = function (chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function (n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-Transform.prototype._destroy = function (err, cb) {
- var _this2 = this;
-
- Duplex.prototype._destroy.call(this, err, function (err2) {
- cb(err2);
- _this2.emit('close');
- });
-};
-
-function done(stream, er, data) {
- if (er) return stream.emit('error', er);
-
- if (data != null) // single equals check for both `null` and `undefined`
- stream.push(data);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
-
- if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
-
- return stream.push(null);
-} \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index b3f4e85a2..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,687 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, encoding, cb), and it'll handle all
-// the drain event emission and buffering.
-
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-module.exports = Writable;
-
-/* <replacement> */
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
- this.next = null;
-}
-
-// It seems a linked list but it is not
-// there will be only 2 of these for each stream
-function CorkedRequest(state) {
- var _this = this;
-
- this.next = null;
- this.entry = null;
- this.finish = function () {
- onCorkedFinish(_this, state);
- };
-}
-/* </replacement> */
-
-/*<replacement>*/
-var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
-/*</replacement>*/
-
-/*<replacement>*/
-var Duplex;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-/*<replacement>*/
-var internalUtil = {
- deprecate: require('util-deprecate')
-};
-/*</replacement>*/
-
-/*<replacement>*/
-var Stream = require('./internal/streams/stream');
-/*</replacement>*/
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-var OurUint8Array = global.Uint8Array || function () {};
-function _uint8ArrayToBuffer(chunk) {
- return Buffer.from(chunk);
-}
-function _isUint8Array(obj) {
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
-}
-
-/*</replacement>*/
-
-var destroyImpl = require('./internal/streams/destroy');
-
-util.inherits(Writable, Stream);
-
-function nop() {}
-
-function WritableState(options, stream) {
- Duplex = Duplex || require('./_stream_duplex');
-
- options = options || {};
-
- // Duplex streams are both readable and writable, but share
- // the same options object.
- // However, some cases require setting options to different
- // values for the readable and the writable sides of the duplex stream.
- // These options can be provided separately as readableXXX and writableXXX.
- var isDuplex = stream instanceof Duplex;
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- var writableHwm = options.writableHighWaterMark;
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
-
- if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
-
- // cast to ints.
- this.highWaterMark = Math.floor(this.highWaterMark);
-
- // if _final has been called
- this.finalCalled = false;
-
- // drain event flag.
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // has it been destroyed
- this.destroyed = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // when true all writes will be buffered until .uncork() call
- this.corked = 0;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, because any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function (er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.bufferedRequest = null;
- this.lastBufferedRequest = null;
-
- // number of pending user-supplied write callbacks
- // this must be 0 before 'finish' can be emitted
- this.pendingcb = 0;
-
- // emit prefinish if the only thing we're waiting for is _write cbs
- // This is relevant for synchronous Transform streams
- this.prefinished = false;
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-
- // count buffered requests
- this.bufferedRequestCount = 0;
-
- // allocate the first CorkedRequest, there is always
- // one allocated and free to use, and we maintain at most two
- this.corkedRequestsFree = new CorkedRequest(this);
-}
-
-WritableState.prototype.getBuffer = function getBuffer() {
- var current = this.bufferedRequest;
- var out = [];
- while (current) {
- out.push(current);
- current = current.next;
- }
- return out;
-};
-
-(function () {
- try {
- Object.defineProperty(WritableState.prototype, 'buffer', {
- get: internalUtil.deprecate(function () {
- return this.getBuffer();
- }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
- });
- } catch (_) {}
-})();
-
-// Test _writableState for inheritance to account for Duplex streams,
-// whose prototype chain only points to Readable.
-var realHasInstance;
-if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
- realHasInstance = Function.prototype[Symbol.hasInstance];
- Object.defineProperty(Writable, Symbol.hasInstance, {
- value: function (object) {
- if (realHasInstance.call(this, object)) return true;
- if (this !== Writable) return false;
-
- return object && object._writableState instanceof WritableState;
- }
- });
-} else {
- realHasInstance = function (object) {
- return object instanceof this;
- };
-}
-
-function Writable(options) {
- Duplex = Duplex || require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, too.
- // `realHasInstance` is necessary because using plain `instanceof`
- // would return false, as no `_writableState` property is attached.
-
- // Trying to use the custom `instanceof` for Writable here will also break the
- // Node.js LazyTransform implementation, which has a non-trivial getter for
- // `_writableState` that would lead to infinite recursion.
- if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
- return new Writable(options);
- }
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- if (options) {
- if (typeof options.write === 'function') this._write = options.write;
-
- if (typeof options.writev === 'function') this._writev = options.writev;
-
- if (typeof options.destroy === 'function') this._destroy = options.destroy;
-
- if (typeof options.final === 'function') this._final = options.final;
- }
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe, not readable'));
-};
-
-function writeAfterEnd(stream, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- pna.nextTick(cb, er);
-}
-
-// Checks that a user-supplied chunk is valid, especially for the particular
-// mode the stream is in. Currently this means that `null` is never accepted
-// and undefined/non-string values are only allowed in object mode.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
- var er = false;
-
- if (chunk === null) {
- er = new TypeError('May not write null values to stream');
- } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- if (er) {
- stream.emit('error', er);
- pna.nextTick(cb, er);
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function (chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
- var isBuf = !state.objectMode && _isUint8Array(chunk);
-
- if (isBuf && !Buffer.isBuffer(chunk)) {
- chunk = _uint8ArrayToBuffer(chunk);
- }
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function') cb = nop;
-
- if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
- state.pendingcb++;
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
- }
-
- return ret;
-};
-
-Writable.prototype.cork = function () {
- var state = this._writableState;
-
- state.corked++;
-};
-
-Writable.prototype.uncork = function () {
- var state = this._writableState;
-
- if (state.corked) {
- state.corked--;
-
- if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
- }
-};
-
-Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
- // node::ParseEncoding() requires lower case.
- if (typeof encoding === 'string') encoding = encoding.toLowerCase();
- if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
- this._writableState.defaultEncoding = encoding;
- return this;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = Buffer.from(chunk, encoding);
- }
- return chunk;
-}
-
-Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
- // making it explicit this property is not enumerable
- // because otherwise some prototype manipulation in
- // userland will fail
- enumerable: false,
- get: function () {
- return this._writableState.highWaterMark;
- }
-});
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
- if (!isBuf) {
- var newChunk = decodeChunk(state, chunk, encoding);
- if (chunk !== newChunk) {
- isBuf = true;
- encoding = 'buffer';
- chunk = newChunk;
- }
- }
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret) state.needDrain = true;
-
- if (state.writing || state.corked) {
- var last = state.lastBufferedRequest;
- state.lastBufferedRequest = {
- chunk: chunk,
- encoding: encoding,
- isBuf: isBuf,
- callback: cb,
- next: null
- };
- if (last) {
- last.next = state.lastBufferedRequest;
- } else {
- state.bufferedRequest = state.lastBufferedRequest;
- }
- state.bufferedRequestCount += 1;
- } else {
- doWrite(stream, state, false, len, chunk, encoding, cb);
- }
-
- return ret;
-}
-
-function doWrite(stream, state, writev, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- --state.pendingcb;
-
- if (sync) {
- // defer the callback if we are being called synchronously
- // to avoid piling up things on the stack
- pna.nextTick(cb, er);
- // this can emit finish, and it will always happen
- // after error
- pna.nextTick(finishMaybe, stream, state);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- } else {
- // the caller expect this to happen before if
- // it is async
- cb(er);
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
- // this can emit finish, but finish must
- // always follow error
- finishMaybe(stream, state);
- }
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er) onwriteError(stream, state, sync, er, cb);else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(state);
-
- if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
- clearBuffer(stream, state);
- }
-
- if (sync) {
- /*<replacement>*/
- asyncWrite(afterWrite, stream, state, finished, cb);
- /*</replacement>*/
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished) onwriteDrain(stream, state);
- state.pendingcb--;
- cb();
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
- var entry = state.bufferedRequest;
-
- if (stream._writev && entry && entry.next) {
- // Fast case, write everything using _writev()
- var l = state.bufferedRequestCount;
- var buffer = new Array(l);
- var holder = state.corkedRequestsFree;
- holder.entry = entry;
-
- var count = 0;
- var allBuffers = true;
- while (entry) {
- buffer[count] = entry;
- if (!entry.isBuf) allBuffers = false;
- entry = entry.next;
- count += 1;
- }
- buffer.allBuffers = allBuffers;
-
- doWrite(stream, state, true, state.length, buffer, '', holder.finish);
-
- // doWrite is almost always async, defer these to save a bit of time
- // as the hot path ends with doWrite
- state.pendingcb++;
- state.lastBufferedRequest = null;
- if (holder.next) {
- state.corkedRequestsFree = holder.next;
- holder.next = null;
- } else {
- state.corkedRequestsFree = new CorkedRequest(state);
- }
- state.bufferedRequestCount = 0;
- } else {
- // Slow case, write chunks one-by-one
- while (entry) {
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, false, len, chunk, encoding, cb);
- entry = entry.next;
- state.bufferedRequestCount--;
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- break;
- }
- }
-
- if (entry === null) state.lastBufferedRequest = null;
- }
-
- state.bufferedRequest = entry;
- state.bufferProcessing = false;
-}
-
-Writable.prototype._write = function (chunk, encoding, cb) {
- cb(new Error('_write() is not implemented'));
-};
-
-Writable.prototype._writev = null;
-
-Writable.prototype.end = function (chunk, encoding, cb) {
- var state = this._writableState;
-
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
-
- // .end() fully uncorks
- if (state.corked) {
- state.corked = 1;
- this.uncork();
- }
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished) endWritable(this, state, cb);
-};
-
-function needFinish(state) {
- return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
-}
-function callFinal(stream, state) {
- stream._final(function (err) {
- state.pendingcb--;
- if (err) {
- stream.emit('error', err);
- }
- state.prefinished = true;
- stream.emit('prefinish');
- finishMaybe(stream, state);
- });
-}
-function prefinish(stream, state) {
- if (!state.prefinished && !state.finalCalled) {
- if (typeof stream._final === 'function') {
- state.pendingcb++;
- state.finalCalled = true;
- pna.nextTick(callFinal, stream, state);
- } else {
- state.prefinished = true;
- stream.emit('prefinish');
- }
- }
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(state);
- if (need) {
- prefinish(stream, state);
- if (state.pendingcb === 0) {
- state.finished = true;
- stream.emit('finish');
- }
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
- }
- state.ended = true;
- stream.writable = false;
-}
-
-function onCorkedFinish(corkReq, state, err) {
- var entry = corkReq.entry;
- corkReq.entry = null;
- while (entry) {
- var cb = entry.callback;
- state.pendingcb--;
- cb(err);
- entry = entry.next;
- }
- if (state.corkedRequestsFree) {
- state.corkedRequestsFree.next = corkReq;
- } else {
- state.corkedRequestsFree = corkReq;
- }
-}
-
-Object.defineProperty(Writable.prototype, 'destroyed', {
- get: function () {
- if (this._writableState === undefined) {
- return false;
- }
- return this._writableState.destroyed;
- },
- set: function (value) {
- // we ignore the value if the stream
- // has not been initialized yet
- if (!this._writableState) {
- return;
- }
-
- // backward compatibility, the user is explicitly
- // managing destroyed
- this._writableState.destroyed = value;
- }
-});
-
-Writable.prototype.destroy = destroyImpl.destroy;
-Writable.prototype._undestroy = destroyImpl.undestroy;
-Writable.prototype._destroy = function (err, cb) {
- this.end();
- cb(err);
-}; \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js
deleted file mode 100644
index aefc68bd9..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/BufferList.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var Buffer = require('safe-buffer').Buffer;
-var util = require('util');
-
-function copyBuffer(src, target, offset) {
- src.copy(target, offset);
-}
-
-module.exports = function () {
- function BufferList() {
- _classCallCheck(this, BufferList);
-
- this.head = null;
- this.tail = null;
- this.length = 0;
- }
-
- BufferList.prototype.push = function push(v) {
- var entry = { data: v, next: null };
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
- this.tail = entry;
- ++this.length;
- };
-
- BufferList.prototype.unshift = function unshift(v) {
- var entry = { data: v, next: this.head };
- if (this.length === 0) this.tail = entry;
- this.head = entry;
- ++this.length;
- };
-
- BufferList.prototype.shift = function shift() {
- if (this.length === 0) return;
- var ret = this.head.data;
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
- --this.length;
- return ret;
- };
-
- BufferList.prototype.clear = function clear() {
- this.head = this.tail = null;
- this.length = 0;
- };
-
- BufferList.prototype.join = function join(s) {
- if (this.length === 0) return '';
- var p = this.head;
- var ret = '' + p.data;
- while (p = p.next) {
- ret += s + p.data;
- }return ret;
- };
-
- BufferList.prototype.concat = function concat(n) {
- if (this.length === 0) return Buffer.alloc(0);
- if (this.length === 1) return this.head.data;
- var ret = Buffer.allocUnsafe(n >>> 0);
- var p = this.head;
- var i = 0;
- while (p) {
- copyBuffer(p.data, ret, i);
- i += p.data.length;
- p = p.next;
- }
- return ret;
- };
-
- return BufferList;
-}();
-
-if (util && util.inspect && util.inspect.custom) {
- module.exports.prototype[util.inspect.custom] = function () {
- var obj = util.inspect({ length: this.length });
- return this.constructor.name + ' ' + obj;
- };
-} \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js
deleted file mode 100644
index 5a0a0d88c..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/destroy.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-/*<replacement>*/
-
-var pna = require('process-nextick-args');
-/*</replacement>*/
-
-// undocumented cb() API, needed for core, not for public API
-function destroy(err, cb) {
- var _this = this;
-
- var readableDestroyed = this._readableState && this._readableState.destroyed;
- var writableDestroyed = this._writableState && this._writableState.destroyed;
-
- if (readableDestroyed || writableDestroyed) {
- if (cb) {
- cb(err);
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
- pna.nextTick(emitErrorNT, this, err);
- }
- return this;
- }
-
- // we set destroyed to true before firing error callbacks in order
- // to make it re-entrance safe in case destroy() is called within callbacks
-
- if (this._readableState) {
- this._readableState.destroyed = true;
- }
-
- // if this is a duplex stream mark the writable part as destroyed as well
- if (this._writableState) {
- this._writableState.destroyed = true;
- }
-
- this._destroy(err || null, function (err) {
- if (!cb && err) {
- pna.nextTick(emitErrorNT, _this, err);
- if (_this._writableState) {
- _this._writableState.errorEmitted = true;
- }
- } else if (cb) {
- cb(err);
- }
- });
-
- return this;
-}
-
-function undestroy() {
- if (this._readableState) {
- this._readableState.destroyed = false;
- this._readableState.reading = false;
- this._readableState.ended = false;
- this._readableState.endEmitted = false;
- }
-
- if (this._writableState) {
- this._writableState.destroyed = false;
- this._writableState.ended = false;
- this._writableState.ending = false;
- this._writableState.finished = false;
- this._writableState.errorEmitted = false;
- }
-}
-
-function emitErrorNT(self, err) {
- self.emit('error', err);
-}
-
-module.exports = {
- destroy: destroy,
- undestroy: undestroy
-}; \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js
deleted file mode 100644
index 9332a3fda..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream-browser.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('events').EventEmitter;
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js
deleted file mode 100644
index ce2ad5b6e..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/lib/internal/streams/stream.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('stream');
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/package.json b/node_modules/stream-iterate/node_modules/readable-stream/package.json
deleted file mode 100644
index 2d5b4eae1..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_from": "readable-stream@^2.1.5",
- "_id": "readable-stream@2.3.6",
- "_inBundle": false,
- "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "_location": "/stream-iterate/readable-stream",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "readable-stream@^2.1.5",
- "name": "readable-stream",
- "escapedName": "readable-stream",
- "rawSpec": "^2.1.5",
- "saveSpec": null,
- "fetchSpec": "^2.1.5"
- },
- "_requiredBy": [
- "/stream-iterate"
- ],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf",
- "_spec": "readable-stream@^2.1.5",
- "_where": "/Users/aeschright/code/cli/node_modules/stream-iterate",
- "browser": {
- "util": false,
- "./readable.js": "./readable-browser.js",
- "./writable.js": "./writable-browser.js",
- "./duplex.js": "./duplex-browser.js",
- "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
- },
- "bugs": {
- "url": "https://github.com/nodejs/readable-stream/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- },
- "deprecated": false,
- "description": "Streams3, a user-land copy of the stream library from Node.js",
- "devDependencies": {
- "assert": "^1.4.0",
- "babel-polyfill": "^6.9.1",
- "buffer": "^4.9.0",
- "lolex": "^2.3.2",
- "nyc": "^6.4.0",
- "tap": "^0.7.0",
- "tape": "^4.8.0"
- },
- "homepage": "https://github.com/nodejs/readable-stream#readme",
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "license": "MIT",
- "main": "readable.js",
- "name": "readable-stream",
- "nyc": {
- "include": [
- "lib/**.js"
- ]
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/readable-stream.git"
- },
- "scripts": {
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
- "cover": "nyc npm test",
- "report": "nyc report --reporter=lcov",
- "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js"
- },
- "version": "2.3.6"
-}
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js b/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index ffd791d7f..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./readable').PassThrough
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js b/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js
deleted file mode 100644
index e50372592..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/readable-browser.js
+++ /dev/null
@@ -1,7 +0,0 @@
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = exports;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/readable.js b/node_modules/stream-iterate/node_modules/readable-stream/readable.js
deleted file mode 100644
index ec89ec533..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var Stream = require('stream');
-if (process.env.READABLE_STREAM === 'disable' && Stream) {
- module.exports = Stream;
- exports = module.exports = Stream.Readable;
- exports.Readable = Stream.Readable;
- exports.Writable = Stream.Writable;
- exports.Duplex = Stream.Duplex;
- exports.Transform = Stream.Transform;
- exports.PassThrough = Stream.PassThrough;
- exports.Stream = Stream;
-} else {
- exports = module.exports = require('./lib/_stream_readable.js');
- exports.Stream = Stream || exports;
- exports.Readable = exports;
- exports.Writable = require('./lib/_stream_writable.js');
- exports.Duplex = require('./lib/_stream_duplex.js');
- exports.Transform = require('./lib/_stream_transform.js');
- exports.PassThrough = require('./lib/_stream_passthrough.js');
-}
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/transform.js b/node_modules/stream-iterate/node_modules/readable-stream/transform.js
deleted file mode 100644
index b1baba26d..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./readable').Transform
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js b/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js
deleted file mode 100644
index ebdde6a85..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/writable-browser.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/_stream_writable.js');
diff --git a/node_modules/stream-iterate/node_modules/readable-stream/writable.js b/node_modules/stream-iterate/node_modules/readable-stream/writable.js
deleted file mode 100644
index 3211a6f80..000000000
--- a/node_modules/stream-iterate/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Stream = require("stream")
-var Writable = require("./lib/_stream_writable.js")
-
-if (process.env.READABLE_STREAM === 'disable') {
- module.exports = Stream && Stream.Writable || Writable
-} else {
- module.exports = Writable
-}
diff --git a/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml b/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml
deleted file mode 100644
index 3347a7254..000000000
--- a/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-sudo: false
-language: node_js
-before_install:
- - npm install -g npm@2
- - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
-notifications:
- email: false
-matrix:
- fast_finish: true
- include:
- - node_js: '0.8'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.10'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.11'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: '0.12'
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 1
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 2
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 3
- env:
- - TASK=test
- - NPM_LEGACY=true
- - node_js: 4
- env: TASK=test
- - node_js: 5
- env: TASK=test
- - node_js: 6
- env: TASK=test
- - node_js: 7
- env: TASK=test
- - node_js: 8
- env: TASK=test
- - node_js: 9
- env: TASK=test
diff --git a/node_modules/stream-iterate/node_modules/string_decoder/LICENSE b/node_modules/stream-iterate/node_modules/string_decoder/LICENSE
deleted file mode 100644
index 778edb207..000000000
--- a/node_modules/stream-iterate/node_modules/string_decoder/LICENSE
+++ /dev/null
@@ -1,48 +0,0 @@
-Node.js is licensed for use as follows:
-
-"""
-Copyright Node.js contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-"""
-
-This license applies to parts of Node.js originating from the
-https://github.com/joyent/node repository:
-
-"""
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
-"""
-
diff --git a/node_modules/stream-iterate/node_modules/string_decoder/README.md b/node_modules/stream-iterate/node_modules/string_decoder/README.md
deleted file mode 100644
index 5fd58315e..000000000
--- a/node_modules/stream-iterate/node_modules/string_decoder/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# string_decoder
-
-***Node-core v8.9.4 string_decoder for userland***
-
-
-[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
-[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
-
-
-```bash
-npm install --save string_decoder
-```
-
-***Node-core string_decoder for userland***
-
-This package is a mirror of the string_decoder implementation in Node-core.
-
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
-
-As of version 1.0.0 **string_decoder** uses semantic versioning.
-
-## Previous versions
-
-Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
-
-## Update
-
-The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
-
-## Streams Working Group
-
-`string_decoder` is maintained by the Streams Working Group, which
-oversees the development and maintenance of the Streams API within
-Node.js. The responsibilities of the Streams Working Group include:
-
-* Addressing stream issues on the Node.js issue tracker.
-* Authoring and editing stream documentation within the Node.js project.
-* Reviewing changes to stream subclasses within the Node.js project.
-* Redirecting changes to streams from the Node.js project to this
- project.
-* Assisting in the implementation of stream providers within Node.js.
-* Recommending versions of `readable-stream` to be included in Node.js.
-* Messaging about the future of streams to give the community advance
- notice of changes.
-
-See [readable-stream](https://github.com/nodejs/readable-stream) for
-more details.
diff --git a/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js b/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js
deleted file mode 100644
index 2e89e63f7..000000000
--- a/node_modules/stream-iterate/node_modules/string_decoder/lib/string_decoder.js
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-'use strict';
-
-/*<replacement>*/
-
-var Buffer = require('safe-buffer').Buffer;
-/*</replacement>*/
-
-var isEncoding = Buffer.isEncoding || function (encoding) {
- encoding = '' + encoding;
- switch (encoding && encoding.toLowerCase()) {
- case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
- return true;
- default:
- return false;
- }
-};
-
-function _normalizeEncoding(enc) {
- if (!enc) return 'utf8';
- var retried;
- while (true) {
- switch (enc) {
- case 'utf8':
- case 'utf-8':
- return 'utf8';
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return 'utf16le';
- case 'latin1':
- case 'binary':
- return 'latin1';
- case 'base64':
- case 'ascii':
- case 'hex':
- return enc;
- default:
- if (retried) return; // undefined
- enc = ('' + enc).toLowerCase();
- retried = true;
- }
- }
-};
-
-// Do not cache `Buffer.isEncoding` when checking encoding names as some
-// modules monkey-patch it to support additional encodings
-function normalizeEncoding(enc) {
- var nenc = _normalizeEncoding(enc);
- if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
- return nenc || enc;
-}
-
-// StringDecoder provides an interface for efficiently splitting a series of
-// buffers into a series of JS strings without breaking apart multi-byte
-// characters.
-exports.StringDecoder = StringDecoder;
-function StringDecoder(encoding) {
- this.encoding = normalizeEncoding(encoding);
- var nb;
- switch (this.encoding) {
- case 'utf16le':
- this.text = utf16Text;
- this.end = utf16End;
- nb = 4;
- break;
- case 'utf8':
- this.fillLast = utf8FillLast;
- nb = 4;
- break;
- case 'base64':
- this.text = base64Text;
- this.end = base64End;
- nb = 3;
- break;
- default:
- this.write = simpleWrite;
- this.end = simpleEnd;
- return;
- }
- this.lastNeed = 0;
- this.lastTotal = 0;
- this.lastChar = Buffer.allocUnsafe(nb);
-}
-
-StringDecoder.prototype.write = function (buf) {
- if (buf.length === 0) return '';
- var r;
- var i;
- if (this.lastNeed) {
- r = this.fillLast(buf);
- if (r === undefined) return '';
- i = this.lastNeed;
- this.lastNeed = 0;
- } else {
- i = 0;
- }
- if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
- return r || '';
-};
-
-StringDecoder.prototype.end = utf8End;
-
-// Returns only complete characters in a Buffer
-StringDecoder.prototype.text = utf8Text;
-
-// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
-StringDecoder.prototype.fillLast = function (buf) {
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
- this.lastNeed -= buf.length;
-};
-
-// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
-// continuation byte. If an invalid byte is detected, -2 is returned.
-function utf8CheckByte(byte) {
- if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
- return byte >> 6 === 0x02 ? -1 : -2;
-}
-
-// Checks at most 3 bytes at the end of a Buffer in order to detect an
-// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
-// needed to complete the UTF-8 character (if applicable) are returned.
-function utf8CheckIncomplete(self, buf, i) {
- var j = buf.length - 1;
- if (j < i) return 0;
- var nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 1;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) self.lastNeed = nb - 2;
- return nb;
- }
- if (--j < i || nb === -2) return 0;
- nb = utf8CheckByte(buf[j]);
- if (nb >= 0) {
- if (nb > 0) {
- if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
- }
- return nb;
- }
- return 0;
-}
-
-// Validates as many continuation bytes for a multi-byte UTF-8 character as
-// needed or are available. If we see a non-continuation byte where we expect
-// one, we "replace" the validated continuation bytes we've seen so far with
-// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
-// behavior. The continuation byte check is included three times in the case
-// where all of the continuation bytes for a character exist in the same buffer.
-// It is also done this way as a slight performance increase instead of using a
-// loop.
-function utf8CheckExtraBytes(self, buf, p) {
- if ((buf[0] & 0xC0) !== 0x80) {
- self.lastNeed = 0;
- return '\ufffd';
- }
- if (self.lastNeed > 1 && buf.length > 1) {
- if ((buf[1] & 0xC0) !== 0x80) {
- self.lastNeed = 1;
- return '\ufffd';
- }
- if (self.lastNeed > 2 && buf.length > 2) {
- if ((buf[2] & 0xC0) !== 0x80) {
- self.lastNeed = 2;
- return '\ufffd';
- }
- }
- }
-}
-
-// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
-function utf8FillLast(buf) {
- var p = this.lastTotal - this.lastNeed;
- var r = utf8CheckExtraBytes(this, buf, p);
- if (r !== undefined) return r;
- if (this.lastNeed <= buf.length) {
- buf.copy(this.lastChar, p, 0, this.lastNeed);
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
- }
- buf.copy(this.lastChar, p, 0, buf.length);
- this.lastNeed -= buf.length;
-}
-
-// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
-// partial character, the character's bytes are buffered until the required
-// number of bytes are available.
-function utf8Text(buf, i) {
- var total = utf8CheckIncomplete(this, buf, i);
- if (!this.lastNeed) return buf.toString('utf8', i);
- this.lastTotal = total;
- var end = buf.length - (total - this.lastNeed);
- buf.copy(this.lastChar, 0, end);
- return buf.toString('utf8', i, end);
-}
-
-// For UTF-8, a replacement character is added when ending on a partial
-// character.
-function utf8End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + '\ufffd';
- return r;
-}
-
-// UTF-16LE typically needs two bytes per character, but even if we have an even
-// number of bytes available, we need to check if we end on a leading/high
-// surrogate. In that case, we need to wait for the next two bytes in order to
-// decode the last character properly.
-function utf16Text(buf, i) {
- if ((buf.length - i) % 2 === 0) {
- var r = buf.toString('utf16le', i);
- if (r) {
- var c = r.charCodeAt(r.length - 1);
- if (c >= 0xD800 && c <= 0xDBFF) {
- this.lastNeed = 2;
- this.lastTotal = 4;
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- return r.slice(0, -1);
- }
- }
- return r;
- }
- this.lastNeed = 1;
- this.lastTotal = 2;
- this.lastChar[0] = buf[buf.length - 1];
- return buf.toString('utf16le', i, buf.length - 1);
-}
-
-// For UTF-16LE we do not explicitly append special replacement characters if we
-// end on a partial character, we simply let v8 handle that.
-function utf16End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) {
- var end = this.lastTotal - this.lastNeed;
- return r + this.lastChar.toString('utf16le', 0, end);
- }
- return r;
-}
-
-function base64Text(buf, i) {
- var n = (buf.length - i) % 3;
- if (n === 0) return buf.toString('base64', i);
- this.lastNeed = 3 - n;
- this.lastTotal = 3;
- if (n === 1) {
- this.lastChar[0] = buf[buf.length - 1];
- } else {
- this.lastChar[0] = buf[buf.length - 2];
- this.lastChar[1] = buf[buf.length - 1];
- }
- return buf.toString('base64', i, buf.length - n);
-}
-
-function base64End(buf) {
- var r = buf && buf.length ? this.write(buf) : '';
- if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
- return r;
-}
-
-// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
-function simpleWrite(buf) {
- return buf.toString(this.encoding);
-}
-
-function simpleEnd(buf) {
- return buf && buf.length ? this.write(buf) : '';
-} \ No newline at end of file
diff --git a/node_modules/stream-iterate/node_modules/string_decoder/package.json b/node_modules/stream-iterate/node_modules/string_decoder/package.json
deleted file mode 100644
index e8bac8778..000000000
--- a/node_modules/stream-iterate/node_modules/string_decoder/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "string_decoder@~1.1.1",
- "_id": "string_decoder@1.1.1",
- "_inBundle": false,
- "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "_location": "/stream-iterate/string_decoder",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "string_decoder@~1.1.1",
- "name": "string_decoder",
- "escapedName": "string_decoder",
- "rawSpec": "~1.1.1",
- "saveSpec": null,
- "fetchSpec": "~1.1.1"
- },
- "_requiredBy": [
- "/stream-iterate/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
- "_spec": "string_decoder@~1.1.1",
- "_where": "/Users/aeschright/code/cli/node_modules/stream-iterate/node_modules/readable-stream",
- "bugs": {
- "url": "https://github.com/nodejs/string_decoder/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "safe-buffer": "~5.1.0"
- },
- "deprecated": false,
- "description": "The string_decoder module from Node core",
- "devDependencies": {
- "babel-polyfill": "^6.23.0",
- "core-util-is": "^1.0.2",
- "inherits": "^2.0.3",
- "tap": "~0.4.8"
- },
- "homepage": "https://github.com/nodejs/string_decoder",
- "keywords": [
- "string",
- "decoder",
- "browser",
- "browserify"
- ],
- "license": "MIT",
- "main": "lib/string_decoder.js",
- "name": "string_decoder",
- "repository": {
- "type": "git",
- "url": "git://github.com/nodejs/string_decoder.git"
- },
- "scripts": {
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js",
- "test": "tap test/parallel/*.js && node test/verify-dependencies"
- },
- "version": "1.1.1"
-}
diff --git a/node_modules/stream-iterate/package.json b/node_modules/stream-iterate/package.json
deleted file mode 100644
index 200f13fc2..000000000
--- a/node_modules/stream-iterate/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "stream-iterate@^1.1.0",
- "_id": "stream-iterate@1.2.0",
- "_inBundle": false,
- "_integrity": "sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE=",
- "_location": "/stream-iterate",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "stream-iterate@^1.1.0",
- "name": "stream-iterate",
- "escapedName": "stream-iterate",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "/sorted-union-stream"
- ],
- "_resolved": "https://registry.npmjs.org/stream-iterate/-/stream-iterate-1.2.0.tgz",
- "_shasum": "2bd7c77296c1702a46488b8ad41f79865eecd4e1",
- "_spec": "stream-iterate@^1.1.0",
- "_where": "/Users/rebecca/code/npm/node_modules/sorted-union-stream",
- "author": {
- "name": "Mathias Buus",
- "url": "@mafintosh"
- },
- "bugs": {
- "url": "https://github.com/mafintosh/stream-iterate/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "readable-stream": "^2.1.5",
- "stream-shift": "^1.0.0"
- },
- "deprecated": false,
- "description": "Iterate through the values of a stream",
- "devDependencies": {
- "from2": "^1.3.0",
- "standard": "^3.3.2",
- "tape": "^4.0.0"
- },
- "homepage": "https://github.com/mafintosh/stream-iterate",
- "license": "MIT",
- "main": "index.js",
- "name": "stream-iterate",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/stream-iterate.git"
- },
- "scripts": {
- "test": "standard && tape test.js"
- },
- "version": "1.2.0"
-}
diff --git a/node_modules/stream-iterate/test.js b/node_modules/stream-iterate/test.js
deleted file mode 100644
index 5beb23a5d..000000000
--- a/node_modules/stream-iterate/test.js
+++ /dev/null
@@ -1,60 +0,0 @@
-var tape = require('tape')
-var from = require('from2')
-var iterate = require('./')
-
-tape('merge sort', function (t) {
- var a = from.obj(['a', 'b', 'd', 'e', 'g', 'h'])
- var b = from.obj(['b', 'c', 'f'])
- var output = []
-
- var readA = iterate(a)
- var readB = iterate(b)
-
- var loop = function () {
- readA(function (err, dataA, nextA) {
- if (err) throw err
- readB(function (err, dataB, nextB) {
- if (err) throw err
-
- if (!dataA && !dataB) {
- t.same(output, ['a', 'b', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], 'sorts list')
- t.end()
- return
- }
-
- if (!dataB || dataA < dataB) {
- output.push(dataA)
- nextA()
- return loop()
- }
-
- if (!dataA || dataA > dataB) {
- output.push(dataB)
- nextB()
- return loop()
- }
-
- output.push(dataA)
- output.push(dataB)
- nextA()
- nextB()
- loop()
- })
- })
- }
-
- loop()
-})
-
-tape('error handling', function (t) {
- var a = from.obj(['a', 'b', 'd', 'e', 'g', 'h'])
- var read = iterate(a)
-
- a.destroy(new Error('oh no'))
-
- read(function (err) {
- t.ok(err, 'had error')
- t.same(err.message, 'oh no')
- t.end()
- })
-})
diff --git a/node_modules/stream-shift/.npmignore b/node_modules/stream-shift/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/stream-shift/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/stream-shift/.travis.yml b/node_modules/stream-shift/.travis.yml
deleted file mode 100644
index ecd4193f6..000000000
--- a/node_modules/stream-shift/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.12"
- - "4"
- - "6"
diff --git a/node_modules/stream-shift/LICENSE b/node_modules/stream-shift/LICENSE
deleted file mode 100644
index bae9da7bf..000000000
--- a/node_modules/stream-shift/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/stream-shift/README.md b/node_modules/stream-shift/README.md
deleted file mode 100644
index d9cc2d945..000000000
--- a/node_modules/stream-shift/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# stream-shift
-
-Returns the next buffer/object in a stream's readable queue
-
-```
-npm install stream-shift
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
-
-## Usage
-
-``` js
-var shift = require('stream-shift')
-
-console.log(shift(someStream)) // first item in its buffer
-```
-
-## Credit
-
-Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
-
-## License
-
-MIT
diff --git a/node_modules/stream-shift/index.js b/node_modules/stream-shift/index.js
deleted file mode 100644
index c4b18b9c2..000000000
--- a/node_modules/stream-shift/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-module.exports = shift
-
-function shift (stream) {
- var rs = stream._readableState
- if (!rs) return null
- return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
-}
-
-function getStateLength (state) {
- if (state.buffer.length) {
- // Since node 6.3.0 state.buffer is a BufferList not an array
- if (state.buffer.head) {
- return state.buffer.head.data.length
- }
-
- return state.buffer[0].length
- }
-
- return state.length
-}
diff --git a/node_modules/stream-shift/package.json b/node_modules/stream-shift/package.json
deleted file mode 100644
index fc472a515..000000000
--- a/node_modules/stream-shift/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "_from": "stream-shift@^1.0.0",
- "_id": "stream-shift@1.0.0",
- "_inBundle": false,
- "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
- "_location": "/stream-shift",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "stream-shift@^1.0.0",
- "name": "stream-shift",
- "escapedName": "stream-shift",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/duplexify",
- "/stream-each",
- "/stream-iterate"
- ],
- "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
- "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
- "_spec": "stream-shift@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/duplexify",
- "author": {
- "name": "Mathias Buus",
- "url": "@mafintosh"
- },
- "bugs": {
- "url": "https://github.com/mafintosh/stream-shift/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Returns the next buffer/object in a stream's readable queue",
- "devDependencies": {
- "standard": "^7.1.2",
- "tape": "^4.6.0",
- "through2": "^2.0.1"
- },
- "homepage": "https://github.com/mafintosh/stream-shift",
- "license": "MIT",
- "main": "index.js",
- "name": "stream-shift",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/stream-shift.git"
- },
- "scripts": {
- "test": "standard && tape test.js"
- },
- "version": "1.0.0"
-}
diff --git a/node_modules/stream-shift/test.js b/node_modules/stream-shift/test.js
deleted file mode 100644
index c0222c37d..000000000
--- a/node_modules/stream-shift/test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var tape = require('tape')
-var through = require('through2')
-var stream = require('stream')
-var shift = require('./')
-
-tape('shifts next', function (t) {
- var passthrough = through()
-
- passthrough.write('hello')
- passthrough.write('world')
-
- t.same(shift(passthrough), Buffer('hello'))
- t.same(shift(passthrough), Buffer('world'))
- t.end()
-})
-
-tape('shifts next with core', function (t) {
- var passthrough = stream.PassThrough()
-
- passthrough.write('hello')
- passthrough.write('world')
-
- t.same(shift(passthrough), Buffer('hello'))
- t.same(shift(passthrough), Buffer('world'))
- t.end()
-})
-
-tape('shifts next with object mode', function (t) {
- var passthrough = through({objectMode: true})
-
- passthrough.write({hello: 1})
- passthrough.write({world: 1})
-
- t.same(shift(passthrough), {hello: 1})
- t.same(shift(passthrough), {world: 1})
- t.end()
-})
-
-tape('shifts next with object mode with core', function (t) {
- var passthrough = stream.PassThrough({objectMode: true})
-
- passthrough.write({hello: 1})
- passthrough.write({world: 1})
-
- t.same(shift(passthrough), {hello: 1})
- t.same(shift(passthrough), {world: 1})
- t.end()
-})
diff --git a/node_modules/tar/CHANGELOG.md b/node_modules/tar/CHANGELOG.md
index 14b5c4ee8..7058fe253 100644
--- a/node_modules/tar/CHANGELOG.md
+++ b/node_modules/tar/CHANGELOG.md
@@ -11,6 +11,8 @@
- Address unpack race conditions using path reservations
- Change large-numbers errors from TypeError to Error
- Add `TAR_*` error codes
+- Raise `TAR_BAD_ARCHIVE` warning/error when there are no valid entries
+ found in an archive
- do not treat ignored entries as an invalid archive
- drop support for node v4
- unpack: conditionally use a file mapping to write files on Windows
diff --git a/node_modules/tar/node_modules/.bin/mkdirp b/node_modules/tar/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896ceb..000000000
--- a/node_modules/tar/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js \ No newline at end of file
diff --git a/node_modules/tar/node_modules/mkdirp/CHANGELOG.md b/node_modules/tar/node_modules/mkdirp/CHANGELOG.md
deleted file mode 100644
index 81458380b..000000000
--- a/node_modules/tar/node_modules/mkdirp/CHANGELOG.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Changers Lorgs!
-
-## 1.0
-
-Full rewrite. Essentially a brand new module.
-
-- Return a promise instead of taking a callback.
-- Use native `fs.mkdir(path, { recursive: true })` when available.
-- Drop support for outdated Node.js versions. (Technically still works on
- Node.js v8, but only 10 and above are officially supported.)
-
-## 0.x
-
-Original and most widely used recursive directory creation implementation
-in JavaScript, dating back to 2010.
diff --git a/node_modules/tar/node_modules/mkdirp/LICENSE b/node_modules/tar/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15f0..000000000
--- a/node_modules/tar/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/tar/node_modules/mkdirp/bin/cmd.js b/node_modules/tar/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8dc4..000000000
--- a/node_modules/tar/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
- if (dashdash)
- dirs.push(arg)
- else if (arg === '--')
- dashdash = true
- else if (arg === '--manual')
- manual = true
- else if (/^-h/.test(arg) || /^--help/.test(arg)) {
- console.log(usage())
- process.exit(0)
- } else if (arg === '-v' || arg === '--version') {
- console.log(require('../package.json').version)
- process.exit(0)
- } else if (arg === '-p' || arg === '--print') {
- print = true
- } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
- const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
- if (isNaN(mode)) {
- console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
- process.exit(1)
- }
- opts.mode = mode
- } else
- dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
- console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
- .then(made => print ? made.forEach(m => m && console.log(m)) : null)
- .catch(er => {
- console.error(er.message)
- if (er.code)
- console.error(' code: ' + er.code)
- process.exit(1)
- })
diff --git a/node_modules/tar/node_modules/mkdirp/index.js b/node_modules/tar/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c9f..000000000
--- a/node_modules/tar/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNative(opts)
- ? mkdirpNative(path, opts)
- : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
- path = pathArg(path)
- opts = optsArg(opts)
- return useNativeSync(opts)
- ? mkdirpNativeSync(path, opts)
- : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/tar/node_modules/mkdirp/lib/find-made.js b/node_modules/tar/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492c0..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
- // we never want the 'made' return value to be a root directory
- if (path === parent)
- return Promise.resolve()
-
- return opts.statAsync(parent).then(
- st => st.isDirectory() ? path : undefined, // will fail later
- er => er.code === 'ENOENT'
- ? findMade(opts, dirname(parent), parent)
- : undefined
- )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
- if (path === parent)
- return undefined
-
- try {
- return opts.statSync(parent).isDirectory() ? path : undefined
- } catch (er) {
- return er.code === 'ENOENT'
- ? findMadeSync(opts, dirname(parent), parent)
- : undefined
- }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/tar/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/tar/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd64..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
- opts.recursive = false
- const parent = dirname(path)
- if (parent === path) {
- return opts.mkdirAsync(path, opts).catch(er => {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- })
- }
-
- return opts.mkdirAsync(path, opts).then(() => made || path, er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(parent, opts)
- .then(made => mkdirpManual(path, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- return opts.statAsync(path).then(st => {
- if (st.isDirectory())
- return made
- else
- throw er
- }, () => { throw er })
- })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
- const parent = dirname(path)
- opts.recursive = false
-
- if (parent === path) {
- try {
- return opts.mkdirSync(path, opts)
- } catch (er) {
- // swallowed by recursive implementation on posix systems
- // any other error is a failure
- if (er.code !== 'EISDIR')
- throw er
- else
- return
- }
- }
-
- try {
- opts.mkdirSync(path, opts)
- return made || path
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
- if (er.code !== 'EEXIST' && er.code !== 'EROFS')
- throw er
- try {
- if (!opts.statSync(path).isDirectory())
- throw er
- } catch (_) {
- throw er
- }
- }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/tar/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/tar/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b6980..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirAsync(path, opts)
-
- return findMade(opts, path).then(made =>
- opts.mkdirAsync(path, opts).then(() => made)
- .catch(er => {
- if (er.code === 'ENOENT')
- return mkdirpManual(path, opts)
- else
- throw er
- }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
- opts.recursive = true
- const parent = dirname(path)
- if (parent === path)
- return opts.mkdirSync(path, opts)
-
- const made = findMadeSync(opts, path)
- try {
- opts.mkdirSync(path, opts)
- return made
- } catch (er) {
- if (er.code === 'ENOENT')
- return mkdirpManualSync(path, opts)
- else
- throw er
- }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/tar/node_modules/mkdirp/lib/opts-arg.js b/node_modules/tar/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 488bd44c3..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
- if (!opts)
- opts = { mode: 0o777 & (~process.umask()), fs }
- else if (typeof opts === 'object')
- opts = { mode: 0o777 & (~process.umask()), fs, ...opts }
- else if (typeof opts === 'number')
- opts = { mode: opts, fs }
- else if (typeof opts === 'string')
- opts = { mode: parseInt(opts, 8), fs }
- else
- throw new TypeError('invalid options argument')
-
- opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
- opts.mkdirAsync = promisify(opts.mkdir)
- opts.stat = opts.stat || opts.fs.stat || fs.stat
- opts.statAsync = promisify(opts.stat)
- opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
- opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
- return opts
-}
-module.exports = optsArg
diff --git a/node_modules/tar/node_modules/mkdirp/lib/path-arg.js b/node_modules/tar/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5a6..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
- if (/\0/.test(path)) {
- // simulate same failure that node raises
- throw Object.assign(
- new TypeError('path must be a string without null bytes'),
- {
- path,
- code: 'ERR_INVALID_ARG_VALUE',
- }
- )
- }
-
- path = resolve(path)
- if (platform === 'win32') {
- const badWinChars = /[*|"<>?:]/
- const {root} = parse(path)
- if (badWinChars.test(path.substr(root.length))) {
- throw Object.assign(new Error('Illegal characters in path.'), {
- path,
- code: 'EINVAL',
- })
- }
- }
-
- return path
-}
-module.exports = pathArg
diff --git a/node_modules/tar/node_modules/mkdirp/lib/use-native.js b/node_modules/tar/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361de1..000000000
--- a/node_modules/tar/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/tar/node_modules/mkdirp/package.json b/node_modules/tar/node_modules/mkdirp/package.json
deleted file mode 100644
index f6c5a817f..000000000
--- a/node_modules/tar/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "_from": "mkdirp@^1.0.3",
- "_id": "mkdirp@1.0.3",
- "_inBundle": false,
- "_integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g==",
- "_location": "/tar/mkdirp",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "mkdirp@^1.0.3",
- "name": "mkdirp",
- "escapedName": "mkdirp",
- "rawSpec": "^1.0.3",
- "saveSpec": null,
- "fetchSpec": "^1.0.3"
- },
- "_requiredBy": [
- "/tar"
- ],
- "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz",
- "_shasum": "4cf2e30ad45959dddea53ad97d518b6c8205e1ea",
- "_spec": "mkdirp@^1.0.3",
- "_where": "/Users/claudiahdz/npm/cli/node_modules/tar",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-mkdirp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Recursively mkdir, like `mkdir -p`",
- "devDependencies": {
- "require-inject": "^1.4.4",
- "tap": "^14.10.6"
- },
- "engines": {
- "node": ">=10"
- },
- "files": [
- "bin",
- "lib",
- "index.js"
- ],
- "homepage": "https://github.com/isaacs/node-mkdirp#readme",
- "keywords": [
- "mkdir",
- "directory",
- "make dir",
- "make",
- "dir",
- "recursive",
- "native"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "mkdirp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/isaacs/node-mkdirp.git"
- },
- "scripts": {
- "postpublish": "git push origin --follow-tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "snap": "tap",
- "test": "tap"
- },
- "tap": {
- "check-coverage": true,
- "coverage-map": "map.js"
- },
- "version": "1.0.3"
-}
diff --git a/node_modules/tar/node_modules/mkdirp/readme.markdown b/node_modules/tar/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de5905..000000000
--- a/node_modules/tar/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-<small>\* may contain some bugs</small>
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
- console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise<String | undefined>
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists. Promise rejects if any errors
-are encountered. Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one). This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one). This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
- implementation and return the result/error. (In this case, it'll either
- succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
- will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
- - If path is a root directory, raise to the caller and do not handle it
- - If ENOENT, mkdirp parent dir, store result as `made`
- - stat(path)
- - If error, raise original `mkdir` error
- - If directory, return `made`
- - Else, raise original `mkdir` error
-- else
- - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail. If the root directory exists, then it
-will fail with `EPERM`. If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists. (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from! Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
- the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
- provides (at least as of Node.js v13.4), and are ok with re-trying on
- `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
- `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
- when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
- are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
- lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
- of a `Promise` language primitive. (Please don't. You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
- Create each supplied directory including any necessary parent directories
- that don't yet exist.
-
- If the directory already exists, do nothing.
-
-OPTIONS are:
-
- -m<mode> If a directory needs to be created, set the mode as an octal
- --mode=<mode> permission string.
-
- -v --version Print the mkdirp version number
-
- -h --help Print this helpful banner
-
- -p --print Print the first directories created for each path provided
-
- --manual Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json
index 61b7734e7..31c5f57d5 100644
--- a/node_modules/tar/package.json
+++ b/node_modules/tar/package.json
@@ -1,8 +1,8 @@
{
"_from": "tar@latest",
- "_id": "tar@6.0.1",
+ "_id": "tar@6.0.2",
"_inBundle": false,
- "_integrity": "sha512-bKhKrrz2FJJj5s7wynxy/fyxpE0CmCjmOQ1KV4KkgXFWOgoIT/NbTMnB1n+LFNrNk0SSBVGGxcK5AGsyC+pW5Q==",
+ "_integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==",
"_location": "/tar",
"_phantomChildren": {},
"_requested": {
@@ -21,8 +21,8 @@
"/cacache",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-6.0.1.tgz",
- "_shasum": "7b3bd6c313cb6e0153770108f8d70ac298607efa",
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz",
+ "_shasum": "5df17813468a6264ff14f766886c622b84ae2f39",
"_spec": "tar@latest",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
@@ -35,7 +35,7 @@
},
"bundleDependencies": false,
"dependencies": {
- "chownr": "^1.1.3",
+ "chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^3.0.0",
"minizlib": "^2.1.0",
@@ -80,5 +80,5 @@
"coverage-map": "map.js",
"check-coverage": true
},
- "version": "6.0.1"
+ "version": "6.0.2"
}
diff --git a/package-lock.json b/package-lock.json
index 7ee174d91..531d75ac0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -256,12 +256,12 @@
"integrity": "sha512-JtktVH7ASBVIWsQTFlFpeOzhBJskvoBCTfeeRhhZy7ybATcUvwiwotZ8j5rkqUUyB69lIy/AvboiiiGBjYBKBA=="
},
"@npmcli/git": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.2.tgz",
- "integrity": "sha512-uv9+EuP5YWluNPgkEOL+iyB/+MVt4U5PMBCfl+I8korKluFdiSp7RxjXYzpWM/wU4wXaROAUFiOiCMmBftonjw==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.3.tgz",
+ "integrity": "sha512-c/ODsV5ppjB12VDXKc6hzVNgg6ZJX/etILUn3WgF5NLAYBhQLJ3fBq6uB2jQD4OwqOzJdPT1/xA3Xh3aaWGk5w==",
"requires": {
"@npmcli/promise-spawn": "^1.1.0",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"mkdirp": "^1.0.3",
"npm-pick-manifest": "^6.0.0",
"promise-inflight": "^1.0.1",
@@ -269,13 +269,6 @@
"semver": "^7.3.2",
"unique-filename": "^1.1.1",
"which": "^2.0.2"
- },
- "dependencies": {
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
- }
}
},
"@npmcli/installed-package-contents": {
@@ -321,13 +314,6 @@
"integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==",
"requires": {
"mkdirp": "^1.0.4"
- },
- "dependencies": {
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
- }
}
},
"@npmcli/name-from-folder": {
@@ -352,83 +338,6 @@
"infer-owner": "^1.0.4",
"node-gyp": "^6.1.0",
"read-package-json-fast": "^1.1.3"
- },
- "dependencies": {
- "fs-minipass": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
- "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
- "requires": {
- "minipass": "^2.6.0"
- }
- },
- "minipass": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
- "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
- "requires": {
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.0"
- }
- },
- "minizlib": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
- "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
- "requires": {
- "minipass": "^2.9.0"
- }
- },
- "node-gyp": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz",
- "integrity": "sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw==",
- "requires": {
- "env-paths": "^2.2.0",
- "glob": "^7.1.4",
- "graceful-fs": "^4.2.2",
- "mkdirp": "^0.5.1",
- "nopt": "^4.0.1",
- "npmlog": "^4.1.2",
- "request": "^2.88.0",
- "rimraf": "^2.6.3",
- "semver": "^5.7.1",
- "tar": "^4.4.12",
- "which": "^1.3.1"
- }
- },
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
- },
- "tar": {
- "version": "4.4.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
- "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
- "requires": {
- "chownr": "^1.1.1",
- "fs-minipass": "^1.2.5",
- "minipass": "^2.8.6",
- "minizlib": "^1.2.1",
- "mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.3"
- }
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
}
},
"@tootallnate/once": {
@@ -522,9 +431,9 @@
}
},
"agent-base": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
- "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz",
+ "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==",
"requires": {
"debug": "4"
},
@@ -540,9 +449,9 @@
}
},
"agentkeepalive": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.2.tgz",
- "integrity": "sha512-waNHE7tQBBn+2qXucI8HY0o2Y0OBPWldWOWsZwY71JcCm4SvrPnWdceFfB5NIXSqE8Ewq6VR/Qt5b1i69P6KCQ==",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.3.tgz",
+ "integrity": "sha512-wn8fw19xKZwdGPO47jivonaHRTd+nGOMP1z11sgGeQzDy2xd5FG0R67dIMcKHDE2cJ5y+YXV30XVGUBPRSY7Hg==",
"requires": {
"debug": "^4.1.0",
"depd": "^1.1.2",
@@ -818,16 +727,26 @@
}
},
"bin-links": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz",
- "integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-2.1.2.tgz",
+ "integrity": "sha512-mtspzc/umzMiZkIRIVm93WgyT7fFVXX302qswWwlHErBVM8BgAVvB0EVOdzmtrNzs1zIKEE0dE4RR5PwtBfy7g==",
"requires": {
- "bluebird": "^3.5.3",
- "cmd-shim": "^3.0.0",
- "gentle-fs": "^2.3.0",
- "graceful-fs": "^4.1.15",
+ "cmd-shim": "^4.0.1",
+ "mkdirp": "^1.0.3",
"npm-normalize-package-bin": "^1.0.0",
+ "read-cmd-shim": "^2.0.0",
+ "rimraf": "^3.0.0",
"write-file-atomic": "^2.3.0"
+ },
+ "dependencies": {
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ }
}
},
"binary-extensions": {
@@ -851,11 +770,6 @@
"readable-stream": "^3.0.1"
}
},
- "bluebird": {
- "version": "3.5.5",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz",
- "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w=="
- },
"boxen": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz",
@@ -917,27 +831,22 @@
"resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz",
"integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og="
},
- "byline": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz",
- "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE="
- },
"byte-size": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz",
"integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw=="
},
"cacache": {
- "version": "15.0.4",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.4.tgz",
- "integrity": "sha512-YlnKQqTbD/6iyoJvEY3KJftjrdBYroCbxxYXzhOzsFLWlp6KX4BOlEf4mTx0cMUfVaTS3ENL2QtDWeRYoGLkkw==",
+ "version": "15.0.5",
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz",
+ "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==",
"requires": {
"@npmcli/move-file": "^1.0.1",
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"glob": "^7.1.4",
"infer-owner": "^1.0.4",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"minipass": "^3.1.1",
"minipass-collect": "^1.0.2",
"minipass-flush": "^1.0.5",
@@ -951,16 +860,6 @@
"unique-filename": "^1.1.1"
},
"dependencies": {
- "chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
- },
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
- },
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -968,19 +867,6 @@
"requires": {
"glob": "^7.1.3"
}
- },
- "tar": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz",
- "integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==",
- "requires": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^3.0.0",
- "minizlib": "^2.1.0",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- }
}
}
},
@@ -1093,9 +979,9 @@
}
},
"chownr": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
- "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw=="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
},
"ci-info": {
"version": "2.0.0",
@@ -1213,12 +1099,12 @@
}
},
"cmd-shim": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz",
- "integrity": "sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-4.0.2.tgz",
+ "integrity": "sha512-yuOHOon6oFX6kcxVl2jIkvPJsQ/yiKp9fd2dnuoBRZB9GEJ3USWAFCIqfB4xmFou93C3MjjhAprcDwrw+O29VA==",
"requires": {
"graceful-fs": "^4.1.2",
- "mkdirp": "~0.5.0"
+ "mkdirp-infer-owner": "^2.0.0"
}
},
"co": {
@@ -1404,31 +1290,6 @@
"safe-buffer": "~5.1.1"
}
},
- "copy-concurrently": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
- "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
- "requires": {
- "aproba": "^1.1.1",
- "fs-write-stream-atomic": "^1.0.8",
- "iferr": "^0.1.5",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.4",
- "run-queue": "^1.0.0"
- },
- "dependencies": {
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
- },
- "iferr": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
- "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE="
- }
- }
- },
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@@ -1788,12 +1649,23 @@
"dev": true
},
"encoding": {
- "version": "0.1.12",
- "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
- "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"optional": true,
"requires": {
- "iconv-lite": "~0.4.13"
+ "iconv-lite": "^0.6.2"
+ },
+ "dependencies": {
+ "iconv-lite": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
+ "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
+ "optional": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ }
+ }
}
},
"end-of-stream": {
@@ -1927,6 +1799,15 @@
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
@@ -2523,16 +2404,6 @@
"minipass": "^3.0.0"
}
},
- "fs-vacuum": {
- "version": "1.2.10",
- "resolved": "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz",
- "integrity": "sha1-t2Kb7AekAxolSP35n17PHMizHjY=",
- "requires": {
- "graceful-fs": "^4.1.2",
- "path-is-inside": "^1.0.1",
- "rimraf": "^2.5.2"
- }
- },
"fs-write-stream-atomic": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
@@ -2634,36 +2505,6 @@
}
}
},
- "gentle-fs": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz",
- "integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==",
- "requires": {
- "aproba": "^1.1.2",
- "chownr": "^1.1.2",
- "cmd-shim": "^3.0.3",
- "fs-vacuum": "^1.2.10",
- "graceful-fs": "^4.1.11",
- "iferr": "^0.1.5",
- "infer-owner": "^1.0.4",
- "mkdirp": "^0.5.1",
- "path-is-inside": "^1.0.2",
- "read-cmd-shim": "^1.0.1",
- "slide": "^1.1.6"
- },
- "dependencies": {
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
- },
- "iferr": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
- "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE="
- }
- }
- },
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
@@ -2830,11 +2671,11 @@
}
},
"hosted-git-info": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.2.tgz",
- "integrity": "sha512-ezZMWtHXm7Eb7Rq4Mwnx2vs79WUx2QmRg3+ZqeGroKzfDO+EprOcgRPYghsOP9JuYBfK18VojmRTGCg8Ma+ktw==",
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.5.tgz",
+ "integrity": "sha512-i4dpK6xj9BIpVOTboXIlKG9+8HMKggcrMX7WA24xZtKwX0TPelq/rbaS5rCKeNX8sJXZJGdSxpnEGtta+wismQ==",
"requires": {
- "lru-cache": "^5.1.1"
+ "lru-cache": "^6.0.0"
}
},
"html-escaper": {
@@ -2928,6 +2769,7 @@
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
+ "dev": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
@@ -3906,18 +3748,11 @@
"integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="
},
"lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
- "yallist": "^3.0.2"
- },
- "dependencies": {
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
+ "yallist": "^4.0.0"
}
},
"make-dir": {
@@ -3935,9 +3770,9 @@
"dev": true
},
"make-fetch-happen": {
- "version": "8.0.7",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.7.tgz",
- "integrity": "sha512-rkDA4c1nMXVqLkfOaM5RK2dxkUndjLOCrPycTDZgbkFDzhmaCO3P1dmCW//yt1I/G1EcedJqMsSjWkV79Hh4hQ==",
+ "version": "8.0.8",
+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.8.tgz",
+ "integrity": "sha512-kILd4WtBFqylc65LRq9sTx/GG0r9yMoomjz9ZMGxzZKWXhnidDhROhnjtZEQDHSWbwQJ5ojI4XZk46DdHwslGg==",
"requires": {
"agentkeepalive": "^4.1.0",
"cacache": "^15.0.0",
@@ -3945,7 +3780,7 @@
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"is-lambda": "^1.0.1",
- "lru-cache": "^5.1.1",
+ "lru-cache": "^6.0.0",
"minipass": "^3.1.3",
"minipass-collect": "^1.0.2",
"minipass-fetch": "^1.1.2",
@@ -4035,9 +3870,9 @@
}
},
"minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"minipass": {
"version": "3.1.3",
@@ -4085,9 +3920,9 @@
}
},
"minipass-pipeline": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz",
- "integrity": "sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.3.tgz",
+ "integrity": "sha512-cFOknTvng5vqnwOpDsZTWhNll6Jf8o2x+/diplafmxpuIymAjzoOolZG0VvQf3V2HgqzJNhnuKHYp2BqDgz8IQ==",
"requires": {
"minipass": "^3.0.0"
}
@@ -4110,12 +3945,9 @@
}
},
"mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "requires": {
- "minimist": "0.0.8"
- }
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
},
"mkdirp-infer-owner": {
"version": "2.0.0",
@@ -4131,31 +3963,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
- },
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
- }
- }
- },
- "move-concurrently": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
- "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
- "requires": {
- "aproba": "^1.1.1",
- "copy-concurrently": "^1.0.0",
- "fs-write-stream-atomic": "^1.0.8",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.5.4",
- "run-queue": "^1.0.3"
- },
- "dependencies": {
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
}
}
},
@@ -4211,9 +4018,9 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"node-gyp": {
- "version": "5.0.7",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.0.7.tgz",
- "integrity": "sha512-K8aByl8OJD51V0VbUURTKsmdswkQQusIvlvmTyhHlIT1hBvaSxzdxpSle857XuXa7uc02UEZx9OR5aDxSWS5Qw==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz",
+ "integrity": "sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw==",
"requires": {
"env-paths": "^2.2.0",
"glob": "^7.1.4",
@@ -4228,6 +4035,11 @@
"which": "^1.3.1"
},
"dependencies": {
+ "chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+ },
"fs-minipass": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
@@ -4243,13 +4055,6 @@
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
- },
- "dependencies": {
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
}
},
"minizlib": {
@@ -4260,6 +4065,14 @@
"minipass": "^2.9.0"
}
},
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
@@ -4277,13 +4090,6 @@
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.3"
- },
- "dependencies": {
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
}
},
"which": {
@@ -4293,6 +4099,11 @@
"requires": {
"isexe": "^2.0.0"
}
+ },
+ "yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
},
@@ -4437,31 +4248,6 @@
"integrity": "sha512-YnHOE4v9LCzRLC5IIsaatKjmqcGh10ksuUYTlU/v6DD5GzxHWCPZWJ+jqZquxxRDFKa7Jka61OD5hDbI1Iq7Ww==",
"dev": true
},
- "npm-lifecycle": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz",
- "integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==",
- "requires": {
- "byline": "^5.0.0",
- "graceful-fs": "^4.1.15",
- "node-gyp": "^5.0.2",
- "resolve-from": "^4.0.0",
- "slide": "^1.1.6",
- "uid-number": "0.0.6",
- "umask": "^1.1.0",
- "which": "^1.3.1"
- },
- "dependencies": {
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "requires": {
- "isexe": "^2.0.0"
- }
- }
- }
- },
"npm-normalize-package-bin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
@@ -4551,13 +4337,13 @@
}
},
"npm-registry-fetch": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-8.1.0.tgz",
- "integrity": "sha512-RkcugRDye2j6yEiHGMyAdKQoipgp8VToSIjm+TFLhVraXOkC/WU2kjE2URcYBpcJ4hs++VFBKo6+Zg4wmrS+Qw==",
+ "version": "8.1.2",
+ "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-8.1.2.tgz",
+ "integrity": "sha512-/m5W4t5xSAO0vwI+nDMh/msTimROztmrQcMxWRoWqWQsNYUavE4zSQCvpfDZb+V6CVs4J2tHvCP0g3me2nNU7w==",
"requires": {
"@npmcli/ci-detect": "^1.0.0",
- "lru-cache": "^5.1.1",
- "make-fetch-happen": "^8.0.7",
+ "lru-cache": "^6.0.0",
+ "make-fetch-happen": "^8.0.8",
"minipass": "^3.1.3",
"minipass-fetch": "^1.1.2",
"minipass-json-stream": "^1.0.1",
@@ -5094,16 +4880,6 @@
"tar": "^6.0.1"
},
"dependencies": {
- "chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
- },
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
- },
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -5482,12 +5258,9 @@
}
},
"read-cmd-shim": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz",
- "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==",
- "requires": {
- "graceful-fs": "^4.1.2"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz",
+ "integrity": "sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw=="
},
"read-installed": {
"version": "4.0.3",
@@ -5699,7 +5472,8 @@
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
},
"restore-cursor": {
"version": "2.0.0",
@@ -5739,21 +5513,6 @@
"integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
"dev": true
},
- "run-queue": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
- "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
- "requires": {
- "aproba": "^1.1.1"
- },
- "dependencies": {
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
- }
- }
- },
"rx-lite": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
@@ -5864,9 +5623,9 @@
"integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw=="
},
"socks": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz",
- "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.4.1.tgz",
+ "integrity": "sha512-8mWHeYC1OA0500qzb+sqwm0Hzi8oBpeuI1JugoBVMEJtJvxSgco8xFSK+NRnZcHeeWjTbF82KUDo5sXH22TY5A==",
"requires": {
"ip": "1.1.5",
"smart-buffer": "^4.1.0"
@@ -5897,47 +5656,6 @@
"resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz",
"integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw="
},
- "sorted-union-stream": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz",
- "integrity": "sha1-x3lMfgd4gAUv9xqNSi27Sppjisc=",
- "requires": {
- "from2": "^1.3.0",
- "stream-iterate": "^1.1.0"
- },
- "dependencies": {
- "from2": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/from2/-/from2-1.3.0.tgz",
- "integrity": "sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0=",
- "requires": {
- "inherits": "~2.0.1",
- "readable-stream": "~1.1.10"
- }
- },
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
- },
- "readable-stream": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- },
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
- }
- }
- },
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -5968,6 +5686,15 @@
"which": "^1.3.0"
},
"dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
@@ -6133,44 +5860,6 @@
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
"dev": true
},
- "stream-iterate": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/stream-iterate/-/stream-iterate-1.2.0.tgz",
- "integrity": "sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE=",
- "requires": {
- "readable-stream": "^2.1.5",
- "stream-shift": "^1.0.0"
- },
- "dependencies": {
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- }
- }
- },
- "stream-shift": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
- "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI="
- },
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
@@ -6277,7 +5966,8 @@
"dependencies": {
"@iarna/cli": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-kfewtgihDKSQVEjn19fXAc7UoomcZ2lm7wNbN22BFRURn5muid79OXUquqdtAdnaulrckZLEObXiYT76ZT1naA==",
"dev": true,
"requires": {
"signal-exit": "^3.0.2"
@@ -6285,12 +5975,14 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
@@ -6299,17 +5991,20 @@
},
"concat-map": {
"version": "0.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"fs.realpath": {
"version": "1.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"glob": {
"version": "7.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -6322,7 +6017,8 @@
},
"inflight": {
"version": "1.0.6",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
@@ -6331,12 +6027,14 @@
},
"inherits": {
"version": "2.0.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"minimatch": {
"version": "3.0.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=",
"dev": true,
"requires": {
"brace-expansion": "^1.0.0"
@@ -6344,12 +6042,14 @@
},
"minimist": {
"version": "0.0.8",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
@@ -6357,7 +6057,8 @@
},
"once": {
"version": "1.4.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
@@ -6365,12 +6066,14 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"rimraf": {
"version": "2.6.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"dev": true,
"requires": {
"glob": "^7.0.5"
@@ -6378,12 +6081,14 @@
},
"signal-exit": {
"version": "3.0.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
},
"wrappy": {
"version": "1.0.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
}
}
@@ -6441,7 +6146,8 @@
"dependencies": {
"@babel/code-frame": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
"dev": true,
"requires": {
"@babel/highlight": "^7.8.3"
@@ -6449,7 +6155,8 @@
},
"@babel/core": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
@@ -6471,14 +6178,16 @@
"dependencies": {
"source-map": {
"version": "0.5.7",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
}
},
"@babel/generator": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3",
@@ -6489,14 +6198,16 @@
"dependencies": {
"source-map": {
"version": "0.5.7",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
}
}
},
"@babel/helper-builder-react-jsx": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3",
@@ -6505,7 +6216,8 @@
},
"@babel/helper-function-name": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==",
"dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.8.3",
@@ -6515,7 +6227,8 @@
},
"@babel/helper-get-function-arity": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3"
@@ -6523,12 +6236,14 @@
},
"@babel/helper-plugin-utils": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==",
"dev": true
},
"@babel/helper-split-export-declaration": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==",
"dev": true,
"requires": {
"@babel/types": "^7.8.3"
@@ -6536,7 +6251,8 @@
},
"@babel/helpers": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==",
"dev": true,
"requires": {
"@babel/template": "^7.8.3",
@@ -6546,7 +6262,8 @@
},
"@babel/highlight": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
@@ -6556,12 +6273,14 @@
},
"@babel/parser": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==",
"dev": true
},
"@babel/plugin-proposal-object-rest-spread": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3",
@@ -6570,7 +6289,8 @@
},
"@babel/plugin-syntax-jsx": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3"
@@ -6578,7 +6298,8 @@
},
"@babel/plugin-syntax-object-rest-spread": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.0"
@@ -6586,7 +6307,8 @@
},
"@babel/plugin-transform-destructuring": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.8.3"
@@ -6594,7 +6316,8 @@
},
"@babel/plugin-transform-react-jsx": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g==",
"dev": true,
"requires": {
"@babel/helper-builder-react-jsx": "^7.8.3",
@@ -6604,7 +6327,8 @@
},
"@babel/runtime": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.2"
@@ -6612,7 +6336,8 @@
},
"@babel/template": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
@@ -6622,7 +6347,8 @@
},
"@babel/traverse": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
@@ -6638,7 +6364,8 @@
},
"@babel/types": {
"version": "7.8.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==",
"dev": true,
"requires": {
"esutils": "^2.0.2",
@@ -6648,17 +6375,20 @@
},
"@types/color-name": {
"version": "1.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
},
"@types/prop-types": {
"version": "15.7.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==",
"dev": true
},
"@types/react": {
"version": "16.9.17",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-UP27In4fp4sWF5JgyV6pwVPAQM83Fj76JOcg02X5BZcpSu5Wx+fP9RMqc2v0ssBoQIFvD5JdKY41gjJJKmw6Bg==",
"dev": true,
"requires": {
"@types/prop-types": "*",
@@ -6667,7 +6397,8 @@
},
"ansi-escapes": {
"version": "4.3.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==",
"dev": true,
"requires": {
"type-fest": "^0.8.1"
@@ -6675,12 +6406,14 @@
},
"ansi-regex": {
"version": "5.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
"version": "3.2.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
@@ -6688,27 +6421,32 @@
},
"ansicolors": {
"version": "0.3.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=",
"dev": true
},
"arrify": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
"dev": true
},
"astral-regex": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"auto-bind": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-v0A231a/lfOo6kxQtmEkdBfTApvC21aJYukA8pkKnoTvVqh3Wmm7/Rwy4GBCHTTHVoLVA5qsBDDvf1XY1nIV2g==",
"dev": true
},
"caller-callsite": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
"dev": true,
"requires": {
"callsites": "^2.0.0"
@@ -6716,7 +6454,8 @@
},
"caller-path": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
"dev": true,
"requires": {
"caller-callsite": "^2.0.0"
@@ -6724,12 +6463,14 @@
},
"callsites": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
"dev": true
},
"cardinal": {
"version": "2.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=",
"dev": true,
"requires": {
"ansicolors": "~0.3.2",
@@ -6738,7 +6479,8 @@
},
"chalk": {
"version": "2.4.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
@@ -6748,12 +6490,14 @@
},
"ci-info": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
"dev": true
},
"cli-cursor": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
"restore-cursor": "^3.1.0"
@@ -6761,7 +6505,8 @@
},
"cli-truncate": {
"version": "2.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
"dev": true,
"requires": {
"slice-ansi": "^3.0.0",
@@ -6770,7 +6515,8 @@
},
"color-convert": {
"version": "1.9.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
@@ -6778,12 +6524,14 @@
},
"color-name": {
"version": "1.1.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"convert-source-map": {
"version": "1.7.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.1"
@@ -6791,19 +6539,22 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
}
}
},
"csstype": {
"version": "2.6.8",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA==",
"dev": true
},
"debug": {
"version": "4.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true,
"requires": {
"ms": "^2.1.1"
@@ -6811,32 +6562,38 @@
},
"emoji-regex": {
"version": "8.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"esprima": {
"version": "4.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true
},
"esutils": {
"version": "2.0.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"events-to-array": {
"version": "1.1.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=",
"dev": true
},
"gensync": {
"version": "1.0.0-beta.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
"dev": true
},
"glob": {
@@ -6855,17 +6612,20 @@
},
"globals": {
"version": "11.12.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true
},
"has-flag": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"import-jsx": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-lTuMdQ/mRXC+xQSGPDvAg1VkODlX78j5hZv2tneJ+zuo7GH/XhUF/YVKoeF382a4jO4GYw9jgganbMhEcxwb0g==",
"dev": true,
"requires": {
"@babel/core": "^7.5.5",
@@ -6878,7 +6638,8 @@
},
"ink": {
"version": "2.6.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-nD/wlSuB6WnFsFB0nUcOJdy28YvvDer3eo+gezjvZqojGA4Rx5sQpacvN//Aai83DRgwrRTyKBl5aciOcfP3zQ==",
"dev": true,
"requires": {
"ansi-escapes": "^4.2.1",
@@ -6903,7 +6664,8 @@
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
@@ -6912,7 +6674,8 @@
},
"chalk": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -6921,7 +6684,8 @@
},
"color-convert": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -6929,17 +6693,20 @@
},
"color-name": {
"version": "1.1.4",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
@@ -6949,7 +6716,8 @@
},
"is-ci": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
"dev": true,
"requires": {
"ci-info": "^2.0.0"
@@ -6957,22 +6725,26 @@
},
"is-fullwidth-code-point": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"js-tokens": {
"version": "4.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
"jsesc": {
"version": "2.5.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
"dev": true
},
"json5": {
"version": "2.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
@@ -6980,17 +6752,20 @@
},
"lodash": {
"version": "4.17.15",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"lodash.throttle": {
"version": "4.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=",
"dev": true
},
"log-update": {
"version": "3.3.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-YSKm5n+YjZoGZT5lfmOqasVH1fIH9xQA9A81Y48nZ99PxAP62vdCCtua+Gcu6oTn0nqtZd/LwRV+Vflo53ZDWA==",
"dev": true,
"requires": {
"ansi-escapes": "^3.2.0",
@@ -7000,17 +6775,20 @@
"dependencies": {
"ansi-escapes": {
"version": "3.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
"dev": true
},
"ansi-regex": {
"version": "4.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"cli-cursor": {
"version": "2.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
"dev": true,
"requires": {
"restore-cursor": "^2.0.0"
@@ -7018,22 +6796,26 @@
},
"emoji-regex": {
"version": "7.0.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"mimic-fn": {
"version": "1.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
"dev": true
},
"onetime": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
"dev": true,
"requires": {
"mimic-fn": "^1.0.0"
@@ -7041,7 +6823,8 @@
},
"restore-cursor": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
"dev": true,
"requires": {
"onetime": "^2.0.0",
@@ -7050,7 +6833,8 @@
},
"string-width": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
"emoji-regex": "^7.0.1",
@@ -7060,7 +6844,8 @@
},
"strip-ansi": {
"version": "5.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -7068,7 +6853,8 @@
},
"wrap-ansi": {
"version": "5.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.0",
@@ -7080,7 +6866,8 @@
},
"loose-envify": {
"version": "1.4.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
@@ -7088,17 +6875,20 @@
},
"mimic-fn": {
"version": "2.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true
},
"minimist": {
"version": "1.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
"minipass": {
"version": "3.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==",
"dev": true,
"requires": {
"yallist": "^4.0.0"
@@ -7106,24 +6896,45 @@
"dependencies": {
"yallist": {
"version": "4.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
}
}
},
"ms": {
"version": "2.1.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"object-assign": {
"version": "4.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"onetime": {
"version": "5.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
"dev": true,
"requires": {
"mimic-fn": "^2.1.0"
@@ -7131,12 +6942,14 @@
},
"path-parse": {
"version": "1.0.6",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"prop-types": {
"version": "15.7.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"dev": true,
"requires": {
"loose-envify": "^1.4.0",
@@ -7146,17 +6959,20 @@
},
"punycode": {
"version": "2.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
"react-is": {
"version": "16.12.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==",
"dev": true
},
"react-reconciler": {
"version": "0.24.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-gAGnwWkf+NOTig9oOowqid9O0HjTDC+XVGBCAmJYYJ2A2cN/O4gDdIuuUQjv8A4v6GDwVfJkagpBBLW5OW9HSw==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
@@ -7167,7 +6983,8 @@
},
"redeyed": {
"version": "2.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=",
"dev": true,
"requires": {
"esprima": "~4.0.0"
@@ -7175,12 +6992,14 @@
},
"regenerator-runtime": {
"version": "0.13.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==",
"dev": true
},
"resolve": {
"version": "1.14.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -7188,12 +7007,14 @@
},
"resolve-from": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
"dev": true
},
"restore-cursor": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
"onetime": "^5.1.0",
@@ -7211,7 +7032,8 @@
},
"scheduler": {
"version": "0.18.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
@@ -7220,17 +7042,20 @@
},
"semver": {
"version": "5.7.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
"signal-exit": {
"version": "3.0.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
},
"slice-ansi": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
@@ -7240,7 +7065,8 @@
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
@@ -7249,7 +7075,8 @@
},
"color-convert": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -7257,14 +7084,16 @@
},
"color-name": {
"version": "1.1.4",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
}
}
},
"string-length": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA==",
"dev": true,
"requires": {
"astral-regex": "^1.0.0",
@@ -7273,17 +7102,20 @@
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"astral-regex": {
"version": "1.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
"dev": true
},
"strip-ansi": {
"version": "5.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
@@ -7293,7 +7125,8 @@
},
"string-width": {
"version": "4.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
@@ -7303,7 +7136,8 @@
},
"strip-ansi": {
"version": "6.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
@@ -7311,7 +7145,8 @@
},
"supports-color": {
"version": "5.5.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
@@ -7319,7 +7154,8 @@
},
"tap-parser": {
"version": "10.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-qdT15H0DoJIi7zOqVXDn9X0gSM68JjNy1w3VemwTJlDnETjbi6SutnqmBfjDJAwkFS79NJ97gZKqie00ZCGmzg==",
"dev": true,
"requires": {
"events-to-array": "^1.0.1",
@@ -7329,7 +7165,8 @@
},
"tap-yaml": {
"version": "1.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==",
"dev": true,
"requires": {
"yaml": "^1.5.0"
@@ -7337,12 +7174,14 @@
},
"to-fast-properties": {
"version": "2.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
"dev": true
},
"treport": {
"version": "1.0.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-QCAbFtzIjQN+9k+alo8e6oo8j0eSLsttdahAgNLoC3U36rls8XRy/R11QOhHmPz7CDcB2ar29eLe4OFJoPnsPA==",
"dev": true,
"requires": {
"cardinal": "^2.1.1",
@@ -7357,7 +7196,8 @@
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
@@ -7366,7 +7206,8 @@
},
"chalk": {
"version": "3.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -7375,7 +7216,8 @@
},
"color-convert": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -7383,17 +7225,20 @@
},
"color-name": {
"version": "1.1.4",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
@@ -7403,12 +7248,14 @@
},
"type-fest": {
"version": "0.8.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
"dev": true
},
"unicode-length": {
"version": "2.0.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-Ph/j1VbS3/r77nhoY2WU0GWGjVYOHL3xpKp0y/Eq2e5r0mT/6b649vm7KFO6RdAdrZkYLdxphYVgvODxPB+Ebg==",
"dev": true,
"requires": {
"punycode": "^2.0.0",
@@ -7417,12 +7264,14 @@
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"strip-ansi": {
"version": "3.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
@@ -7432,7 +7281,8 @@
},
"widest-line": {
"version": "3.1.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
"dev": true,
"requires": {
"string-width": "^4.0.0"
@@ -7440,7 +7290,8 @@
},
"wrap-ansi": {
"version": "6.2.0",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
@@ -7450,7 +7301,8 @@
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
@@ -7459,7 +7311,8 @@
},
"color-convert": {
"version": "2.0.1",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
@@ -7467,7 +7320,8 @@
},
"color-name": {
"version": "1.1.4",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
}
}
@@ -7486,7 +7340,8 @@
},
"yaml": {
"version": "1.7.2",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==",
"dev": true,
"requires": {
"@babel/runtime": "^7.6.3"
@@ -7494,7 +7349,8 @@
},
"yoga-layout-prebuilt": {
"version": "1.9.3",
- "bundled": true,
+ "resolved": false,
+ "integrity": "sha512-9SNQpwuEh2NucU83i2KMZnONVudZ86YNcFk9tq74YaqrQfgJWO3yB9uzH1tAg8iqh5c9F5j0wuyJ2z72wcum2w==",
"dev": true
}
}
@@ -7553,23 +7409,16 @@
}
},
"tar": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.1.tgz",
- "integrity": "sha512-bKhKrrz2FJJj5s7wynxy/fyxpE0CmCjmOQ1KV4KkgXFWOgoIT/NbTMnB1n+LFNrNk0SSBVGGxcK5AGsyC+pW5Q==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz",
+ "integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==",
"requires": {
- "chownr": "^1.1.3",
+ "chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^3.0.0",
"minizlib": "^2.1.0",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
- },
- "dependencies": {
- "mkdirp": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz",
- "integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g=="
- }
}
},
"tar-stream": {
@@ -8118,6 +7967,17 @@
"dev": true,
"requires": {
"mkdirp": "^0.5.1"
+ },
+ "dependencies": {
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ }
}
},
"write-file-atomic": {
diff --git a/package.json b/package.json
index 98af03c68..36c1c2dc6 100644
--- a/package.json
+++ b/package.json
@@ -29,8 +29,8 @@
},
"main": "./lib/npm.js",
"bin": {
- "npm": "./bin/npm-cli.js",
- "npx": "./bin/npx-cli.js"
+ "npm": "bin/npm-cli.js",
+ "npx": "bin/npx-cli.js"
},
"dependencies": {
"@npmcli/arborist": "0.0.1",
@@ -42,15 +42,14 @@
"ansistyles": "~0.1.3",
"aproba": "^2.0.0",
"archy": "~1.0.0",
- "bin-links": "^1.1.7",
+ "bin-links": "^2.1.2",
"byte-size": "^5.0.1",
- "cacache": "^15.0.4",
+ "cacache": "^15.0.5",
"call-limit": "^1.1.1",
- "chownr": "^1.1.3",
+ "chownr": "^2.0.0",
"ci-info": "^2.0.0",
"cli-columns": "^3.1.2",
"cli-table3": "^0.5.1",
- "cmd-shim": "^3.0.3",
"columnify": "~1.5.4",
"config-chain": "^1.1.12",
"detect-indent": "~5.0.0",
@@ -58,13 +57,11 @@
"dezalgo": "~1.0.3",
"editor": "~1.0.0",
"find-npm-prefix": "^1.0.2",
- "fs-vacuum": "~1.2.10",
"fs-write-stream-atomic": "~1.0.10",
- "gentle-fs": "^2.3.0",
"glob": "^7.1.4",
"graceful-fs": "^4.2.3",
"has-unicode": "~2.0.1",
- "hosted-git-info": "^3.0.2",
+ "hosted-git-info": "^3.0.5",
"iferr": "^1.0.2",
"infer-owner": "^1.0.4",
"inflight": "~1.0.6",
@@ -92,23 +89,20 @@
"lodash.union": "~4.6.0",
"lodash.uniq": "~4.5.0",
"lodash.without": "~4.4.0",
- "lru-cache": "^5.1.1",
"meant": "~1.0.1",
- "mkdirp": "~0.5.1",
- "move-concurrently": "^1.0.1",
+ "mkdirp": "^1.0.4",
+ "mkdirp-infer-owner": "^2.0.0",
"ms": "^2.1.2",
- "node-gyp": "^5.0.7",
"nopt": "^4.0.3",
"normalize-package-data": "^2.5.0",
"npm-audit-report": "^2.1.1",
"npm-cache-filename": "~1.0.2",
"npm-install-checks": "^3.0.2",
- "npm-lifecycle": "^3.1.4",
"npm-package-arg": "^8.0.1",
"npm-packlist": "^2.1.0",
"npm-pick-manifest": "^6.1.0",
"npm-profile": "^5.0.1",
- "npm-registry-fetch": "^8.1.0",
+ "npm-registry-fetch": "^8.1.2",
"npm-user-validate": "~1.0.0",
"npmlog": "~4.1.2",
"once": "~1.4.0",
@@ -121,7 +115,6 @@
"query-string": "^6.8.2",
"qw": "~1.0.1",
"read": "~1.0.7",
- "read-cmd-shim": "^1.0.5",
"read-installed": "~4.0.3",
"read-package-json": "^2.1.1",
"read-package-tree": "^5.3.1",
@@ -135,10 +128,9 @@
"sha": "^3.0.0",
"slide": "~1.1.6",
"sorted-object": "~2.0.1",
- "sorted-union-stream": "~2.1.3",
"ssri": "^8.0.0",
"stringify-package": "^1.0.1",
- "tar": "^6.0.1",
+ "tar": "^6.0.2",
"text-table": "~0.2.0",
"tiny-relative-date": "^1.3.0",
"uid-number": "0.0.6",
@@ -162,7 +154,6 @@
"ansistyles",
"aproba",
"archy",
- "bin-links",
"byte-size",
"cacache",
"call-limit",
@@ -170,7 +161,6 @@
"ci-info",
"cli-columns",
"cli-table3",
- "cmd-shim",
"columnify",
"config-chain",
"detect-indent",
@@ -178,9 +168,7 @@
"dezalgo",
"editor",
"find-npm-prefix",
- "fs-vacuum",
"fs-write-stream-atomic",
- "gentle-fs",
"glob",
"graceful-fs",
"has-unicode",
@@ -212,18 +200,14 @@
"lodash.union",
"lodash.uniq",
"lodash.without",
- "lru-cache",
"meant",
"mkdirp",
- "move-concurrently",
"ms",
- "node-gyp",
"nopt",
"normalize-package-data",
"npm-audit-report",
"npm-cache-filename",
"npm-install-checks",
- "npm-lifecycle",
"npm-package-arg",
"npm-packlist",
"npm-pick-manifest",
@@ -255,7 +239,6 @@
"sha",
"slide",
"sorted-object",
- "sorted-union-stream",
"ssri",
"stringify-package",
"tar",
@@ -275,7 +258,6 @@
],
"devDependencies": {
"deep-equal": "^1.0.1",
- "get-stream": "^4.1.0",
"licensee": "^7.0.3",
"marked": "^0.6.3",
"marked-man": "^0.6.0",
diff --git a/test/common-tap.js b/test/common-tap.js
index 9e38c7690..f570cfa6b 100644
--- a/test/common-tap.js
+++ b/test/common-tap.js
@@ -3,7 +3,6 @@
const configCommon = require('./common-config.js')
var fs = require('graceful-fs')
-var readCmdShim = require('read-cmd-shim')
var isWindows = require('../lib/utils/is-windows.js')
var Bluebird = require('bluebird')
@@ -207,14 +206,6 @@ exports.makeGitRepo = function (params, cb) {
chain(commands, cb)
}
-exports.readBinLink = function (path) {
- if (isWindows) {
- return readCmdShim.sync(path)
- } else {
- return fs.readlinkSync(path)
- }
-}
-
exports.skipIfWindows = function (why) {
if (!isWindows) return
if (!why) why = 'this test not available on windows'
diff --git a/test/tap/bin-overwriting.js b/test/tap/bin-overwriting.js
deleted file mode 100644
index faaa78745..000000000
--- a/test/tap/bin-overwriting.js
+++ /dev/null
@@ -1,108 +0,0 @@
-const t = require('tap')
-const common = require('../common-tap.js')
-const pkg = common.pkg
-
-const { writeFileSync, readFileSync, readlink } = require('fs')
-const readCmdShim = require('read-cmd-shim')
-const path = require('path')
-const readBinCb = process.platform === 'win32' ? readCmdShim : readlink
-const readBin = bin => new Promise((resolve, reject) => {
- readBinCb(bin, (er, target) => {
- if (er) {
- reject(er)
- } else {
- resolve(path.resolve(path.dirname(bin), target))
- }
- })
-})
-
-// verify that we can't overwrite bins that we shouldn't be able to
-
-const mkdirp = require('mkdirp').sync
-
-process.env.npm_config_prefix = pkg + '/global'
-process.env.npm_config_global = true
-
-const globalBin = process.platform === 'win32'
- ? path.resolve(pkg, 'global')
- : path.resolve(pkg, 'global/bin')
-
-const globalDir = process.platform === 'win32'
- ? path.resolve(pkg, 'global/node_modules')
- : path.resolve(pkg, 'global/lib/node_modules')
-
-const beep = path.resolve(globalBin, 'beep')
-const firstBin = path.resolve(globalDir, 'first/first.js')
-const secondBin = path.resolve(globalDir, 'second/second.js')
-
-t.test('setup', { bail: true }, t => {
- // set up non-link bin in place
- mkdirp(globalBin)
- writeFileSync(beep, 'beep boop')
-
- // create first package
- mkdirp(pkg + '/first')
- writeFileSync(pkg + '/first/package.json', JSON.stringify({
- name: 'first',
- version: '1.0.0',
- bin: { beep: 'first.js' }
- }))
- writeFileSync(pkg + '/first/first.js', `#!/usr/bin/env node
- console.log('first')`)
-
- // create second package
- mkdirp(pkg + '/second')
- writeFileSync(pkg + '/second/package.json', JSON.stringify({
- name: 'second',
- version: '1.0.0',
- bin: { beep: 'second.js' }
- }))
- writeFileSync(pkg + '/second/second.js', `#!/usr/bin/env node
- console.log('second')`)
-
- // pack both to install globally
- return common.npm(['pack'], { cwd: pkg + '/first' })
- .then(() => common.npm(['pack'], { cwd: pkg + '/second' }))
-})
-
-t.test('installing first fails, because pre-existing bin in place', t => {
- return common.npm([
- 'install',
- pkg + '/first/first-1.0.0.tgz'
- ]).then(([code, stdout, stderr]) => {
- t.notEqual(code, 0)
- t.match(stderr, 'EEXIST')
- t.equal(readFileSync(beep, 'utf8'), 'beep boop')
- })
-})
-
-t.test('installing first with --force succeeds', t => {
- return common.npm([
- 'install',
- pkg + '/first/first-1.0.0.tgz',
- '--force'
- ]).then(() => {
- return t.resolveMatch(readBin(beep), firstBin, 'bin written to first.js')
- })
-})
-
-t.test('installing second fails, because bin links to other package', t => {
- return common.npm([
- 'install',
- pkg + '/second/second-1.0.0.tgz'
- ]).then(([code, stdout, stderr]) => {
- t.notEqual(code, 0)
- t.match(stderr, 'EEXIST')
- return t.resolveMatch(readBin(beep), firstBin, 'bin still linked to first')
- })
-})
-
-t.test('installing second with --force succeeds', t => {
- return common.npm([
- 'install',
- pkg + '/second/second-1.0.0.tgz',
- '--force'
- ]).then(() => {
- return t.resolveMatch(readBin(beep), secondBin, 'bin written to second.js')
- })
-})
diff --git a/test/tap/config-meta.js b/test/tap/config-meta.js
deleted file mode 100644
index 3c03ab816..000000000
--- a/test/tap/config-meta.js
+++ /dev/null
@@ -1,128 +0,0 @@
-// this is a weird meta test. It verifies that all the instances of
-// `npm.config.get(...)` are:
-// a) Simple strings, and not variables
-// b) Documented
-// c) Defined in the `npmconf` package.
-
-var test = require('tap').test
-var fs = require('fs')
-var path = require('path')
-var root = path.resolve(__dirname, '..', '..')
-var lib = path.resolve(root, 'lib')
-var bin = path.resolve(root, 'bin')
-var nm = path.resolve(root, 'node_modules')
-var doc = path.resolve(root, 'docs/content/using-npm/config.md')
-var FILES = []
-var CONFS = {}
-var DOC = {}
-
-var exceptions = [
- path.resolve(lib, 'adduser.js'),
- path.resolve(lib, 'config.js'),
- path.resolve(lib, 'config', 'pacote.js'),
- path.resolve(lib, 'pack.js'),
- path.resolve(lib, 'publish.js'),
- path.resolve(lib, 'install', 'inflate-shrinkwrap.js'),
- path.resolve(lib, 'utils', 'lifecycle.js'),
- path.resolve(lib, 'utils', 'map-to-registry.js'),
- path.resolve(nm, 'npm-registry-client', 'lib', 'publish.js'),
- path.resolve(nm, 'npm-registry-client', 'lib', 'request.js')
-]
-
-test('get files', function (t) {
- walk(nm)
- walk(lib)
- walk(bin)
- t.pass('got files')
- t.end()
-
- function walk (lib) {
- var files = fs.readdirSync(lib).map(function (f) {
- return path.resolve(lib, f)
- })
- files.forEach(function (f) {
- try {
- var s = fs.lstatSync(f)
- } catch (er) {
- return
- }
- if (s.isDirectory()) {
- walk(f)
- } else if (f.match(/\.js$/)) {
- FILES.push(f)
- }
- })
- }
-})
-
-test('get lines', function (t) {
- FILES.forEach(function (f) {
- var lines = fs.readFileSync(f, 'utf8').split(/\r|\n/)
- lines.forEach(function (l, i) {
- var matches = l.split(/conf(?:ig)?\.get\(/g)
- matches.shift()
- matches.forEach(function (m) {
- m = m.split(')').shift()
- var literal = m.match(/^[''].+?['']/)
- if (literal) {
- m = literal[0].slice(1, -1)
- if (!m.match(/^_/) && m !== 'argv') {
- CONFS[m] = {
- file: f,
- line: i
- }
- }
- } else if (exceptions.indexOf(f) === -1 && f.indexOf('.cache') === -1) {
- t.fail('non-string-literal config used in ' + f + ':' + i)
- }
- })
- })
- })
- t.pass('got lines')
- t.end()
-})
-
-test('get docs', function (t) {
- var d = fs.readFileSync(doc, 'utf8').split(/\r|\n/)
- // walk down until the '## Config Settings' section
- for (var i = 0; i < d.length && d[i] !== '### Config Settings'; i++);
- i++
- // now gather up all the ^###\s lines until the next ^##\s
- for (; i < d.length && !d[i].match(/^### /); i++) {
- if (d[i].match(/^#### /)) {
- DOC[ d[i].replace(/^#### /, '').trim() ] = true
- }
- }
- t.pass('read the docs')
- t.end()
-})
-
-test('check configs', function (t) {
- var defs = require('../../lib/config/defaults.js')
- var types = Object.keys(defs.types)
- var defaults = Object.keys(defs.defaults)
- for (var c1 in CONFS) {
- if (CONFS[c1].file.indexOf(lib) === 0) {
- t.ok(DOC[c1], 'should be documented ' + c1 + ' ' +
- CONFS[c1].file + ':' + CONFS[c1].line)
- t.ok(types.indexOf(c1) !== -1, 'should be defined in npmconf ' + c1)
- t.ok(defaults.indexOf(c1) !== -1, 'should have default in npmconf ' + c1)
- }
- }
-
- types.forEach(function (c) {
- if (!c.match(/^_/) && c !== 'argv' && !c.match(/^versions?$/) && c !== 'ham-it-up') {
- t.ok(DOC[c], 'defined type should be documented ' + c)
- // t.ok(CONFS[c], 'defined type should be used ' + c)
- }
- })
-
- defaults.forEach(function (c) {
- if (!c.match(/^_/) && c !== 'argv' && !c.match(/^versions?$/) && c !== 'ham-it-up') {
- t.ok(DOC[c], 'defaulted type should be documented ' + c)
- // t.ok(CONFS[c], 'defaulted type should be used ' + c)
- }
- })
-
- t.end()
-})
diff --git a/test/tap/correct-mkdir.js b/test/tap/correct-mkdir.js
deleted file mode 100644
index 175fb34a0..000000000
--- a/test/tap/correct-mkdir.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* eslint-disable camelcase */
-var t = require('tap')
-var test = t.test
-var assert = require('assert')
-var requireInject = require('require-inject')
-const common = require('../common-tap.js')
-var cache_dir = common.pkg
-common.skipIfWindows('windows does not use correct-mkdir behavior')
-
-test('correct-mkdir: no race conditions', function (t) {
- var mock_fs = {}
- var did_hook = false
- mock_fs.lstat = function (path, cb) {
- if (path === cache_dir) {
- // Return a non-matching owner
- cb(null, {
- uid: +process.getuid() + 1,
- isDirectory: function () {
- return true
- }
- })
- if (!did_hook) {
- did_hook = true
- doHook()
- }
- } else {
- assert.ok(false, 'Unhandled stat path: ' + path)
- }
- }
- var chown_in_progress = 0
- var mock_chownr = function (path, uid, gid, cb) {
- ++chown_in_progress
- process.nextTick(function () {
- --chown_in_progress
- cb(null)
- })
- }
- var mocks = {
- 'graceful-fs': mock_fs,
- 'chownr': mock_chownr,
- 'infer-owner': requireInject('infer-owner', { fs: mock_fs })
- }
- var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
-
- var calls_in_progress = 3
- function handleCallFinish () {
- t.equal(chown_in_progress, 0, 'should not return while chown still in progress')
- if (!--calls_in_progress) {
- t.end()
- }
- }
- function doHook () {
- // This is fired during the first correctMkdir call, after the stat has finished
- // but before the chownr has finished
- // Buggy old code will fail and return a cached value before initial call is done
- correctMkdir(cache_dir, handleCallFinish)
- }
- // Initial call
- correctMkdir(cache_dir, handleCallFinish)
- // Immediate call again in case of race condition there
- correctMkdir(cache_dir, handleCallFinish)
-})
-
-test('correct-mkdir: ignore ENOENTs from chownr', function (t) {
- var mock_fs = {}
- mock_fs.lstat = function (path, cb) {
- if (path === cache_dir) {
- cb(null, {
- isDirectory: function () {
- return true
- }
- })
- } else {
- assert.ok(false, 'Unhandled stat path: ' + path)
- }
- }
- var mock_chownr = function (path, uid, gid, cb) {
- cb(Object.assign(new Error(), {code: 'ENOENT'}))
- }
- var mocks = {
- 'graceful-fs': mock_fs,
- 'chownr': mock_chownr
- }
- var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
-
- function handleCallFinish (err) {
- t.ifErr(err, 'chownr\'s ENOENT errors were ignored')
- t.end()
- }
- correctMkdir(cache_dir, handleCallFinish)
-})
-
-// NEED TO RUN LAST
-
-// These test checks that Windows users are protected by crashes related to
-// unexpectedly having a UID/GID other than 0 if a user happens to add these
-// variables to their environment. There are assumptions in correct-mkdir
-// that special-case Windows by checking on UID-related things.
-test('correct-mkdir: SUDO_UID and SUDO_GID non-Windows', function (t) {
- process.env.SUDO_UID = 999
- process.env.SUDO_GID = 999
- process.getuid = function () { return 0 }
- process.getgid = function () { return 0 }
- var mock_fs = {}
- mock_fs.lstat = function (path, cb) {
- if (path === cache_dir) {
- cb(null, {
- uid: 0,
- isDirectory: function () {
- return true
- }
- })
- } else {
- assert.ok(false, 'Unhandled stat path: ' + path)
- }
- }
- var mock_chownr = function (path, uid, gid, cb) {
- t.is(uid, +process.env.SUDO_UID, 'using the environment\'s UID')
- t.is(gid, +process.env.SUDO_GID, 'using the environment\'s GID')
- cb(null, {})
- }
- var mocks = {
- 'graceful-fs': mock_fs,
- 'chownr': mock_chownr
- }
- var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
-
- function handleCallFinish () {
- t.end()
- }
- correctMkdir(cache_dir, handleCallFinish)
-})
-
-test('correct-mkdir: SUDO_UID and SUDO_GID Windows', function (t) {
- process.env.SUDO_UID = 999
- process.env.SUDO_GID = 999
- delete process.getuid
- delete process.getgid
- var mock_fs = {}
- mock_fs.lstat = function (path, cb) {
- if (path === cache_dir) {
- cb(null, {
- uid: 0,
- isDirectory: function () {
- return true
- }
- })
- } else {
- assert.ok(false, 'Unhandled stat path: ' + path)
- }
- }
- var mock_chownr = function (path, uid, gid, cb) {
- t.fail('chownr should not be called at all on Windows')
- cb(new Error('nope'))
- }
- var mocks = {
- 'graceful-fs': mock_fs,
- 'chownr': mock_chownr
- }
- var correctMkdir = requireInject('../../lib/utils/correct-mkdir.js', mocks)
-
- function handleCallFinish (err) {
- t.ifErr(err, 'chownr was not called because Windows')
- t.end()
- }
- correctMkdir(cache_dir, handleCallFinish)
-})
diff --git a/test/tap/do-not-remove-other-bins.js b/test/tap/do-not-remove-other-bins.js
deleted file mode 100644
index a61404322..000000000
--- a/test/tap/do-not-remove-other-bins.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict'
-var fs = require('fs')
-var path = require('path')
-
-var mkdirp = require('mkdirp')
-var test = require('tap').test
-
-var common = require('../common-tap')
-
-var base = common.pkg
-var installPath = path.resolve(base, 'install')
-var installBin = path.resolve(installPath, 'node_modules', '.bin')
-var packageApath = path.resolve(base, 'packageA')
-var packageBpath = path.resolve(base, 'packageB')
-
-var packageA = {
- name: 'a',
- version: '1.0.0',
- description: 'x',
- repository: 'x',
- license: 'MIT',
- bin: {
- testbin: './testbin.js'
- }
-}
-var packageB = {
- name: 'b',
- version: '1.0.0',
- description: 'x',
- repository: 'x',
- license: 'MIT',
- bin: {
- testbin: './testbin.js'
- }
-}
-
-var EXEC_OPTS = {
- cwd: installPath
-}
-
-test('setup', function (t) {
- mkdirp.sync(path.join(installPath, 'node_modules'))
- mkdirp.sync(packageApath)
- fs.writeFileSync(
- path.join(packageApath, 'package.json'),
- JSON.stringify(packageA, null, 2)
- )
- fs.writeFileSync(
- path.join(packageApath, packageA.bin.testbin),
- ''
- )
- mkdirp.sync(packageBpath)
- fs.writeFileSync(
- path.join(packageBpath, 'package.json'),
- JSON.stringify(packageB, null, 2)
- )
- fs.writeFileSync(
- path.join(packageBpath, packageB.bin.testbin),
- ''
- )
- t.end()
-})
-
-test('npm install A', function (t) {
- process.chdir(installPath)
- common.npm([
- 'install', packageApath
- ], EXEC_OPTS, function (err, code, stdout, stderr) {
- console.log(stdout, stderr)
- t.ifErr(err, 'install finished successfully')
- t.notOk(code, 'exit ok')
- t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
- t.end()
- })
-})
-
-test('npm install B', function (t) {
- process.chdir(installPath)
- common.npm([
- 'install', packageBpath
- ], EXEC_OPTS, function (err, code, stdout, stderr) {
- t.ifErr(err, 'install finished successfully')
- t.notOk(code, 'exit ok')
- t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
- t.end()
- })
-})
-
-test('verify bins', function (t) {
- var bin = path.dirname(
- path.resolve(
- installBin,
- common.readBinLink(path.join(installBin, 'testbin'))))
- t.is(bin, path.join(installPath, 'node_modules', 'b'))
- t.end()
-})
-
-test('rm install A', function (t) {
- process.chdir(installPath)
- common.npm([
- 'rm', packageApath
- ], EXEC_OPTS, function (err, code, stdout, stderr) {
- t.ifErr(err, 'install finished successfully')
- t.notOk(code, 'exit ok')
- t.notOk(stderr, 'Should not get data on stderr: ' + stderr)
- t.end()
- })
-})
-
-test('verify postremoval bins', function (t) {
- var bin = path.dirname(
- path.resolve(
- installBin,
- common.readBinLink(path.join(installBin, 'testbin'))))
- t.is(bin, path.join(installPath, 'node_modules', 'b'))
- t.end()
-})
diff --git a/test/tap/locker.js b/test/tap/locker.js
deleted file mode 100644
index 1df6fda71..000000000
--- a/test/tap/locker.js
+++ /dev/null
@@ -1,77 +0,0 @@
-var test = require('tap').test
-var path = require('path')
-var fs = require('graceful-fs')
-var crypto = require('crypto')
-var mkdirp = require('mkdirp')
-var npm = require('../../')
-var locker = require('../../lib/utils/locker.js')
-var lock = locker.lock
-var unlock = locker.unlock
-
-const common = require('../common-tap.js')
-var pkg = common.pkg
-var cache = path.join(pkg, '/cache')
-var tmp = path.join(pkg, '/tmp')
-var nm = path.join(pkg, '/node_modules')
-
-test('setup', function (t) {
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
- t.end()
-})
-
-test('locking file puts lock in correct place', function (t) {
- npm.load({cache: cache, tmpdir: tmp}, function (er) {
- t.ifError(er, 'npm bootstrapped OK')
-
- var n = 'correct'
- var c = n.replace(/[^a-zA-Z0-9]+/g, '-').replace(/^-+|-+$/g, '')
- var p = path.resolve(nm, n)
- var h = crypto.createHash('sha1').update(p).digest('hex')
- var l = c.substr(0, 24) + '-' + h.substr(0, 16) + '.lock'
- var v = path.join(cache, '_locks', l)
-
- lock(nm, n, function (er) {
- t.ifError(er, 'locked path')
-
- fs.exists(v, function (found) {
- t.ok(found, 'lock found OK')
-
- unlock(nm, n, function (er) {
- t.ifError(er, 'unlocked path')
-
- fs.exists(v, function (found) {
- t.notOk(found, 'lock deleted OK')
- t.end()
- })
- })
- })
- })
- })
-})
-
-test('unlocking out of order errors out', function (t) {
- npm.load({cache: cache, tmpdir: tmp}, function (er) {
- t.ifError(er, 'npm bootstrapped OK')
-
- var n = 'busted'
- var c = n.replace(/[^a-zA-Z0-9]+/g, '-').replace(/^-+|-+$/g, '')
- var p = path.resolve(nm, n)
- var h = crypto.createHash('sha1').update(p).digest('hex')
- var l = c.substr(0, 24) + '-' + h.substr(0, 16) + '.lock'
- var v = path.join(cache, '_locks', l)
-
- fs.exists(v, function (found) {
- t.notOk(found, 'no lock to unlock')
-
- t.throws(function () {
- unlock(nm, n, function () {
- t.fail("shouldn't get here")
- t.end()
- })
- }, 'blew up as expected')
-
- t.end()
- })
- })
-})
diff --git a/test/tap/verify-no-lifecycle-on-repo.js b/test/tap/verify-no-lifecycle-on-repo.js
deleted file mode 100644
index c9232715a..000000000
--- a/test/tap/verify-no-lifecycle-on-repo.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict'
-var path = require('path')
-var fs = require('graceful-fs')
-var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
-var test = require('tap').test
-var requireInject = require('require-inject')
-const common = require('../common-tap.js')
-
-var base = common.pkg
-
-var baseJSON = {
- name: 'base',
- version: '1.0.0',
- repository: {
- type: 'git',
- url: 'http://example.com'
- },
- scripts: {
- prepublish: 'false'
- }
-}
-
-var lastOpened
-var npm = requireInject.installGlobally('../../lib/npm.js', {
- '../../lib/utils/lifecycle.js': function (pkg, stage, wd, moreOpts, cb) {
- if (typeof moreOpts === 'function') {
- cb = moreOpts
- }
-
- cb(new Error("Shouldn't be calling lifecycle scripts"))
- },
- opener: function (url, options, cb) {
- lastOpened = {url: url, options: options}
- cb()
- }
-})
-
-test('setup', function (t) {
- cleanup()
- setup()
- t.end()
-})
-
-test('repo', function (t) {
- process.chdir(base)
- npm.load({browser: 'echo'}, function () {
- npm.commands.repo([], function (err) {
- t.ifError(err, 'no errors')
- t.match(lastOpened.url, baseJSON.repository.url, 'opened the right url')
- t.is(lastOpened.options.command, 'echo', 'opened with a specified browser')
- t.end()
- })
- })
-})
-
-test('cleanup', function (t) {
- cleanup()
- t.end()
-})
-
-function saveJson (pkgPath, json) {
- mkdirp.sync(pkgPath)
- fs.writeFileSync(path.join(pkgPath, 'package.json'), JSON.stringify(json, null, 2))
-}
-
-function setup () {
- saveJson(base, baseJSON)
-}
-
-function cleanup () {
- rimraf.sync(base)
-}